QElectroTech 0.100.0-dev
Loading...
Searching...
No Matches
configdialog.h
Go to the documentation of this file.
1/*
2 Copyright 2006-2024 The QElectroTech Team
3 This file is part of QElectroTech.
4
5 QElectroTech is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 2 of the License, or
8 (at your option) any later version.
9
10 QElectroTech is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
17*/
18#ifndef CONFIG_DIALOG_H
19#define CONFIG_DIALOG_H
20#include <QDialog>
21class ConfigPage;
22class QListWidget;
23class QListWidgetItem;
24class QStackedWidget;
25class QDialogButtonBox;
31class ConfigDialog : public QDialog {
32 Q_OBJECT
33 // constructors, destructor
34 public:
35 ConfigDialog(QWidget * = nullptr);
36 ~ConfigDialog() override;
37 private:
39
40 public:
41 QList<ConfigPage *> pages;
42
43
44 // methods
45 public slots:
46 void applyConf();
47 void addPage(ConfigPage *);
48 void setCurrentPage(const int index);
49
50 private:
51 void buildPagesList();
53
54 // attributes
55 private:
56 QListWidget *pages_list;
57 QStackedWidget *pages_widget;
58 QDialogButtonBox *buttons;
59
60
61
62};
63#endif
Definition configdialog.h:31
QListWidget * pages_list
Definition configdialog.h:56
ConfigDialog(const ConfigDialog &)
~ConfigDialog() override
Destructeur.
Definition configdialog.cpp:94
void buildPagesList()
Definition configdialog.cpp:101
void setCurrentPage(const int index)
ConfigDialog::setCurrentPage Set the current index to index.
Definition configdialog.cpp:146
QDialogButtonBox * buttons
Definition configdialog.h:58
QList< ConfigPage * > pages
Definition configdialog.h:41
void addPageToList(ConfigPage *)
Definition configdialog.cpp:112
QStackedWidget * pages_widget
Definition configdialog.h:57
void applyConf()
Definition configdialog.cpp:123
void addPage(ConfigPage *)
Definition configdialog.cpp:134
Definition configpage.h:27