本文整理汇总了C++中KAction::setStatusTip方法的典型用法代码示例。如果您正苦于以下问题:C++ KAction::setStatusTip方法的具体用法?C++ KAction::setStatusTip怎么用?C++ KAction::setStatusTip使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KAction
的用法示例。
在下文中一共展示了KAction::setStatusTip方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: KActionCollection
void K3b::VideoDVDRippingView::initActions()
{
d->actionCollection = new KActionCollection( this );
KAction* actionCheck = new KAction( this );
connect( actionCheck, SIGNAL(triggered()), this, SLOT(slotCheck()) );
actionCollection()->addAction( "check_tracks", actionCheck );
KAction* actionUncheck = new KAction( this );
connect( actionUncheck, SIGNAL(triggered()), this, SLOT(slotUncheck()) );
actionCollection()->addAction( "uncheck_tracks", actionUncheck );
KAction* actionStartRip = new KAction( KIcon( "tools-rip-video-dvd" ), i18n("Start Ripping"), this );
actionStartRip->setToolTip( i18n("Open the Video DVD ripping dialog") );
actionStartRip->setStatusTip(actionStartRip->toolTip());
actionStartRip->setWhatsThis( i18n("<p>Rips single titles from a video DVD "
"into a compressed format such as XviD. Menu structures are completely ignored."
"<p>If you intend to copy the plain Video DVD vob files from the DVD "
"(including decryption) for further processing with another application, "
"please use \"Show files\" button."
"<p>If you intend to make a copy of the entire Video DVD including all menus "
"and extras it is recommended to use the K3b Copy tool.") );
connect( actionStartRip, SIGNAL(triggered()), this, SLOT(slotStartRipping()) );
actionCollection()->addAction( "start_rip", actionStartRip );
KAction* actionSelectAll = KStandardAction::selectAll( d->view, SLOT(selectAll()), actionCollection() );
// setup the popup menu
d->popupMenu = new KMenu( this );
d->popupMenu->addAction( actionCheck );
d->popupMenu->addAction( actionUncheck );
d->popupMenu->addSeparator();
d->popupMenu->addAction( actionSelectAll );
d->popupMenu->addSeparator();
d->popupMenu->addAction( actionStartRip );
connect( d->popupMenu, SIGNAL(aboutToShow()), this, SLOT(slotContextMenuAboutToShow()) );
}
示例2: initActions
void KStars::initActions() {
KIconLoader::global()->addAppDir( "kstars" );
KAction *ka;
// ==== File menu ================
ka = KNS3::standardAction(i18n("Download New Data..."), this, SLOT(slotDownload()), actionCollection(), "get_data")
<< KShortcut( Qt::CTRL+Qt::Key_D );
ka->setWhatsThis(i18n("Downloads new data"));
ka->setToolTip(ka->whatsThis());
ka->setStatusTip(ka->whatsThis());
#ifdef HAVE_CFITSIO_H
actionCollection()->addAction("open_file", this, SLOT(slotOpenFITS()) )
<< i18n("Open FITS...")
<< KIcon("document-open")
<< KShortcut( Qt::CTRL+Qt::Key_O );
#endif
actionCollection()->addAction("export_image", this, SLOT( slotExportImage() ) )
<< i18n("&Save Sky Image...")
<< KIcon("document-export-image")
<< KShortcut( Qt::CTRL+Qt::Key_I );
actionCollection()->addAction("run_script", this, SLOT( slotRunScript() ))
<< i18n("&Run Script...")
<< KIcon("system-run" )
<< KShortcut( Qt::CTRL+Qt::Key_R );
actionCollection()->addAction("printing_wizard", this, SLOT(slotPrintingWizard() ) )
<< i18nc("start Printing Wizard", "Printing &Wizard");
actionCollection()->addAction( KStandardAction::Print, "print", this, SLOT( slotPrint() ) );
actionCollection()->addAction( KStandardAction::Quit, "quit", this, SLOT( close() ) );
// ==== Time Menu ================
actionCollection()->addAction("time_to_now", this, SLOT( slotSetTimeToNow() ))
<< i18n("Set Time to &Now")
<< KShortcut( Qt::CTRL+Qt::Key_E )
<< KIcon("clock");
actionCollection()->addAction("time_dialog", this, SLOT( slotSetTime() ) )
<< i18nc("set Clock to New Time", "&Set Time..." )
<< KShortcut( Qt::CTRL+Qt::Key_S )
<< KIcon("view-history");
ka = actionCollection()->add<KToggleAction>("clock_startstop")
<< i18n("Stop &Clock" )
<< KIcon("media-playback-pause" );
if ( ! StartClockRunning )
ka->toggle();
QObject::connect( ka, SIGNAL( triggered() ), this, SLOT( slotToggleTimer() ) );
QObject::connect(data()->clock(), SIGNAL(clockToggled(bool)), ka, SLOT(setChecked(bool)) );
//UpdateTime() if clock is stopped (so hidden objects get drawn)
QObject::connect(data()->clock(), SIGNAL(clockToggled(bool)), this, SLOT(updateTime()) );
actionCollection()->addAction("time_step_forward", this, SLOT( slotStepForward() ) )
<< i18n("Advance one step forward in time")
<< KIcon("media-skip-forward" )
<< KShortcut( Qt::Key_Greater, Qt::Key_Period );
actionCollection()->addAction("time_step_backward", this, SLOT( slotStepBackward() ) )
<< i18n("Advance one step backward in time")
<< KIcon("media-skip-backward" )
<< KShortcut( Qt::Key_Less, Qt::Key_Comma );
// ==== Pointing Menu ================
actionCollection()->addAction("zenith", this, SLOT( slotPointFocus() ) )
<< i18n("&Zenith")
<< KShortcut("Z");
actionCollection()->addAction("north", this, SLOT( slotPointFocus() ) )
<< i18n("&North")
<< KShortcut("N");
actionCollection()->addAction("east", this, SLOT( slotPointFocus() ) )
<< i18n("&East")
<< KShortcut("E");
actionCollection()->addAction("south", this, SLOT( slotPointFocus() ) )
<< i18n("&South")
<< KShortcut("S");
actionCollection()->addAction("west", this, SLOT( slotPointFocus() ) )
<< i18n("&West")
<< KShortcut("W");
actionCollection()->addAction("find_object", this, SLOT( slotFind() ) )
<< i18n("&Find Object...")
<< KIcon("edit-find")
<< KShortcut( Qt::CTRL+Qt::Key_F );
actionCollection()->addAction("track_object", this, SLOT( slotTrack() ) )
<< i18n("Engage &Tracking")
<< KIcon("object-locked" )
<< KShortcut( Qt::CTRL+Qt::Key_T );
actionCollection()->addAction("manual_focus", this, SLOT( slotManualFocus() ) )
<< i18n("Set Coordinates &Manually..." )
<< KShortcut( Qt::CTRL+Qt::Key_M );
// ==== View Menu ================
actionCollection()->addAction( KStandardAction::ZoomIn, "zoom_in", map(), SLOT( slotZoomIn() ) );
actionCollection()->addAction( KStandardAction::ZoomOut, "zoom_out", map(), SLOT( slotZoomOut() ) );
actionCollection()->addAction("zoom_default", map(), SLOT( slotZoomDefault() ) )
<< i18n("&Default Zoom")
<< KIcon("zoom-fit-best" )
<< KShortcut( Qt::CTRL+Qt::Key_Z );
actionCollection()->addAction("zoom_set", this, SLOT( slotSetZoom() ) )
<< i18n("&Zoom to Angular Size..." )
<< KIcon("zoom-original" )
<< KShortcut( Qt::CTRL+Qt::SHIFT+Qt::Key_Z );
//.........这里部分代码省略.........
示例3: if
SamView::SamView(QWidget *parent, Qt::WFlags flags) : KXmlGuiWindow(parent, flags),
m_startCompilationAfterAdaption(false),
m_startTestAfterCompile(false),
m_startTestAfterAdaption(false),
m_exportAfterTest(false),
m_dirty(false),
m_creationCorpus(0),
m_reportParameters(0),
modelCompiler(0),
modelCompilationAdapter(0),
barGraph(0)
{
KGlobal::locale()->insertCatalog("simonlib");
ui.setupUi(this);
ui.qpPlot->hide();
barGraphLegend = new QwtLegend(ui.qpPlot);
ui.qpPlot->insertLegend(barGraphLegend);
#if QWT_VERSION >= 0x060100
connect(ui.qpPlot, SIGNAL(legendDataChanged(const QVariant &, const QList<QwtLegendData>&)),
barGraphLegend, SLOT(updateLegend(const QVariant&, const QList<QwtLegendData>&)));
barGraphLegend->show();
ui.qpPlot->updateLegend();
#endif
initGraph();
ui.saTestConfigurations->setWidget(ui.wgTestConfigurations);
KAction* getPathsFromSimon = new KAction(this);
getPathsFromSimon->setText(i18n("Modify Simon's model"));
getPathsFromSimon->setStatusTip(i18n("Manage Simon's current model with SSC"));
getPathsFromSimon->setIcon(KIcon("simon"));
actionCollection()->addAction("getPathsFromSimon", getPathsFromSimon);
connect(getPathsFromSimon, SIGNAL(triggered(bool)),
this, SLOT(getBuildPathsFromSimon()));
KAction* recompile = new KAction(this);
recompile->setText(i18n("Build model"));
recompile->setStatusTip(i18n("Build the currently open model."));
recompile->setIcon(KIcon("view-refresh"));
recompile->setShortcut(Qt::CTRL + Qt::Key_F5);
actionCollection()->addAction("compileModel", recompile);
connect(recompile, SIGNAL(triggered(bool)),
this, SLOT(compileModel()));
KAction* test= new KAction(this);
test->setText(i18n("Test model"));
test->setStatusTip(i18n("Test the model."));
test->setIcon(KIcon("chronometer"));
actionCollection()->addAction("testModel", test);
connect(test, SIGNAL(triggered(bool)),
this, SLOT(testModel()));
KAction* testResults= new KAction(this);
testResults->setText(i18n("Test results"));
testResults->setStatusTip(i18n("Display the test results."));
testResults->setIcon(KIcon("view-pim-tasks"));
actionCollection()->addAction("testResults", testResults);
connect(testResults, SIGNAL(triggered(bool)),
this, SLOT(switchToTestResults()));
KAction* exportTestResults = new KAction(this);
exportTestResults->setText(i18n("Export test result"));
exportTestResults->setStatusTip(i18n("Export the test results to a file."));
exportTestResults->setIcon(KIcon("document-export"));
actionCollection()->addAction("exportTestResults", exportTestResults);
connect(exportTestResults, SIGNAL(triggered(bool)),
this, SLOT(exportTestResults()));
m_user = "internalSamuser";
KStandardAction::openNew(this, SLOT(newProject()), actionCollection());
KStandardAction::save(this, SLOT(save()), actionCollection());
KStandardAction::saveAs(this, SLOT(saveAs()), actionCollection());
KStandardAction::open(this, SLOT(load()), actionCollection());
KStandardAction::preferences(this, SLOT(showConfig()), actionCollection());
KStandardAction::quit(this, SLOT(close()), actionCollection());
setupGUI();
connect(ui.cbType, SIGNAL(currentIndexChanged(int)), this, SLOT(backendChanged()));
connect(ui.pbCompileModel, SIGNAL(clicked()), this, SLOT(compileModel()));
connect(ui.pbTestModel, SIGNAL(clicked()), this, SLOT(testModel()));
connect(ui.pbImportRecognitionSamples, SIGNAL(clicked()), this, SLOT(importRecognitionSamples()));
connect(ui.rbDynamicModel, SIGNAL(toggled(bool)), this, SLOT(setDirty()));
connect(ui.rbStaticModel, SIGNAL(toggled(bool)), this, SLOT(setDirty()));
connect(ui.urOutputModel, SIGNAL(textChanged(QString)), this, SLOT(setDirty()));
connect(ui.urPromptsBasePath, SIGNAL(textChanged(QString)), this, SLOT(setDirty()));
connect(ui.urLexicon, SIGNAL(textChanged(QString)), this, SLOT(setDirty()));
connect(ui.urGrammar, SIGNAL(textChanged(QString)), this, SLOT(setDirty()));
connect(ui.urVocabulary, SIGNAL(textChanged(QString)), this, SLOT(setDirty()));
connect(ui.urPrompts, SIGNAL(textChanged(QString)), this, SLOT(setDirty()));
//.........这里部分代码省略.........
示例4: setupActions
void EditActions::setupActions() {
KActionCollection* actionCollection = mTutorialEditor->actionCollection();
mUndoStack->createUndoAction(actionCollection);
mUndoStack->createRedoAction(actionCollection);
KAction* action = new KAction(this);
action->setText(i18nc("@action", "Set information..."));
action->setStatusTip(i18nc("@info:status", "Set the name and description "
"of the tutorial."));
action->setIcon(KIcon("documentinfo"));
actionCollection->addAction("setTutorialInformation", action);
connect(action, SIGNAL(triggered(bool)),
this, SLOT(setTutorialInformation()));
action = new KAction(this);
action->setText(i18nc("@action", "Set license..."));
action->setStatusTip(i18nc("@info:status", "Set the license text of the "
"tutorial."));
action->setIcon(KIcon("document-edit"));
actionCollection->addAction("setTutorialLicense", action);
connect(action, SIGNAL(triggered(bool)), this, SLOT(setTutorialLicense()));
action = new KAction(this);
action->setText(i18nc("@action", "Set setup code..."));
action->setStatusTip(i18nc("@info:status", "Set the custom code to be "
"executed when the tutorial starts."));
action->setIcon(KIcon("code-function"));
actionCollection->addAction("setTutorialSetup", action);
connect(action, SIGNAL(triggered(bool)), this, SLOT(setTutorialSetup()));
action = new KAction(this);
action->setText(i18nc("@action", "Set tear down code..."));
action->setStatusTip(i18nc("@info:status", "Set the custom code to be "
"executed when the tutorial finishes."));
action->setIcon(KIcon("code-function"));
actionCollection->addAction("setTutorialTearDown", action);
connect(action, SIGNAL(triggered(bool)), this, SLOT(setTutorialTearDown()));
action = new KAction(this);
action->setText(i18nc("@action", "Add step..."));
action->setStatusTip(i18nc("@info:status", "Add a new step to the "
"tutorial."));
action->setIcon(KIcon("list-add"));
actionCollection->addAction("addStep", action);
connect(action, SIGNAL(triggered(bool)), this, SLOT(addStep()));
action = new KAction(this);
action->setText(i18nc("@action", "Set step data..."));
action->setStatusTip(i18nc("@info:status", "Set the name and text of the "
"currently selected step."));
action->setIcon(KIcon("document-edit"));
action->setEnabled(false);
actionCollection->addAction("setStepData", action);
connect(action, SIGNAL(triggered(bool)), this, SLOT(setStepData()));
action = new KAction(this);
action->setText(i18nc("@action", "Set setup code..."));
action->setStatusTip(i18nc("@info:status", "Set the custom code to be "
"executed when the tutorial passes to the currently selected step."));
action->setIcon(KIcon("code-function"));
action->setEnabled(false);
actionCollection->addAction("setStepSetup", action);
connect(action, SIGNAL(triggered(bool)), this, SLOT(setStepSetup()));
action = new KAction(this);
action->setText(i18nc("@action", "Set tear down code..."));
action->setStatusTip(i18nc("@info:status", "Set the custom code to be "
"executed when the tutorial changes from the currently selected step to "
"another step."));
action->setIcon(KIcon("code-function"));
action->setEnabled(false);
actionCollection->addAction("setStepTearDown", action);
connect(action, SIGNAL(triggered(bool)), this, SLOT(setStepTearDown()));
action = new KAction(this);
action->setText(i18nc("@action", "Remove step"));
action->setStatusTip(i18nc("@info:status", "Removes the currently selected "
"step from the tutorial."));
action->setIcon(KIcon("list-remove"));
action->setEnabled(false);
actionCollection->addAction("removeStep", action);
connect(action, SIGNAL(triggered(bool)), this, SLOT(removeStep()));
action = new KAction(this);
action->setText(i18nc("@action", "Add reaction..."));
action->setStatusTip(i18nc("@info:status", "Add a new reaction to the "
"selected step."));
action->setIcon(KIcon("list-add"));
action->setEnabled(false);
actionCollection->addAction("addReaction", action);
connect(action, SIGNAL(triggered(bool)), this, SLOT(addReaction()));
action = new KAction(this);
action->setText(i18nc("@action", "Set reaction data..."));
action->setStatusTip(i18nc("@info:status", "Set the trigger and the "
"response of the currently selected reaction."));
action->setIcon(KIcon("document-edit"));
action->setEnabled(false);
//.........这里部分代码省略.........
示例5: initActions
void Portal::initActions()
{
fileQuit = actionCollection()->addAction( KStandardAction::Quit, this, SLOT(slotFileQuit() ) );
editCut = actionCollection()->addAction( KStandardAction::Cut, this, SLOT(slotEditCut() ) );
editCopy = actionCollection()->addAction( KStandardAction::Copy, this, SLOT(slotEditCopy() ) );
editPaste = actionCollection()->addAction( KStandardAction::Paste, this, SLOT(slotEditPaste() ) );
viewStatusBar = KStandardAction::showStatusbar(this, SLOT(slotViewStatusBar()), actionCollection());
actionCollection()->addAction( KStandardAction::Preferences, this, SLOT( preferences() ) );
actNewDocument = actionCollection()->addAction( "document_new", this, SLOT( slotNewDocument()) );
actNewDocument->setText( i18n("Create Document") );
actNewDocument->setShortcut( KStandardShortcut::shortcut(KStandardShortcut::New) );
actNewDocument->setIcon( KIcon("document-new"));
actCopyDocument = actionCollection()->addAction( "document_copy", this, SLOT( slotCopyDocument()) );
actCopyDocument->setText( i18n("Copy Document"));
actCopyDocument->setShortcut( KStandardShortcut::shortcut(KStandardShortcut::Copy) );
actCopyDocument->setIcon( KIcon( "document-edit"));
actFollowDocument = actionCollection()->addAction( "document_follow", this, SLOT( slotFollowUpDocument() ) );
actFollowDocument->setText( i18n("Follow Document" ));
actFollowDocument->setShortcut( KShortcut( Qt::CTRL + Qt::Key_F ));
actFollowDocument->setIcon( KIcon( "document-edit"));
actPrintDocument = actionCollection()->addAction( "document_print", this, SLOT( slotPrintDocument()) );
actPrintDocument->setText( i18n("Print Document"));
actPrintDocument->setShortcut( KStandardShortcut::shortcut(KStandardShortcut::Print) );
actPrintDocument->setIcon( KIcon("document-print"));
actOpenArchivedDocument = actionCollection()->addAction( "archived_open", this, SLOT( slotArchivedDocExecuted()) );
actOpenArchivedDocument->setText( i18n("Open Archived Document"));
actOpenArchivedDocument->setShortcut( KShortcut(Qt::CTRL + Qt::Key_A) );
actViewDocument = actionCollection()->addAction( "document_view", this, SLOT( slotViewDocument()));
actViewDocument->setText(i18n("Show Document"));
actViewDocument->setShortcut( KStandardShortcut::shortcut(KStandardShortcut::Reload) );
actViewDocument->setIcon( KIcon("document-preview" ));
actOpenDocument = actionCollection()->addAction( "document_open", this, SLOT( slotOpenDocument()) );
actOpenDocument->setText( i18n("Edit Document"));
actOpenDocument->setShortcut( KStandardShortcut::shortcut(KStandardShortcut::Open) );
actOpenDocument->setIcon( KIcon("document-open" ));
actMailDocument = actionCollection()->addAction( "document_mail", this, SLOT( slotMailDocument()) );
actMailDocument->setText(i18n("&Mail Document"));
actMailDocument->setShortcut( KShortcut(Qt::CTRL + Qt::Key_M ));
actMailDocument->setIcon( KIcon("mail-forward"));
actEditTemplates = actionCollection()->addAction( "edit_tag_templates", this, SLOT( slotEditTagTemplates() ) );
actEditTemplates->setText("Edit Tag Templates");
actEditTemplates->setShortcut( KShortcut( Qt::CTRL + Qt::Key_E ));
KAction *reconfDb = actionCollection()->addAction( "reconfigure_db", this, SLOT( slotReconfigureDatabase() ) );
reconfDb->setText("Redo Initial Setup...");
reconfDb->setShortcut( KShortcut( Qt::CTRL + Qt::Key_R ));
fileQuit->setStatusTip(i18n("Quits the application"));
editCut->setStatusTip(i18n("Cuts the selected section and puts it to the clipboard"));
editCopy->setStatusTip(i18n("Copies the selected section to the clipboard"));
editPaste->setStatusTip(i18n("Pastes the clipboard contents to current position"));
viewStatusBar->setStatusTip(i18n("Enables/disables the statusbar"));
actNewDocument->setStatusTip( i18n( "Creates a new Document" ) );
actPrintDocument->setStatusTip( i18n( "Print and archive this Document" ) );
actCopyDocument->setStatusTip( i18n( "Creates a new document which is a copy of the selected document" ) );
actFollowDocument->setStatusTip( i18n( "Create a followup document for the current document" ) );
actOpenDocument->setStatusTip( i18n( "Opens the document for editing" ) );
actViewDocument->setStatusTip( i18n( "Opens a read only view on the document." ) );
actMailDocument->setStatusTip( i18n( "Send document per mail" ) );
actEditTemplates->setStatusTip( i18n("Edit the available tag templates which can be assigned to document items.") );
reconfDb->setStatusTip( i18n( "Configure the Database Kraft is working on." ) );
actOpenArchivedDocument->setStatusTip( i18n( "Open a viewer on an archived document" ) );
setStandardToolBarMenuEnabled( true );
actOpenDocument->setEnabled( false );
actViewDocument->setEnabled( false );
actPrintDocument->setEnabled( false );
actCopyDocument->setEnabled( false );
actFollowDocument->setEnabled( false );
actMailDocument->setEnabled( false );
actOpenArchivedDocument->setEnabled( false );
// use the absolute path to your kraftui.rc file for testing purpose in createGUI();
QString prjPath = QString::fromUtf8(qgetenv("KRAFT_HOME"));
if( !prjPath.isEmpty() ) {
createGUI(QString("%1/src/kraftui.rc").arg(prjPath));
} else {
createGUI( "kraftui.rc");
}
}