本文整理汇总了C++中Launcher::rules方法的典型用法代码示例。如果您正苦于以下问题:C++ Launcher::rules方法的具体用法?C++ Launcher::rules怎么用?C++ Launcher::rules使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Launcher
的用法示例。
在下文中一共展示了Launcher::rules方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: kickoffConfiguration
//.........这里部分代码省略.........
for (int i = 0; i < currentEntries.count(); ++i)
{
QListWidgetItem *item = NULL;
if (currentEntries.at(i) == "tasks")
{
item = new QListWidgetItem(i18n("--- tasks area ---"), m_arrangementUi.currentEntriesListWidget);
}
else if (currentEntries.at(i) == "jobs")
{
item = new QListWidgetItem(i18n("--- jobs area ---"), m_arrangementUi.currentEntriesListWidget);
}
else if (currentEntries.at(i) == "separator")
{
item = new QListWidgetItem(i18n("--- separator ---"), m_arrangementUi.currentEntriesListWidget);
}
else
{
if (hasEntry(currentEntries.at(i), false))
{
continue;
}
Launcher *launcher = m_applet->launcherForUrl(KUrl(currentEntries.at(i)));
if (!launcher)
{
continue;
}
item = new QListWidgetItem(launcher->icon(), launcher->title(), m_arrangementUi.currentEntriesListWidget);
item->setToolTip(launcher->launcherUrl().pathOrUrl());
m_rules[launcher->launcherUrl().pathOrUrl()] = qMakePair(launcher->rules(), launcher->isExcluded());
}
m_arrangementUi.currentEntriesListWidget->addItem(item);
}
for (int i = 0; i < availableEntries.count(); ++i)
{
if (i > 0 && hasEntry(availableEntries.at(i), false))
{
continue;
}
QListWidgetItem *item = NULL;
if (availableEntries.at(i).startsWith("--- "))
{
item = new QListWidgetItem(availableEntries.at(i), m_arrangementUi.availableEntriesListWidget);
}
else
{
Launcher *launcher = m_applet->launcherForUrl(KUrl(availableEntries.at(i)));
if (!launcher)
{
continue;
}
item = new QListWidgetItem(launcher->icon(), launcher->title(), m_arrangementUi.availableEntriesListWidget);
item->setToolTip(launcher->launcherUrl().pathOrUrl());
m_rules[launcher->launcherUrl().pathOrUrl()] = qMakePair(launcher->rules(), launcher->isExcluded());
}