2013-04-14 03:44:02 +00:00
|
|
|
/*
|
|
|
|
* mainwindow.h
|
|
|
|
*
|
|
|
|
* header file for the main window of Subsurface
|
|
|
|
*
|
|
|
|
*/
|
2013-04-07 22:20:43 +00:00
|
|
|
#ifndef MAINWINDOW_H
|
|
|
|
#define MAINWINDOW_H
|
|
|
|
|
|
|
|
#include <QMainWindow>
|
|
|
|
|
2013-04-25 23:44:06 +00:00
|
|
|
class QSortFilterProxyModel;
|
2013-04-12 07:24:07 +00:00
|
|
|
class DiveTripModel;
|
2013-04-09 08:35:44 +00:00
|
|
|
|
2013-04-07 22:20:43 +00:00
|
|
|
namespace Ui
|
|
|
|
{
|
|
|
|
class MainWindow;
|
|
|
|
}
|
|
|
|
|
|
|
|
class DiveInfo;
|
|
|
|
class DiveNotes;
|
|
|
|
class Stats;
|
|
|
|
class Equipment;
|
|
|
|
|
2013-04-09 08:35:44 +00:00
|
|
|
class MainWindow : public QMainWindow
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
2013-04-07 22:20:43 +00:00
|
|
|
public:
|
|
|
|
MainWindow();
|
2013-04-09 08:35:44 +00:00
|
|
|
|
|
|
|
private Q_SLOTS:
|
|
|
|
|
2013-04-09 16:26:23 +00:00
|
|
|
/* file menu action */
|
2013-04-09 08:35:44 +00:00
|
|
|
void on_actionNew_triggered();
|
2013-04-09 16:26:23 +00:00
|
|
|
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();
|
2013-04-09 08:35:44 +00:00
|
|
|
|
2013-04-27 09:09:57 +00:00
|
|
|
protected:
|
|
|
|
void closeEvent(QCloseEvent *);
|
|
|
|
|
2013-04-07 22:20:43 +00:00
|
|
|
private:
|
|
|
|
Ui::MainWindow *ui;
|
2013-04-12 07:24:07 +00:00
|
|
|
DiveTripModel *model;
|
2013-04-25 23:44:06 +00:00
|
|
|
QSortFilterProxyModel *sortModel;
|
2013-04-13 13:17:59 +00:00
|
|
|
QString filter();
|
|
|
|
bool askSaveChanges();
|
2013-04-27 09:09:57 +00:00
|
|
|
void readSettings();
|
|
|
|
void writeSettings();
|
2013-04-13 13:17:59 +00:00
|
|
|
|
2013-04-07 22:20:43 +00:00
|
|
|
};
|
|
|
|
|
2013-04-09 08:35:44 +00:00
|
|
|
#endif
|