本文整理汇总了C++中KAction::setWhatsThis方法的典型用法代码示例。如果您正苦于以下问题:C++ KAction::setWhatsThis方法的具体用法?C++ KAction::setWhatsThis怎么用?C++ KAction::setWhatsThis使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KAction
的用法示例。
在下文中一共展示了KAction::setWhatsThis方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: KDevMakeFrontend
MakeViewPart::MakeViewPart(QObject *parent, const char *name, const QStringList &)
: KDevMakeFrontend(&data, parent, name)
{
setInstance(MakeViewFactory::instance());
setXMLFile("kdevmakeview.rc");
m_dcop = new KDevMakeFrontendIface(this);
m_widget = new MakeWidget(this);
m_widget->setIcon( SmallIcon("exec") );
m_widget->setCaption(i18n("Messages Output"));
QWhatsThis::add(m_widget, i18n("<b>Messages output</b><p>"
"The messages window shows the output of the compiler and "
"used build tools like make, ant, uic, dcopidl etc. "
"For compiler error messages, click on the error message. "
"This will automatically open the source file and set the "
"cursor to the line that caused the compiler error/warning."));
mainWindow()->embedOutputView(m_widget, i18n("Messages"), i18n("Compiler output messages"));
KAction *action;
action = new KAction( i18n("&Next Error"), Key_F4, m_widget, SLOT(nextError()),
actionCollection(), "view_next_error");
action->setToolTip( i18n("Go to the next error") );
action->setWhatsThis(i18n("<b>Next error</b><p>Switches to the file and line where the next error was reported from."));
action = new KAction( i18n("&Previous Error"), SHIFT+Key_F4, m_widget, SLOT(prevError()),
actionCollection(), "view_previous_error");
action->setToolTip( i18n("Go to the previous error") );
action->setWhatsThis(i18n("<b>Previous error</b><p>Switches to the file and line where the previous error was reported from."));
connect( core(), SIGNAL(stopButtonClicked(KDevPlugin*)),
this, SLOT(slotStopButtonClicked(KDevPlugin*)) );
}
示例2: 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 );
}
示例3: 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 );
}
示例4: 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 );
}
示例5: cut
KAction *create(StandardAction id, const QObject *recvr, const char *slot, QObject *parent)
{
KAction *pAction = 0;
const Info* pInfo = infoPtr(id);
if (pInfo) {
pAction = new KAction(parent);
pAction->setObjectName(pInfo->psName);
KShortcut cut(pInfo->shortcut);
if (!cut.isEmpty())
pAction->setShortcut(cut);
pAction->setText(i18n(pInfo->psText));
pAction->setToolTip(i18n(pInfo->psToolTip));
pAction->setWhatsThis(i18n(pInfo->psWhatsThis));
if (pInfo->psIconName)
pAction->setIcon(KIcon(QLatin1String(pInfo->psIconName)));
}
if (recvr && slot)
QObject::connect(pAction, SIGNAL(triggered(bool)), recvr, slot);
if (pAction) {
KActionCollection *collection = qobject_cast<KActionCollection *>(parent);
if (collection)
collection->addAction(pAction->objectName(), pAction);
}
return pAction;
}
示例6: KDevPlugin
ReplacePart::ReplacePart(QObject *parent, const char *name, const QStringList& )
: KDevPlugin( &data, parent, name ? name : "ReplacePart" )
{
setInstance(ReplaceFactory::instance());
setXMLFile("kdevpart_replace.rc");
m_widget = new ReplaceWidget(this);
m_widget->setIcon( SmallIcon("filefind") );
m_widget->setCaption(i18n("Replace"));
QWhatsThis::add
(m_widget, i18n("<b>Replace</b><p>"
"This window shows a preview of a string replace "
"operation. Uncheck a line to exclude that replacement. "
"Uncheck a file to exclude the whole file from the "
"operation. "
"Clicking on a line in the list will automatically "
"open the corresponding source file and set the "
"cursor to the line with the match." ));
mainWindow()->embedOutputView( m_widget, i18n("Replace"), i18n("Project wide string replacement") );
mainWindow()->setViewAvailable( m_widget, false );
KAction * action = new KAction(i18n("Find-Select-Replace..."), 0,
CTRL+SHIFT+Key_R, this, SLOT(slotReplace()), actionCollection(), "edit_replace_across");
action->setToolTip( i18n("Project wide string replacement") );
action->setWhatsThis( i18n("<b>Find-Select-Replace</b><p>"
"Opens the project wide string replacement dialog. There you "
"can enter a string or a regular expression which is then "
"searched for within all files in the locations "
"you specify. Matches will be displayed in the <b>Replace</b> window, you "
"can replace them with the specified string, exclude them from replace operation or cancel the whole replace.") );
connect( core(), SIGNAL(contextMenu(QPopupMenu *, const Context *)), this, SLOT(contextMenu(QPopupMenu *, const Context *)) );
}
示例7: KDevLanguageSupport
RubySupportPart::RubySupportPart(QObject *parent, const char *name, const QStringList& )
: KDevLanguageSupport (&data, parent, name ? name : "RubySupportPart" )
{
setInstance(RubySupportFactory::instance());
setXMLFile("kdevrubysupport.rc");
KAction *action;
action = new KAction( i18n("&Run"), "exec", SHIFT + Key_F9,
this, SLOT(slotRun()),
actionCollection(), "build_execute" );
action->setToolTip(i18n("Run"));
action->setWhatsThis(i18n("<b>Run</b><p>Starts an application."));
action->setIcon("ruby_run.png");
action = new KAction( i18n("Run Test Under Cursor"), "exec", ALT + Key_F9,
this, SLOT(slotRunTestUnderCursor()),
actionCollection(), "build_execute_test_function" );
action->setToolTip(i18n("Run Test Under Cursor"));
action->setWhatsThis(i18n("<b>Run Test Under Cursor</b><p>Runs the function under the cursor as test."));
action = new KAction( i18n("Launch Browser"), "network", 0, this, SLOT(slotBrowse()), actionCollection(), "build_launch_browser" );
action->setToolTip(i18n("Launch Browser"));
action->setWhatsThis(i18n("<b>Launch Browser</b><p>Opens a web browser pointing to the Ruby Rails server") );
action = new KAction( i18n("Switch To Controller"), 0, CTRL+ALT+Key_1, this, SLOT(slotSwitchToController()), actionCollection(), "switch_to_controller" );
action = new KAction( i18n("Switch To Model"), 0, CTRL+ALT+Key_2, this, SLOT(slotSwitchToModel()), actionCollection(), "switch_to_model" );
action = new KAction( i18n("Switch To View"), 0, CTRL+ALT+Key_3, this, SLOT(slotSwitchToView()), actionCollection(), "switch_to_view" );
action = new KAction( i18n("Switch To Test"), 0, CTRL+ALT+Key_4, this, SLOT(slotSwitchToTest()), actionCollection(), "switch_to_test" );
kdDebug() << "Creating RubySupportPart" << endl;
m_shellWidget = new KDevShellWidget( 0, "irb console");
m_shellWidget->setIcon( SmallIcon("ruby_config.png", KIcon::SizeMedium, KIcon::DefaultState, RubySupportPart::instance()));
m_shellWidget->setCaption(i18n("Ruby Shell"));
mainWindow()->embedOutputView( m_shellWidget, i18n("Ruby Shell"), i18n("Ruby Shell"));
mainWindow()->raiseView( m_shellWidget );
connect( core(), SIGNAL(projectOpened()), this, SLOT(projectOpened()) );
connect( core(), SIGNAL(projectClosed()), this, SLOT(projectClosed()) );
connect( core(), SIGNAL(contextMenu(QPopupMenu *, const Context *)),
this, SLOT(contextMenu(QPopupMenu *, const Context *)) );
connect( partController(), SIGNAL(savedFile(const KURL&)),
this, SLOT(savedFile(const KURL&)) );
connect( core(), SIGNAL(projectConfigWidget(KDialogBase*)),
this, SLOT(projectConfigWidget(KDialogBase*)) );
}
示例8: setupActions
void KateViewManager::setupActions ()
{
KAction *a;
/**
* view splitting
*/
a = m_mainWindow->actionCollection()->addAction("view_split_vert");
a->setIcon( KIcon("view-split-left-right") );
a->setText( i18n("Split Ve&rtical") );
a->setShortcut( Qt::CTRL + Qt::SHIFT + Qt::Key_L );
connect(a, SIGNAL(triggered()), this, SLOT(slotSplitViewSpaceVert()));
a->setWhatsThis(i18n("Split the currently active view vertically into two views."));
a = m_mainWindow->actionCollection()->addAction("view_split_horiz");
a->setIcon( KIcon("view-split-top-bottom") );
a->setText( i18n("Split &Horizontal") );
a->setShortcut( Qt::CTRL + Qt::SHIFT + Qt::Key_T );
connect(a, SIGNAL(triggered()), this, SLOT(slotSplitViewSpaceHoriz()));
a->setWhatsThis(i18n("Split the currently active view horizontally into two views."));
m_closeView = m_mainWindow->actionCollection()->addAction("view_close_current_space");
m_closeView->setIcon( KIcon("view-close") );
m_closeView->setText( i18n("Cl&ose Current View") );
m_closeView->setShortcut( Qt::CTRL + Qt::SHIFT + Qt::Key_R );
connect(m_closeView, SIGNAL(triggered()), this, SLOT(slotCloseCurrentViewSpace()));
m_closeView->setWhatsThis(i18n("Close the currently active splitted view"));
goNext = m_mainWindow->actionCollection()->addAction( "go_next_split_view" );
goNext->setText( i18n("Next Split View") );
goNext->setShortcut( Qt::Key_F8 );
connect(goNext, SIGNAL(triggered()), this, SLOT(activateNextView()));
goNext->setWhatsThis(i18n("Make the next split view the active one."));
goPrev = m_mainWindow->actionCollection()->addAction( "go_prev_split_view" );
goPrev->setText( i18n("Previous Split View") );
goPrev->setShortcut( Qt::SHIFT + Qt::Key_F8 );
connect(goPrev, SIGNAL(triggered()), this, SLOT(activatePrevView()));
goPrev->setWhatsThis(i18n("Make the previous split view the active one."));
}
示例9: KDevPlugin
ValgrindPart::ValgrindPart( QObject *parent, const char *name, const QStringList& )
: KDevPlugin( &data, parent, name ? name : "ValgrindPart" )
{
setInstance( ValgrindFactory::instance() );
setXMLFile( "kdevpart_valgrind.rc" );
proc = new KShellProcess();
connect( proc, SIGNAL(receivedStdout( KProcess*, char*, int )),
this, SLOT(receivedStdout( KProcess*, char*, int )) );
connect( proc, SIGNAL(receivedStderr( KProcess*, char*, int )),
this, SLOT(receivedStderr( KProcess*, char*, int )) );
connect( proc, SIGNAL(processExited( KProcess* )),
this, SLOT(processExited( KProcess* )) );
connect( core(), SIGNAL(stopButtonClicked(KDevPlugin*)),
this, SLOT(slotStopButtonClicked(KDevPlugin*)) );
connect( core(), SIGNAL(projectOpened()),
this, SLOT(projectOpened()) );
m_widget = new ValgrindWidget( this );
m_widget->setIcon( SmallIcon("fork") );
m_widget->setCaption(i18n("Valgrind Output"));
QWhatsThis::add( m_widget, i18n( "<b>Valgrind</b><p>Shows the output of the valgrind. Valgrind detects<br>"
"use of uninitialized memory<br>"
"reading/writing memory after it has been free'd<br>"
"reading/writing off the end of malloc'd blocks<br>"
"reading/writing inappropriate areas on the stack<br>"
"memory leaks -- where pointers to malloc'd blocks are lost forever<br>"
"passing of uninitialised and/or unaddressable memory to system calls<br>"
"mismatched use of malloc/new/new [] vs free/delete/delete []<br>"
"some abuses of the POSIX pthread API." ) );
KAction* action = new KAction( i18n("&Valgrind Memory Leak Check"), 0, this,
SLOT(slotExecValgrind()), actionCollection(), "tools_valgrind" );
action->setToolTip(i18n("Valgrind memory leak check"));
action->setWhatsThis(i18n("<b>Valgrind memory leak check</b><p>Runs Valgrind - a tool to help you find memory-management problems in your programs."));
action = new KAction( i18n("P&rofile with KCachegrind"), 0, this,
SLOT(slotExecCalltree()), actionCollection(), "tools_calltree" );
action->setToolTip(i18n("Profile with KCachegrind"));
action->setWhatsThis(i18n("<b>Profile with KCachegrind</b><p>Runs your program in calltree and then displays profiler information in KCachegrind."));
mainWindow()->embedOutputView( m_widget, "Valgrind", i18n("Valgrind memory leak check") );
}
示例10: initActions
void KAddressBookMain::initActions()
{
KStandardAction::quit( this, SLOT( close() ), actionCollection() );
KAction *action;
action = KStandardAction::keyBindings( this, SLOT( configureKeyBindings() ), actionCollection() );
action->setWhatsThis( i18n( "You will be presented with a dialog, where you can configure the application wide shortcuts." ) );
KStandardAction::configureToolbars( this, SLOT( configureToolbars() ), actionCollection() );
}
示例11: addAction
KAction* KexiProjectNavigator::addAction(const QString& name, const KIcon& icon, const QString& text,
const QString& toolTip, const QString& whatsThis, const char* slot)
{
KAction *action = new KAction(icon, text, this);
d->actions->addAction(name, action);
action->setToolTip(toolTip);
action->setWhatsThis(whatsThis);
connect(action, SIGNAL(triggered()), this, slot);
return action;
}
示例12: KDevLanguageSupport
PythonSupportPart::PythonSupportPart(QObject *parent, const char *name, const QStringList &)
: KDevLanguageSupport(&data, parent, name ? name : "PythonSupportPart")
{
setInstance(PythonSupportFactory::instance());
setXMLFile("kdevpythonsupport.rc");
connect( core(), SIGNAL(projectOpened()), this, SLOT(projectOpened()) );
connect( core(), SIGNAL(projectClosed()), this, SLOT(projectClosed()) );
connect( partController(), SIGNAL(savedFile(const KURL&)),
this, SLOT(savedFile(const KURL&)) );
connect( core(), SIGNAL(projectConfigWidget(KDialogBase*)),
this, SLOT(projectConfigWidget(KDialogBase*)) );
connect( core(), SIGNAL(contextMenu(QPopupMenu *, const Context *)),
this, SLOT(contextMenu(QPopupMenu *, const Context *)) );
KAction *action;
action = new KAction( i18n("Execute Program"), "exec", 0,
this, SLOT(slotExecute()),
actionCollection(), "build_exec" );
action->setToolTip( i18n("Execute program") );
action->setWhatsThis(i18n("<b>Execute program</b><p>Runs the Python program."));
action = new KAction( i18n("Execute String..."), "exec", 0,
this, SLOT(slotExecuteString()),
actionCollection(), "build_execstring" );
action->setToolTip( i18n("Execute string") );
action->setWhatsThis(i18n("<b>Execute String</b><p>Executes a string as Python code."));
action = new KAction( i18n("Start Python Interpreter"), "exec", 0,
this, SLOT(slotStartInterpreter()),
actionCollection(), "build_runinterpreter" );
action->setToolTip( i18n("Start Python interpreter") );
action->setWhatsThis(i18n("<b>Start python interpreter</b><p>Starts the Python interpreter without a program"));
action = new KAction( i18n("Python Documentation..."), 0,
this, SLOT(slotPydoc()),
actionCollection(), "help_pydoc" );
action->setToolTip( i18n("Python documentation") );
action->setWhatsThis(i18n("<b>Python documentation</b><p>Shows a Python documentation page."));
}
示例13: initActions
void ViewManager::initActions()
{
mActionSelectView = new KSelectAction(i18n("Select View"), 0, mCore->actionCollection(), "select_view");
#if KDE_VERSION >= 309
mActionSelectView->setMenuAccelsEnabled(false);
#endif
connect(mActionSelectView, SIGNAL(activated(const QString &)),
SLOT(setActiveView(const QString &)));
KAction *action;
action = new KAction(i18n("Modify View..."), "configure", 0, this,
SLOT(editView()), mCore->actionCollection(),
"view_modify");
action->setWhatsThis(
i18n("By pressing this button a dialog opens that allows you to modify the view of the addressbook. There you can add or remove fields that you want to be shown or hidden in the addressbook like the name for example."));
action = new KAction(i18n("Add View..."), "window_new", 0, this,
SLOT(addView()), mCore->actionCollection(),
"view_add");
action->setWhatsThis(
i18n("You can add a new view by choosing one from the dialog that appears after pressing the button. You have to give the view a name, so that you can distinguish between the different views."));
mActionDeleteView = new KAction(i18n("Delete View"), "view_remove", 0,
this, SLOT(deleteView()),
mCore->actionCollection(), "view_delete");
mActionDeleteView->setWhatsThis(i18n("By pressing this button you can delete the actual view, which you have added before."));
action = new KAction(i18n("Refresh View"), "reload", 0, this,
SLOT(refreshView()), mCore->actionCollection(),
"view_refresh");
action->setWhatsThis(i18n("The view will be refreshed by pressing this button."));
action = new KAction(i18n("Edit &Filters..."), "filter", 0, this,
SLOT(configureFilters()), mCore->actionCollection(),
"options_edit_filters");
action->setWhatsThis(i18n("Edit the contact filters<p>You will be presented with a dialog, where you can add, remove and edit filters."));
}
示例14: initActions
void MainWindow::initActions()
{
KStandardAction::quit( this, SLOT(close()), actionCollection() );
KAction *action =
KStandardAction::keyBindings( this, SLOT(configureKeyBindings()), actionCollection() );
action->setWhatsThis(
i18nc( "@info:whatsthis",
"You will be presented with a dialog where you can configure "
"the application-wide shortcuts." ) );
KStandardAction::configureToolbars( this, SLOT(configureToolbars()), actionCollection() );
KStandardAction::preferences( this, SLOT(configure()), actionCollection() );
}
示例15: KDevPlugin
PartExplorerPlugin::PartExplorerPlugin( QObject *parent, const char *name, const QStringList & )
: KDevPlugin( &data, parent, name ? name : "PartExplorerPlugin" )
{
// we need an instance
setInstance( PartExplorerPluginFactory::instance() );
setXMLFile( "kdevpartexplorer.rc" );
// this should be your custom internal widget
m_widget = new PartExplorerForm( mainWindow()->main() );
// mainWindow()->embedSelectView( m_widget, i18n("PartExplorer"), i18n("Query system services"));
KAction *action = new KAction( i18n("&Part Explorer"), 0, this, SLOT(slotShowForm()),
actionCollection(), "show_partexplorerform" );
action->setToolTip(i18n("KTrader query execution"));
action->setWhatsThis(i18n("<b>Part explorer</b><p>Shows a dialog for KTrader query execution. Search your KDE documentation for more information about KDE services and KTrader."));
}