From 24c960bab0318b095de39ff82ba19d6a29853f8d Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Fri, 22 Dec 2006 20:26:19 +0000 Subject: [PATCH] simplify, and add an option svn path=/trunk/playground/graphics/okular/; revision=615812 --- conf/dlgdebug.cpp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/conf/dlgdebug.cpp b/conf/dlgdebug.cpp index 9f1ee06fb..7284a5203 100644 --- a/conf/dlgdebug.cpp +++ b/conf/dlgdebug.cpp @@ -12,19 +12,22 @@ #include "dlgdebug.h" +#define DEBUG_SIMPLE_BOOL( cfgname, layout ) \ +{ \ + QCheckBox * foo = new QCheckBox( cfgname, this ); \ + foo->setObjectName( "kcfg_" cfgname ); \ + layout->addWidget( foo ); \ +} + DlgDebug::DlgDebug( QWidget * parent ) : QWidget( parent ) { QVBoxLayout * lay = new QVBoxLayout( this ); lay->setMargin( 0 ); - QCheckBox * drawBoundaries = new QCheckBox( "DebugDrawBoundaries", this ); - drawBoundaries->setObjectName( "kcfg_DebugDrawBoundaries" ); - lay->addWidget( drawBoundaries ); - - QCheckBox * drawAnnRect = new QCheckBox( "DebugDrawAnnotationRect", this ); - drawAnnRect->setObjectName( "kcfg_DebugDrawAnnotationRect" ); - lay->addWidget( drawAnnRect ); + DEBUG_SIMPLE_BOOL( "DebugDrawBoundaries", lay ); + DEBUG_SIMPLE_BOOL( "DebugDrawAnnotationRect", lay ); + DEBUG_SIMPLE_BOOL( "TocPageColumn", lay ); lay->addItem( new QSpacerItem( 5, 5, QSizePolicy::Fixed, QSizePolicy::MinimumExpanding ) ); }