本文整理汇总了C++中KAction::whatsThis方法的典型用法代码示例。如果您正苦于以下问题:C++ KAction::whatsThis方法的具体用法?C++ KAction::whatsThis怎么用?C++ KAction::whatsThis使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KAction
的用法示例。
在下文中一共展示了KAction::whatsThis方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: 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 );
//.........这里部分代码省略.........