summaryrefslogtreecommitdiffabout
path: root/microkde
authorzautrix <zautrix>2004-07-05 09:24:56 (UTC)
committer zautrix <zautrix>2004-07-05 09:24:56 (UTC)
commit5c5c1354afa5d24768ceefe5b7dd8733ff7bd5f0 (patch) (side-by-side diff)
treef41b695d2b18bf7d7ff84d0d8b39faf15d229669 /microkde
parentc2d4beeaeda44694a3e1c0b72a5808d2f518b286 (diff)
downloadkdepimpi-5c5c1354afa5d24768ceefe5b7dd8733ff7bd5f0.zip
kdepimpi-5c5c1354afa5d24768ceefe5b7dd8733ff7bd5f0.tar.gz
kdepimpi-5c5c1354afa5d24768ceefe5b7dd8733ff7bd5f0.tar.bz2
Removed strange handling of addresseeeditor
Diffstat (limited to 'microkde') (more/less context) (show whitespace changes)
-rw-r--r--microkde/kdialogbase.cpp12
-rw-r--r--microkde/kdialogbase.h2
2 files changed, 14 insertions, 0 deletions
diff --git a/microkde/kdialogbase.cpp b/microkde/kdialogbase.cpp
index 2ea2053..c953058 100644
--- a/microkde/kdialogbase.cpp
+++ b/microkde/kdialogbase.cpp
@@ -76,8 +76,15 @@ void KDialogBase::init( const QString &caption, int buttonMask,
connect( mOkButton, SIGNAL( clicked() ), SLOT( slotOk() ) );
} else {
mOkButton = 0;
}
+ if ( buttonMask & Default ) {
+ qDebug("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() ) );
@@ -114,8 +121,9 @@ void KDialogBase::hideButtons()
if ( mUser1Button ) mUser1Button->hide() ;
if ( mUser2Button ) mUser2Button->hide() ;
if ( mOkButton ) mOkButton->hide() ;
if ( mApplyButton ) mApplyButton->hide() ;
+ if ( mDefaultButton ) mDefaultButton->hide();
if ( mCancelButton ) mCancelButton->hide() ;
if ( mCloseButton ) mCloseButton->hide() ;
}
@@ -135,8 +143,9 @@ void KDialogBase::initLayout()
if ( mUser1Button ) buttonLayout->addWidget( mUser1Button );
if ( mUser2Button ) buttonLayout->addWidget( mUser2Button );
if ( mOkButton ) buttonLayout->addWidget( mOkButton );
if ( mApplyButton ) buttonLayout->addWidget( mApplyButton );
+ if ( mDefaultButton ) buttonLayout->addWidget( mDefaultButton );
if ( mCancelButton ) buttonLayout->addWidget( mCancelButton );
if ( mCloseButton ) buttonLayout->addWidget( mCloseButton );
}
@@ -196,8 +205,11 @@ QPushButton *KDialogBase::findButton( ButtonCode id )
break;
case Cancel:
button = mCancelButton;
break;
+ case Default:
+ button = mDefaultButton;
+ break;
case Close:
button = mCloseButton;
break;
default:
diff --git a/microkde/kdialogbase.h b/microkde/kdialogbase.h
index 199d2fa..7b44bfb 100644
--- a/microkde/kdialogbase.h
+++ b/microkde/kdialogbase.h
@@ -104,8 +104,9 @@ class KDialogBase : public KDialog
* The Close button was pressed. This signal is only emitted if
* @ref slotClose() is not replaced.
*/
void closeClicked();
+ void defaultClicked();
protected slots:
virtual void slotOk();
virtual void slotApply();
@@ -133,7 +134,8 @@ class KDialogBase : public KDialog
QPushButton *mCloseButton;
QPushButton *mOkButton;
QPushButton *mApplyButton;
QPushButton *mCancelButton;
+ QPushButton *mDefaultButton;
};
#endif