From 4c14dd868886f64cfe29e2ab38bbd68a097da996 Mon Sep 17 00:00:00 2001 From: dismine Date: Sat, 5 Oct 2013 15:07:04 +0300 Subject: [PATCH] Menu for main window. --HG-- branch : develop --- mainwindow.cpp | 12 ++++++++++++ mainwindow.h | 2 ++ mainwindow.ui | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 60 insertions(+) diff --git a/mainwindow.cpp b/mainwindow.cpp index b76be3b72..ee35f0263 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -104,6 +104,10 @@ MainWindow::MainWindow(QWidget *parent) : timer->setTimerType(Qt::VeryCoarseTimer); connect(timer, &QTimer::timeout, this, &MainWindow::AutoSavePattern); timer->start(300000); + + connect(ui->actionAbout_Qt, &QAction::triggered, this, &MainWindow::AboutQt); + connect(ui->actionAbout_Valentina, &QAction::triggered, this, &MainWindow::About); + connect(ui->actionExit, &QAction::triggered, this, &MainWindow::close); } void MainWindow::ActionNewDraw(){ @@ -443,6 +447,14 @@ void MainWindow::ClosedDialogDetail(int result){ ArrowTool(); } +void MainWindow::About(){ + QMessageBox::about(this, tr("About Valentina"), tr("Valentina v.0.1.0")); +} + +void MainWindow::AboutQt(){ + QMessageBox::aboutQt(this, tr("About Qt")); +} + void MainWindow::tableClosed(){ show(); MinimumScrollBar(); diff --git a/mainwindow.h b/mainwindow.h index 4015d654f..eba55383f 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -92,6 +92,8 @@ public slots: void ClosedDialogSplinePath(int result); void ClosedDialogPointOfContact(int result); void ClosedDialogDetail(int result); + void About(); + void AboutQt(); /** * @brief tableClosed Слот, що виконується при отриманні сигналу закриття вікна укладання *деталей моделі. diff --git a/mainwindow.ui b/mainwindow.ui index 1a59a2b7b..f04705dd9 100644 --- a/mainwindow.ui +++ b/mainwindow.ui @@ -494,6 +494,37 @@ 25 + + + File + + + + + + + + + + + Help + + + + + + + Drawing + + + + + + + + + + @@ -726,6 +757,21 @@ Create layout + + + About Qt + + + + + About Valentina + + + + + Exit + +