diff options
author | Aqua-sama <aqua@iserlohn-fortress.net> | 2018-04-19 13:21:48 +0200 |
---|---|---|
committer | Aqua-sama <aqua@iserlohn-fortress.net> | 2018-04-19 13:21:48 +0200 |
commit | 892daad6789d440f60521197ae0a3f47def59256 (patch) | |
tree | dfc32d336b75a5524605f7392e4256db960dfe1b /src/mainwindow/widgets | |
parent | Removed MainWindow::titleChangedConnection (diff) | |
download | smolbote-892daad6789d440f60521197ae0a3f47def59256.tar.xz |
Add Window menu
- add new tab button to tab widget
- tab shortcuts are read from configuration again
- updated manpage some
Diffstat (limited to 'src/mainwindow/widgets')
-rw-r--r-- | src/mainwindow/widgets/tabwidget.cpp | 22 | ||||
-rw-r--r-- | src/mainwindow/widgets/tabwidget.h | 4 |
2 files changed, 0 insertions, 26 deletions
diff --git a/src/mainwindow/widgets/tabwidget.cpp b/src/mainwindow/widgets/tabwidget.cpp index 21476cd..66182c3 100644 --- a/src/mainwindow/widgets/tabwidget.cpp +++ b/src/mainwindow/widgets/tabwidget.cpp @@ -25,28 +25,6 @@ TabWidget::TabWidget(QWidget *parent) connect(this, &TabWidget::tabCloseRequested, this, &TabWidget::deleteTab); - // general actions - closeTab_action = new QAction(this); - closeTab_action->setShortcut(QKeySequence("Ctrl+X")); - connect(closeTab_action, &QAction::triggered, this, [this]() { - this->deleteTab(this->currentIndex()); - }); - addAction(closeTab_action); - - leftTab_action = new QAction(this); - leftTab_action->setShortcut(QKeySequence("Ctrl+O")); - connect(leftTab_action, &QAction::triggered, this, [this]() { - this->setCurrentIndex(qMax(0, this->currentIndex() - 1)); - }); - addAction(leftTab_action); - - rightTab_action = new QAction(this); - rightTab_action->setShortcut(QKeySequence("Ctrl+P")); - connect(rightTab_action, &QAction::triggered, this, [this]() { - this->setCurrentIndex(qMin(this->currentIndex() + 1, this->count() - 1)); - }); - addAction(rightTab_action); - // context menu tabContextMenu = new QMenu(this); auto *closeTab = tabContextMenu->addAction(tr("Close Tab")); diff --git a/src/mainwindow/widgets/tabwidget.h b/src/mainwindow/widgets/tabwidget.h index b7aad63..06fa79b 100644 --- a/src/mainwindow/widgets/tabwidget.h +++ b/src/mainwindow/widgets/tabwidget.h @@ -30,10 +30,6 @@ protected: void contextMenuEvent(QContextMenuEvent *event) override; private: - QAction *closeTab_action; - QAction *leftTab_action; - QAction *rightTab_action; - QMenu *tabContextMenu; }; |