2 Copyright (c) 2006 Paolo Capriotti <p.capriotti@sns.it>
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.
18 #include <QRadioButton>
19 #include "kurlrequester.h"
20 #include "kcolorbutton.h"
21 #include "kfontrequester.h"
24 class OptCheckBox
: public QCheckBox
{
26 OptionWidget
*m_owner
;
27 boost::shared_ptr
<BoolOpt
> m_opt
;
30 OptCheckBox(boost::shared_ptr
<BoolOpt
> opt
, OptionWidget
*owner
, QWidget
*parent
= NULL
);
36 class OptRadioButton
: public QRadioButton
{
38 OptionWidget
*m_owner
;
39 boost::shared_ptr
<SelectOpt
> m_opt
;
43 OptRadioButton(boost::shared_ptr
<SelectOpt
> opt
, int i
, OptionWidget
*owner
, QWidget
*parent
= NULL
);
49 class OptSpinBox
: public QSpinBox
{
51 OptionWidget
*m_owner
;
52 boost::shared_ptr
<IntOpt
> m_opt
;
55 OptSpinBox(boost::shared_ptr
<IntOpt
> opt
, OptionWidget
*owner
, QWidget
*parent
= NULL
);
61 class OptLineEdit
: public QLineEdit
{
63 OptionWidget
*m_owner
;
64 boost::shared_ptr
<StringOpt
> m_opt
;
67 OptLineEdit(boost::shared_ptr
<StringOpt
> opt
, OptionWidget
*owner
, QWidget
*parent
= NULL
);
70 void setOpt(const QString
&);
73 class OptUrlRequester
: public KUrlRequester
{
75 OptionWidget
*m_owner
;
76 boost::shared_ptr
<UrlOpt
> m_opt
;
79 OptUrlRequester(boost::shared_ptr
<UrlOpt
> opt
, OptionWidget
*owner
, QWidget
*parent
= NULL
);
82 void setOpt(const QString
&);
85 class OptComboBox
: public QComboBox
{
87 OptionWidget
*m_owner
;
88 boost::shared_ptr
<ComboOpt
> m_opt
;
91 OptComboBox(boost::shared_ptr
<ComboOpt
> opt
, OptionWidget
*owner
, QWidget
*parent
= NULL
);
97 class OptColorButton
: public KColorButton
{
99 OptionWidget
*m_owner
;
100 boost::shared_ptr
<ColorOpt
> m_opt
;
103 OptColorButton(boost::shared_ptr
<ColorOpt
> opt
, OptionWidget
*owner
, QWidget
*parent
= NULL
);
106 void setOpt(const QColor
&);
109 class OptFontRequester
: public KFontRequester
{
111 OptionWidget
*m_owner
;
112 boost::shared_ptr
<FontOpt
> m_opt
;
115 OptFontRequester(boost::shared_ptr
<FontOpt
> opt
, OptionWidget
*owner
, QWidget
*parent
= NULL
);
118 void setOpt(const QFont
&);