dRonin  adbada4
dRonin GCS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Groups Pages
settingsdialog.h
Go to the documentation of this file.
1 
13 /*
14  * This program is free software; you can redistribute it and/or modify
15  * it under the terms of the GNU General Public License as published by
16  * the Free Software Foundation; either version 3 of the License, or
17  * (at your option) any later version.
18  *
19  * This program is distributed in the hope that it will be useful, but
20  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
21  * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  * for more details.
23  *
24  * You should have received a copy of the GNU General Public License along
25  * with this program; if not, see <http://www.gnu.org/licenses/>
26  */
27 
28 #ifndef SETTINGSDIALOG_H
29 #define SETTINGSDIALOG_H
30 
31 #include "ui_settingsdialog.h"
32 
33 #include <QtCore/QList>
34 
36 
37 namespace Core {
38 
39 class UAVGadgetInstanceManager;
40 
41 namespace Internal {
42 
43  class SettingsDialog : public QDialog, public ::Ui::SettingsDialog
44  {
45  Q_OBJECT
46 
47  public:
48  SettingsDialog(QWidget *parent, const QString &initialCategory = QString(),
49  const QString &initialPage = QString());
51 
52  // Run the dialog and return true if 'Ok' was choosen or 'Apply' was invoked
53  // at least once
54  bool execDialog();
55  void insertPage(IOptionsPage *page);
56  void deletePage();
57  void updateText(QString text);
58  void disableApplyOk(bool disable);
59 
60  signals:
62  void settingsDialogRemoved();
63  void categoryItemSelected();
64 
65  public slots:
66  void done(int);
67 
68  private slots:
69  void pageSelected();
70  void accept();
71  void reject();
72  void apply();
73  void categoryItemSelectedShowChildInstead();
74 
75  private:
77  QMap<QString, QList<QTreeWidgetItem *> *> m_categoryItemsMap;
78  UAVGadgetInstanceManager *m_instanceManager;
79  bool m_applied;
80  QString m_currentCategory;
81  QString m_currentPage;
82  int m_windowWidth;
83  int m_windowHeight;
84  };
85 
86 } // namespace Internal
87 } // namespace Core
88 
89 #endif // SETTINGSDIALOG_H
SettingsDialog(QWidget *parent, const QString &initialCategory=QString(), const QString &initialPage=QString())
void insertPage(IOptionsPage *page)
The IOptionsPage is an interface for providing options pages.
Definition: ioptionspage.h:42
void settingsDialogShown(Core::Internal::SettingsDialog *)