summaryrefslogtreecommitdiffabout
path: root/microkde/kdialogbase.cpp
Side-by-side diff
Diffstat (limited to 'microkde/kdialogbase.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--microkde/kdialogbase.cpp25
1 files changed, 12 insertions, 13 deletions
diff --git a/microkde/kdialogbase.cpp b/microkde/kdialogbase.cpp
index c953058..d1f7630 100644
--- a/microkde/kdialogbase.cpp
+++ b/microkde/kdialogbase.cpp
@@ -15,9 +15,9 @@ KDialogBase::KDialogBase()
KDialogBase::KDialogBase( QWidget *parent, const char *name, bool modal,
const QString &caption,
int buttonMask, ButtonCode defaultButton,
- bool separator,
+ bool separator,
const QString &user1,
const QString &user2,
const QString &user3) :
KDialog( parent, name, modal )
@@ -27,11 +27,11 @@ KDialogBase::KDialogBase( QWidget *parent, const char *name, bool modal,
(findButton( defaultButton ) )->setFocus();
}
-KDialogBase::KDialogBase( int dialogFace, const QString &caption,
- int buttonMask, ButtonCode defaultButton,
- QWidget *parent, const char *name, bool modal,
+KDialogBase::KDialogBase( int dialogFace, const QString &caption,
+ int buttonMask, ButtonCode defaultButton,
+ QWidget *parent, const char *name, bool modal,
bool separator,
const QString &user1,
const QString &user2,
const QString &user3) :
@@ -77,9 +77,8 @@ void KDialogBase::init( const QString &caption, int buttonMask,
} else {
mOkButton = 0;
}
if ( buttonMask & Default ) {
- qDebug("buttonMask & Default ");
mDefaultButton = new QPushButton( i18n("Default"), this );
connect( mDefaultButton, SIGNAL( clicked() ), SIGNAL( defaultClicked() ) );
} else {
mDefaultButton = 0;
@@ -103,9 +102,9 @@ void KDialogBase::init( const QString &caption, int buttonMask,
mCloseButton = new QPushButton( i18n("Close"), this );
connect( mCloseButton, SIGNAL( clicked() ), SLOT( slotClose() ) );
} else {
mCloseButton = 0;
- }
+ }
}
QTabWidget *KDialogBase::tabWidget()
{
@@ -124,23 +123,23 @@ void KDialogBase::hideButtons()
if ( mApplyButton ) mApplyButton->hide() ;
if ( mDefaultButton ) mDefaultButton->hide();
if ( mCancelButton ) mCancelButton->hide() ;
if ( mCloseButton ) mCloseButton->hide() ;
-
+
}
void KDialogBase::initLayout()
{
-
+
delete mTopLayout;
mTopLayout = new QVBoxLayout( this );
mTopLayout->setMargin( marginHint() );
mTopLayout->setSpacing( spacingHint() );
-
+
mTopLayout->addWidget( mMainWidget );
-
+
QBoxLayout *buttonLayout = new QHBoxLayout;
mTopLayout->addLayout( buttonLayout );
-
+
if ( mUser1Button ) buttonLayout->addWidget( mUser1Button );
if ( mUser2Button ) buttonLayout->addWidget( mUser2Button );
if ( mOkButton ) buttonLayout->addWidget( mOkButton );
if ( mApplyButton ) buttonLayout->addWidget( mApplyButton );
@@ -204,17 +203,17 @@ QPushButton *KDialogBase::findButton( ButtonCode id )
button = mUser2Button;
break;
case Cancel:
button = mCancelButton;
- break;
+ break;
case Default:
button = mDefaultButton;
break;
case Close:
button = mCloseButton;
break;
default:
- break;
+ break;
}
return button;
}