1 // Copyright 2007 "Gilles Degottex"
3 // This file is part of "fmit"
5 // "Music" is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU Lesser General Public License as published by
7 // the Free Software Foundation; either version 2.1 of the License, or
8 // (at your option) any later version.
10 // "Music" 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 Lesser General Public License for more details.
15 // You should have received a copy of the GNU Lesser General Public License
16 // along with this program; if not, write to the Free Software
17 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 #ifndef _AutoQSettings_h_
20 #define _AutoQSettings_h_
24 #include <qsettings.h>
25 #include <qcheckbox.h>
27 #include <qlineedit.h>
28 #include <qcombobox.h>
29 #include <qgroupbox.h>
30 #include <qradiobutton.h>
32 class AutoQSettings : public QSettings
34 std::list<QCheckBox*> m_elements_checkbox;
35 std::list<QSpinBox*> m_elements_spinbox;
36 std::list<QLineEdit*> m_elements_lineedit;
37 std::list<QComboBox*> m_elements_combobox;
38 std::list<QGroupBox*> m_elements_qgroupbox;
39 std::list<QRadioButton*> m_elements_qradiobutton;
42 AutoQSettings(const QString& domain, const QString& product, const QString& setting_version);
44 void add(QCheckBox* el);
45 void add(QSpinBox* el);
46 void add(QLineEdit* el);
47 void add(QComboBox* el);
48 void add(QGroupBox* el);
49 void add(QRadioButton* el);
51 void save(QCheckBox* el);
52 void load(QCheckBox* el);
59 #endif // _AutoQSettings_h_