Add GUI elements to wizard

pull/1/head
Timothy Pearson 12 years ago
parent 15ed3f5aa0
commit ebe1ee0677

@ -38,6 +38,7 @@
#include <tqcheckbox.h>
#include "ldapcontroller.h"
#include "realmwizard.h"
// FIXME
// Connect this to CMake/Automake
@ -111,8 +112,19 @@ void LDAPController::systemRoleChanged() {
m_base->systemRole->setCurrentItem(0);
}
else {
// RAJA FIXME
changed();
// Something will probably change
save();
RealmWizard realmwizard(this, this);
if (realmwizard.exec() < 0) {
// Wizard was cancelled
// Back out all changes!
m_base->systemRole->setCurrentItem(ROLE_WORKSTATION);
save();
}
// Something probably changed
load();
}
}
if (m_base->systemRole->currentItem() == ROLE_WORKSTATION) {
@ -131,7 +143,7 @@ void LDAPController::load() {
m_systemconfig->setGroup(NULL);
m_base->systemEnableSupport->setChecked(m_systemconfig->readBoolEntry("EnableLDAP", false));
TQString ldapRole = m_systemconfig->readEntry("LDAPRole", "Workstation");
if (ldapRole == "RealmController") {
if (ldapRole == "Realm Controller") {
m_base->systemRole->setCurrentItem(ROLE_REALM_CONTROLLER);
}
else {
@ -145,7 +157,26 @@ void LDAPController::defaults() {
}
void LDAPController::save() {
//
m_systemconfig->setGroup(NULL);
m_systemconfig->writeEntry("EnableLDAP", m_base->systemEnableSupport->isChecked());
m_systemconfig->writeEntry("LDAPRole", m_base->systemRole->currentText());
m_systemconfig->sync();
if (m_base->systemEnableSupport->isChecked()) {
// // Write the Kerberos5 configuration file
// writeKrb5ConfFile();
// // Write the LDAP configuration file
// writeLDAPConfFile();
// // Write the NSSwitch configuration file
// writeNSSwitchFile();
// // Write the PAM configuration files
// writePAMFiles();
// // Write the cron files
// writeCronFiles();
}
load();
}
int LDAPController::buttons() {

@ -1,118 +1,293 @@
<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
<class>RealmConfigPageDlg</class>
<widget class="TQWidget">
<property name="name">
<cstring>RealmConfigPageDlg</cstring>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>678</width>
<height>452</height>
</rect>
</property>
<grid>
<class>RealmConfigPageDlg</class>
<widget class="TQWidget">
<property name="name">
<cstring>unnamed</cstring>
<cstring>RealmConfigPageDlg</cstring>
</property>
<widget class="TQLabel" row="0" column="0" rowspan="9" colspan="1">
<property name="name">
<cstring>px_introSidebar</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>170</width>
<height>430</height>
</size>
</property>
<property name="frameShape">
<enum>Panel</enum>
</property>
<property name="frameShadow">
<enum>Sunken</enum>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
<property name="indent">
<number>0</number>
</property>
</widget>
<widget class="TQLabel" row="0" column="1">
<property name="name">
<cstring>txt_welcome</cstring>
</property>
<property name="text">
<string>&lt;h3&gt;Welcome to the TDE LDAP Realming Wizard!&lt;/h3&gt;</string>
</property>
</widget>
<widget class="TQLabel" row="1" column="1">
<property name="name">
<cstring>TextLabel6</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>1</hsizetype>
<vsizetype>1</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>&lt;p&gt;This Wizard will help you bond your machine to an LDAP realm in three quick, easy steps.&lt;/p&gt;
&lt;p&gt;Please note that you will need administrative access to the LDAP realm you will be bonding with.&lt;/p&gt;
&lt;p&gt;If you wish to quit the Wizard, click &lt;b&gt;Cancel&lt;/b&gt; at any time.&lt;/p&gt;</string>
</property>
<property name="textFormat">
<enum>RichText</enum>
</property>
<property name="alignment">
<set>WordBreak|AlignTop|AlignLeft</set>
</property>
<property name="vAlign" stdset="0">
</property>
<property name="wordwrap" stdset="0">
</property>
</widget>
<spacer row="2" column="1">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>678</width>
<height>452</height>
</rect>
</property>
<grid>
<property name="name">
<cstring>Spacer6</cstring>
</property>
<property name="orientation">
<enum>Vertical</enum>
</property>
<property name="sizeType">
<enum>Fixed</enum>
</property>
<property name="sizeHint">
<size>
<width>20</width>
<height>30</height>
</size>
<cstring>unnamed</cstring>
</property>
<widget class="TQLabel" row="0" column="0" rowspan="9" colspan="1">
<property name="name">
<cstring>px_introSidebar</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>170</width>
<height>430</height>
</size>
</property>
<property name="frameShape">
<enum>Panel</enum>
</property>
<property name="frameShadow">
<enum>Sunken</enum>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
<property name="indent">
<number>0</number>
</property>
</widget>
<widget class="TQGroupBox" row="0" column="1">
<property name="name">
<cstring>groupRealmInfo</cstring>
</property>
<property name="title">
<string>Basic Realm Information (required)</string>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="text">
<string>Realm Name</string>
</property>
</widget>
<widget class="KLineEdit" row="0" column="1" colspan="3">
<property name="name">
<cstring>txtRealmName</cstring>
</property>
</widget>
<widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="text">
<string>Key Distribution Server [KDC]</string>
</property>
</widget>
<widget class="KLineEdit" row="1" column="1">
<property name="name">
<cstring>txtKDC</cstring>
</property>
</widget>
<widget class="TQLabel" row="1" column="2">
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="text">
<string>port</string>
</property>
</widget>
<widget class="KIntNumInput" row="1" column="3">
<property name="name">
<cstring>txtKDCPort</cstring>
</property>
<property name="minValue">
<number>1</number>
</property>
<property name="maxValue">
<number>99999</number>
</property>
</widget>
<widget class="TQLabel" row="2" column="0">
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="text">
<string>Administration Server</string>
</property>
</widget>
<widget class="KLineEdit" row="2" column="1">
<property name="name">
<cstring>txtAdminServer</cstring>
</property>
</widget>
<widget class="TQLabel" row="2" column="2">
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="text">
<string>port</string>
</property>
</widget>
<widget class="KIntNumInput" row="2" column="3">
<property name="name">
<cstring>txtAdminServerPort</cstring>
</property>
<property name="minValue">
<number>1</number>
</property>
<property name="maxValue">
<number>99999</number>
</property>
</widget>
<widget class="TQLabel" row="3" column="0">
<property name="name">
<cstring>labelUIDOffset</cstring>
</property>
<property name="text">
<string>UID offset</string>
</property>
<property name="hidden">
<string>true</string>
</property>
</widget>
<widget class="KIntNumInput" row="3" column="1" colspan="3">
<property name="name">
<cstring>txtUIDOffset</cstring>
</property>
<property name="minValue">
<number>100</number>
</property>
<property name="maxValue">
<number>99999</number>
</property>
<property name="hidden">
<string>true</string>
</property>
</widget>
<widget class="TQLabel" row="4" column="0">
<property name="name">
<cstring>labelGIDOffset</cstring>
</property>
<property name="text">
<string>GID offset</string>
</property>
<property name="hidden">
<string>true</string>
</property>
</widget>
<widget class="KIntNumInput" row="4" column="1" colspan="3">
<property name="name">
<cstring>txtGIDOffset</cstring>
</property>
<property name="minValue">
<number>100</number>
</property>
<property name="maxValue">
<number>99999</number>
</property>
<property name="hidden">
<string>true</string>
</property>
</widget>
</grid>
</widget>
<widget class="TQGroupBox" row="1" column="1">
<property name="name">
<cstring>groupDomainAliases</cstring>
</property>
<property name="title">
<string>Realm Domain Aliases (optional)</string>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="text">
<string>Enter each domain alias on a new line below</string>
</property>
</widget>
<widget class="KTextEdit" row="1" column="0">
<property name="name">
<cstring>txtDomains</cstring>
</property>
</widget>
</grid>
</widget>
<widget class="TQGroupBox" row="2" column="1">
<property name="name">
<cstring>groupAdvancedPKInit</cstring>
</property>
<property name="title">
<string>Advanced PKInit Settings (optional)</string>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="TQCheckBox" row="0" column="0">
<property name="name">
<cstring>checkRequireEKU</cstring>
</property>
<property name="text">
<string>Require EKU</string>
</property>
</widget>
<widget class="TQCheckBox" row="0" column="1">
<property name="name">
<cstring>checkRequireKrbtgtOtherName</cstring>
</property>
<property name="text">
<string>Require KRB TGT Other Name</string>
</property>
</widget>
<widget class="TQCheckBox" row="1" column="0">
<property name="name">
<cstring>checkWin2k</cstring>
</property>
<property name="text">
<string>Windows 2000 Compatibility</string>
</property>
</widget>
<widget class="TQCheckBox" row="1" column="1">
<property name="name">
<cstring>checkWin2kPkinitRequireBinding</cstring>
</property>
<property name="text">
<string>Require Windows 2000 Binding</string>
</property>
</widget>
</grid>
</widget>
<spacer row="3" column="1">
<property name="name">
<cstring>Spacer6</cstring>
</property>
<property name="orientation">
<enum>Vertical</enum>
</property>
<property name="sizeType">
<enum>Fixed</enum>
</property>
<property name="sizeHint">
<size>
<width>20</width>
<height>30</height>
</size>
</property>
</spacer>
<spacer row="7" column="1">
<property name="name">
<cstring>Spacer5</cstring>
</property>
<property name="orientation">
<enum>Vertical</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
</spacer>
</grid>
</widget>
<layoutdefaults spacing="3" margin="6"/>
<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/>
<property name="name">
<cstring>Spacer5</cstring>
</property>
<property name="orientation">
<enum>Vertical</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
</spacer>
</grid>
</widget>
<layoutdefaults spacing="3" margin="6"/>
<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/>
</UI>

@ -1,118 +1,142 @@
<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
<class>RealmFinishPageDlg</class>
<widget class="TQWidget">
<property name="name">
<cstring>RealmFinishPageDlg</cstring>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>678</width>
<height>452</height>
</rect>
</property>
<grid>
<class>RealmFinishPageDlg</class>
<widget class="TQWidget">
<property name="name">
<cstring>unnamed</cstring>
<cstring>RealmFinishPageDlg</cstring>
</property>
<widget class="TQLabel" row="0" column="0" rowspan="9" colspan="1">
<grid>
<property name="name">
<cstring>px_introSidebar</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>170</width>
<height>430</height>
</size>
</property>
<property name="frameShape">
<enum>Panel</enum>
</property>
<property name="frameShadow">
<enum>Sunken</enum>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
<property name="indent">
<number>0</number>
</property>
</widget>
<widget class="TQLabel" row="0" column="1">
<property name="name">
<cstring>txt_welcome</cstring>
</property>
<property name="text">
<string>&lt;h3&gt;Welcome to the TDE LDAP Realming Wizard!&lt;/h3&gt;</string>
</property>
</widget>
<widget class="TQLabel" row="1" column="1">
<property name="name">
<cstring>TextLabel6</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>1</hsizetype>
<vsizetype>1</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>&lt;p&gt;This Wizard will help you bond your machine to an LDAP realm in three quick, easy steps.&lt;/p&gt;
&lt;p&gt;Please note that you will need administrative access to the LDAP realm you will be bonding with.&lt;/p&gt;
&lt;p&gt;If you wish to quit the Wizard, click &lt;b&gt;Cancel&lt;/b&gt; at any time.&lt;/p&gt;</string>
</property>
<property name="textFormat">
<enum>RichText</enum>
</property>
<property name="alignment">
<set>WordBreak|AlignTop|AlignLeft</set>
</property>
<property name="vAlign" stdset="0">
</property>
<property name="wordwrap" stdset="0">
</property>
</widget>
<spacer row="2" column="1">
<property name="name">
<cstring>Spacer6</cstring>
</property>
<property name="orientation">
<enum>Vertical</enum>
</property>
<property name="sizeType">
<enum>Fixed</enum>
</property>
<property name="sizeHint">
<size>
<width>20</width>
<height>30</height>
</size>
</property>
<cstring>unnamed</cstring>
</property>
<widget class="TQLabel" row="0" column="0" rowspan="9" colspan="1">
<property name="name">
<cstring>px_introSidebar</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>170</width>
<height>430</height>
</size>
</property>
<property name="frameShape">
<enum>Panel</enum>
</property>
<property name="frameShadow">
<enum>Sunken</enum>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
<property name="indent">
<number>0</number>
</property>
</widget>
<widget class="TQLabel" row="0" column="1" colspan="2">
<property name="name">
<cstring>yad_string</cstring>
</property>
<property name="text">
<string>&lt;h3&gt;You're almost done!&lt;/h3&gt;</string>
</property>
</widget>
<widget class="TQLabel" row="1" column="1" colspan="2">
<property name="name">
<cstring>passprompt</cstring>
</property>
<property name="text">
<string>Please provide new LDAP realm administrator credentials below to finish setup</string>
</property>
</widget>
<widget class="TQLabel" row="2" column="1">
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="text">
<string>Username</string>
</property>
</widget>
<widget class="KLineEdit" row="2" column="2">
<property name="name">
<cstring>ldapAdminUsername</cstring>
</property>
</widget>
<widget class="TQLabel" row="3" column="1">
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="text">
<string>Password</string>
</property>
</widget>
<widget class="KPasswordEdit" row="3" column="2">
<property name="name">
<cstring>ldapAdminPassword</cstring>
</property>
</widget>
<widget class="TQLabel" row="4" column="1">
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="text">
<string>Confirm Password</string>
</property>
</widget>
<widget class="KPasswordEdit" row="4" column="2">
<property name="name">
<cstring>ldapConfirmAdminPassword</cstring>
</property>
</widget>
<widget class="TQLabel" row="5" column="1">
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="text">
<string>LDAP Realm</string>
</property>
</widget>
<widget class="KLineEdit" row="5" column="2">
<property name="name">
<cstring>ldapAdminRealm</cstring>
</property>
</widget>
<spacer row="6" column="1">
<property name="name">
<cstring>Spacer6</cstring>
</property>
<property name="orientation">
<enum>Vertical</enum>
</property>
<property name="sizeType">
<enum>Fixed</enum>
</property>
<property name="sizeHint">
<size>
<width>20</width>
<height>30</height>
</size>
</property>
</spacer>
<spacer row="7" column="1">
<property name="name">
<cstring>Spacer5</cstring>
</property>
<property name="orientation">
<enum>Vertical</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
</spacer>
</grid>
</widget>
<layoutdefaults spacing="3" margin="6"/>
<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/>
<property name="name">
<cstring>Spacer5</cstring>
</property>
<property name="orientation">
<enum>Vertical</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
</spacer>
</grid>
</widget>
<layoutdefaults spacing="3" margin="6"/>
<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/>
</UI>

@ -52,7 +52,7 @@
<cstring>txt_welcome</cstring>
</property>
<property name="text">
<string>&lt;h3&gt;Welcome to the TDE LDAP Realming Wizard!&lt;/h3&gt;</string>
<string>&lt;h3&gt;Welcome to the TDE LDAP Realm Setup Wizard!&lt;/h3&gt;</string>
</property>
</widget>
<widget class="TQLabel" row="1" column="1">
@ -68,8 +68,8 @@
</sizepolicy>
</property>
<property name="text">
<string>&lt;p&gt;This Wizard will help you bond your machine to an LDAP realm in three quick, easy steps.&lt;/p&gt;
&lt;p&gt;Please note that you will need administrative access to the LDAP realm you will be bonding with.&lt;/p&gt;
<string>&lt;p&gt;This Wizard will help you create a new LDAP realm in three quick, easy steps.&lt;/p&gt;
&lt;p&gt;Please note that this Wizard will overwrite any existing LDAP realms and data.&lt;/p&gt;
&lt;p&gt;If you wish to quit the Wizard, click &lt;b&gt;Cancel&lt;/b&gt; at any time.&lt;/p&gt;</string>
</property>
<property name="textFormat">

@ -55,8 +55,8 @@
#include "realmwizard.h"
#include "realmwizard.moc"
RealmWizard::RealmWizard(TQWidget *parent, const char *name)
: KWizard(parent, name, true) {
RealmWizard::RealmWizard(LDAPController* controller, TQWidget *parent, const char *name)
: KWizard(parent, name, true), m_controller(controller) {
setCaption(i18n("LDAP Realm Wizard"));
@ -152,7 +152,7 @@ bool RealmWizard::askClose(){
*/
void RealmWizard::reject(){
if (askClose()){
done(0);
done(-1);
}
}

@ -28,6 +28,8 @@
#include <kapplication.h>
#include <kwizard.h>
#include "ldapcontroller.h"
/** prototypes */
class KLanguageCombo;
class RealmIntroPage;
@ -39,7 +41,7 @@ class RealmWizard : public KWizard {
Q_OBJECT
public:
/** construtor */
RealmWizard(TQWidget* parent=0, const char *name=0);
RealmWizard(LDAPController* controller, TQWidget* parent=0, const char *name=0);
/** destructor */
~RealmWizard();
@ -69,6 +71,7 @@ private:
RealmConfigPage* realmpage;
RealmFinishPage* finishpage;
bool realm_dirty;
LDAPController* m_controller;
protected: // Protected methods
// the close button on the titlebar sets e->accept() which we don't want.

Loading…
Cancel
Save