Qt 5.10 Book Examples
chapter28
Settings
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
};
MyProgram::~MyProgram
virtual ~MyProgram()
Definition:
MyProgram.cpp:54
MyProgram::slotCheckBoxClicked
void slotCheckBoxClicked()
Definition:
MyProgram.cpp:102
MyProgram::MyProgram
MyProgram(QWidget *pwgt=0)
Definition:
MyProgram.cpp:15
MyProgram::slotComboBoxActivated
void slotComboBoxActivated(int)
Definition:
MyProgram.cpp:108
MyProgram::readSettings
void readSettings()
Definition:
MyProgram.cpp:60
MyProgram::writeSettings
void writeSettings()
Definition:
MyProgram.cpp:89
MyProgram
Definition:
MyProgram.h:22
Generated by
1.8.14