|
|
|
@ -30,16 +30,61 @@
|
|
|
|
|
#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 "realmconfigpage.h"
|
|
|
|
|
|
|
|
|
|
RealmConfigPage::RealmConfigPage(TQWidget *parent, const char *name ) : RealmConfigPageDlg(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()));
|
|
|
|
|
|
|
|
|
|
connect(txtRealmName, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(realmNameChanged()));
|
|
|
|
|
|
|
|
|
|
m_parentWizard = dynamic_cast<KWizard*>(parent);
|
|
|
|
|
m_parentDialog = dynamic_cast<KDialogBase*>(parent);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
RealmConfigPage::~RealmConfigPage(){
|
|
|
|
|
RealmConfigPage::~RealmConfigPage() {
|
|
|
|
|
//
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void RealmConfigPage::validateEntries() {
|
|
|
|
|
if (m_parentWizard) {
|
|
|
|
|
if ((txtRealmName->text() != "") && (txtKDC->text() != "") && (txtAdminServer->text() != "")) {
|
|
|
|
|
m_parentWizard->nextButton()->setEnabled(true);
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
m_parentWizard->nextButton()->setEnabled(false);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (m_parentDialog) {
|
|
|
|
|
if ((txtRealmName->text() != "") && (txtKDC->text() != "") && (txtAdminServer->text() != "")) {
|
|
|
|
|
m_parentDialog->enableButton(KDialogBase::Ok, true);
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
m_parentDialog->enableButton(KDialogBase::Ok, false);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void RealmConfigPage::realmNameChanged() {
|
|
|
|
|
TQString realmName = txtRealmName->text();
|
|
|
|
|
txtRealmName->setText(realmName.upper());
|
|
|
|
|
|
|
|
|
|
TQString defaultDomainAliases;
|
|
|
|
|
defaultDomainAliases = realmName.lower();
|
|
|
|
|
defaultDomainAliases += "\n";
|
|
|
|
|
defaultDomainAliases += ".";
|
|
|
|
|
defaultDomainAliases += realmName.lower();
|
|
|
|
|
txtDomains->setText(defaultDomainAliases);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#include "realmconfigpage.moc"
|
|
|
|
|