本文整理汇总了C++中PluginManager::shortName方法的典型用法代码示例。如果您正苦于以下问题:C++ PluginManager::shortName方法的具体用法?C++ PluginManager::shortName怎么用?C++ PluginManager::shortName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PluginManager
的用法示例。
在下文中一共展示了PluginManager::shortName方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: newProfile
/**
* initizialises the default options for a new profile
*/
bool PsiOptions::newProfile()
{
bool ok = true;
if (!load(":/options/newprofile.xml")) {
ok = false;
}
StatusPreset(tr("Away from desk"),
tr("I am away from my desk. Leave a message."),
XMPP::Status::Away
).toOptions(this);
StatusPreset(tr("Showering"),
tr("I'm in the shower. You'll have to wait for me to get out."),
XMPP::Status::Away
).toOptions(this);
StatusPreset(tr("Eating"),
tr("Out eating. Mmmm.. food."),
XMPP::Status::Away
).toOptions(this);
StatusPreset(tr("Sleep"),
tr("Sleep is good. Zzzzz"),
XMPP::Status::DND
).toOptions(this);
StatusPreset(tr("Work"),
tr("Can't chat. Gotta work."),
XMPP::Status::DND
).toOptions(this);
StatusPreset(tr("Air"),
tr("Stepping out to get some fresh air."),
XMPP::Status::Away
).toOptions(this);
StatusPreset(tr("Movie"),
tr("Out to a movie. Is that OK with you?"),
XMPP::Status::Away
).toOptions(this);
StatusPreset(tr("Secret"),
tr("I'm not available right now and that's all you need to know."),
XMPP::Status::XA
).toOptions(this);
StatusPreset(tr("Out for the night"),
tr("Out for the night."),
XMPP::Status::Away
).toOptions(this);
StatusPreset(tr("Greece"),
tr("I have gone to a far away place. I will be back someday!"),
XMPP::Status::XA
).toOptions(this);
{
QStringList pluginsKeys;
#ifdef PSI_PLUGINS
PluginManager *pm = PluginManager::instance();
QStringList plugins = pm->availablePlugins();
foreach (const QString &plugin, plugins) {
pluginsKeys << pm->shortName(plugin) + "-plugin";
}
#endif
ToolbarPrefs chatToolbar;
chatToolbar.on = true;
chatToolbar.name = "Chat";
chatToolbar.keys << "chat_clear" << "chat_find" << "chat_html_text" << "chat_add_contact";
chatToolbar.keys += pluginsKeys;
chatToolbar.keys << "spacer" << "chat_icon" << "chat_file"
<< "chat_pgp" << "chat_info" << "chat_history" << "chat_voice"
<< "chat_active_contacts";
ToolbarPrefs groupchatToolbar;
groupchatToolbar.on = true;
groupchatToolbar.name = "Groupchat";
groupchatToolbar.keys << "gchat_clear" << "gchat_find" << "gchat_html_text" << "gchat_configure";
groupchatToolbar.keys += pluginsKeys;
groupchatToolbar.keys << "spacer" << "gchat_icon" ;
ToolbarPrefs buttons;
buttons.name = tr("Buttons");
#ifndef Q_OS_MAC
buttons.on = true;
#endif
buttons.keys << "button_options" << "button_status";
buttons.dock = Qt3Dock_Bottom;
ToolbarPrefs showContacts;
showContacts.name = tr("Show contacts");
showContacts.keys << "show_offline" << "show_hidden" << "show_agents" << "show_self" << "show_statusmsg";
ToolbarPrefs eventNotifier;
eventNotifier.name = tr("Event notifier");
eventNotifier.keys << "event_notifier";
eventNotifier.dock = Qt3Dock_Bottom;
QList<ToolbarPrefs> toolbars;
toolbars << chatToolbar
<< groupchatToolbar
<< buttons
<< showContacts
<< eventNotifier;
foreach(ToolbarPrefs tb, toolbars) {
tb.locked = true;
//.........这里部分代码省略.........