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 <kiconloader.h>
#include <dcopclient.h> #include <dcopclient.h>
#include <kprocess.h> #include <kprocess.h>
#include <klineedit.h>
#include <ktextedit.h>
#include <kwizard.h>
#include <kdialogbase.h>
#include <tqpushbutton.h>
#include "realmconfigpage.h" #include "realmconfigpage.h"
RealmConfigPage::RealmConfigPage(TQWidget *parent, const char *name ) : RealmConfigPageDlg(parent,name) { 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" #include "realmconfigpage.moc"

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

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

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

Loading…
Cancel
Save