Merge branch 'master' of ssh://swordfish/srv/www/htdocs/git/engrid
[engrid.git] / src / guisettingstab.h
blob7b005c362940e75213488c569f3730c18162e6e0
1 //
2 // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3 // + +
4 // + This file is part of enGrid. +
5 // + +
6 // + Copyright 2008,2009 Oliver Gloth +
7 // + +
8 // + enGrid is free software: you can redistribute it and/or modify +
9 // + it under the terms of the GNU General Public License as published by +
10 // + the Free Software Foundation, either version 3 of the License, or +
11 // + (at your option) any later version. +
12 // + +
13 // + enGrid is distributed in the hope that it will be useful, +
14 // + but WITHOUT ANY WARRANTY; without even the implied warranty of +
15 // + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +
16 // + GNU General Public License for more details. +
17 // + +
18 // + You should have received a copy of the GNU General Public License +
19 // + along with enGrid. If not, see <http://www.gnu.org/licenses/>. +
20 // + +
21 // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
23 #ifndef SETTINGSTAB_H
24 #define SETTINGSTAB_H
26 #include <QWidget>
27 #include <QString>
28 #include <QtGui>
29 #include <QVector>
31 #include "dialoglineedit/dialoglineedit.h"
32 ///\todo fix problems with more than one boolean + general tab stuff
34 /**
35 * Creates a QWidget listing all key/value pairs contained in the group "group"
36 * of the QSettings file corresponding to the (org,app) pair.
37 * integers appear in spinboxes
38 * doubles appear in line edit boxes
39 * booleans appear in checkboxes
40 * \todo fix problems with more than one boolean + general tab stuff
42 class GuiSettingsTab : public QWidget
45 Q_OBJECT;
47 public:
49 QVector<QString> spinbox_name;///< vector of the label texts of the QSpinBox widgets
50 QVector<QSpinBox*> spinbox;///< vector of pointers to the QSpinBox widgets
52 QVector<QString> checkbox_name;///< vector of the label texts of the QCheckBox widgets
53 QVector<QCheckBox*> checkbox;///< vector of pointers to the QCheckBox widgets
55 QVector<QString> double_lineedit_name;///< vector of the label texts of the double QLineEdit widgets
56 QVector<QLineEdit*> double_lineedit;///< vector of pointers to the double QLineEdit widgets
58 QVector<QString> string_lineedit_name;///< vector of the label texts of the string QLineEdit widgets
59 QVector<QLineEdit*> string_lineedit;///< vector of pointers to the string QLineEdit widgets
61 QVector<QString> filename_dialoglineedit_name;///< vector of the label texts of the filename DialogLineEdit widgets
62 QVector<DialogLineEdit*> filename_dialoglineedit;///< vector of pointers to the filename DialogLineEdit widgets
64 QVector<QString> directory_dialoglineedit_name;///< vector of the label texts of the directory DialogLineEdit widgets
65 QVector<DialogLineEdit*> directory_dialoglineedit;///< vector of pointers to the directory DialogLineEdit widgets
67 public:
68 //constructors
69 /**
70 * Constructor using the (org,app) pair to determine QSettings
71 * @param org organization
72 * @param app application
73 * @param group group
74 * @param parent Parent QWidget
76 GuiSettingsTab(QString org, QString app, QString group, QWidget *parent = 0);
80 #endif