summaryrefslogtreecommitdiffabout
path: root/libkdepim/kprefswidget.cpp
Unidiff
Diffstat (limited to 'libkdepim/kprefswidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libkdepim/kprefswidget.cpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/libkdepim/kprefswidget.cpp b/libkdepim/kprefswidget.cpp
index f6a0b38..51431e2 100644
--- a/libkdepim/kprefswidget.cpp
+++ b/libkdepim/kprefswidget.cpp
@@ -16,41 +16,42 @@
16 along with this program; if not, write to the Free Software 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. 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 18
19 As a special exception, permission is given to link this program 19 As a special exception, permission is given to link this program
20 with any edition of Qt, and distribute the resulting executable, 20 with any edition of Qt, and distribute the resulting executable,
21 without including the source code for Qt in the source distribution. 21 without including the source code for Qt in the source distribution.
22*/ 22*/
23 23
24// $Id$ 24// $Id$
25 25
26#include <qlayout.h> 26#include <qlayout.h>
27#include <qlabel.h> 27#include <qlabel.h>
28#include <qgroupbox.h> 28#include <q3groupbox.h>
29#include <qbuttongroup.h> 29#include <q3buttongroup.h>
30#include <qlineedit.h> 30#include <qlineedit.h>
31#include <qfont.h> 31#include <qfont.h>
32#include <qslider.h> 32#include <qslider.h>
33#include <qfile.h> 33#include <qfile.h>
34#include <qtextstream.h> 34#include <q3textstream.h>
35#include <qvbox.h> 35#include <q3vbox.h>
36#include <qhbox.h> 36#include <q3hbox.h>
37#include <qspinbox.h> 37#include <qspinbox.h>
38#include <qdatetime.h> 38#include <qdatetime.h>
39#include <qframe.h> 39#include <q3frame.h>
40#include <qcombobox.h> 40#include <qcombobox.h>
41#include <qcheckbox.h> 41#include <qcheckbox.h>
42#include <qradiobutton.h> 42#include <qradiobutton.h>
43#include <qpushbutton.h> 43#include <qpushbutton.h>
44#include <qapplication.h> 44#include <qapplication.h>
45#include <QDesktopWidget>
45 46
46#include <kcolorbutton.h> 47#include <kcolorbutton.h>
47#include <kdebug.h> 48#include <kdebug.h>
48#include <klocale.h> 49#include <klocale.h>
49#include <kglobal.h> 50#include <kglobal.h>
50#include <kfontdialog.h> 51#include <kfontdialog.h>
51#include <kmessagebox.h> 52#include <kmessagebox.h>
52#include <kcolordialog.h> 53#include <kcolordialog.h>
53#include <kiconloader.h> 54#include <kiconloader.h>
54 55
55#include "kprefs.h" 56#include "kprefs.h"
56 57
@@ -122,25 +123,25 @@ KColorButton *KPrefsWidColor::button()
122{ 123{
123 return mButton; 124 return mButton;
124} 125}
125 126
126KPrefsWidFont::KPrefsWidFont(const QString &sampleText,const QString &labelText, 127KPrefsWidFont::KPrefsWidFont(const QString &sampleText,const QString &labelText,
127 QFont *reference,QWidget *parent) 128 QFont *reference,QWidget *parent)
128{ 129{
129 mReference = reference; 130 mReference = reference;
130 131
131 mLabel = new QLabel(labelText, parent); 132 mLabel = new QLabel(labelText, parent);
132 133
133 mPreview = new QLabel(sampleText,parent); 134 mPreview = new QLabel(sampleText,parent);
134 mPreview->setFrameStyle(QFrame::Panel|QFrame::Sunken); 135 mPreview->setFrameStyle(Q3Frame::Panel|Q3Frame::Sunken);
135 136
136 mButton = new QPushButton(i18n("Choose..."), parent); 137 mButton = new QPushButton(i18n("Choose..."), parent);
137 connect(mButton,SIGNAL(clicked()),SLOT(selectFont())); 138 connect(mButton,SIGNAL(clicked()),SLOT(selectFont()));
138 mPreview->setMaximumHeight( QApplication::desktop()->height() / 12 ); 139 mPreview->setMaximumHeight( QApplication::desktop()->height() / 12 );
139 mPreview->setMaximumWidth( (QApplication::desktop()->width() / 2)-10 ); 140 mPreview->setMaximumWidth( (QApplication::desktop()->width() / 2)-10 );
140} 141}
141 142
142KPrefsWidFont::~KPrefsWidFont() 143KPrefsWidFont::~KPrefsWidFont()
143{ 144{
144} 145}
145 146
146void KPrefsWidFont::readConfig() 147void KPrefsWidFont::readConfig()
@@ -209,38 +210,38 @@ QLabel *KPrefsWidTime::label()
209 210
210QSpinBox *KPrefsWidTime::spinBox() 211QSpinBox *KPrefsWidTime::spinBox()
211{ 212{
212 return mSpin; 213 return mSpin;
213} 214}
214 215
215 216
216KPrefsWidRadios::KPrefsWidRadios(const QString &text,int *reference, 217KPrefsWidRadios::KPrefsWidRadios(const QString &text,int *reference,
217 QWidget *parent) 218 QWidget *parent)
218{ 219{
219 mReference = reference; 220 mReference = reference;
220 221
221 mBox = new QButtonGroup(1,Qt::Horizontal,text,parent); 222 mBox = new Q3ButtonGroup(1,Qt::Horizontal,text,parent);
222 connect( mBox, SIGNAL( clicked(int)), SIGNAL( modified() ) ); 223 connect( mBox, SIGNAL( clicked(int)), SIGNAL( modified() ) );
223} 224}
224 225
225KPrefsWidRadios::~KPrefsWidRadios() 226KPrefsWidRadios::~KPrefsWidRadios()
226{ 227{
227} 228}
228 229
229void KPrefsWidRadios::addRadio(const QString &text) 230void KPrefsWidRadios::addRadio(const QString &text)
230{ 231{
231 new QRadioButton(text,mBox); 232 new QRadioButton(text,mBox);
232} 233}
233 234
234QButtonGroup *KPrefsWidRadios::groupBox() 235Q3ButtonGroup *KPrefsWidRadios::groupBox()
235{ 236{
236 return mBox; 237 return mBox;
237} 238}
238 239
239void KPrefsWidRadios::readConfig() 240void KPrefsWidRadios::readConfig()
240{ 241{
241 mBox->setButton(*mReference); 242 mBox->setButton(*mReference);
242} 243}
243 244
244void KPrefsWidRadios::writeConfig() 245void KPrefsWidRadios::writeConfig()
245{ 246{
246 *mReference = mBox->id(mBox->selected()); 247 *mReference = mBox->id(mBox->selected());