OSCAR-code/daily.h

86 lines
2.2 KiB
C
Raw Normal View History

2011-06-26 08:30:44 +00:00
/********************************************************************
Daily GUI Headers
Copyright (c)2011 Mark Watkins <jedimark@users.sourceforge.net>
License: GPL
*********************************************************************/
#ifndef DAILY_H
#define DAILY_H
#include <QScrollArea>
#include <QSplitter>
#include <QWidget>
#include <QTreeWidget>
#include <QLabel>
#include <QtOpenGL/QGLContext>
#include <SleepLib/profiles.h>
#include <Graphs/graphwindow.h>
#include <Graphs/graphdata.h>
namespace Ui {
class Daily;
}
class Daily : public QWidget
{
Q_OBJECT
public:
explicit Daily(QWidget *parent,QGLContext *context);
~Daily();
void SetGLContext(QGLContext *context) { shared_context=context; };
void ReloadGraphs();
2011-06-27 15:00:00 +00:00
void RedrawGraphs();
2011-06-26 08:30:44 +00:00
private slots:
void on_calendar_currentPageChanged(int year, int month);
void on_calendar_selectionChanged();
void on_JournalNotesItalic_clicked();
void on_JournalNotesBold_clicked();
void on_JournalNotesFontsize_activated(int index);
void on_JournalNotesColour_clicked();
void on_EnergySlider_sliderMoved(int position);
void on_treeWidget_itemSelectionChanged();
void on_JournalNotesUnderline_clicked();
2011-06-26 08:30:44 +00:00
private:
Session * CreateJournalSession(QDate date);
Session * GetJournalSession(QDate date);
void Load(QDate date);
void Unload(QDate date);
void UpdateCalendarDay(QDate date);
void UpdateEventsTree(QTreeWidget * tree,Day *day);
gPointData *tap,*tap_eap,*tap_iap,*g_ahi,*frw,*prd,*leakdata,*pressure_iap,*pressure_eap,*snore;
gPointData *pulse,*spo2;
gGraphWindow *PRD,*FRW,*G_AHI,*TAP,*LEAK,*SF,*TAP_EAP,*TAP_IAP,*PULSE,*SPO2,*SNORE;
list<gPointData *> OXIData;
list<gPointData *> CPAPData;
2011-06-27 07:45:59 +00:00
list<gGraphWindow *> Graphs;
2011-06-26 08:30:44 +00:00
void AddCPAPData(gPointData *d) { CPAPData.push_back(d); };
void AddOXIData(gPointData *d) { OXIData.push_back(d); };
2011-06-27 07:45:59 +00:00
void AddGraph(gGraphWindow *w) { Graphs.push_back(w); };
2011-06-26 08:30:44 +00:00
void UpdateCPAPGraphs(Day *day);
void UpdateOXIGraphs(Day *day);
gPointData *flags[10];
Ui::Daily *ui;
Profile *profile;
QDate previous_date;
QGLContext *shared_context;
QScrollArea *scrollArea;
QSplitter *gSplitter;
QLabel *NoData;
};
#endif // DAILY_H