From 1182c989973a3006a482413ddd2d523be64e5443 Mon Sep 17 00:00:00 2001 From: Amit Chaudhuri Date: Tue, 9 Apr 2013 17:26:23 +0100 Subject: [PATCH] Add stub slots for all menu items Naming of QActions was inconsistent wrt abbreviations - fixed. Add stub slots for each action relying on connect by name. Add qDebug() message to allow people to check that menu items fire slots; not really necessary but may provide some reassurance as we build familiarity with Qt. Some changes to display text for menu items (e.g. Tree becomes View All). Signed-off-by: Amit Chaudhuri Signed-off-by: Dirk Hohndel --- qt-ui/mainwindow.cpp | 138 ++++++++++++++++++++++++++++++++++++++++++- qt-ui/mainwindow.h | 34 +++++++++++ qt-ui/mainwindow.ui | 110 +++++++++++++++++----------------- 3 files changed, 226 insertions(+), 56 deletions(-) diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp index 03e14377f..9bcc03c75 100644 --- a/qt-ui/mainwindow.cpp +++ b/qt-ui/mainwindow.cpp @@ -11,5 +11,141 @@ MainWindow::MainWindow() : ui(new Ui::MainWindow()) void MainWindow::on_actionNew_triggered() { - qDebug() << "actionNew"; + qDebug() << "actionNew"; } + +void MainWindow::on_actionOpen_triggered() +{ + qDebug() << "actionOpen"; +} + +void MainWindow::on_actionSave_triggered() +{ + qDebug() << "actionSave"; +} + +void MainWindow::on_actionSaveAs_triggered() +{ + qDebug() << "actionSaveAs"; +} +void MainWindow::on_actionClose_triggered() +{ + qDebug() << "actionClose"; +} + +void MainWindow::on_actionImport_triggered() +{ + qDebug() << "actionImport"; +} + +void MainWindow::on_actionExportUDDF_triggered() +{ + qDebug() << "actionExportUDDF"; +} + +void MainWindow::on_actionPrint_triggered() +{ + qDebug() << "actionPrint"; +} + +void MainWindow::on_actionPreferences_triggered() +{ + qDebug() << "actionPreferences"; +} + +void MainWindow::on_actionQuit_triggered() +{ + qDebug() << "actionQuit"; +} + +void MainWindow::on_actionDownloadDC_triggered() +{ + qDebug() << "actionDownloadDC"; +} + +void MainWindow::on_actionDownloadWeb_triggered() +{ + qDebug() << "actionDownloadWeb";} + +void MainWindow::on_actionEditDeviceNames_triggered() +{ + qDebug() << "actionEditDeviceNames";} + +void MainWindow::on_actionAddDive_triggered() +{ + qDebug() << "actionAddDive"; +} + +void MainWindow::on_actionRenumber_triggered() +{ + qDebug() << "actionRenumber"; +} + +void MainWindow::on_actionAutoGroup_triggered() +{ + qDebug() << "actionAutoGroup"; +} + +void MainWindow::on_actionToggleZoom_triggered() +{ + qDebug() << "actionToggleZoom"; +} + +void MainWindow::on_actionYearlyStatistics_triggered() +{ + qDebug() << "actionYearlyStatistics"; +} + +void MainWindow::on_actionViewList_triggered() +{ + qDebug() << "actionViewList"; +} + +void MainWindow::on_actionViewProfile_triggered() +{ + qDebug() << "actionViewProfile"; +} + +void MainWindow::on_actionViewInfo_triggered() +{ + qDebug() << "actionViewInfo"; +} + +void MainWindow::on_actionViewAll_triggered() +{ + qDebug() << "actionViewAll"; +} + +void MainWindow::on_actionPreviousDC_triggered() +{ + qDebug() << "actionPreviousDC"; +} + +void MainWindow::on_actionNextDC_triggered() +{ + qDebug() << "actionNextDC"; +} + +void MainWindow::on_actionSelectEvents_triggered() +{ + qDebug() << "actionSelectEvents"; +} + +void MainWindow::on_actionInputPlan_triggered() +{ + qDebug() << "actionInputPlan"; +} + +void MainWindow::on_actionAboutSubsurface_triggered() +{ + qDebug() << "actionAboutSubsurface"; +} + +void MainWindow::on_actionUserManual_triggered() +{ + qDebug() << "actionUserManual"; +} + + + +#include "mainwindow.moc" diff --git a/qt-ui/mainwindow.h b/qt-ui/mainwindow.h index 6361870b2..51b428c5f 100644 --- a/qt-ui/mainwindow.h +++ b/qt-ui/mainwindow.h @@ -22,7 +22,41 @@ public: private Q_SLOTS: + /* file menu action */ void on_actionNew_triggered(); + void on_actionOpen_triggered(); + void on_actionSave_triggered(); + void on_actionSaveAs_triggered(); + void on_actionClose_triggered(); + void on_actionImport_triggered(); + void on_actionExportUDDF_triggered(); + void on_actionPrint_triggered(); + void on_actionPreferences_triggered(); + void on_actionQuit_triggered(); + + /* log menu actions */ + void on_actionDownloadDC_triggered(); + void on_actionDownloadWeb_triggered(); + void on_actionEditDeviceNames_triggered(); + void on_actionAddDive_triggered(); + void on_actionRenumber_triggered(); + void on_actionAutoGroup_triggered(); + void on_actionToggleZoom_triggered(); + void on_actionYearlyStatistics_triggered(); + + /* view menu actions */ + void on_actionViewList_triggered(); + void on_actionViewProfile_triggered(); + void on_actionViewInfo_triggered(); + void on_actionViewAll_triggered(); + void on_actionPreviousDC_triggered(); + void on_actionNextDC_triggered(); + + /* other menu actions */ + void on_actionSelectEvents_triggered(); + void on_actionInputPlan_triggered(); + void on_actionAboutSubsurface_triggered(); + void on_actionUserManual_triggered(); private: Ui::MainWindow *ui; diff --git a/qt-ui/mainwindow.ui b/qt-ui/mainwindow.ui index b99d10222..96751dc0c 100644 --- a/qt-ui/mainwindow.ui +++ b/qt-ui/mainwindow.ui @@ -45,7 +45,7 @@ 0 0 763 - 19 + 20 @@ -54,63 +54,63 @@ - - - + + + - - + + - + - + - + Log - - - + + + - + - - - + + + View - - - - - - + + + + + + Filter - + Planner - + Help - - + + @@ -135,7 +135,7 @@ Ctrl+O - + Save @@ -143,7 +143,7 @@ Ctrl+S - + Save as @@ -151,7 +151,7 @@ Ctrl+Shift+S - + Close @@ -159,7 +159,7 @@ Ctrl+W - + Import Files @@ -167,12 +167,12 @@ Ctrl+I - + Export UDDF - + Print @@ -180,12 +180,12 @@ Ctrl+P - + Preferences - + Quit @@ -193,22 +193,22 @@ Ctrl+Q - + Download from Dive computer - + Download from Web Service - + Edit Device Names - + Add Dive @@ -218,67 +218,67 @@ Renumber - + Auto Group - + Toggle Zoom - + Yearly Statistics - + - List + View List - + - Profile + View Profile - + - Info + View Info - + - Tree + View All - + Prev DC - + Next DC - + Select Events - + Input Plan - + About Subsurface - + User Manual