Sticky timers are loaded with zero timer at startup
[kitchenalert] / src / kitchenalertmainwindow.h
index c8b4e44..9511c40 100644 (file)
@@ -40,8 +40,8 @@ namespace Ui {
 /*! The main window class of KitchenAlert'
 
   @author Heli Hyvättinen
-  @date 2011-04-05
-  @version 0.2.1
+  @date 2011-01-05
+  @version 0.3.0
 
 Operates the UI.
 
@@ -52,8 +52,6 @@ class KitchenAlertMainWindow : public QMainWindow
     Q_OBJECT 
 
 
-
-
 public:
     explicit KitchenAlertMainWindow(QWidget *parent = 0);
     ~KitchenAlertMainWindow();
@@ -125,6 +123,11 @@ public slots:
     */
     void loadTimer();
 
+    /*! Opens a dialog for choosing which timers to preload at start */
+    void openStickyDialog();
+
+   /*! Loads the sticky timers. */
+    bool loadStickies();
 
 signals:
 
@@ -146,12 +149,18 @@ protected:
     */
     void disableSelectionDependentButtons();
 
+
+
+
+
 private:
 
     Ui::KitchenAlertMainWindow *ui;
 
     CurrentAlertsTableModel model_; /*! The model that stores the alerts */
 
+    QString defaultSaveDirectory_;
+
     /*!
     Returns a QMoldelIndex pointing to the cell in the column 0 of the row that is currently selected.
     */
@@ -163,9 +172,10 @@ private:
     */
     void initializeAlertSound();
 
-    void initializeTimer(Timer * p_timer);
-
+    void initializeTimer(Timer * p_timer, bool startImmediately = true);
 
+    //Adds the timer to the model and optionally starts it on success, gives an error message on failure
+    bool loadTimer(QString filename, bool startImmediately);
 };
 
 #endif // KITCHENALERTMAINWINDOW_H