Chameleon

Chameleon Svn Source Tree

Root/branches/xZenu/src/util/doxygen/addon/doxywizard/inputbool.h

Source at commit 1322 created 9 years 5 months ago.
By meklort, Add doxygen to utils folder
1/******************************************************************************
2 *
3 *
4 *
5 * Copyright (C) 1997-2011 by Dimitri van Heesch.
6 *
7 * Permission to use, copy, modify, and distribute this software and its
8 * documentation under the terms of the GNU General Public License is hereby
9 * granted. No representations are made about the suitability of this software
10 * for any purpose. It is provided "as is" without express or implied warranty.
11 * See the GNU General Public License for more details.
12 *
13 */
14
15#ifndef _INPUTBOOL_H
16#define _INPUTBOOL_H
17
18#include "input.h"
19#include <QObject>
20
21class QCheckBox;
22class QGridLayout;
23class QLabel;
24
25class InputBool : public QObject, public Input
26{
27 Q_OBJECT
28
29 public:
30 InputBool(QGridLayout *layout,int &row,const QString &id,
31 bool enabled, const QString &docs );
32
33 // Input
34 QVariant &value();
35 void update();
36 Kind kind() const { return Bool; }
37 QString docs() const { return m_docs; }
38 QString id() const { return m_id; }
39 void addDependency(Input *option) { m_dependencies+=option; }
40 void setEnabled(bool);
41 void updateDependencies();
42 void writeValue(QTextStream &t,QTextCodec *codec);
43
44 public slots:
45 void reset();
46 void setValue(bool);
47
48 signals:
49 void changed();
50 void toggle(QString,bool);
51 void showHelp(Input *);
52
53 private slots:
54 void help();
55
56 private:
57 void updateDefault();
58 bool m_state;
59 bool m_default;
60 bool m_enabled;
61 QVariant m_value;
62 QCheckBox *m_cb;
63 QString m_docs;
64 QList<Input*> m_dependencies;
65 QString m_id;
66 QLabel *m_lab;
67
68};
69
70#endif
71

Archive Download this file

Revision: 1322