Improve comments for Daily & MainWindow headers

This commit is contained in:
Mark Watkins 2011-12-18 20:53:51 +10:00
parent 7583602d64
commit fc2ffa84f2
10 changed files with 310 additions and 47 deletions

View File

@ -193,9 +193,7 @@ void UpdaterWindow::ParseUpdateXML(QIODevice * dev)
close(); close();
return; return;
} }
qDebug() << "Version" << release->version << "has release section" << platform;
qDebug() << "Version" << release->version << "has updates for" << platform;
QString latestapp="", latestqt=""; QString latestapp="", latestqt="";
updates.clear(); updates.clear();

View File

@ -15,8 +15,19 @@ namespace Ui {
class UpdaterWindow; class UpdaterWindow;
} }
/*! \enum RequestMode
\brief Used in replyFinished() to differentiate the current update task.
*/
enum RequestMode { RM_None, RM_CheckUpdates, RM_GetFile }; enum RequestMode { RM_None, RM_CheckUpdates, RM_GetFile };
/*! \class UpdaterWindow
\brief Auto Update Module for SleepyHead
This class handles the complete Auto-Update procedure for SleepyHead, it does the network checks,
parses the update.xml from SourceForge host, checks for any new updates, and provides the UI
and mechanisms to download and replace the binaries according to what is specified in update.xml.
*/
class UpdaterWindow : public QMainWindow class UpdaterWindow : public QMainWindow
{ {
Q_OBJECT Q_OBJECT
@ -24,7 +35,13 @@ class UpdaterWindow : public QMainWindow
public: public:
explicit UpdaterWindow(QWidget *parent = 0); explicit UpdaterWindow(QWidget *parent = 0);
~UpdaterWindow(); ~UpdaterWindow();
//! Start the
void checkForUpdates(); void checkForUpdates();
/*! \fn ParseUpdateXML(QIODevice * dev)
\brief Parses the update.xml from either QFile or QNetworkReply source
*/
void ParseUpdateXML(QIODevice * dev); void ParseUpdateXML(QIODevice * dev);
protected slots: protected slots:

View File

@ -35,13 +35,14 @@
#include "Graphs/gStatsLine.h" #include "Graphs/gStatsLine.h"
//extern QProgressBar *qprogress; //extern QProgressBar *qprogress;
extern MainWindow * mainwin;
const int min_height=150; const int min_height=150;
const float ounce_convert=28.3495231; const float ounce_convert=28.3495231;
const float pound_convert=ounce_convert*16; const float pound_convert=ounce_convert*16;
Daily::Daily(QWidget *parent,gGraphView * shared, MainWindow *mw) Daily::Daily(QWidget *parent,gGraphView * shared)
:QWidget(parent),mainwin(mw), ui(new Ui::Daily) :QWidget(parent), ui(new Ui::Daily)
{ {
ui->setupUi(this); ui->setupUi(this);
@ -524,7 +525,6 @@ void Daily::LoadDate(QDate date)
void Daily::on_calendar_selectionChanged() void Daily::on_calendar_selectionChanged()
{ {
if (previous_date.isValid()) if (previous_date.isValid())
Unload(previous_date); Unload(previous_date);
@ -550,30 +550,6 @@ void Daily::ResetGraphLayout()
//splitter->setSizes(splitter_sizes); //splitter->setSizes(splitter_sizes);
} }
void Daily::ShowHideGraphs()
{
/* int vis=0;
for (int i=0;i<Graphs.size();i++) {
if (Graphs[i]->isEmpty()) {
GraphAction[i]->setVisible(false);
Graphs[i]->hide();
} else {
Graphs[i]->ResetBounds();
GraphAction[i]->setVisible(true);
if (GraphAction[i]->isChecked()) {
Graphs[i]->show();
vis++;
} else {
Graphs[i]->hide();
}
}
}
GraphLayout->setMinimumHeight(vis*default_height+10);
//splitter->setMaximumHeight(vis*default_height);
splitter->layout();
//splitter->update();
RedrawGraphs(); */
}
void Daily::graphtogglebutton_toggled(bool b) void Daily::graphtogglebutton_toggled(bool b)
{ {
Q_UNUSED(b) Q_UNUSED(b)

154
daily.h
View File

@ -32,75 +32,220 @@ namespace Ui {
class MainWindow; class MainWindow;
/*! \class Daily
\brief SleepyHead's Daily view which displays the calendar and all the graphs relative to a selected Day
*/
class Daily : public QWidget class Daily : public QWidget
{ {
Q_OBJECT Q_OBJECT
public: public:
explicit Daily(QWidget *parent, gGraphView *shared,MainWindow *mw); /*! \fn Daily()
\brief Constructs a Daily object
\param parent * (QObject parent)
\param shared *
\param MainWindow *
Creates all the graph objects and adds them to the main gGraphView area for this tab.
shared is not used for daily object
Neither is MainWindow * mw, as a "mainwin" global is used instead.
*/
explicit Daily(QWidget *parent, gGraphView *shared);
~Daily(); ~Daily();
/*! \fn ReloadGraphs()
\brief Reload all graph information from disk and updates the view.
*/
void ReloadGraphs(); void ReloadGraphs();
/*! \fn ResetGraphLayout()
\brief Resets all graphs in the main gGraphView back to constant heights.
*/
void ResetGraphLayout(); void ResetGraphLayout();
/*! \fn graphView()
\returns the main graphView area for the Daily View
*/
gGraphView *graphView() { return GraphView; } gGraphView *graphView() { return GraphView; }
/*! \fn RedrawGraphs()
\brief Calls updateGL on the main graphView area, redrawing the OpenGL area
*/
void RedrawGraphs(); void RedrawGraphs();
/*! \fn LoadDate()
\brief Selects a new day object, unloading the previous one, and loads the graph data for the supplied date.
\param QDate date
*/
void LoadDate(QDate date); void LoadDate(QDate date);
/*! \fn getDate()
\brief Returns the most recently loaded Date
\return QDate
*/
QDate getDate() { return previous_date; } QDate getDate() { return previous_date; }
void PrintReport();
/*! \fn UnitsChanged()
\brief Called by Profile editor when measurement units are changed
*/
void UnitsChanged(); void UnitsChanged();
/*! \fn GetJournalSession(QDate date)
\brief Looks up if there is a journal object for a supplied date
\param QDate date
\returns Session * containing valid Journal Session object or NULL if none found.
*/
Session * GetJournalSession(QDate date); Session * GetJournalSession(QDate date);
QString GetDetailsText(); QString GetDetailsText();
/*! \fn eventBreakdownPie()
\brief Returns a pointer to the Event Breakdown Piechart for the Report Printing module
\returns gGraph * object containing this chart
*/
gGraph * eventBreakdownPie() { return GAHI; } gGraph * eventBreakdownPie() { return GAHI; }
private slots: private slots:
/*! \fn on_calendar_currentPageChanged(int year, int month);
\brief Scans through all days for this month, updating the day colors for the calendar object
\param int year
\param int month
*/
void on_calendar_currentPageChanged(int year, int month); void on_calendar_currentPageChanged(int year, int month);
/*! \fn on_calendar_selectionChanged();
\brief Called when the calendar object is clicked. Selects and loads a new date, unloading the previous one.
*/
void on_calendar_selectionChanged(); void on_calendar_selectionChanged();
/* Journal Notes edit buttons I don't want to document */
void on_JournalNotesItalic_clicked(); void on_JournalNotesItalic_clicked();
void on_JournalNotesBold_clicked(); void on_JournalNotesBold_clicked();
void on_JournalNotesFontsize_activated(int index); void on_JournalNotesFontsize_activated(int index);
void on_JournalNotesColour_clicked(); void on_JournalNotesColour_clicked();
void on_JournalNotesUnderline_clicked();
void on_treeWidget_itemSelectionChanged(); void on_treeWidget_itemSelectionChanged();
void on_JournalNotesUnderline_clicked();
void ShowHideGraphs(); /*! \fn on_nextDayButton_clicked();
\brief Step backwards one day (if possible)
*/
void on_prevDayButton_clicked(); void on_prevDayButton_clicked();
/*! \fn on_nextDayButton_clicked();
\brief Step forward one day (if possible)
*/
void on_nextDayButton_clicked(); void on_nextDayButton_clicked();
/*! \fn on_calButton_toggled();
\brief Hides the calendar and put it out of the way, giving more room for the Details area.
*/
void on_calButton_toggled(bool checked); void on_calButton_toggled(bool checked);
/*! \fn on_todayButton_clicked();
\brief Select the most recent day.
*/
void on_todayButton_clicked(); void on_todayButton_clicked();
/*! \fn Link_clicked(const QUrl &url);
\brief Called when a link is clicked on in the HTML Details tab
\param const QUrl & url
*/
void Link_clicked(const QUrl &url); void Link_clicked(const QUrl &url);
void on_evViewSlider_valueChanged(int value); void on_evViewSlider_valueChanged(int value);
/*! \fn on_treeWidget_itemClicked(QTreeWidgetItem *item, int column);
\brief Called when an event is selected in the Event tab.. Zooms into the graph area.
\param QTreeWidgetItem *item
\param int column
*/
void on_treeWidget_itemClicked(QTreeWidgetItem *item, int column); void on_treeWidget_itemClicked(QTreeWidgetItem *item, int column);
/*! \fn graphtogglebutton_toggled(bool)
\brief Called to hide/show a graph when on of the toggle bottoms underneath the graph area is clicked
\param bool button status
*/
void graphtogglebutton_toggled(bool); void graphtogglebutton_toggled(bool);
/*! \fn on_addBookmarkButton_clicked()
\brief Current selected graph Area is added to Bookmark's list for this day's journal object.
*/
void on_addBookmarkButton_clicked(); void on_addBookmarkButton_clicked();
/*! \fn on_removeBookmarkButton_clicked()
\brief Currently selected bookmark is removed from this day's Bookmark list.
*/
void on_removeBookmarkButton_clicked(); void on_removeBookmarkButton_clicked();
/*! \fn on_bookmarkTable_itemClicked(QTableWidgetItem *item);
\brief Called when a bookmark has been selected.. Zooms in on the area
\param QTableWidgetItem *item
*/
void on_bookmarkTable_itemClicked(QTableWidgetItem *item); void on_bookmarkTable_itemClicked(QTableWidgetItem *item);
/*! \fn on_bookmarkTable_itemChanged(QTableWidgetItem *item);
\brief Called when bookmarks have been altered.. Saves the bookmark list to Journal object.
*/
void on_bookmarkTable_itemChanged(QTableWidgetItem *item); void on_bookmarkTable_itemChanged(QTableWidgetItem *item);
/*! \fn on_weightSpinBox_valueChanged(double arg1);
\brief Called when weight has changed.. Updates the BMI dislpay and journal objects.
Also Refreshes the Overview charts
*/
void on_weightSpinBox_valueChanged(double arg1); void on_weightSpinBox_valueChanged(double arg1);
/*! \fn on_ouncesSpinBox_valueChanged(int arg1);
\brief Called when weights ounces component has changed.. Updates the BMI dislpay and journal objects.
Also Refreshes the Overview charts
*/
void on_ouncesSpinBox_valueChanged(int arg1); void on_ouncesSpinBox_valueChanged(int arg1);
/*! \fn on_ouncesSpinBox_valueChanged(int arg1);
\brief Called when the zombie slider has been moved.. Updates the BMI dislpay and journal objects.
Also Refreshes the Overview charts
*/
void on_ZombieMeter_valueChanged(int value); void on_ZombieMeter_valueChanged(int value);
protected: protected:
private: private:
/*! \fn CreateJournalSession()
\brief Create a new journal session for this date, if one doesn't exist.
\param QDate date
Creates a new journal Machine record if necessary.
*/
Session * CreateJournalSession(QDate date); Session * CreateJournalSession(QDate date);
/*! \fn update_Bookmarks()
\brief Saves the current bookmark list to the Journal object
*/
void update_Bookmarks(); void update_Bookmarks();
/*! \fn Load(QDate date)
\brief Selects a new day object, loads it's content and generates the HTML for the Details tab
\param QDate date
*/
void Load(QDate date); void Load(QDate date);
/*! \fn Unload(QDate date)
\brief Saves any journal changes for the provided date.
\param QDate date
*/
void Unload(QDate date); void Unload(QDate date);
/*! \fn UpdateCalendarDay(QDate date)
\brief Updates the calendar visual information, changing a dates color depending on what data is available.
\param QDate date
*/
void UpdateCalendarDay(QDate date); void UpdateCalendarDay(QDate date);
/*! \fn UpdateEventsTree(QDate date)
\brief Refreshes the Events tree from the supplied Day object.
\param QTreeWidget * tree
\param Day *
*/
void UpdateEventsTree(QTreeWidget * tree,Day *day); void UpdateEventsTree(QTreeWidget * tree,Day *day);
gGraph *PRD,*FRW,*GAHI,*TAP,*LEAK,*SF,*TAP_EAP,*TAP_IAP,*PULSE,*SPO2, gGraph *PRD,*FRW,*GAHI,*TAP,*LEAK,*SF,*TAP_EAP,*TAP_IAP,*PULSE,*SPO2,
@ -120,7 +265,6 @@ private:
void UpdateCPAPGraphs(Day *day); void UpdateCPAPGraphs(Day *day);
void UpdateOXIGraphs(Day *day); void UpdateOXIGraphs(Day *day);
MainWindow * mainwin;
Ui::Daily *ui; Ui::Daily *ui;
QDate previous_date; QDate previous_date;
QMenu *show_graph_menu; QMenu *show_graph_menu;

View File

@ -71,6 +71,7 @@ MainWindow::MainWindow(QWidget *parent) :
logtime.start(); logtime.start();
ui->setupUi(this); ui->setupUi(this);
QString version=VersionString(); QString version=VersionString();
if (QString(GIT_BRANCH)!="master") version+=QString(" ")+QString(GIT_BRANCH); if (QString(GIT_BRANCH)!="master") version+=QString(" ")+QString(GIT_BRANCH);
this->setWindowTitle(tr("SleepyHead")+QString(" v%1 (Profile: %2)").arg(version).arg(PREF["Profile"].toString())); this->setWindowTitle(tr("SleepyHead")+QString(" v%1 (Profile: %2)").arg(version).arg(PREF["Profile"].toString()));
@ -81,6 +82,7 @@ MainWindow::MainWindow(QWidget *parent) :
oximetry=NULL; oximetry=NULL;
prefdialog=NULL; prefdialog=NULL;
// Initialize Status Bar objects
qstatusbar=ui->statusbar; qstatusbar=ui->statusbar;
qprogress=new QProgressBar(this); qprogress=new QProgressBar(this);
qprogress->setMaximum(100); qprogress->setMaximum(100);
@ -98,6 +100,10 @@ MainWindow::MainWindow(QWidget *parent) :
ui->statusbar->addPermanentWidget(qprogress,1); ui->statusbar->addPermanentWidget(qprogress,1);
ui->statusbar->addPermanentWidget(qstatus2,0); ui->statusbar->addPermanentWidget(qstatus2,0);
// This next section is a mess..
// Preferences & Profile variables really need to initialize somewhere else
if (!PROFILE.Exists("ShowDebug")) PROFILE["ShowDebug"]=false; if (!PROFILE.Exists("ShowDebug")) PROFILE["ShowDebug"]=false;
ui->actionDebug->setChecked(PROFILE["ShowDebug"].toBool()); ui->actionDebug->setChecked(PROFILE["ShowDebug"].toBool());
@ -105,8 +111,6 @@ MainWindow::MainWindow(QWidget *parent) :
ui->logText->hide(); ui->logText->hide();
} }
// TODO: Move all this to profile creation.
// This speeds up the second part of importing craploads.. later it will speed up the first part too. // This speeds up the second part of importing craploads.. later it will speed up the first part too.
if (!PROFILE.Exists("EnableMultithreading")) PROFILE["EnableMultithreading"]=QThread::idealThreadCount()>1; if (!PROFILE.Exists("EnableMultithreading")) PROFILE["EnableMultithreading"]=QThread::idealThreadCount()>1;
@ -136,15 +140,14 @@ MainWindow::MainWindow(QWidget *parent) :
// Using the dirty registry here. :( // Using the dirty registry here. :(
QSettings settings("Jedimark", "SleepyHead"); QSettings settings("Jedimark", "SleepyHead");
// Load previous Window geometry
this->restoreGeometry(settings.value("MainWindow/geometry").toByteArray()); this->restoreGeometry(settings.value("MainWindow/geometry").toByteArray());
// Start with the Welcome Tab
ui->tabWidget->setCurrentWidget(ui->welcome); ui->tabWidget->setCurrentWidget(ui->welcome);
/*netmanager = new QNetworkAccessManager(this); // Nifty Notification popups in System Tray (uses Growl on Mac)
connect(netmanager, SIGNAL(finished(QNetworkReply*)), this, SLOT(replyFinished(QNetworkReply*)));
connect(ui->webView, SIGNAL(statusBarMessage(QString)), this, SLOT(updatestatusBarMessage(QString))); */
if (QSystemTrayIcon::isSystemTrayAvailable() && QSystemTrayIcon::supportsMessages()) { if (QSystemTrayIcon::isSystemTrayAvailable() && QSystemTrayIcon::supportsMessages()) {
systray=new QSystemTrayIcon(QIcon(":/docs/sheep.png"),this); systray=new QSystemTrayIcon(QIcon(":/docs/sheep.png"),this);
systray->show(); systray->show();
@ -157,7 +160,7 @@ MainWindow::MainWindow(QWidget *parent) :
systraymenu->addAction("Check for Updates",this,SLOT(on_actionCheck_for_Updates_triggered())); systraymenu->addAction("Check for Updates",this,SLOT(on_actionCheck_for_Updates_triggered()));
systraymenu->addSeparator(); systraymenu->addSeparator();
systraymenu->addAction("Exit",this,SLOT(close())); systraymenu->addAction("Exit",this,SLOT(close()));
} else { } else { // if not available, the messages will popup in the taskbar
systray=NULL; systray=NULL;
systraymenu=NULL; systraymenu=NULL;
} }
@ -166,13 +169,13 @@ MainWindow::MainWindow(QWidget *parent) :
extern MainWindow *mainwin; extern MainWindow *mainwin;
MainWindow::~MainWindow() MainWindow::~MainWindow()
{ {
if (systray) delete systray;
if (systraymenu) delete systraymenu; if (systraymenu) delete systraymenu;
if (systray) delete systray;
//if (!isMaximized()) { // Save current window position
QSettings settings("Jedimark", "SleepyHead"); QSettings settings("Jedimark", "SleepyHead");
settings.setValue("MainWindow/geometry", saveGeometry()); settings.setValue("MainWindow/geometry", saveGeometry());
//}
if (daily) { if (daily) {
daily->close(); daily->close();
delete daily; delete daily;
@ -185,7 +188,11 @@ MainWindow::~MainWindow()
oximetry->close(); oximetry->close();
delete oximetry; delete oximetry;
} }
// Trash anything allocated by the Graph objects
DoneGraphs(); DoneGraphs();
// Shutdown and Save the current User profile
Profiles::Done(); Profiles::Done();
mainwin=NULL; mainwin=NULL;
delete ui; delete ui;
@ -214,7 +221,7 @@ void MainWindow::Startup()
//SnapshotGraph->setMinimumSize(1024,512); //SnapshotGraph->setMinimumSize(1024,512);
SnapshotGraph->hide(); SnapshotGraph->hide();
daily=new Daily(ui->tabWidget,NULL,this); daily=new Daily(ui->tabWidget,NULL);
ui->tabWidget->insertTab(1,daily,tr("Daily")); ui->tabWidget->insertTab(1,daily,tr("Daily"));
overview=new Overview(ui->tabWidget,daily->graphView()); overview=new Overview(ui->tabWidget,daily->graphView());

View File

@ -30,6 +30,11 @@ extern QStatusBar *qstatusbar;
class Daily; class Daily;
class Report; class Report;
class Overview; class Overview;
/*! \class MainWindow
\brief The Main Application window for SleepyHead
*/
class MainWindow : public QMainWindow class MainWindow : public QMainWindow
{ {
Q_OBJECT Q_OBJECT
@ -37,86 +42,170 @@ class MainWindow : public QMainWindow
public: public:
explicit MainWindow(QWidget *parent = 0); explicit MainWindow(QWidget *parent = 0);
~MainWindow(); ~MainWindow();
//! \brief Log message s to Application Debug log
void Log(QString s); void Log(QString s);
//! \brief Create a new menu object in the main menubar.
QMenu * CreateMenu(QString title); QMenu * CreateMenu(QString title);
//! \brief Start the automatic update checker process
void CheckForUpdates(); void CheckForUpdates();
/*! \fn Notify(QString s,int ms=5000, QString title="SleepyHead v"+VersionString());
\brief Pops up a message box near the system tray
\param QString string
\param int ms
\param title
Title is shown in bold
string is the main message content to show
ms = millisecond delay of how long to show popup
Mac needs Growl notification system for this to work
*/
void Notify(QString s,int ms=5000, QString title="SleepyHead v"+VersionString()); void Notify(QString s,int ms=5000, QString title="SleepyHead v"+VersionString());
/*! \fn gGraphView *snapshotGraph()
\brief Returns the current snapshotGraph object used by the report printing system */
gGraphView *snapshotGraph() { return SnapshotGraph; } gGraphView *snapshotGraph() { return SnapshotGraph; }
Daily *getDaily() { return daily; } Daily *getDaily() { return daily; }
Overview *getOverview() { return overview; } Overview *getOverview() { return overview; }
Oximetry *getOximetry() { return oximetry; } Oximetry *getOximetry() { return oximetry; }
/*! \fn void RestartApplication(bool force_login=false);
\brief Closes down SleepyHead and restarts it
\param bool force_login
If force_login is set, it will return to the login menu even if it's set to skip
*/
void RestartApplication(bool force_login=false); void RestartApplication(bool force_login=false);
//! \brief Self explainitory, selects the Oximetry Tab
void selectOximetryTab(); void selectOximetryTab();
void JumpDaily(); void JumpDaily();
/*! \fn void PrintReport gGraphView *gv,QString name, QDate date=QDate::currentDate());
\brief Prepares a report using gGraphView object, and sends to a created QPrinter object
\param gGraphView *gv GraphView Object containing which graph set to print
\param QString name Report Title
\param QDate date
*/
void PrintReport(gGraphView *gv,QString name, QDate date=QDate::currentDate()); void PrintReport(gGraphView *gv,QString name, QDate date=QDate::currentDate());
private slots: private slots:
/*! \fn void on_action_Import_Data_triggered();
\brief Provide the file dialog for selecting import location, and start the import process
This is called when the Import button is clicked
*/
void on_action_Import_Data_triggered(); void on_action_Import_Data_triggered();
//! \brief Selects the welcome page when it's clicked on
void on_actionView_Welcome_triggered(); void on_actionView_Welcome_triggered();
//! \brief Toggle Fullscreen (currently F11)
void on_action_Fullscreen_triggered(); void on_action_Fullscreen_triggered();
//! \brief Loads the default page in the Welcome screens web browser
void on_homeButton_clicked(); void on_homeButton_clicked();
//! \brief Go back in the welcome browsers history
void on_backButton_clicked(); void on_backButton_clicked();
//! \brief Go forward in the welcome browsers history
void on_forwardButton_clicked(); void on_forwardButton_clicked();
//! \brief Updates the URL bar to show changes to the URL
void on_webView_urlChanged(const QUrl &arg1); void on_webView_urlChanged(const QUrl &arg1);
//! \brief Loads a web page when enter is pressed in the URL bar
void on_urlBar_activated(const QString &arg1); void on_urlBar_activated(const QString &arg1);
//! \brief Selects the Daily page and redraws the graphs
void on_dailyButton_clicked(); void on_dailyButton_clicked();
//! \brief Selects the Overview page and redraws the graphs
void on_overviewButton_clicked(); void on_overviewButton_clicked();
//! \brief called when webpage has finished loading in welcome browser
void on_webView_loadFinished(bool arg1); void on_webView_loadFinished(bool arg1);
//! \brief called when webpage has starts loading in welcome browser
void on_webView_loadStarted(); void on_webView_loadStarted();
//! \brief Updates the progress bar in the statusbar while a page is loading
void on_webView_loadProgress(int progress); void on_webView_loadProgress(int progress);
//! \brief Display About Dialog
void on_action_About_triggered(); void on_action_About_triggered();
//! \brief Called after a timeout to initiate loading of all summary data for this profile
void Startup(); void Startup();
//! \brief Toggle the Debug pane on and off
void on_actionDebug_toggled(bool arg1); void on_actionDebug_toggled(bool arg1);
//! \brief passes the ResetGraphLayout menu click to the Daily & Overview views
void on_action_Reset_Graph_Layout_triggered(); void on_action_Reset_Graph_Layout_triggered();
//! \brief Opens the Preferences Dialog, and saving changes if OK is pressed
void on_action_Preferences_triggered(); void on_action_Preferences_triggered();
//! \brief Opens and/or shows the Oximetry page
void on_oximetryButton_clicked(); void on_oximetryButton_clicked();
//! \brief Creates the UpdaterWindow object that actually does the real check for updates
void on_actionCheck_for_Updates_triggered(); void on_actionCheck_for_Updates_triggered();
//! \brief Attempts to do a screenshot of the application window
//! \note This is currently broken on Macs
void on_action_Screenshot_triggered(); void on_action_Screenshot_triggered();
//! \brief This is the actual screenshot code.. It's delayed with a QTimer to give the menu time to close.
void DelayedScreenshot(); void DelayedScreenshot();
//! \brief a slot that calls the real Oximetry tab selector
void on_actionView_O_ximetry_triggered(); void on_actionView_O_ximetry_triggered();
//! \brief Updates the Statusbar message with the QString message contained in Text
void updatestatusBarMessage (const QString & text); void updatestatusBarMessage (const QString & text);
//! \brief Passes the Daily, Overview & Oximetry object to Print Report, based on current tab
void on_actionPrint_Report_triggered(); void on_actionPrint_Report_triggered();
//! \brief Opens the Profile Editor
void on_action_Edit_Profile_triggered(); void on_action_Edit_Profile_triggered();
//! \brief Toggled the LinkGraphGroups preference, which forces the link between Oximetry & CPAP days
void on_action_Link_Graph_Groups_toggled(bool arg1); void on_action_Link_Graph_Groups_toggled(bool arg1);
//! \brief Selects the next view tab
void on_action_CycleTabs_triggered(); void on_action_CycleTabs_triggered();
//! \brief Opens the CSV Export window
void on_actionExp_ort_triggered(); void on_actionExp_ort_triggered();
//! \brief Opens the User Guide at the wiki in the welcome browser.
void on_actionOnline_Users_Guide_triggered(); void on_actionOnline_Users_Guide_triggered();
//! \brief Opens the Frequently Asked Questions at the wiki in the welcome browser.
void on_action_Frequently_Asked_Questions_triggered(); void on_action_Frequently_Asked_Questions_triggered();
/*! \fn void on_action_Rebuild_Oximetry_Index_triggered();
\brief This function scans over all oximetry data and reindexes and tries to fix any inconsistencies.
*/
void on_action_Rebuild_Oximetry_Index_triggered(); void on_action_Rebuild_Oximetry_Index_triggered();
//! \brief Log out, by effectively forcing a restart
void on_actionChange_User_triggered(); void on_actionChange_User_triggered();
//! \brief Destroy the CPAP data for the currently selected day, so it can be freshly imported again
void on_actionPurge_Current_Day_triggered(); void on_actionPurge_Current_Day_triggered();
//! \brief Destroy ALL the CPAP data for the currently selected machine, so it can be freshly imported again
void on_actionAll_Data_for_current_CPAP_machine_triggered(); void on_actionAll_Data_for_current_CPAP_machine_triggered();
private: private:

View File

@ -19,6 +19,10 @@ namespace Ui {
class PreferencesDialog; class PreferencesDialog;
} }
/*! \class MySortFilterProxyModel
\brief Enables the Graph tabs view to be filtered
*/
class MySortFilterProxyModel:public QSortFilterProxyModel class MySortFilterProxyModel:public QSortFilterProxyModel
{ {
Q_OBJECT Q_OBJECT
@ -30,12 +34,17 @@ protected:
}; };
//! \note MaksProfile in still a work in progress
struct MaskProfile { struct MaskProfile {
QString name; QString name;
EventDataType pflow[5][2]; EventDataType pflow[5][2];
}; };
/*! \class PreferencesDialog
\brief SleepyHead's Main Preferences Window
This provides the Preferences form and logic to alter Preferences for SleepyHead
*/
class PreferencesDialog : public QDialog class PreferencesDialog : public QDialog
{ {
Q_OBJECT Q_OBJECT
@ -43,8 +52,12 @@ class PreferencesDialog : public QDialog
public: public:
explicit PreferencesDialog(QWidget *parent, Profile * _profile); explicit PreferencesDialog(QWidget *parent, Profile * _profile);
~PreferencesDialog(); ~PreferencesDialog();
/*! \fn Save()
\brief Save the current preferences, called when Ok button is clicked on */
void Save(); void Save();
void RefreshLastChecked(); void RefreshLastChecked();
private slots: private slots:
void on_eventTable_doubleClicked(const QModelIndex &index); void on_eventTable_doubleClicked(const QModelIndex &index);
void on_combineSlider_valueChanged(int value); void on_combineSlider_valueChanged(int value);

View File

@ -165,6 +165,9 @@ void ProfileSelect::deleteProfile()
} }
} }
} }
//! \fn ProfileSelect::QuickLogin()
//! \brief For programmatically bypassing the login window
void ProfileSelect::QuickLogin() void ProfileSelect::QuickLogin()
{ {
on_listView_activated(ui->listView->currentIndex()); on_listView_activated(ui->listView->currentIndex());
@ -187,6 +190,9 @@ void ProfileSelect::on_newProfileButton_clicked()
accept(); accept();
} }
//! \fn ProfileSelect::on_listView_activated(const QModelIndex &index)
//! \brief Process the selected login, requesting passwords if required.
void ProfileSelect::on_listView_activated(const QModelIndex &index) void ProfileSelect::on_listView_activated(const QModelIndex &index)
{ {
QString name=index.data().toString(); QString name=index.data().toString();

View File

@ -15,6 +15,9 @@ namespace Ui {
class ProfileSelect; class ProfileSelect;
} }
/*! \class ProfileSelect
\brief Simple Login Window providing a list of all profiles to select from
*/
class ProfileSelect : public QDialog class ProfileSelect : public QDialog
{ {
Q_OBJECT Q_OBJECT

View File

@ -5,6 +5,9 @@
#include <QMetaType> #include <QMetaType>
#include <QDate> #include <QDate>
/*! \struct Update
\brief Holds platform specific information about an individual updates
*/
class Update class Update
{ {
public: public:
@ -23,6 +26,9 @@ public:
QString unzipped_path; QString unzipped_path;
}; };
/*! \struct Release
\brief Holds information about an individual major release
*/
struct Release struct Release
{ {
Release() {} Release() {}
@ -46,6 +52,10 @@ struct Release
Q_DECLARE_METATYPE(Update *) Q_DECLARE_METATYPE(Update *)
/*! \class UpdateParser
\brief SAX XML parser for update.xml
*/
class UpdateParser:public QXmlDefaultHandler class UpdateParser:public QXmlDefaultHandler
{ {
public: public: