本文整理汇总了C++中QLCChannel::getIconFromGroup方法的典型用法代码示例。如果您正苦于以下问题:C++ QLCChannel::getIconFromGroup方法的具体用法?C++ QLCChannel::getIconFromGroup怎么用?C++ QLCChannel::getIconFromGroup使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QLCChannel
的用法示例。
在下文中一共展示了QLCChannel::getIconFromGroup方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: updateModeItem
void QLCFixtureEditor::updateModeItem(const QLCFixtureMode* mode,
QTreeWidgetItem* item)
{
Q_ASSERT(mode != NULL);
Q_ASSERT(item != NULL);
item->setText(MODE_COL_NAME, mode->name());
item->setData(MODE_COL_NAME, PROP_PTR, (qulonglong) mode);
item->setText(MODE_COL_CHS, QString::number(mode->channels().size()));
if (mode->heads().size() > 0)
item->setText(MODE_COL_HEAD, QString::number(mode->heads().size()));
else
item->setText(MODE_COL_HEAD, QString());
/* Destroy the existing list of children */
QList <QTreeWidgetItem*> children(item->takeChildren());
foreach (QTreeWidgetItem* child, children)
delete child;
/* Put all mode channels as non-selectable sub items */
for (int i = 0; i < mode->channels().size(); i++)
{
QLCChannel* ch = mode->channel(i);
Q_ASSERT(ch != NULL);
QTreeWidgetItem* chitem = new QTreeWidgetItem(item);
chitem->setText(MODE_COL_NAME, ch->name());
chitem->setIcon(MODE_COL_NAME, ch->getIconFromGroup(ch->group()));
chitem->setText(MODE_COL_CHS, QString("%1").arg(i + 1));
chitem->setFlags(0); /* No selection etc. */
}
}