aboutsummaryrefslogtreecommitdiff
path: root/src/mainwindow/widgets
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2018-04-19 13:21:48 +0200
committerAqua-sama <aqua@iserlohn-fortress.net>2018-04-19 13:21:48 +0200
commit892daad6789d440f60521197ae0a3f47def59256 (patch)
treedfc32d336b75a5524605f7392e4256db960dfe1b /src/mainwindow/widgets
parentRemoved MainWindow::titleChangedConnection (diff)
downloadsmolbote-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.cpp22
-rw-r--r--src/mainwindow/widgets/tabwidget.h4
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;
};