From 041db41b351647a2e6ccf1673f0dac755582d6db Mon Sep 17 00:00:00 2001 From: Teo Mrnjavac Date: Tue, 24 Jun 2014 15:31:11 +0200 Subject: [PATCH] Add a Quit button to Calamares::ViewManager. --- src/calamares/ViewManager.cpp | 5 +++++ src/calamares/ViewManager.h | 1 + 2 files changed, 6 insertions(+) diff --git a/src/calamares/ViewManager.cpp b/src/calamares/ViewManager.cpp index 8c0f785c7..6e672641b 100644 --- a/src/calamares/ViewManager.cpp +++ b/src/calamares/ViewManager.cpp @@ -18,6 +18,7 @@ #include "ViewManager.h" +#include #include namespace Calamares @@ -49,12 +50,16 @@ ViewManager::ViewManager( QObject* parent ) m_back = new QPushButton( tr( "&Back" ), m_widget ); m_next = new QPushButton( tr( "&Next" ), m_widget ); + m_quit = new QPushButton( tr( "&Quit" ), m_widget ); QBoxLayout* bottomLayout = new QHBoxLayout; mainLayout->addLayout( bottomLayout ); bottomLayout->addStretch(); bottomLayout->addWidget( m_back ); bottomLayout->addWidget( m_next ); + bottomLayout->addSpacing( 12 ); + bottomLayout->addWidget( m_quit ); + connect( m_quit, &QPushButton::clicked, qApp, &QApplication::quit ); } diff --git a/src/calamares/ViewManager.h b/src/calamares/ViewManager.h index 6cf1a3722..4c8a1e0db 100644 --- a/src/calamares/ViewManager.h +++ b/src/calamares/ViewManager.h @@ -56,6 +56,7 @@ private: QStackedWidget* m_stack; QPushButton* m_back; QPushButton* m_next; + QPushButton* m_quit; }; }