本文整理汇总了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;
}
示例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;
}