当前位置: 首页>>代码示例>>C++>>正文


C++ QLCPhysical::setDepth方法代码示例

本文整理汇总了C++中QLCPhysical::setDepth方法的典型用法代码示例。如果您正苦于以下问题:C++ QLCPhysical::setDepth方法的具体用法?C++ QLCPhysical::setDepth怎么用?C++ QLCPhysical::setDepth使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在QLCPhysical的用法示例。


在下文中一共展示了QLCPhysical::setDepth方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: QLCFixtureMode

QLCFixtureMode *Fixture::genericDimmerMode(QLCFixtureDef *def, int channels)
{
    Q_ASSERT(def != NULL);
    QLCFixtureMode *mode = new QLCFixtureMode(def);

    mode->setName(QString("%1 Channel").arg(channels));
    QList<QLCChannel *>chList = def->channels();
    for (int i = 0; i < chList.count(); i++)
    {
        QLCChannel *ch = chList.at(i);
        mode->insertChannel(ch, i);
        QLCFixtureHead head;
        head.addChannel(i);
        mode->insertHead(-1, head);
    }

    QLCPhysical physical;
    physical.setWidth(300 * channels);
    physical.setHeight(300);
    physical.setDepth(300);

    mode->setPhysical(physical);
    def->addMode(mode);

    return mode;
}
开发者ID:ming-hai,项目名称:qlcplus,代码行数:26,代码来源:fixture.cpp

示例2: accept

void EditMode::accept()
{
	QLCPhysical physical = m_mode->physical();

	physical.setBulbType(m_bulbTypeCombo->currentText());
	physical.setBulbLumens(m_bulbLumensSpin->value());
	physical.setBulbColourTemperature(m_bulbTempCombo->currentText().toInt());
	physical.setWeight(m_weightSpin->value());
	physical.setWidth(m_widthSpin->value());
	physical.setHeight(m_heightSpin->value());
	physical.setDepth(m_depthSpin->value());
	physical.setLensName(m_lensNameCombo->currentText());
	physical.setLensDegreesMin(m_lensDegreesMinSpin->value());
	physical.setLensDegreesMax(m_lensDegreesMaxSpin->value());
	physical.setFocusType(m_focusTypeCombo->currentText());
	physical.setFocusPanMax(m_panMaxSpin->value());
	physical.setFocusTiltMax(m_tiltMaxSpin->value());
	physical.setPowerConsumption(m_powerConsumptionSpin->value());
	physical.setDmxConnector(m_dmxConnectorCombo->currentText());

	m_mode->setPhysical(physical);
	m_mode->setName(m_modeNameEdit->text());

	QDialog::accept();
}
开发者ID:speakman,项目名称:qlc,代码行数:25,代码来源:editmode.cpp

示例3: if

QLCFixtureMode *Fixture::genericRGBPanelMode(QLCFixtureDef *def, Components components, quint32 width, quint32 height)
{
    Q_ASSERT(def != NULL);
    QLCFixtureMode *mode = new QLCFixtureMode(def);
    int compNum = 3;
    if (components == BGR)
    {
        mode->setName("BGR");
    }
    else if (components == RGBW)
    {
        mode->setName("RGBW");
        compNum = 4;
    }
    else if (components == RGBWW)
    {
        mode->setName("RGBWW");
        compNum = 5;
    }
    else
        mode->setName("RGB");

    QList<QLCChannel *>channels = def->channels();
    for (int i = 0; i < channels.count(); i++)
    {
        QLCChannel *ch = channels.at(i);
        mode->insertChannel(ch, i);
        if (i%compNum == 0)
        {
            QLCFixtureHead head;
            head.addChannel(i);
            head.addChannel(i+1);
            head.addChannel(i+2);
            if (components == RGBW)
                head.addChannel(i+3);
            else if (components == RGBWW)
            {
                head.addChannel(i+3);
                head.addChannel(i+4);
            }
            mode->insertHead(-1, head);
        }
    }
    QLCPhysical physical;
    physical.setWidth(width);
    physical.setHeight(height);
    physical.setDepth(height);

    mode->setPhysical(physical);

    return mode;
}
开发者ID:offtools,项目名称:qlcplus,代码行数:52,代码来源:fixture.cpp

示例4: slotDepthChanged

void EditMode::slotDepthChanged(int depth)
{
	QLCPhysical physical = m_mode->physical();
	physical.setDepth(depth);
	m_mode->setPhysical(physical);
}
开发者ID:speakman,项目名称:qlc,代码行数:6,代码来源:editmode.cpp


注:本文中的QLCPhysical::setDepth方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。