Qt 5.10 Book Examples
MyProgram.h
Go to the documentation of this file.
1 // ======================================================================
2 // MyProgram.h --
3 // ======================================================================
4 // This file is a part of the book
5 // "Qt 5.10 Professional programming with C++"
6 // http://qt-book.com
7 // ======================================================================
8 // Copyright (c) 2017 by Max Schlee
9 // ======================================================================
10 
11 #pragma once
12 
13 #include <QWidget>
14 #include <QSettings>
15 
16 class QComboBox;
17 class QCheckBox;
18 class QTextEdit;
19 class QLabel;
20 
21 // ======================================================================
22 class MyProgram : public QWidget {
23 Q_OBJECT
24 
25 private:
26  QSettings m_settings;
27  QComboBox* m_pcbo;
28  QCheckBox* m_pchk;
29  QTextEdit* m_ptxt;
30  QLabel* m_plbl;
31  int m_nCounter;
32 
33 public:
34  MyProgram(QWidget* pwgt = 0);
35  virtual ~MyProgram();
36 
37  void writeSettings();
38  void readSettings ();
39 
40 public slots:
41  void slotCheckBoxClicked ( );
42  void slotComboBoxActivated(int);
43 };
virtual ~MyProgram()
Definition: MyProgram.cpp:54
void slotCheckBoxClicked()
Definition: MyProgram.cpp:102
MyProgram(QWidget *pwgt=0)
Definition: MyProgram.cpp:15
void slotComboBoxActivated(int)
Definition: MyProgram.cpp:108
void readSettings()
Definition: MyProgram.cpp:60
void writeSettings()
Definition: MyProgram.cpp:89