| 213 | } |
| 214 | |
| 215 | void MainWindowPrivate::setupActions() |
| 216 | { |
| 217 | connect(Core::self()->sessionController(), &SessionController::quitSession, this, &MainWindowPrivate::quitAll); |
| 218 | |
| 219 | QAction* action; |
| 220 | |
| 221 | const QString app = qApp->applicationName(); |
| 222 | action = KStandardAction::preferences( this, SLOT(settingsDialog()), |
| 223 | actionCollection()); |
| 224 | action->setToolTip( i18nc( "@info:tooltip %1 = application name", "Configure %1", app ) ); |
| 225 | action->setWhatsThis( i18nc("@info:whatsthis", "Lets you customize %1.", app ) ); |
| 226 | |
| 227 | action = KStandardAction::configureNotifications(this, SLOT(configureNotifications()), actionCollection()); |
| 228 | action->setText( i18nc("@action", "Configure Notifications...") ); |
| 229 | action->setToolTip( i18nc("@info:tooltip", "Configure notifications") ); |
| 230 | action->setWhatsThis( i18nc( "@info:whatsthis", "Shows a dialog that lets you configure notifications." ) ); |
| 231 | |
| 232 | action = actionCollection()->addAction( QStringLiteral("loaded_plugins"), this, SLOT(showLoadedPlugins()) ); |
| 233 | action->setIcon(QIcon::fromTheme(QStringLiteral("plugins"))); |
| 234 | action->setText( i18nc("@action", "Loaded Plugins") ); |
| 235 | action->setToolTip( i18nc("@info:tooltip", "Show a list of all loaded plugins") ); |
| 236 | action->setWhatsThis( i18nc( "@info:whatsthis", "Shows a dialog with information about all loaded plugins." ) ); |
| 237 | |
| 238 | action = actionCollection()->addAction( QStringLiteral("view_next_window") ); |
| 239 | action->setText( i18nc("@action", "&Next Window" ) ); |
| 240 | connect( action, &QAction::triggered, this, &MainWindowPrivate::gotoNextWindow ); |
| 241 | actionCollection()->setDefaultShortcut(action, Qt::ALT | Qt::SHIFT | Qt::Key_Right); |
| 242 | action->setToolTip( i18nc( "@info:tooltip", "Next window" ) ); |
| 243 | action->setWhatsThis( i18nc( "@info:whatsthis", "Switches to the next window." ) ); |
| 244 | action->setIcon(QIcon::fromTheme(QStringLiteral("go-next"))); |
| 245 | |
| 246 | action = actionCollection()->addAction( QStringLiteral("view_previous_window") ); |
| 247 | action->setText( i18nc("@action", "&Previous Window" ) ); |
| 248 | connect( action, &QAction::triggered, this, &MainWindowPrivate::gotoPreviousWindow ); |
| 249 | actionCollection()->setDefaultShortcut(action, Qt::ALT | Qt::SHIFT | Qt::Key_Left); |
| 250 | action->setToolTip( i18nc( "@info:tooltip", "Previous window" ) ); |
| 251 | action->setWhatsThis( i18nc( "@info:whatsthis", "Switches to the previous window." ) ); |
| 252 | action->setIcon(QIcon::fromTheme(QStringLiteral("go-previous"))); |
| 253 | |
| 254 | action = actionCollection()->addAction(QStringLiteral("next_error")); |
| 255 | action->setText(i18nc("@action", "Jump to Next Outputmark")); |
| 256 | actionCollection()->setDefaultShortcut( action, QKeySequence(Qt::Key_F4) ); |
| 257 | action->setIcon(QIcon::fromTheme(QStringLiteral("arrow-right"))); |
| 258 | connect(action, &QAction::triggered, this, &MainWindowPrivate::selectNextItem); |
| 259 | |
| 260 | action = actionCollection()->addAction(QStringLiteral("prev_error")); |
| 261 | action->setText(i18nc("@action", "Jump to Previous Outputmark")); |
| 262 | actionCollection()->setDefaultShortcut( action, QKeySequence(Qt::SHIFT | Qt::Key_F4) ); |
| 263 | action->setIcon(QIcon::fromTheme(QStringLiteral("arrow-left"))); |
| 264 | connect(action, &QAction::triggered, this, &MainWindowPrivate::selectPrevItem); |
| 265 | |
| 266 | action = actionCollection()->addAction( QStringLiteral("split_horizontal") ); |
| 267 | action->setIcon(QIcon::fromTheme( QStringLiteral("view-split-top-bottom") )); |
| 268 | action->setText( i18nc("@action", "Split View &Top/Bottom" ) ); |
| 269 | actionCollection()->setDefaultShortcut(action, Qt::CTRL | Qt::SHIFT | Qt::Key_T); |
| 270 | connect( action, &QAction::triggered, this, &MainWindowPrivate::splitHorizontal ); |
| 271 | action->setToolTip( i18nc( "@info:tooltip", "Split horizontal" ) ); |
| 272 | action->setWhatsThis( i18nc( "@info:whatsthis", "Splits the current view horizontally." ) ); |
no test coverage detected