Prepare 1.0 alpha3 release.
[tagua/yd.git] / src / option_p.h
blobf67ed58e604c0509b30acc6457ea2ef31bb1d049
1 /*
2 Copyright (c) 2006 Paolo Capriotti <p.capriotti@gmail.com>
3 (c) 2006 Maurizio Monge <maurizio.monge@kdemail.net>
5 This program 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 */
11 #ifndef OPTION_P_H
12 #define OPTION_P_H
14 #include <QCheckBox>
15 #include <QComboBox>
16 #include <QSpinBox>
17 #include <QLineEdit>
18 #include <QRadioButton>
20 #include <KUrlRequester>
21 #include <KColorButton>
22 #include <KFontRequester>
24 #include "option.h"
26 class OptCheckBox : public QCheckBox {
27 Q_OBJECT
28 OptionWidget *m_owner;
29 BoolOptPtr m_opt;
31 public:
32 OptCheckBox(BoolOptPtr opt, OptionWidget *owner, QWidget *parent = NULL);
34 private Q_SLOTS:
35 void setOpt(bool);
38 class OptRadioButton : public QRadioButton {
39 Q_OBJECT
40 OptionWidget *m_owner;
41 SelectOptPtr m_opt;
42 int m_index;
44 public:
45 OptRadioButton(SelectOptPtr opt, int i, OptionWidget *owner, QWidget *parent = NULL);
47 private Q_SLOTS:
48 void setOpt(bool);
51 class OptSpinBox : public QSpinBox {
52 Q_OBJECT
53 OptionWidget *m_owner;
54 IntOptPtr m_opt;
56 public:
57 OptSpinBox(IntOptPtr opt, OptionWidget *owner, QWidget *parent = NULL);
59 private Q_SLOTS:
60 void setOpt(int);
63 class OptSlider : public QSlider {
64 Q_OBJECT
65 OptionWidget *m_owner;
66 IntOptPtr m_opt;
68 public:
69 OptSlider(IntOptPtr opt, OptionWidget *owner, QWidget *parent = NULL);
71 private Q_SLOTS:
72 void setOpt(int);
75 class OptLineEdit : public QLineEdit {
76 Q_OBJECT
77 OptionWidget *m_owner;
78 StringOptPtr m_opt;
80 public:
81 OptLineEdit(StringOptPtr opt, OptionWidget *owner, QWidget *parent = NULL);
83 private Q_SLOTS:
84 void setOpt(const QString&);
87 class OptUrlRequester : public KUrlRequester {
88 Q_OBJECT
89 OptionWidget *m_owner;
90 UrlOptPtr m_opt;
92 public:
93 OptUrlRequester(UrlOptPtr opt, OptionWidget *owner, QWidget *parent = NULL);
95 private Q_SLOTS:
96 void setOpt(const QString&);
99 class OptComboBox : public QComboBox {
100 Q_OBJECT
101 OptionWidget *m_owner;
102 ComboOptPtr m_opt;
104 public:
105 OptComboBox(ComboOptPtr opt, OptionWidget *owner, QWidget *parent = NULL);
107 private Q_SLOTS:
108 void setOpt(int);
111 class OptColorButton : public KColorButton {
112 Q_OBJECT
113 OptionWidget *m_owner;
114 ColorOptPtr m_opt;
116 public:
117 OptColorButton(ColorOptPtr opt, OptionWidget *owner, QWidget *parent = NULL);
119 private Q_SLOTS:
120 void setOpt(const QColor&);
123 class OptFontRequester : public KFontRequester {
124 Q_OBJECT
125 OptionWidget *m_owner;
126 FontOptPtr m_opt;
128 public:
129 OptFontRequester(FontOptPtr opt, OptionWidget *owner, QWidget *parent = NULL);
131 private Q_SLOTS:
132 void setOpt(const QFont&);
135 #endif //OPTION_P_H