Sticky timers are loaded with zero timer at startup
[kitchenalert] / src / kitchenalertmainwindow.h
index a2d7202..9511c40 100644 (file)
@@ -123,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:
 
@@ -144,13 +149,17 @@ protected:
     */
     void disableSelectionDependentButtons();
 
+
+
+
+
 private:
 
     Ui::KitchenAlertMainWindow *ui;
 
     CurrentAlertsTableModel model_; /*! The model that stores the alerts */
 
-    const QString defaultSaveDirectory_;
+    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