本文整理汇总了C++中Capability::name方法的典型用法代码示例。如果您正苦于以下问题:C++ Capability::name方法的具体用法?C++ Capability::name怎么用?C++ Capability::name使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Capability
的用法示例。
在下文中一共展示了Capability::name方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: slotValueChanged
void EditSceneValue::slotValueChanged(int value)
{
if (m_updateValue == false)
{
return;
}
m_updateValue = false;
Capability* c = m_channel->searchCapability(value);
ASSERT(c != NULL);
for (int i = 0; i < m_presetCombo->count(); i++)
{
if (m_presetCombo->text(i) == c->name())
{
m_presetCombo->setCurrentItem(i);
break;
}
}
m_value = value;
m_updateValue = true;
}
示例2: handle_capability
static void handle_capability (const Capability &desc,
::Deployment::Capability &toconfig)
{
DANCE_TRACE ("Capability_Handler::get_capability");
toconfig.name = ACE_TEXT_ALWAYS_CHAR ( desc.name ().c_str ());
toconfig.resourceType.length (desc.count_resourceType ());
std::for_each (desc.begin_resourceType (),
desc.end_resourceType (),
String_Seq_Functor (toconfig.resourceType));
toconfig.property.length (desc.count_property ());
std::for_each (desc.begin_property (),
desc.end_property (),
SatisfierProperty_Functor (toconfig.property));
}
示例3: invokePresetMenu
void AdvancedSceneEditor::invokePresetMenu(const QPoint &pos)
{
QPopupMenu* menu = new QPopupMenu;
menu->insertItem("Preset");
menu->insertSeparator();
int i = 0;
for (Capability* c = m_currentChannel->capabilities()->first(); c != NULL;
c = m_currentChannel->capabilities()->next())
{
menu->insertItem(c->name(), i++);
}
if (i > 0)
{
connect(menu, SIGNAL(activated(int)), this, SLOT(slotPresetMenuActivated(int)));
}
示例4: contextMenuEvent
void ConsoleChannel::contextMenuEvent(QContextMenuEvent* e)
{
QString s;
QString t;
Capability* c = NULL;
Device* device = _app->doc()->device(m_deviceID);
assert(device);
LogicalChannel* ch = device->deviceClass()->channels()->at(m_channel);
QPopupMenu* menu = new QPopupMenu();
menu->insertItem(ch->name(), KMenuTitle);
menu->setItemEnabled(KMenuTitle, false);
menu->insertSeparator();
QPtrListIterator<Capability> it(*ch->capabilities());
QPopupMenu* valueMenu = NULL;
while (it.current())
{
c = it.current();
// Set the value range and name as menu item's name
s.sprintf("%.3d - %.3d:", c->lo(), c->hi());
s += c->name();
// Create a submenu for ranges that contain more than one value
if (c->hi() - c->lo() > 0)
{
valueMenu = new QPopupMenu(menu);
connect(valueMenu, SIGNAL(activated(int)),
this, SLOT(slotContextMenuActivated(int)));
for (int i = c->lo(); i <= c->hi(); i++)
{
t.sprintf("%.3d", i);
valueMenu->insertItem(t, i);
}
menu->insertItem(s, valueMenu);
}
else
{
示例5: if
EditSceneValue::EditSceneValue(QWidget* parent, LogicalChannel* ch,
SceneValue ¤tValue)
: UI_EditSceneValue(parent, "", true)
{
ASSERT(ch != NULL);
m_channel = ch;
m_updateValue = true;
for (Capability* c = m_channel->capabilities()->first();
c != NULL; c = m_channel->capabilities()->next())
{
m_presetCombo->insertItem(c->name());
}
m_typeCombo->insertItem("Fade");
m_typeCombo->insertItem("Set");
m_typeCombo->insertItem("NoSet");
if (currentValue.type == Scene::Fade)
{
m_typeCombo->setCurrentItem(0);
m_type = QString("Fade");
}
else if (currentValue.type == Scene::Set)
{
m_typeCombo->setCurrentItem(1);
m_type = QString("Set");
}
else
{
m_typeCombo->setCurrentItem(2);
m_type = QString("NoSet");
}
connect(m_valueSpin, SIGNAL(valueChanged(int)),
this, SLOT(slotValueChanged(int)));
connect(m_presetCombo, SIGNAL(activated(const QString &)),
this, SLOT(slotPresetComboActivated(const QString &)));
m_valueSpin->setValue(currentValue.value);
m_value = currentValue.value;
}