diff --git a/mainwindow.cpp b/mainwindow.cpp index 57f85959..d47684da 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -8,6 +8,23 @@ MainWindow::MainWindow(QWidget *parent) : ui->setupUi(this); } +void MainWindow::closeEvent(QCloseEvent *event) +{ + const QMessageBox::StandardButton ret + = QMessageBox::warning(this, tr("Application"), + tr("something-something-close?"), + QMessageBox::Yes | QMessageBox::No); + switch (ret) { + case QMessageBox::Yes: + event->accept(); + break; + case QMessageBox::No: + default: + event->ignore(); + break; + } +} + MainWindow::~MainWindow() { delete ui; diff --git a/mainwindow.h b/mainwindow.h index 450992cd..1487d0ed 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -2,6 +2,7 @@ #define MAINWINDOW_H #include +#include namespace Ui { class MainWindow; @@ -15,6 +16,9 @@ public: explicit MainWindow(QWidget *parent = 0); ~MainWindow(); +protected: + void closeEvent(QCloseEvent *event) override; + private slots: void on_actionExit_triggered(); diff --git a/moonlight-qt.pro.user b/moonlight-qt.pro.user new file mode 100644 index 00000000..0578f775 --- /dev/null +++ b/moonlight-qt.pro.user @@ -0,0 +1,336 @@ + + + + + + EnvironmentId + {4670429c-020d-4244-91b2-7400759b936c} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + true + false + 0 + true + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.PluginSettings + + + + ProjectExplorer.Project.Target.0 + + Desktop Qt 5.10.1 clang 64bit + Desktop Qt 5.10.1 clang 64bit + qt.qt5.5101.clang_64_kit + 0 + 0 + 0 + + /Users/aidan/Desktop/build-moonlight-qt-Desktop_Qt_5_10_1_clang_64bit-Debug + + + true + qmake + + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Make + + Qt4ProjectManager.MakeStep + + -w + -r + + false + + + + 2 + Build + + ProjectExplorer.BuildSteps.Build + + + + true + Make + + Qt4ProjectManager.MakeStep + + -w + -r + + true + clean + + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + + Qt4ProjectManager.Qt4BuildConfiguration + 2 + true + + + /Users/aidan/Desktop/build-moonlight-qt-Desktop_Qt_5_10_1_clang_64bit-Release + + + true + qmake + + QtProjectManager.QMakeBuildStep + false + + false + false + false + + + true + Make + + Qt4ProjectManager.MakeStep + + -w + -r + + false + + + + 2 + Build + + ProjectExplorer.BuildSteps.Build + + + + true + Make + + Qt4ProjectManager.MakeStep + + -w + -r + + true + clean + + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + + Qt4ProjectManager.Qt4BuildConfiguration + 0 + true + + + /Users/aidan/Desktop/build-moonlight-qt-Desktop_Qt_5_10_1_clang_64bit-Profile + + + true + qmake + + QtProjectManager.QMakeBuildStep + true + + false + true + false + + + true + Make + + Qt4ProjectManager.MakeStep + + -w + -r + + false + + + + 2 + Build + + ProjectExplorer.BuildSteps.Build + + + + true + Make + + Qt4ProjectManager.MakeStep + + -w + -r + + true + clean + + + 1 + Clean + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + + Qt4ProjectManager.Qt4BuildConfiguration + 0 + true + + 3 + + + 0 + Deploy + + ProjectExplorer.BuildSteps.Deploy + + 1 + Deploy locally + + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + moonlight-qt + + Qt4ProjectManager.Qt4RunConfiguration:/Users/aidan/Desktop/moonlight-qt/moonlight-qt.pro + true + + moonlight-qt.pro + false + + /moonlight-qt.app/Contents/MacOS + 3768 + false + true + false + false + true + + 1 + + + + ProjectExplorer.Project.TargetCount + 1 + + + ProjectExplorer.Project.Updater.FileVersion + 18 + + + Version + 18 + +