OSCAR-code/mainwindow.h

142 lines
3.1 KiB
C
Raw Normal View History

/*
2011-06-26 08:30:44 +00:00
MainWindow Headers
Copyright (c)2011 Mark Watkins <jedimark@users.sourceforge.net>
License: GPL
*/
2011-06-26 08:30:44 +00:00
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QGLContext>
2011-09-06 07:33:34 +00:00
#include <QNetworkAccessManager>
#include <QNetworkReply>
#include <QSystemTrayIcon>
#include "version.h"
2011-06-26 08:30:44 +00:00
#include "daily.h"
#include "overview.h"
2011-07-13 05:27:27 +00:00
#include "oximetry.h"
#include "preferencesdialog.h"
2011-06-26 08:30:44 +00:00
extern Profile * profile;
2011-06-26 08:30:44 +00:00
namespace Ui {
class MainWindow;
}
extern QStatusBar *qstatusbar;
class Daily;
class Report;
class Overview;
2011-06-26 08:30:44 +00:00
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
void Log(QString s);
QMenu * CreateMenu(QString title);
void CheckForUpdates();
void Notify(QString s,int ms=5000);
gGraphView *snapshotGraph() { return SnapshotGraph; }
Daily *getDaily() { return daily; }
Overview *getOverview() { return overview; }
Oximetry *getOximetry() { return oximetry; }
2011-12-13 08:05:33 +00:00
void RestartApplication(bool force_login=false);
void selectOximetryTab();
void JumpDaily();
2011-12-02 14:36:40 +00:00
void PrintReport(gGraphView *gv,QString name, QDate date=QDate::currentDate());
2011-06-26 08:30:44 +00:00
private slots:
void on_action_Import_Data_triggered();
void on_actionView_Welcome_triggered();
void on_action_Fullscreen_triggered();
void on_homeButton_clicked();
void on_backButton_clicked();
void on_forwardButton_clicked();
void on_webView_urlChanged(const QUrl &arg1);
void on_urlBar_activated(const QString &arg1);
void on_dailyButton_clicked();
void on_overviewButton_clicked();
void on_webView_loadFinished(bool arg1);
void on_webView_loadStarted();
void on_webView_loadProgress(int progress);
2011-06-26 16:35:54 +00:00
void on_action_About_triggered();
2011-06-27 06:26:29 +00:00
void Startup();
void on_actionDebug_toggled(bool arg1);
2011-07-28 14:20:59 +00:00
void on_action_Reset_Graph_Layout_triggered();
2011-08-02 22:37:15 +00:00
void on_action_Preferences_triggered();
void on_oximetryButton_clicked();
2011-09-06 07:33:34 +00:00
void on_actionCheck_for_Updates_triggered();
void replyFinished(QNetworkReply*);
2011-09-07 08:08:27 +00:00
void on_action_Screenshot_triggered();
void DelayedScreenshot();
2011-09-07 09:15:33 +00:00
void on_actionView_O_ximetry_triggered();
void updatestatusBarMessage (const QString & text);
void on_actionPrint_Report_triggered();
2011-09-07 09:15:33 +00:00
2011-10-01 12:59:05 +00:00
void on_action_Edit_Profile_triggered();
void on_action_Link_Graph_Groups_toggled(bool arg1);
void on_action_CycleTabs_triggered();
2011-11-14 14:10:46 +00:00
void on_actionExp_ort_triggered();
2011-11-21 10:20:11 +00:00
void on_actionOnline_Users_Guide_triggered();
void on_action_Frequently_Asked_Questions_triggered();
void on_action_Rebuild_Oximetry_Index_triggered();
void on_actionChange_User_triggered();
void on_actionPurge_Current_Day_triggered();
2011-12-13 08:05:33 +00:00
void on_actionAll_Data_for_current_CPAP_machine_triggered();
2011-06-26 08:30:44 +00:00
private:
2011-06-26 08:30:44 +00:00
Ui::MainWindow *ui;
Daily * daily;
Overview * overview;
2011-07-29 14:58:44 +00:00
Oximetry * oximetry;
2011-06-27 06:26:29 +00:00
bool first_load;
//Profile *profile;
2011-09-06 07:33:34 +00:00
QNetworkAccessManager *netmanager;
PreferencesDialog *prefdialog;
2011-09-18 14:43:15 +00:00
QMutex loglock,strlock;
QStringList logbuffer;
QTime logtime;
QSystemTrayIcon *systray;
QMenu *systraymenu;
gGraphView *SnapshotGraph;
2011-06-26 08:30:44 +00:00
};
#endif // MAINWINDOW_H