diff options
author | Kjell Tore Ullavik <kt@mathblocks.net> | 2017-11-30 04:15:34 +0100 |
---|---|---|
committer | Kjell Tore Ullavik <kt@mathblocks.net> | 2017-11-30 04:26:36 +0100 |
commit | 52d29fe416a3e41caf750889f7b9fcff637c2b94 (patch) | |
tree | 15e4b6bd0abb5be9d8df8ace158f1200cb4b6359 /src-qt5/desktop-utils/lumina-textedit/MainUI.cpp | |
parent | Make the poppler include path "poppler/qt5/<file.h>" rather than just the file. (diff) | |
download | lumina-52d29fe416a3e41caf750889f7b9fcff637c2b94.tar.gz lumina-52d29fe416a3e41caf750889f7b9fcff637c2b94.tar.bz2 lumina-52d29fe416a3e41caf750889f7b9fcff637c2b94.zip |
Add 'Show Toolbar' to textedit menu.
Diffstat (limited to 'src-qt5/desktop-utils/lumina-textedit/MainUI.cpp')
-rw-r--r-- | src-qt5/desktop-utils/lumina-textedit/MainUI.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src-qt5/desktop-utils/lumina-textedit/MainUI.cpp b/src-qt5/desktop-utils/lumina-textedit/MainUI.cpp index 9e4ce499..33f2d851 100644 --- a/src-qt5/desktop-utils/lumina-textedit/MainUI.cpp +++ b/src-qt5/desktop-utils/lumina-textedit/MainUI.cpp @@ -72,6 +72,10 @@ MainUI::MainUI() : QMainWindow(), ui(new Ui::MainUI){ for(int i=0; i<smodes.length(); i++){ ui->menuSyntax_Highlighting->addAction(smodes[i]); } + + bool toolbarVisible = settings->value("showToolbar",true).toBool(); + ui->toolBar->setHidden(!toolbarVisible); + ui->actionShow_Toolbar->setChecked(toolbarVisible); ui->actionLine_Numbers->setChecked( settings->value("showLineNumbers",true).toBool() ); ui->actionWrap_Lines->setChecked( settings->value("wrapLines",true).toBool() ); ui->actionShow_Popups->setChecked( settings->value("showPopupWarnings",true).toBool() ); @@ -96,6 +100,7 @@ MainUI::MainUI() : QMainWindow(), ui(new Ui::MainUI){ connect(tabWidget->dndTabBar(), SIGNAL(DetachTab(int)), this, SLOT(tabDetached(int)) ); connect(tabWidget->dndTabBar(), SIGNAL(DroppedIn(QStringList)), this, SLOT(LoadArguments(QStringList)) ); connect(tabWidget->dndTabBar(), SIGNAL(DraggedOut(int, Qt::DropAction)), this, SLOT(tabDraggedOut(int, Qt::DropAction)) ); + connect(ui->actionShow_Toolbar, SIGNAL(toggled(bool)), this, SLOT(showToolbar(bool)) ); connect(ui->actionLine_Numbers, SIGNAL(toggled(bool)), this, SLOT(showLineNumbers(bool)) ); connect(ui->actionWrap_Lines, SIGNAL(toggled(bool)), this, SLOT(wrapLines(bool)) ); connect(ui->actionShow_Popups, SIGNAL(toggled(bool)), this, SLOT(showPopupWarnings(bool)) ); @@ -337,6 +342,11 @@ void MainUI::showPopupWarnings(bool show){ settings->setValue("showPopupWarnings",show); } +void MainUI::showToolbar(bool show){ + settings->setValue("showToolbar",show); + ui->toolBar->setHidden(!show); +} + void MainUI::updateTab(QString file){ PlainTextEditor *cur = 0; int index = -1; |