summaryrefslogtreecommitdiffabout
path: root/kaddressbook/views/configuretableviewdialog.cpp
Unidiff
Diffstat (limited to 'kaddressbook/views/configuretableviewdialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/views/configuretableviewdialog.cpp35
1 files changed, 19 insertions, 16 deletions
diff --git a/kaddressbook/views/configuretableviewdialog.cpp b/kaddressbook/views/configuretableviewdialog.cpp
index c329cd9..7ed897a 100644
--- a/kaddressbook/views/configuretableviewdialog.cpp
+++ b/kaddressbook/views/configuretableviewdialog.cpp
@@ -24,17 +24,20 @@
24#include <qstring.h> 24#include <qstring.h>
25#include <qwidget.h> 25#include <qwidget.h>
26#include <qlayout.h> 26#include <qlayout.h>
27#include <qlabel.h> 27#include <qlabel.h>
28#include <qradiobutton.h> 28#include <qradiobutton.h>
29#include <qcheckbox.h> 29#include <qcheckbox.h>
30#include <qvbox.h> 30#include <q3vbox.h>
31#include <qbuttongroup.h> 31#include <q3buttongroup.h>
32#include <qtabwidget.h> 32#include <qtabwidget.h>
33#include <qwhatsthis.h> 33#include <q3whatsthis.h>
34#include <qpushbutton.h> 34#include <qpushbutton.h>
35//Added by qt3to4:
36#include <Q3GridLayout>
37#include <Q3Frame>
35 38
36#include <kglobal.h> 39#include <kglobal.h>
37#include <klocale.h> 40#include <klocale.h>
38#include <klineedit.h> 41#include <klineedit.h>
39#include <kurlrequester.h> 42#include <kurlrequester.h>
40#include <kiconloader.h> 43#include <kiconloader.h>
@@ -81,13 +84,13 @@ void ConfigureTableViewWidget::saveSettings( KConfig *config )
81 mPage->saveSettings( config ); 84 mPage->saveSettings( config );
82} 85}
83 86
84 87
85 88
86LookAndFeelPage::LookAndFeelPage(QWidget *parent, const char *name) 89LookAndFeelPage::LookAndFeelPage(QWidget *parent, const char *name)
87 : QVBox(parent, name) 90 : Q3VBox(parent, name)
88{ 91{
89 initGUI(); 92 initGUI();
90 93
91 // Set initial state 94 // Set initial state
92 enableBackgroundToggled(mBackgroundBox->isChecked()); 95 enableBackgroundToggled(mBackgroundBox->isChecked());
93} 96}
@@ -226,18 +229,18 @@ void LookAndFeelPage::initGUI()
226 int spacing = KDialog::spacingHint(); 229 int spacing = KDialog::spacingHint();
227 int margin = KDialog::marginHint(); 230 int margin = KDialog::marginHint();
228 231
229 QTabWidget *tabs = new QTabWidget( this ); 232 QTabWidget *tabs = new QTabWidget( this );
230 233
231 // General 234 // General
232 QVBox *generalTab = new QVBox( this, "generaltab" ); 235 Q3VBox *generalTab = new Q3VBox( this, "generaltab" );
233 236
234 generalTab->setSpacing( spacing ); 237 generalTab->setSpacing( spacing );
235 generalTab->setMargin( margin ); 238 generalTab->setMargin( margin );
236 239
237 QButtonGroup *group = new QButtonGroup(1, Qt::Horizontal, 240 Q3ButtonGroup *group = new Q3ButtonGroup(1, Qt::Horizontal,
238 i18n("Row Separator"), generalTab); 241 i18n("Row Separator"), generalTab);
239 242
240 mAlternateButton = new QRadioButton(i18n("Alternating backgrounds"), 243 mAlternateButton = new QRadioButton(i18n("Alternating backgrounds"),
241 group, "mAlternateButton"); 244 group, "mAlternateButton");
242 mLineButton = new QRadioButton(i18n("Single line"), group, "mLineButton"); 245 mLineButton = new QRadioButton(i18n("Single line"), group, "mLineButton");
243 mNoneButton = new QRadioButton(i18n("None"), group, "mNoneButton"); 246 mNoneButton = new QRadioButton(i18n("None"), group, "mNoneButton");
@@ -259,69 +262,69 @@ void LookAndFeelPage::initGUI()
259 mToolTipBox = new QCheckBox(i18n("Enable contact tooltips"), generalTab, 262 mToolTipBox = new QCheckBox(i18n("Enable contact tooltips"), generalTab,
260 "mToolTipBox"); 263 "mToolTipBox");
261 264
262 tabs->addTab( generalTab, i18n("&General") ); 265 tabs->addTab( generalTab, i18n("&General") );
263 266
264 // Colors 267 // Colors
265 QVBox *colorTab = new QVBox( this, "colortab" ); 268 Q3VBox *colorTab = new Q3VBox( this, "colortab" );
266 colorTab->setSpacing( spacing ); 269 colorTab->setSpacing( spacing );
267 colorTab->setMargin( spacing ); 270 colorTab->setMargin( spacing );
268 cbEnableCustomColors = new QCheckBox( i18n("&Enable custom Colors"), colorTab ); 271 cbEnableCustomColors = new QCheckBox( i18n("&Enable custom Colors"), colorTab );
269 connect( cbEnableCustomColors, SIGNAL(clicked()), this, SLOT(enableColors()) ); 272 connect( cbEnableCustomColors, SIGNAL(clicked()), this, SLOT(enableColors()) );
270 lbColors = new ColorListBox( colorTab ); 273 lbColors = new ColorListBox( colorTab );
271 tabs->addTab( colorTab, i18n("&Colors") ); 274 tabs->addTab( colorTab, i18n("&Colors") );
272 275
273 QWhatsThis::add( cbEnableCustomColors, i18n( 276 Q3WhatsThis::add( cbEnableCustomColors, i18n(
274 "If custom colors are enabled, you may choose the colors for the view below. " 277 "If custom colors are enabled, you may choose the colors for the view below. "
275 "Otherwise colors from your current KDE color scheme are used." 278 "Otherwise colors from your current KDE color scheme are used."
276 ) ); 279 ) );
277 QWhatsThis::add( lbColors, i18n( 280 Q3WhatsThis::add( lbColors, i18n(
278 "Double click or press RETURN on a item to select a color for the related strings in the view." 281 "Double click or press RETURN on a item to select a color for the related strings in the view."
279 ) ); 282 ) );
280 283
281 // Fonts 284 // Fonts
282 QVBox *fntTab = new QVBox( this, "fonttab" ); 285 Q3VBox *fntTab = new Q3VBox( this, "fonttab" );
283 286
284 fntTab->setSpacing( spacing ); 287 fntTab->setSpacing( spacing );
285 fntTab->setMargin( spacing ); 288 fntTab->setMargin( spacing );
286 289
287 cbEnableCustomFonts = new QCheckBox( i18n("&Enable custom fonts"), fntTab ); 290 cbEnableCustomFonts = new QCheckBox( i18n("&Enable custom fonts"), fntTab );
288 connect( cbEnableCustomFonts, SIGNAL(clicked()), this, SLOT(enableFonts()) ); 291 connect( cbEnableCustomFonts, SIGNAL(clicked()), this, SLOT(enableFonts()) );
289 292
290 vbFonts = new QWidget( fntTab ); 293 vbFonts = new QWidget( fntTab );
291 QGridLayout *gFnts = new QGridLayout( vbFonts, 2, 3 ); 294 Q3GridLayout *gFnts = new Q3GridLayout( vbFonts, 2, 3 );
292 gFnts->setSpacing( spacing ); 295 gFnts->setSpacing( spacing );
293 gFnts->setAutoAdd( true ); 296 gFnts->setAutoAdd( true );
294 gFnts->setColStretch( 1, 1 ); 297 gFnts->setColStretch( 1, 1 );
295 QLabel *lTFnt = new QLabel( i18n("&Text font:"), vbFonts ); 298 QLabel *lTFnt = new QLabel( i18n("&Text font:"), vbFonts );
296 lTextFont = new QLabel( vbFonts ); 299 lTextFont = new QLabel( vbFonts );
297 lTextFont->setFrameStyle( QFrame::Panel|QFrame::Sunken ); 300 lTextFont->setFrameStyle( Q3Frame::Panel|Q3Frame::Sunken );
298#ifndef KAB_EMBEDDED 301#ifndef KAB_EMBEDDED
299 btnFont = new KPushButton( i18n("Choose..."), vbFonts ); 302 btnFont = new KPushButton( i18n("Choose..."), vbFonts );
300#else //KAB_EMBEDDED 303#else //KAB_EMBEDDED
301 btnFont = new QPushButton( i18n("Choose..."), vbFonts ); 304 btnFont = new QPushButton( i18n("Choose..."), vbFonts );
302#endif //KAB_EMBEDDED 305#endif //KAB_EMBEDDED
303 306
304 lTFnt->setBuddy( btnFont ); 307 lTFnt->setBuddy( btnFont );
305 308
306 connect( btnFont, SIGNAL(clicked()), this, SLOT(setTextFont()) ); 309 connect( btnFont, SIGNAL(clicked()), this, SLOT(setTextFont()) );
307 310
308 QLabel *lHFnt = new QLabel( i18n("&Header font:"), vbFonts ); 311 QLabel *lHFnt = new QLabel( i18n("&Header font:"), vbFonts );
309 lHeaderFont = new QLabel( vbFonts ); 312 lHeaderFont = new QLabel( vbFonts );
310 lHeaderFont->setFrameStyle( QFrame::Panel|QFrame::Sunken ); 313 lHeaderFont->setFrameStyle( Q3Frame::Panel|Q3Frame::Sunken );
311#ifndef KAB_EMBEDDED 314#ifndef KAB_EMBEDDED
312 btnHeaderFont = new KPushButton( i18n("Choose..."), vbFonts ); 315 btnHeaderFont = new KPushButton( i18n("Choose..."), vbFonts );
313#else //KAB_EMBEDDED 316#else //KAB_EMBEDDED
314 btnHeaderFont = new QPushButton( i18n("Choose..."), vbFonts ); 317 btnHeaderFont = new QPushButton( i18n("Choose..."), vbFonts );
315#endif //KAB_EMBEDDED 318#endif //KAB_EMBEDDED
316 lHFnt->setBuddy( btnHeaderFont ); 319 lHFnt->setBuddy( btnHeaderFont );
317 connect( btnHeaderFont, SIGNAL(clicked()), this, SLOT(setHeaderFont()) ); 320 connect( btnHeaderFont, SIGNAL(clicked()), this, SLOT(setHeaderFont()) );
318 321
319 fntTab->setStretchFactor( new QWidget( fntTab ), 1 ); 322 fntTab->setStretchFactor( new QWidget( fntTab ), 1 );
320 323
321 QWhatsThis::add( cbEnableCustomFonts, i18n( 324 Q3WhatsThis::add( cbEnableCustomFonts, i18n(
322 "If custom fonts are enabled, you may choose which fonts to use for this view below. " 325 "If custom fonts are enabled, you may choose which fonts to use for this view below. "
323 "Otherwise the default KDE font will be used, in bold style for the header and " 326 "Otherwise the default KDE font will be used, in bold style for the header and "
324 "normal style for the data." 327 "normal style for the data."
325 ) ); 328 ) );
326 329
327 tabs->addTab( fntTab, i18n("&Fonts") ); 330 tabs->addTab( fntTab, i18n("&Fonts") );
@@ -337,9 +340,9 @@ void LookAndFeelPage::enableBackgroundToggled(bool enabled)
337void LookAndFeelPage::updateFontLabel( QFont fnt, QLabel *l ) 340void LookAndFeelPage::updateFontLabel( QFont fnt, QLabel *l )
338{ 341{
339 l->setFont( fnt ); 342 l->setFont( fnt );
340 l->setText( QString( fnt.family() + " %1" ).arg( fnt.pointSize() ) ); 343 l->setText( QString( fnt.family() + " %1" ).arg( fnt.pointSize() ) );
341} 344}
342 345
343#ifndef KAB_EMBEDDED 346#ifndef KAB_EMBEDDED_
344#include "configuretableviewdialog.moc" 347#include "moc_configuretableviewdialog.cpp"
345#endif //KAB_EMBEDDED 348#endif //KAB_EMBEDDED