summaryrefslogtreecommitdiffstats
path: root/src/bondrealmpage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/bondrealmpage.cpp')
-rw-r--r--src/bondrealmpage.cpp23
1 files changed, 21 insertions, 2 deletions
diff --git a/src/bondrealmpage.cpp b/src/bondrealmpage.cpp
index 09d9d31..020c5a5 100644
--- a/src/bondrealmpage.cpp
+++ b/src/bondrealmpage.cpp
@@ -30,16 +30,35 @@
#include <kiconloader.h>
#include <dcopclient.h>
#include <kprocess.h>
+#include <klineedit.h>
+#include <kwizard.h>
#include "bondrealmpage.h"
BondRealmPage::BondRealmPage(TQWidget *parent, const char *name ) : BondRealmPageDlg(parent,name) {
- px_introSidebar->setPixmap(UserIcon("step1.png"));
+ px_introSidebar->setPixmap(UserIcon("step2.png"));
+
+ connect(txtRealmName, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(validateEntries()));
+ connect(txtKDC, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(validateEntries()));
+ connect(txtAdminServer, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(validateEntries()));
+
+ m_parentWizard = dynamic_cast<KWizard*>(parent);
}
-BondRealmPage::~BondRealmPage(){
+BondRealmPage::~BondRealmPage() {
//
}
+void BondRealmPage::validateEntries() {
+ if (m_parentWizard) {
+ if ((txtRealmName->text() != "") && (txtKDC->text() != "") && (txtAdminServer->text() != "")) {
+ m_parentWizard->nextButton()->setEnabled(true);
+ }
+ else {
+ m_parentWizard->nextButton()->setEnabled(false);
+ }
+ }
+}
+
#include "bondrealmpage.moc"