QElectroTech  0.70
configdialog.h
Go to the documentation of this file.
1 /*
2  Copyright 2006-2019 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:
38  ConfigDialog(const ConfigDialog &);
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
void setCurrentPage(const int index)
ConfigDialog::setCurrentPage Set the current index to .
void applyConf()
QStackedWidget * pages_widget
Definition: configdialog.h:57
QListWidget * pages_list
Definition: configdialog.h:56
ConfigDialog(QWidget *=nullptr)
QDialogButtonBox * buttons
Definition: configdialog.h:58
void addPage(ConfigPage *)
~ConfigDialog() override
Destructeur.
void buildPagesList()
QList< ConfigPage * > pages
Definition: configdialog.h:41
void addPageToList(ConfigPage *)