diff options
Diffstat (limited to 'src/realmfinishpage.cpp')
-rw-r--r-- | src/realmfinishpage.cpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/realmfinishpage.cpp b/src/realmfinishpage.cpp index c9eb64e..c71fc0b 100644 --- a/src/realmfinishpage.cpp +++ b/src/realmfinishpage.cpp @@ -30,16 +30,45 @@ #include <kiconloader.h> #include <dcopclient.h> #include <kprocess.h> +#include <klineedit.h> +#include <ktextedit.h> +#include <kwizard.h> +#include <kdialogbase.h> +#include <tqpushbutton.h> #include "realmfinishpage.h" RealmFinishPage::RealmFinishPage(TQWidget *parent, const char *name ) : RealmFinishPageDlg(parent,name) { px_introSidebar->setPixmap(UserIcon("step3.png")); + + connect(ldapAdminUsername, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(validateEntries())); + + m_parentWizard = dynamic_cast<KWizard*>(parent); + m_parentDialog = dynamic_cast<KDialogBase*>(parent); } RealmFinishPage::~RealmFinishPage(){ // } +void RealmFinishPage::validateEntries() { + if (m_parentWizard) { + if (ldapAdminUsername->text() != "") { + m_parentWizard->finishButton()->setEnabled(true); + } + else { + m_parentWizard->finishButton()->setEnabled(false); + } + } + if (m_parentDialog) { + if (ldapAdminUsername->text() != "") { + m_parentDialog->enableButton(KDialogBase::Ok, true); + } + else { + m_parentDialog->enableButton(KDialogBase::Ok, false); + } + } +} + #include "realmfinishpage.moc" |