diff options
author | Ken Moore <moorekou@gmail.com> | 2016-06-27 14:35:00 -0400 |
---|---|---|
committer | Ken Moore <moorekou@gmail.com> | 2016-06-27 14:35:00 -0400 |
commit | 1010381477f79fd229503bfe66c75073952e3fb7 (patch) | |
tree | 05816c5fc204bd32362e944b7ad2e944934954c7 /src-qt5/core-utils/lumina-config/mainWindow.cpp | |
parent | Finish up the interactions on the main selection page in the new UI. (diff) | |
download | lumina-1010381477f79fd229503bfe66c75073952e3fb7.tar.gz lumina-1010381477f79fd229503bfe66c75073952e3fb7.tar.bz2 lumina-1010381477f79fd229503bfe66c75073952e3fb7.zip |
Add in the new autostart services UI page. Also cleanup a bit more of the shortcuts and page interactions.
Diffstat (limited to 'src-qt5/core-utils/lumina-config/mainWindow.cpp')
-rw-r--r-- | src-qt5/core-utils/lumina-config/mainWindow.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src-qt5/core-utils/lumina-config/mainWindow.cpp b/src-qt5/core-utils/lumina-config/mainWindow.cpp index 9121d295..3102fe7b 100644 --- a/src-qt5/core-utils/lumina-config/mainWindow.cpp +++ b/src-qt5/core-utils/lumina-config/mainWindow.cpp @@ -20,6 +20,8 @@ mainWindow::mainWindow() : QMainWindow(), ui(new Ui::mainWindow()){ QWidget *tmp = new QWidget(this); tmp->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); ui->toolBar->insertWidget(ui->actionSave, tmp); //after the save button + backShortcut = new QShortcut(Qt::Key_Escape, this); + connect(backShortcut, SIGNAL(activated()), this, SLOT(on_actionBack_triggered()) ); setupIcons(); loadMonitors(); changePage(""); //load the default main page @@ -37,6 +39,7 @@ void mainWindow::slotSingleInstance(){ } void mainWindow::setupIcons(){ + this->setWindowIcon( LXDG::findIcon("preferences-desktop") ); ui->actionSave->setIcon( LXDG::findIcon("document-save","") ); ui->actionBack->setIcon( LXDG::findIcon("go-previous-view","") ); ui->actionMonitor->setIcon(LXDG::findIcon("preferences-desktop-display","") ); @@ -81,12 +84,14 @@ void mainWindow::changePage(QString id){ connect(page, SIGNAL(HasPendingChanges(bool)), this, SLOT(pageCanSave(bool)) ); connect(page, SIGNAL(ChangePageTitle(QString)), this, SLOT(pageSetTitle(QString)) ); connect(page, SIGNAL(ChangePage(QString)), this, SLOT(page_change(QString)) ); + page->setFocus(); + ui->toolBar->setVisible( !cpage.isEmpty() ); } //Now load the new page page->LoadSettings(ui->actionMonitor->whatsThis().toInt()); //need to make this show the current screen as needed //Now update this UI a bit based on page settings ui->actionMonitor->setVisible( page->needsScreenSelector() && ui->actionMonitor->menu()->actions().length()>1 ); - + this->showNormal(); } //================ |