-rw-r--r-- | microkde/kdialogbase.cpp | 25 | ||||
-rw-r--r-- | microkde/kutils/kcmultidialog.cpp | 23 |
2 files changed, 25 insertions, 23 deletions
diff --git a/microkde/kdialogbase.cpp b/microkde/kdialogbase.cpp index c953058..d1f7630 100644 --- a/microkde/kdialogbase.cpp +++ b/microkde/kdialogbase.cpp @@ -16,7 +16,7 @@ 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) : @@ -28,9 +28,9 @@ KDialogBase::KDialogBase( 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, +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, @@ -78,7 +78,6 @@ void KDialogBase::init( const QString &caption, int buttonMask, mOkButton = 0; } if ( buttonMask & Default ) { - qDebug("buttonMask & Default "); mDefaultButton = new QPushButton( i18n("Default"), this ); connect( mDefaultButton, SIGNAL( clicked() ), SIGNAL( defaultClicked() ) ); } else { @@ -104,7 +103,7 @@ void KDialogBase::init( const QString &caption, int buttonMask, connect( mCloseButton, SIGNAL( clicked() ), SLOT( slotClose() ) ); } else { mCloseButton = 0; - } + } } QTabWidget *KDialogBase::tabWidget() @@ -125,21 +124,21 @@ void KDialogBase::hideButtons() 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 ); @@ -205,7 +204,7 @@ QPushButton *KDialogBase::findButton( ButtonCode id ) break; case Cancel: button = mCancelButton; - break; + break; case Default: button = mDefaultButton; break; @@ -213,7 +212,7 @@ QPushButton *KDialogBase::findButton( ButtonCode id ) button = mCloseButton; break; default: - break; + break; } return button; } diff --git a/microkde/kutils/kcmultidialog.cpp b/microkde/kutils/kcmultidialog.cpp index 4136622..13be2ce 100644 --- a/microkde/kutils/kcmultidialog.cpp +++ b/microkde/kutils/kcmultidialog.cpp @@ -43,17 +43,20 @@ KCMultiDialog::KCMultiDialog(const QString& baseGroup, QWidget *parent, const ch { enableButton(Apply, false); //connect(this, SIGNAL(aboutToShowPage(QWidget *)), this, SLOT(slotAboutToShow(QWidget *))); + + connect( this, SIGNAL( defaultClicked() ), SLOT( slotDefault() ) ); + _baseGroup = baseGroup; mMainWidget = new KJanusWidget( this, "JanusWidget", KJanusWidget::Tabbed ); setMainWidget(mMainWidget ); #ifdef DESKTOP_VERSION resize(640,480); #else - resize(640,480); + resize(640,480); setMaximumSize( KMIN(KGlobal::getDesktopWidth()-5, 640), KMIN(KGlobal::getDesktopHeight()-20, 480)); //showMaximized(); #endif - + } KCMultiDialog::~KCMultiDialog() @@ -65,7 +68,7 @@ void KCMultiDialog::slotDefault() { int curPageIndex = mMainWidget->activePageIndex(); - + QPtrListIterator<KCModule> it(modules); for (; it.current(); ++it) { @@ -76,7 +79,7 @@ void KCMultiDialog::slotDefault() return; } } - + } void KCMultiDialog::slotApply() @@ -89,14 +92,14 @@ qDebug("KCMultiDialog::slotApply clicked"); clientChanged(false); emit applyClicked(); - + } void KCMultiDialog::slotOk() { qDebug("KCMultiDialog::slotOk clicked"); - + QPtrListIterator<KCModule> it(modules); for (; it.current(); ++it) (*it)->save(); @@ -119,7 +122,7 @@ void KCMultiDialog::slotHelp() } else { new KRun(url); } -*/ +*/ } void KCMultiDialog::clientChanged(bool state) @@ -127,7 +130,7 @@ void KCMultiDialog::clientChanged(bool state) enableButton(Apply, state); } -/*US +/*US void KCMultiDialog::addModule(const QString& path, bool withfallback) { kdDebug(1208) << "KCMultiDialog::addModule " << path << endl; @@ -157,7 +160,7 @@ void KCMultiDialog::addModule(KCModule* module ) //, const QString& modulename, modules.append(module); connect(module, SIGNAL(changed(bool)), this, SLOT(clientChanged(bool))); - + } @@ -197,5 +200,5 @@ void KCMultiDialog::slotAboutToShow(QWidget *page) QApplication::restoreOverrideCursor(); */ -qDebug("KCMultiDialog::slotAboutToShow not implemented"); +qDebug("KCMultiDialog::slotAboutToShow not implemented"); } |