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.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/microkde/kdialogbase.cpp b/microkde/kdialogbase.cpp
index 801094a..f453331 100644
--- a/microkde/kdialogbase.cpp
+++ b/microkde/kdialogbase.cpp
@@ -19,85 +19,87 @@ KDialogBase::KDialogBase( QWidget *parent, const char *name, bool modal,
bool separator,
const QString &user1,
const QString &user2,
const QString &user3) :
KDialog( parent, name, modal )
{
init( caption, buttonMask, user1, user2 );
if (findButton( defaultButton ) ) {
(findButton( defaultButton ) )->setFocus();
(findButton( defaultButton ) )->setDefault( true );
}
}
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) :
KDialog( parent, name, modal )
{
init( caption, buttonMask, user1, user2 );
- if (findButton( defaultButton ) )
- (findButton( defaultButton ) )->setFocus();
+ if (findButton( defaultButton ) ) {
+ (findButton( defaultButton ) )->setFocus();
+ (findButton( defaultButton ) )->setDefault( true );
+ }
}
KDialogBase::~KDialogBase()
{
}
void KDialogBase::init( const QString &caption, int buttonMask,
const QString &user1 ,const QString &user2 )
{
mMainWidget = 0;
mTabWidget = 0;
mPlainPage = 0;
mTopLayout = 0;
if ( !caption.isEmpty() ) {
setCaption( caption );
}
if ( buttonMask & User1 ) {
mUser1Button = new QPushButton( user1, this );
connect( mUser1Button, SIGNAL( clicked() ), SLOT( slotUser1() ) );
} else {
mUser1Button = 0;
}
if ( buttonMask & User2 ) {
mUser2Button = new QPushButton( user2, this );
connect( mUser2Button, SIGNAL( clicked() ), SLOT( slotUser2() ) );
} else {
mUser2Button = 0;
}
if ( buttonMask & Ok ) {
mOkButton = new QPushButton( i18n("Ok"), this );
connect( mOkButton, SIGNAL( clicked() ), SLOT( slotOk() ) );
- mOkButton->setDefault( true );
+ //mOkButton->setDefault( true );
} else {
mOkButton = 0;
}
if ( buttonMask & Default ) {
mDefaultButton = new QPushButton( i18n("Default"), this );
connect( mDefaultButton, SIGNAL( clicked() ), SIGNAL( defaultClicked() ) );
} else {
mDefaultButton = 0;
}
if ( buttonMask & Apply ) {
mApplyButton = new QPushButton( i18n("Apply"), this );
connect( mApplyButton, SIGNAL( clicked() ), SLOT( slotApply() ) );
} else {
mApplyButton = 0;
}
if ( buttonMask & Cancel ) {
mCancelButton = new QPushButton( i18n("Cancel"), this );
connect( mCancelButton, SIGNAL( clicked() ), SLOT( slotCancel() ) );
} else {
mCancelButton = 0;
}