1 #ifndef DLG_TIPOFDAY_H
2 #define DLG_TIPOFDAY_H
3 
4 #include <QComboBox>
5 #include <QDialog>
6 #include <QDialogButtonBox>
7 #include <QHBoxLayout>
8 #include <QLineEdit>
9 #include <QPushButton>
10 #include <QVBoxLayout>
11 
12 class QLabel;
13 class QPushButton;
14 class QCheckBox;
15 class TipsOfTheDay;
16 
17 class DlgTipOfTheDay : public QDialog
18 {
19     Q_OBJECT
20 public:
21     explicit DlgTipOfTheDay(QWidget *parent = nullptr);
22     ~DlgTipOfTheDay() override;
23     bool successfulInit;
24     bool newTipsAvailable;
25 signals:
26     void newTipRequested(int tipId);
27 
28 protected:
29     void resizeEvent(QResizeEvent *event) override;
30 
31 private:
32     unsigned int currentTip;
33     TipsOfTheDay *tipDatabase;
34     QLabel *title, *tipTextContent, *imageLabel, *tipNumber, *date;
35     QCheckBox *showTipsOnStartupCheck;
36     QPixmap *image;
37 
38     QVBoxLayout *content, *mainLayout;
39     QDialogButtonBox *buttonBox;
40     QPushButton *nextButton, *previousButton;
41     QHBoxLayout *buttonBar;
42 
43 private slots:
44     void nextClicked();
45     void previousClicked();
46     void updateTip(int tipId);
47 };
48 
49 #endif
50