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


C++ QLCFixtureDef::setAuthor方法代码示例

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


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

示例1: QLCFixtureDef

QLCFixtureDef *Fixture::genericDimmerDef(int channels)
{
    QLCFixtureDef *def = new QLCFixtureDef();
    def->setManufacturer(KXMLFixtureGeneric);
    def->setModel(KXMLFixtureGeneric);
    def->setType(QLCFixtureDef::Dimmer);
    def->setAuthor("QLC+");

    for (int i = 0; i < channels; i++)
    {
        QLCChannel *intensity = new QLCChannel();
        intensity->setGroup(QLCChannel::Intensity);
        intensity->setName(tr("Dimmer #%1").arg(i + 1));
        intensity->addCapability(new QLCCapability(0, UCHAR_MAX, tr("Intensity")));
        def->addChannel(intensity);
    }

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

示例2: if

QLCFixtureDef *Fixture::genericRGBPanelDef(int columns, Components components)
{
    QLCFixtureDef *def = new QLCFixtureDef();
    def->setManufacturer(KXMLFixtureGeneric);
    def->setModel(KXMLFixtureRGBPanel);
    def->setType("LED Bar");
    def->setAuthor("QLC+");
    for (int i = 0; i < columns; i++)
    {
        QLCChannel* red = new QLCChannel();
        red->setName(QString("Red %1").arg(i + 1));
        red->setGroup(QLCChannel::Intensity);
        red->setColour(QLCChannel::Red);

        QLCChannel* green = new QLCChannel();
        green->setName(QString("Green %1").arg(i + 1));
        green->setGroup(QLCChannel::Intensity);
        green->setColour(QLCChannel::Green);

        QLCChannel* blue = new QLCChannel();
        blue->setName(QString("Blue %1").arg(i + 1));
        blue->setGroup(QLCChannel::Intensity);
        blue->setColour(QLCChannel::Blue);

        if (components == BGR)
        {
            def->addChannel(blue);
            def->addChannel(green);
            def->addChannel(red);
        }
        else if (components == RGBW)
        {
            QLCChannel* white = new QLCChannel();
            white->setName(QString("White %1").arg(i + 1));
            white->setGroup(QLCChannel::Intensity);
            white->setColour(QLCChannel::White);

            def->addChannel(red);
            def->addChannel(green);
            def->addChannel(blue);
            def->addChannel(white);
        }
        else if (components == RGBWW)
        {
            QLCChannel* white = new QLCChannel();
            white->setName(QString("Warm White %1").arg(i + 1));
            white->setGroup(QLCChannel::Intensity);
            white->setColour(QLCChannel::White);

            QLCChannel* white2 = new QLCChannel();
            white2->setName(QString("Cold White %1").arg(i + 1));
            white2->setGroup(QLCChannel::Intensity);
            white2->setColour(QLCChannel::White);

            def->addChannel(red);
            def->addChannel(green);
            def->addChannel(blue);
            def->addChannel(white);
            def->addChannel(white2);
        }
        else
        {
            def->addChannel(red);
            def->addChannel(green);
            def->addChannel(blue);
        }
    }

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


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