QElectroTech  0.8-dev
configdialog.h
Go to the documentation of this file.
1 /*
2  Copyright 2006-2020 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>
21 class ConfigPage;
22 class QListWidget;
23 class QListWidgetItem;
24 class QStackedWidget;
25 class QDialogButtonBox;
31 class 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();
52  void addPageToList(ConfigPage *);
53 
54  // attributes
55  private:
56  QListWidget *pages_list;
57  QStackedWidget *pages_widget;
58  QDialogButtonBox *buttons;
59 
60 
61 
62 };
63 #endif
ConfigDialog::applyConf
void applyConf()
Definition: configdialog.cpp:122
ConfigDialog::pages
QList< ConfigPage * > pages
Definition: configdialog.h:41
ConfigDialog::setCurrentPage
void setCurrentPage(const int index)
ConfigDialog::setCurrentPage Set the current index to index.
Definition: configdialog.cpp:144
configpages.h
ConfigDialog::~ConfigDialog
~ConfigDialog() override
Destructeur.
Definition: configdialog.cpp:95
ConfigDialog::addPage
void addPage(ConfigPage *)
Definition: configdialog.cpp:132
qetapp.h
ConfigDialog
Definition: configdialog.h:31
ConfigDialog::buttons
QDialogButtonBox * buttons
Definition: configdialog.h:58
ConfigDialog::pages_widget
QStackedWidget * pages_widget
Definition: configdialog.h:57
ConfigDialog::addPageToList
void addPageToList(ConfigPage *)
Definition: configdialog.cpp:111
ConfigDialog::ConfigDialog
ConfigDialog(const ConfigDialog &)
machine_info.h
ConfigPage
Definition: configpage.h:27
Machine_info::i_max_screen_height
int32_t i_max_screen_height()
Machine_info::i_max_screen_height.
Definition: machine_info.cpp:294
configdialog.h
ConfigDialog::buildPagesList
void buildPagesList()
Definition: configdialog.cpp:101
ConfigDialog::ConfigDialog
ConfigDialog(QWidget *=nullptr)
Definition: configdialog.cpp:29
Machine_info::i_max_screen_width
int32_t i_max_screen_width()
Machine_info::i_max_screen_width.
Definition: machine_info.cpp:285
Machine_info
The Machine_info class This class hold information from your PC.
Definition: machine_info.h:29
ConfigDialog::pages_list
QListWidget * pages_list
Definition: configdialog.h:56
QET::Icons::Cancel
QIcon Cancel
Definition: qeticons.cpp:34