Pretty much ready to accept ldap and heimdal configuration routines

pull/1/head
Timothy Pearson 13 years ago
parent ebe1ee0677
commit 46d1d860d1

@ -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"

@ -21,6 +21,8 @@
#ifndef REALMCONFIGPAGE_H
#define REALMCONFIGPAGE_H
#include <kwizard.h>
#include "realmconfigpagedlg.h"
class TQStringList;
@ -31,9 +33,20 @@ class TQStringList;
class RealmConfigPage : public RealmConfigPageDlg {
Q_OBJECT
public:
RealmConfigPage(TQWidget *parent=0, const char *name=0);
~RealmConfigPage();
public slots:
void validateEntries();
private slots:
void realmNameChanged();
private:
KWizard* m_parentWizard;
KDialogBase* m_parentDialog;
};
#endif

@ -35,7 +35,7 @@
RealmFinishPage::RealmFinishPage(TQWidget *parent, const char *name ) : RealmFinishPageDlg(parent,name) {
px_introSidebar->setPixmap(UserIcon("step1.png"));
px_introSidebar->setPixmap(UserIcon("step3.png"));
}
RealmFinishPage::~RealmFinishPage(){

@ -77,9 +77,9 @@ RealmWizard::RealmWizard(LDAPController* controller, TQWidget *parent, const cha
// realmpage->txtAdminServerPort->setValue(749);
// realmpage->txtUIDOffset->setValue(5000);
// realmpage->txtGIDOffset->setValue(5000);
//
// // Other setup
// finishpage->ldapAdminRealm->setEnabled(false);
// Other setup
finishpage->ldapAdminRealm->setEnabled(false);
setFinishEnabled(TQWizard::page(2), true);
@ -93,16 +93,15 @@ RealmWizard::~RealmWizard() {
void RealmWizard::next() {
if (currentPage()==intropage) {
TQWizard::next();
// RAJA FIXME
// realmpage->validateEntries();
realmpage->validateEntries();
}
else if (currentPage()==realmpage) {
// Save realm information
// RAJA FIXME
finishpage->ldapAdminRealm->setText(realmpage->txtRealmName->text());
TQWizard::next();
}
if (currentPage()==finishpage) {
backButton()->setEnabled(false);
finishButton()->setFocus();
}
}

Loading…
Cancel
Save