2013-04-13 20:44:02 -07:00
|
|
|
/*
|
|
|
|
* mainwindow.h
|
|
|
|
*
|
|
|
|
* header file for the main window of Subsurface
|
|
|
|
*
|
|
|
|
*/
|
2013-04-07 15:20:43 -07:00
|
|
|
#ifndef MAINWINDOW_H
|
|
|
|
#define MAINWINDOW_H
|
|
|
|
|
|
|
|
#include <QMainWindow>
|
2013-05-02 20:32:57 -03:00
|
|
|
#include <QModelIndex>
|
2013-05-12 06:54:34 -07:00
|
|
|
#include <QAction>
|
2013-04-07 15:20:43 -07:00
|
|
|
|
2013-05-19 00:09:36 -03:00
|
|
|
struct DiveList;
|
2013-04-25 20:44:06 -03:00
|
|
|
class QSortFilterProxyModel;
|
2013-04-12 08:24:07 +01:00
|
|
|
class DiveTripModel;
|
2013-04-09 09:35:44 +01:00
|
|
|
|
2013-04-07 15:20:43 -07:00
|
|
|
namespace Ui
|
|
|
|
{
|
|
|
|
class MainWindow;
|
|
|
|
}
|
|
|
|
|
|
|
|
class DiveInfo;
|
|
|
|
class DiveNotes;
|
|
|
|
class Stats;
|
|
|
|
class Equipment;
|
2013-05-03 21:49:40 -03:00
|
|
|
class QItemSelection;
|
2013-05-19 00:09:36 -03:00
|
|
|
class DiveListView;
|
|
|
|
class GlobeGPS;
|
|
|
|
class MainTab;
|
|
|
|
class ProfileGraphicsView;
|
2013-05-30 10:54:06 -03:00
|
|
|
class QTextBrowser;
|
2013-04-07 15:20:43 -07:00
|
|
|
|
2013-04-09 09:35:44 +01:00
|
|
|
class MainWindow : public QMainWindow
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
2013-04-07 15:20:43 -07:00
|
|
|
public:
|
|
|
|
MainWindow();
|
2013-05-19 00:09:36 -03:00
|
|
|
ProfileGraphicsView *graphics();
|
|
|
|
MainTab *information();
|
|
|
|
DiveListView *dive_list();
|
|
|
|
GlobeGPS *globe();
|
2013-05-21 23:13:45 -07:00
|
|
|
void showError(QString message);
|
2013-04-09 09:35:44 +01:00
|
|
|
|
|
|
|
private Q_SLOTS:
|
|
|
|
|
2013-05-19 00:09:36 -03:00
|
|
|
|
2013-04-09 17:26:23 +01:00
|
|
|
/* file menu action */
|
2013-04-09 09:35:44 +01:00
|
|
|
void on_actionNew_triggered();
|
2013-04-09 17:26:23 +01: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 09:35:44 +01:00
|
|
|
|
2013-05-14 08:18:26 -03:00
|
|
|
void current_dive_changed(int divenr);
|
2013-06-04 21:40:09 +09:00
|
|
|
void initialUiSetup();
|
2013-05-14 08:18:26 -03:00
|
|
|
|
2013-04-27 10:09:57 +01:00
|
|
|
protected:
|
|
|
|
void closeEvent(QCloseEvent *);
|
|
|
|
|
2013-05-26 11:33:45 -07:00
|
|
|
public Q_SLOTS:
|
|
|
|
void readSettings();
|
2013-05-30 17:58:59 +09:00
|
|
|
void refreshDisplay();
|
2013-05-26 11:33:45 -07:00
|
|
|
|
2013-04-07 15:20:43 -07:00
|
|
|
private:
|
|
|
|
Ui::MainWindow *ui;
|
2013-05-12 06:54:34 -07:00
|
|
|
QAction *actionNextDive;
|
|
|
|
QAction *actionPreviousDive;
|
2013-05-30 10:54:06 -03:00
|
|
|
QTextBrowser *helpView;
|
2013-04-13 10:17:59 -03:00
|
|
|
QString filter();
|
|
|
|
bool askSaveChanges();
|
2013-04-27 10:09:57 +01:00
|
|
|
void writeSettings();
|
2013-05-10 10:45:13 -07:00
|
|
|
void redrawProfile();
|
2013-05-19 15:25:47 -07:00
|
|
|
void file_save();
|
|
|
|
void file_save_as();
|
2013-04-07 15:20:43 -07:00
|
|
|
};
|
|
|
|
|
2013-05-19 00:09:36 -03:00
|
|
|
MainWindow *mainWindow();
|
|
|
|
|
2013-04-09 09:35:44 +01:00
|
|
|
#endif
|