summaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
authorGravatar Amit Chaudhuri <amit.k.chaudhuri@gmail.com>2013-04-09 17:26:23 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-04-09 22:49:13 -0700
commit1182c989973a3006a482413ddd2d523be64e5443 (patch)
treefb3bc9fd16f8b3d1fbbfe8ff660d3c31f1d083ac /qt-ui
parent99153de715955a9a80097c9951eaf096efeb5752 (diff)
downloadsubsurface-1182c989973a3006a482413ddd2d523be64e5443.tar.gz
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 <amit.k.chaudhuri@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/mainwindow.cpp138
-rw-r--r--qt-ui/mainwindow.h34
-rw-r--r--qt-ui/mainwindow.ui110
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 @@
<x>0</x>
<y>0</y>
<width>763</width>
- <height>19</height>
+ <height>20</height>
</rect>
</property>
<widget class="QMenu" name="menuFile">
@@ -54,63 +54,63 @@
</property>
<addaction name="actionNew"/>
<addaction name="actionOpen"/>
- <addaction name="actSave"/>
- <addaction name="actSaveAs"/>
- <addaction name="actClose"/>
+ <addaction name="actionSave"/>
+ <addaction name="actionSaveAs"/>
+ <addaction name="actionClose"/>
<addaction name="separator"/>
- <addaction name="actImport"/>
- <addaction name="actExportUDDF"/>
+ <addaction name="actionImport"/>
+ <addaction name="actionExportUDDF"/>
<addaction name="separator"/>
- <addaction name="actPrint"/>
+ <addaction name="actionPrint"/>
<addaction name="separator"/>
- <addaction name="actPreferences"/>
+ <addaction name="actionPreferences"/>
<addaction name="separator"/>
- <addaction name="actQuit"/>
+ <addaction name="actionQuit"/>
</widget>
<widget class="QMenu" name="menuLog">
<property name="title">
<string>Log</string>
</property>
- <addaction name="actDowFromDiveComputer"/>
- <addaction name="actDownloadFromWeb"/>
- <addaction name="actionEdit_Device_Names"/>
+ <addaction name="actionDownloadDC"/>
+ <addaction name="actionDownloadWeb"/>
+ <addaction name="actionEditDeviceNames"/>
<addaction name="separator"/>
- <addaction name="actionAdd_Dive"/>
+ <addaction name="actionAddDive"/>
<addaction name="separator"/>
<addaction name="actionRenumber"/>
- <addaction name="actionAuto_Group"/>
- <addaction name="actionToggle_Zoom"/>
- <addaction name="actionYearly_Statistics"/>
+ <addaction name="actionAutoGroup"/>
+ <addaction name="actionToggleZoom"/>
+ <addaction name="actionYearlyStatistics"/>
</widget>
<widget class="QMenu" name="menuView">
<property name="title">
<string>View</string>
</property>
- <addaction name="actionList"/>
- <addaction name="actionProfile"/>
- <addaction name="actionInfo"/>
- <addaction name="actionTree"/>
- <addaction name="actionPrev_DC"/>
- <addaction name="actionNext_DC"/>
+ <addaction name="actionViewList"/>
+ <addaction name="actionViewProfile"/>
+ <addaction name="actionViewInfo"/>
+ <addaction name="actionViewAll"/>
+ <addaction name="actionPreviousDC"/>
+ <addaction name="actionNextDC"/>
</widget>
<widget class="QMenu" name="menuFilter">
<property name="title">
<string>Filter</string>
</property>
- <addaction name="actionSelect_Events"/>
+ <addaction name="actionSelectEvents"/>
</widget>
<widget class="QMenu" name="menuPlanner">
<property name="title">
<string>Planner</string>
</property>
- <addaction name="actionInput_Plan"/>
+ <addaction name="actionInputPlan"/>
</widget>
<widget class="QMenu" name="menuHelp">
<property name="title">
<string>Help</string>
</property>
- <addaction name="actionAbout_Subsurface"/>
- <addaction name="actionUser_Manual"/>
+ <addaction name="actionAboutSubsurface"/>
+ <addaction name="actionUserManual"/>
</widget>
<addaction name="menuFile"/>
<addaction name="menuLog"/>
@@ -135,7 +135,7 @@
<string>Ctrl+O</string>
</property>
</action>
- <action name="actSave">
+ <action name="actionSave">
<property name="text">
<string>Save</string>
</property>
@@ -143,7 +143,7 @@
<string>Ctrl+S</string>
</property>
</action>
- <action name="actSaveAs">
+ <action name="actionSaveAs">
<property name="text">
<string>Save as</string>
</property>
@@ -151,7 +151,7 @@
<string>Ctrl+Shift+S</string>
</property>
</action>
- <action name="actClose">
+ <action name="actionClose">
<property name="text">
<string>Close</string>
</property>
@@ -159,7 +159,7 @@
<string>Ctrl+W</string>
</property>
</action>
- <action name="actImport">
+ <action name="actionImport">
<property name="text">
<string>Import Files</string>
</property>
@@ -167,12 +167,12 @@
<string>Ctrl+I</string>
</property>
</action>
- <action name="actExportUDDF">
+ <action name="actionExportUDDF">
<property name="text">
<string>Export UDDF</string>
</property>
</action>
- <action name="actPrint">
+ <action name="actionPrint">
<property name="text">
<string>Print</string>
</property>
@@ -180,12 +180,12 @@
<string>Ctrl+P</string>
</property>
</action>
- <action name="actPreferences">
+ <action name="actionPreferences">
<property name="text">
<string>Preferences</string>
</property>
</action>
- <action name="actQuit">
+ <action name="actionQuit">
<property name="text">
<string>Quit</string>
</property>
@@ -193,22 +193,22 @@
<string>Ctrl+Q</string>
</property>
</action>
- <action name="actDowFromDiveComputer">
+ <action name="actionDownloadDC">
<property name="text">
<string>Download from Dive computer</string>
</property>
</action>
- <action name="actDownloadFromWeb">
+ <action name="actionDownloadWeb">
<property name="text">
<string>Download from Web Service</string>
</property>
</action>
- <action name="actionEdit_Device_Names">
+ <action name="actionEditDeviceNames">
<property name="text">
<string>Edit Device Names</string>
</property>
</action>
- <action name="actionAdd_Dive">
+ <action name="actionAddDive">
<property name="text">
<string>Add Dive</string>
</property>
@@ -218,67 +218,67 @@
<string>Renumber</string>
</property>
</action>
- <action name="actionAuto_Group">
+ <action name="actionAutoGroup">
<property name="text">
<string>Auto Group</string>
</property>
</action>
- <action name="actionToggle_Zoom">
+ <action name="actionToggleZoom">
<property name="text">
<string>Toggle Zoom</string>
</property>
</action>
- <action name="actionYearly_Statistics">
+ <action name="actionYearlyStatistics">
<property name="text">
<string>Yearly Statistics</string>
</property>
</action>
- <action name="actionList">
+ <action name="actionViewList">
<property name="text">
- <string>List</string>
+ <string>View List</string>
</property>
</action>
- <action name="actionProfile">
+ <action name="actionViewProfile">
<property name="text">
- <string>Profile</string>
+ <string>View Profile</string>
</property>
</action>
- <action name="actionInfo">
+ <action name="actionViewInfo">
<property name="text">
- <string>Info</string>
+ <string>View Info</string>
</property>
</action>
- <action name="actionTree">
+ <action name="actionViewAll">
<property name="text">
- <string>Tree</string>
+ <string>View All</string>
</property>
</action>
- <action name="actionPrev_DC">
+ <action name="actionPreviousDC">
<property name="text">
<string>Prev DC</string>
</property>
</action>
- <action name="actionNext_DC">
+ <action name="actionNextDC">
<property name="text">
<string>Next DC</string>
</property>
</action>
- <action name="actionSelect_Events">
+ <action name="actionSelectEvents">
<property name="text">
<string>Select Events</string>
</property>
</action>
- <action name="actionInput_Plan">
+ <action name="actionInputPlan">
<property name="text">
<string>Input Plan</string>
</property>
</action>
- <action name="actionAbout_Subsurface">
+ <action name="actionAboutSubsurface">
<property name="text">
<string>About Subsurface</string>
</property>
</action>
- <action name="actionUser_Manual">
+ <action name="actionUserManual">
<property name="text">
<string>User Manual</string>
</property>