summaryrefslogtreecommitdiffabout
path: root/kaddressbook/views/configurecardviewdialog.cpp
Unidiff
Diffstat (limited to 'kaddressbook/views/configurecardviewdialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/views/configurecardviewdialog.cpp57
1 files changed, 30 insertions, 27 deletions
diff --git a/kaddressbook/views/configurecardviewdialog.cpp b/kaddressbook/views/configurecardviewdialog.cpp
index e0fbd21..b6327fe 100644
--- a/kaddressbook/views/configurecardviewdialog.cpp
+++ b/kaddressbook/views/configurecardviewdialog.cpp
@@ -25,11 +25,14 @@
25#include <qlayout.h> 25#include <qlayout.h>
26#include <qlabel.h> 26#include <qlabel.h>
27#include <qcheckbox.h> 27#include <qcheckbox.h>
28#include <qvbox.h> 28#include <q3vbox.h>
29#include <qgroupbox.h> 29#include <q3groupbox.h>
30#include <qspinbox.h> 30#include <qspinbox.h>
31#include <qtabwidget.h> 31#include <qtabwidget.h>
32#include <qwhatsthis.h> 32#include <q3whatsthis.h>
33//Added by qt3to4:
34#include <Q3GridLayout>
35#include <Q3Frame>
33 36
34#include <kdebug.h> 37#include <kdebug.h>
35#include <kglobal.h> 38#include <kglobal.h>
@@ -89,7 +92,7 @@ void ConfigureCardViewWidget::saveSettings( KConfig *config )
89//////////////////////// 92////////////////////////
90// CardViewLookNFeelPage 93// CardViewLookNFeelPage
91CardViewLookNFeelPage::CardViewLookNFeelPage( QWidget *parent, const char *name ) 94CardViewLookNFeelPage::CardViewLookNFeelPage( QWidget *parent, const char *name )
92 : QVBox( parent, name ) 95 : Q3VBox( parent, name )
93{ 96{
94 initGUI(); 97 initGUI();
95} 98}
@@ -234,28 +237,28 @@ void CardViewLookNFeelPage::initGUI()
234 QTabWidget *tabs = new QTabWidget( this ); 237 QTabWidget *tabs = new QTabWidget( this );
235 238
236 // Layout 239 // Layout
237 QVBox *loTab = new QVBox( this, "layouttab" ); 240 Q3VBox *loTab = new Q3VBox( this, "layouttab" );
238 241
239 loTab->setSpacing( spacing ); 242 loTab->setSpacing( spacing );
240 loTab->setMargin( margin ); 243 loTab->setMargin( margin );
241 244
242 QGroupBox *gbGeneral = new QGroupBox( 1, Qt::Horizontal, i18n("General"), loTab ); 245 Q3GroupBox *gbGeneral = new Q3GroupBox( 1, Qt::Horizontal, i18n("General"), loTab );
243 246
244 cbDrawSeps = new QCheckBox( i18n("Draw &separators"), gbGeneral ); 247 cbDrawSeps = new QCheckBox( i18n("Draw &separators"), gbGeneral );
245 248
246 QHBox *hbSW = new QHBox( gbGeneral ); 249 Q3HBox *hbSW = new Q3HBox( gbGeneral );
247 QLabel *lSW = new QLabel( i18n("Separator &width:"), hbSW ); 250 QLabel *lSW = new QLabel( i18n("Separator &width:"), hbSW );
248 sbSepWidth = new QSpinBox( 1, 50, 1, hbSW ); 251 sbSepWidth = new QSpinBox( 1, 50, 1, hbSW );
249 lSW->setBuddy( sbSepWidth); 252 lSW->setBuddy( sbSepWidth);
250 253
251 QHBox *hbPadding = new QHBox( gbGeneral ); 254 Q3HBox *hbPadding = new Q3HBox( gbGeneral );
252 QLabel *lSpacing = new QLabel( i18n("&Padding:"), hbPadding ); 255 QLabel *lSpacing = new QLabel( i18n("&Padding:"), hbPadding );
253 sbSpacing = new QSpinBox( 0, 100, 1, hbPadding ); 256 sbSpacing = new QSpinBox( 0, 100, 1, hbPadding );
254 lSpacing->setBuddy( sbSpacing ); 257 lSpacing->setBuddy( sbSpacing );
255 258
256 QGroupBox *gbCards = new QGroupBox( 1, Qt::Horizontal, i18n("Cards"), loTab ); 259 Q3GroupBox *gbCards = new Q3GroupBox( 1, Qt::Horizontal, i18n("Cards"), loTab );
257 260
258 QHBox *hbMargin = new QHBox( gbCards ); 261 Q3HBox *hbMargin = new Q3HBox( gbCards );
259 QLabel *lMargin = new QLabel( i18n("&Margin:"), hbMargin ); 262 QLabel *lMargin = new QLabel( i18n("&Margin:"), hbMargin );
260 sbMargin = new QSpinBox( 0, 100, 1, hbMargin ); 263 sbMargin = new QSpinBox( 0, 100, 1, hbMargin );
261 lMargin->setBuddy( sbMargin ); 264 lMargin->setBuddy( sbMargin );
@@ -264,23 +267,23 @@ void CardViewLookNFeelPage::initGUI()
264 267
265 loTab->setStretchFactor( new QWidget( loTab ), 1 ); 268 loTab->setStretchFactor( new QWidget( loTab ), 1 );
266 269
267 QWhatsThis::add( sbMargin, i18n( 270 Q3WhatsThis::add( sbMargin, i18n(
268 "The item margin is the distance (in pixels) between the item edge and the item data. Most noticeably, " 271 "The item margin is the distance (in pixels) between the item edge and the item data. Most noticeably, "
269 "incrementing the item margin will add space between the focus rectangle and the item data." 272 "incrementing the item margin will add space between the focus rectangle and the item data."
270 ) ); 273 ) );
271 QWhatsThis::add( lMargin, QWhatsThis::textFor( sbMargin ) ); 274 /* TODO:hacker: Q3WhatsThis::add( lMargin, Q3WhatsThis::textFor( sbMargin ) ); */
272 QWhatsThis::add( sbSpacing, i18n( 275 Q3WhatsThis::add( sbSpacing, i18n(
273 "The Item Spacing decides the distance (in pixels) between the items and anything else: the view " 276 "The Item Spacing decides the distance (in pixels) between the items and anything else: the view "
274 "borders, other items or column separators." 277 "borders, other items or column separators."
275 ) ); 278 ) );
276 QWhatsThis::add( lSpacing, QWhatsThis::textFor( sbSpacing ) ); 279 /* TODO:hacker: Q3WhatsThis::add( lSpacing, Q3WhatsThis::textFor( sbSpacing ) ); */
277 QWhatsThis::add( sbSepWidth, i18n("Sets the width of column separators") ); 280 Q3WhatsThis::add( sbSepWidth, i18n("Sets the width of column separators") );
278 QWhatsThis::add( lSW, QWhatsThis::textFor( sbSepWidth ) ); 281 /* TODO:hacker: Q3WhatsThis::add( lSW, Q3WhatsThis::textFor( sbSepWidth ) ); */
279 282
280 tabs->addTab( loTab, i18n("&Layout") ); 283 tabs->addTab( loTab, i18n("&Layout") );
281 284
282 // Colors 285 // Colors
283 QVBox *colorTab = new QVBox( this, "colortab" ); 286 Q3VBox *colorTab = new Q3VBox( this, "colortab" );
284 colorTab->setSpacing( spacing ); 287 colorTab->setSpacing( spacing );
285 colorTab->setMargin( spacing ); 288 colorTab->setMargin( spacing );
286 cbEnableCustomColors = new QCheckBox( i18n("&Enable custom Colors"), colorTab ); 289 cbEnableCustomColors = new QCheckBox( i18n("&Enable custom Colors"), colorTab );
@@ -288,16 +291,16 @@ void CardViewLookNFeelPage::initGUI()
288 lbColors = new ColorListBox( colorTab ); 291 lbColors = new ColorListBox( colorTab );
289 tabs->addTab( colorTab, i18n("&Colors") ); 292 tabs->addTab( colorTab, i18n("&Colors") );
290 293
291 QWhatsThis::add( cbEnableCustomColors, i18n( 294 Q3WhatsThis::add( cbEnableCustomColors, i18n(
292 "If custom colors are enabled, you may choose the colors for the view below. " 295 "If custom colors are enabled, you may choose the colors for the view below. "
293 "Otherwise colors from your current KDE color scheme are used." 296 "Otherwise colors from your current KDE color scheme are used."
294 ) ); 297 ) );
295 QWhatsThis::add( lbColors, i18n( 298 Q3WhatsThis::add( lbColors, i18n(
296 "Double click or press RETURN on a item to select a color for the related strings in the view." 299 "Double click or press RETURN on a item to select a color for the related strings in the view."
297 ) ); 300 ) );
298 301
299 // Fonts 302 // Fonts
300 QVBox *fntTab = new QVBox( this, "fonttab" ); 303 Q3VBox *fntTab = new Q3VBox( this, "fonttab" );
301 304
302 fntTab->setSpacing( spacing ); 305 fntTab->setSpacing( spacing );
303 fntTab->setMargin( spacing ); 306 fntTab->setMargin( spacing );
@@ -306,13 +309,13 @@ void CardViewLookNFeelPage::initGUI()
306 connect( cbEnableCustomFonts, SIGNAL(clicked()), this, SLOT(enableFonts()) ); 309 connect( cbEnableCustomFonts, SIGNAL(clicked()), this, SLOT(enableFonts()) );
307 310
308 vbFonts = new QWidget( fntTab ); 311 vbFonts = new QWidget( fntTab );
309 QGridLayout *gFnts = new QGridLayout( vbFonts, 2, 3 ); 312 Q3GridLayout *gFnts = new Q3GridLayout( vbFonts, 2, 3 );
310 gFnts->setSpacing( spacing ); 313 gFnts->setSpacing( spacing );
311 gFnts->setAutoAdd( true ); 314 gFnts->setAutoAdd( true );
312 gFnts->setColStretch( 1, 1 ); 315 gFnts->setColStretch( 1, 1 );
313 QLabel *lTFnt = new QLabel( i18n("&Text font:"), vbFonts ); 316 QLabel *lTFnt = new QLabel( i18n("&Text font:"), vbFonts );
314 lTextFont = new QLabel( vbFonts ); 317 lTextFont = new QLabel( vbFonts );
315 lTextFont->setFrameStyle( QFrame::Panel|QFrame::Sunken ); 318 lTextFont->setFrameStyle( Q3Frame::Panel|Q3Frame::Sunken );
316#ifndef KAB_EMBEDDED 319#ifndef KAB_EMBEDDED
317 btnFont = new KPushButton( i18n("Choose..."), vbFonts ); 320 btnFont = new KPushButton( i18n("Choose..."), vbFonts );
318#else //KAB_EMBEDDED 321#else //KAB_EMBEDDED
@@ -325,7 +328,7 @@ void CardViewLookNFeelPage::initGUI()
325 328
326 QLabel *lHFnt = new QLabel( i18n("&Header font:"), vbFonts ); 329 QLabel *lHFnt = new QLabel( i18n("&Header font:"), vbFonts );
327 lHeaderFont = new QLabel( vbFonts ); 330 lHeaderFont = new QLabel( vbFonts );
328 lHeaderFont->setFrameStyle( QFrame::Panel|QFrame::Sunken ); 331 lHeaderFont->setFrameStyle( Q3Frame::Panel|Q3Frame::Sunken );
329#ifndef KAB_EMBEDDED 332#ifndef KAB_EMBEDDED
330 btnHeaderFont = new KPushButton( i18n("Choose..."), vbFonts ); 333 btnHeaderFont = new KPushButton( i18n("Choose..."), vbFonts );
331#else //KAB_EMBEDDED 334#else //KAB_EMBEDDED
@@ -336,7 +339,7 @@ void CardViewLookNFeelPage::initGUI()
336 339
337 fntTab->setStretchFactor( new QWidget( fntTab ), 1 ); 340 fntTab->setStretchFactor( new QWidget( fntTab ), 1 );
338 341
339 QWhatsThis::add( cbEnableCustomFonts, i18n( 342 Q3WhatsThis::add( cbEnableCustomFonts, i18n(
340 "If custom fonts are enabled, you may choose which fonts to use for this view below. " 343 "If custom fonts are enabled, you may choose which fonts to use for this view below. "
341 "Otherwise the default KDE font will be used, in bold style for the header and " 344 "Otherwise the default KDE font will be used, in bold style for the header and "
342 "normal style for the data." 345 "normal style for the data."
@@ -345,7 +348,7 @@ void CardViewLookNFeelPage::initGUI()
345 tabs->addTab( fntTab, i18n("&Fonts") ); 348 tabs->addTab( fntTab, i18n("&Fonts") );
346 349
347 // Behaviour 350 // Behaviour
348 QVBox *behaviourTab = new QVBox( this ); 351 Q3VBox *behaviourTab = new Q3VBox( this );
349 behaviourTab->setMargin( margin ); 352 behaviourTab->setMargin( margin );
350 behaviourTab->setSpacing( spacing ); 353 behaviourTab->setSpacing( spacing );
351 354
@@ -364,6 +367,6 @@ void CardViewLookNFeelPage::updateFontLabel( QFont fnt, QLabel *l )
364 l->setText( QString( fnt.family() + " %1" ).arg( fnt.pointSize() ) ); 367 l->setText( QString( fnt.family() + " %1" ).arg( fnt.pointSize() ) );
365} 368}
366 369
367#ifndef KAB_EMBEDDED 370#ifndef KAB_EMBEDDED_
368#include "configurecardviewdialog.moc" 371#include "moc_configurecardviewdialog.cpp"
369#endif //KAB_EMBEDDED 372#endif //KAB_EMBEDDED