本文整理汇总了C++中KAction::setHelpText方法的典型用法代码示例。如果您正苦于以下问题:C++ KAction::setHelpText方法的具体用法?C++ KAction::setHelpText怎么用?C++ KAction::setHelpText使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KAction
的用法示例。
在下文中一共展示了KAction::setHelpText方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: KAction
KNotesPlugin::KNotesPlugin( KontactInterface::Core *core, const QVariantList & )
: KontactInterface::Plugin( core, core, "knotes" ), mAboutData( 0 )
{
setComponentData( KontactPluginFactory::componentData() );
KAction *action =
new KAction( KIcon( "knotes" ),
i18nc( "@action:inmenu", "New Popup Note..." ), this );
actionCollection()->addAction( "new_note", action );
connect( action, SIGNAL(triggered(bool)), SLOT(slotNewNote()) );
action->setShortcut( QKeySequence( Qt::CTRL + Qt::SHIFT + Qt::Key_N ) );
action->setHelpText(
i18nc( "@info:status", "Create new popup note" ) );
action->setWhatsThis(
i18nc( "@info:whatsthis",
"You will be presented with a dialog where you can create a new popup note." ) );
insertNewAction( action );
KAction *syncAction =
new KAction( KIcon( "view-refresh" ),
i18nc( "@action:inmenu", "Sync Popup Notes" ), this );
actionCollection()->addAction( "knotes_sync", syncAction );
connect( syncAction, SIGNAL(triggered(bool)), SLOT(slotSyncNotes()) );
syncAction->setHelpText(
i18nc( "@info:status", "Synchronize groupware notes" ) );
syncAction->setWhatsThis(
i18nc( "@info:whatsthis",
"Choose this option to synchronize your groupware notes." ) );
insertSyncAction( syncAction );
}
示例2: KAction
KJotsPlugin::KJotsPlugin( KontactInterface::Core *core, const QVariantList & )
: KontactInterface::Plugin( core, core, "kjots" ), m_interface( 0 )
{
setComponentData( KontactPluginFactory::componentData() );
KAction *action =
new KAction( KIcon( "document-new" ),
i18nc( "@action:inmenu", "New KJots Page" ), this );
actionCollection()->addAction( "new_kjots_page", action );
action->setShortcut( QKeySequence( Qt::CTRL + Qt::SHIFT + Qt::Key_P ) );
action->setHelpText(
i18nc( "@info:status", "Create a new jots page" ) );
action->setWhatsThis(
i18nc( "@info:whatsthis",
"You will be presented with a dialog where you can create a new jots page." ) );
connect( action, SIGNAL(triggered(bool)), SLOT( newPage()) );
insertNewAction( action );
action = new KAction( KIcon( "address-book-new" ),
i18nc( "@action:inmenu", "New KJots Book" ), this );
actionCollection()->addAction( "new_kjots_book", action );
action->setShortcut( QKeySequence( Qt::CTRL + Qt::SHIFT + Qt::Key_B ) );
action->setHelpText(
i18nc( "@info:status", "Create a new jots book" ) );
action->setWhatsThis(
i18nc( "@info:whatsthis",
"You will be presented with a dialog where you can create a new jots book." ) );
connect( action, SIGNAL(triggered(bool)), SLOT( newBook()) );
insertNewAction( action );
mUniqueAppWatcher = new KontactInterface::UniqueAppWatcher(
new KontactInterface::UniqueAppHandlerFactory<KJotsUniqueAppHandler>(), this );
}
示例3: KAction
TodoPlugin::TodoPlugin( KontactInterface::Core *core, const QVariantList & )
: KontactInterface::Plugin( core, core, "korganizer", "todo" ), mIface( 0 )
{
setComponentData( KontactPluginFactory::componentData() );
KIconLoader::global()->addAppDir( "korganizer" );
KIconLoader::global()->addAppDir( "kdepim" );
KAction *action =
new KAction( KIcon( "task-new" ),
i18nc( "@action:inmenu", "New To-do..." ), this );
actionCollection()->addAction( "new_todo", action );
action->setShortcut( QKeySequence( Qt::CTRL + Qt::SHIFT + Qt::Key_T ) );
action->setHelpText(
i18nc( "@info:status", "Create a new to-do" ) );
action->setWhatsThis(
i18nc( "@info:whatsthis",
"You will be presented with a dialog where you can create a new to-do item." ) );
connect( action, SIGNAL(triggered(bool)), SLOT(slotNewTodo()) );
insertNewAction( action );
KAction *syncAction =
new KAction( KIcon( "view-refresh" ),
i18nc( "@action:inmenu", "Sync To-do List" ), this );
syncAction->setHelpText(
i18nc( "@info:status", "Synchronize groupware to-do list" ) );
syncAction->setWhatsThis(
i18nc( "@info:whatsthis",
"Choose this option to synchronize your groupware to-do list." ) );
connect( syncAction, SIGNAL(triggered(bool)), SLOT(slotSyncTodos()) );
insertSyncAction( syncAction );
mUniqueAppWatcher = new KontactInterface::UniqueAppWatcher(
new KontactInterface::UniqueAppHandlerFactory<KOrganizerUniqueAppHandler>(), this );
}
示例4: setupKAction
KAction* Player::setupKAction(const char *icon, QString text, QString help_text, const char *name) {
KAction* action = new KAction(this);
action->setIcon(KIcon(icon));
action->setText(text);
action->setHelpText(help_text);
actionCollection()->addAction(name, action);
return action;
}
示例5: KAction
CoisceimPlugin::CoisceimPlugin( KontactInterface::Core *core, const QVariantList & )
: KontactInterface::Plugin( core, core, "coisceim" ), m_interface( 0 )
{
setComponentData( KontactPluginFactory::componentData() );
KAction *action =
new KAction( KIcon( "byobu" ),
i18nc( "@action:inmenu", "New Trip" ), this );
actionCollection()->addAction( "new_trip", action );
action->setHelpText(
i18nc( "@info:status", "Create a new trip" ) );
connect( action, SIGNAL(triggered(bool)), SLOT(createTrip()) );
insertNewAction( action );
mUniqueAppWatcher = new KontactInterface::UniqueAppWatcher(
new KontactInterface::UniqueAppHandlerFactory<CoisceimUniqueAppHandler>(), this );
}
示例6: setupActions
void MainWindow::setupActions()
{
KAction *newDownloadAction = actionCollection()->addAction("new_download");
newDownloadAction->setText(i18n("&New Download..."));
newDownloadAction->setIcon(KIcon("document-new"));
newDownloadAction->setShortcuts(KShortcut("Ctrl+N"));
newDownloadAction->setHelpText(i18n("Opens a dialog to add a transfer to the list"));
connect(newDownloadAction, SIGNAL(triggered()), SLOT(slotNewTransfer()));
KAction *openAction = actionCollection()->addAction("import_transfers");
openAction->setText(i18n("&Import Transfers..."));
openAction->setIcon(KIcon("document-open"));
openAction->setShortcuts(KShortcut("Ctrl+I"));
openAction->setHelpText(i18n("Imports a list of transfers"));
connect(openAction, SIGNAL(triggered()), SLOT(slotImportTransfers()));
KAction *exportAction = actionCollection()->addAction("export_transfers");
exportAction->setText(i18n("&Export Transfers List..."));
exportAction->setIcon(KIcon("document-export"));
exportAction->setShortcuts(KShortcut("Ctrl+E"));
exportAction->setHelpText(i18n("Exports the current transfers into a file"));
connect(exportAction, SIGNAL(triggered()), SLOT(slotExportTransfers()));
KAction *createMetalinkAction = actionCollection()->addAction("create_metalink");
createMetalinkAction->setText(i18n("&Create a Metalink..."));
createMetalinkAction->setIcon(KIcon("journal-new"));
createMetalinkAction->setHelpText(i18n("Creates or modifies a metalink and saves it on disk"));
connect(createMetalinkAction, SIGNAL(triggered()), SLOT(slotCreateMetalink()));
KAction *priorityTop = actionCollection()->addAction("priority_top");
priorityTop->setText(i18n("Top Priority"));
priorityTop->setIcon(KIcon("arrow-up-double"));
priorityTop->setShortcuts(KShortcut("Ctrl+PgUp"));
priorityTop->setHelpText(i18n("Download selected transfer first"));
connect(priorityTop, SIGNAL(triggered()), this, SLOT(slotPriorityTop()));
KAction *priorityBottom = actionCollection()->addAction("priority_bottom");
priorityBottom->setText(i18n("Least Priority"));
priorityBottom->setIcon(KIcon("arrow-down-double"));
priorityBottom->setShortcuts(KShortcut("Ctrl+PgDown"));
priorityBottom->setHelpText(i18n("Download selected transfer last"));
connect(priorityBottom, SIGNAL(triggered()), this, SLOT(slotPriorityBottom()));
KAction *priorityUp = actionCollection()->addAction("priority_up");
priorityUp->setText(i18n("Increase Priority"));
priorityUp->setIcon(KIcon("arrow-up"));
priorityUp->setShortcuts(KShortcut("Ctrl+Up"));
priorityUp->setHelpText(i18n("Increase priority for selected transfer"));
connect(priorityUp, SIGNAL(triggered()), this, SLOT(slotPriorityUp()));
KAction *priorityDown = actionCollection()->addAction("priority_down");
priorityDown->setText(i18n("Decrease Priority"));
priorityDown->setIcon(KIcon("arrow-down"));
priorityDown->setShortcuts(KShortcut("Ctrl+Down"));
priorityDown->setHelpText(i18n("Decrease priority for selected transfer"));
connect(priorityDown, SIGNAL(triggered()), this, SLOT(slotPriorityDown()));
//FIXME: Not needed maybe because the normal delete already deletes groups?
KAction *deleteGroupAction = actionCollection()->addAction("delete_groups");
deleteGroupAction->setText(i18n("Delete Group"));
deleteGroupAction->setIcon(KIcon("edit-delete"));
deleteGroupAction->setHelpText(i18n("Delete selected group"));
connect(deleteGroupAction, SIGNAL(triggered()), SLOT(slotDeleteGroup()));
KAction *renameGroupAction = actionCollection()->addAction("rename_groups");
renameGroupAction->setText(i18n("Rename Group..."));
renameGroupAction->setIcon(KIcon("edit-rename"));
connect(renameGroupAction, SIGNAL(triggered()), SLOT(slotRenameGroup()));
KAction *setIconGroupAction = actionCollection()->addAction("seticon_groups");
setIconGroupAction->setText(i18n("Set Icon..."));
setIconGroupAction->setIcon(KIcon("preferences-desktop-icons"));
setIconGroupAction->setHelpText(i18n("Select a custom icon for the selected group"));
connect(setIconGroupAction, SIGNAL(triggered()), SLOT(slotSetIconGroup()));
m_autoPasteAction = new KToggleAction(KIcon("edit-paste"),
i18n("Auto-Paste Mode"), actionCollection());
actionCollection()->addAction("auto_paste", m_autoPasteAction);
m_autoPasteAction->setChecked(Settings::autoPaste());
m_autoPasteAction->setWhatsThis(i18n("<b>Auto paste</b> button toggles the auto-paste mode "
"on and off.\nWhen set, KGet will periodically scan "
"the clipboard for URLs and paste them automatically."));
connect(m_autoPasteAction, SIGNAL(triggered()), SLOT(slotToggleAutoPaste()));
m_konquerorIntegration = new KToggleAction(KIcon("konqueror"),
i18n("Use KGet as Konqueror Download Manager"), actionCollection());
actionCollection()->addAction("konqueror_integration", m_konquerorIntegration);
connect(m_konquerorIntegration, SIGNAL(triggered(bool)), SLOT(slotTrayKonquerorIntegration(bool)));
m_konquerorIntegration->setChecked(Settings::konquerorIntegration());
// local - Destroys all sub-windows and exits
KStandardAction::quit(this, SLOT(slotQuit()), actionCollection());
// local - Standard configure actions
KStandardAction::preferences(this, SLOT(slotPreferences()), actionCollection());
KStandardAction::configureNotifications(this, SLOT(slotConfigureNotifications()), actionCollection());
m_menubarAction = KStandardAction::showMenubar(this, SLOT(slotShowMenubar()), actionCollection());
m_menubarAction->setChecked(!menuBar()->isHidden());
// Transfer related actions
//.........这里部分代码省略.........
示例7: init
//.........这里部分代码省略.........
m_ownActions.append(actNewWindow);
actNewWindow->setIcon( KIcon("window-new") );
actNewWindow->setText( openStr );
QObject::connect(actNewWindow, SIGNAL(triggered()), q, SLOT(slotPopupNewView()));
}
if ( isDirectory && sWriting && !isCurrentTrash ) // A dir, and we can create things into it
{
const bool mkdirRequested = m_itemFlags & KParts::BrowserExtension::ShowCreateDirectory;
if ( (currentDir || mkdirRequested) && m_pMenuNew ) // Current dir -> add the "new" menu
{
// As requested by KNewFileMenu :
m_pMenuNew->checkUpToDate();
m_pMenuNew->setPopupFiles(m_popupItemProperties.urlList());
q->addAction( m_pMenuNew );
q->addSeparator();
}
else if (mkdirRequested)
{
KAction *actNewDir = new KAction(m_parentWidget);
m_ownActions.append(actNewDir);
actNewDir->setIcon( KIcon("folder-new") );
actNewDir->setText( i18n( "Create &Folder..." ) );
QObject::connect(actNewDir, SIGNAL(triggered()), q, SLOT(slotPopupNewDir()));
q->addAction( actNewDir );
q->addSeparator();
}
} else if ( isIntoTrash ) {
// Trashed item, offer restoring
act = new KAction(m_parentWidget /*for status tips*/);
m_ownActions.append(act);
act->setText( i18n( "&Restore" ) );
act->setHelpText(i18n("Restores this file or directory, back to the location where it was deleted from initially"));
QObject::connect(act, SIGNAL(triggered()), q, SLOT(slotPopupRestoreTrashedItems()));
q->addAction(act);
}
if (m_itemFlags & KParts::BrowserExtension::ShowNavigationItems)
{
if (m_itemFlags & KParts::BrowserExtension::ShowUp)
addNamedAction( "go_up" );
addNamedAction( "go_back" );
addNamedAction( "go_forward" );
if (m_itemFlags & KParts::BrowserExtension::ShowReload)
addNamedAction( "reload" );
q->addSeparator();
}
if (!currentDir && isSymLink && !isSymLinkInSameDir) {
// #65151: offer to open the target's parent dir
act = new KAction(m_parentWidget);
m_ownActions.append(act);
act->setText(isDirectory ? i18n("Show Original Directory") : i18n("Show Original File"));
act->setHelpText(i18n("Opens a new file manager window showing the target of this link, in its parent directory."));
QObject::connect(act, SIGNAL(triggered()), q, SLOT(slotShowOriginalFile()));
q->addAction(act);
}
// "open in new window" is either provided by us, or by the tabhandling group
if (actNewWindow) {
q->addAction(actNewWindow);
q->addSeparator();
}
addGroup( "tabhandling" ); // includes a separator at the end