parent
3b25ffc998
commit
43ef321b01
@ -1 +1 @@
|
||||
Subproject commit 307fab5fdad542247fa11a418be0e9635f4b5ebf
|
||||
Subproject commit 4027b878fb556a51ed29affd578e78aa70997480
|
@ -0,0 +1,132 @@
|
||||
<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
|
||||
<class>LDAPMultiMasterReplicationConfigBase</class>
|
||||
<widget class="TQWidget">
|
||||
<property name="name">
|
||||
<cstring>LDAPMultiMasterReplicationConfigBase</cstring>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>519</width>
|
||||
<height>356</height>
|
||||
</rect>
|
||||
</property>
|
||||
<grid>
|
||||
<property name="name">
|
||||
<cstring>unnamed</cstring>
|
||||
</property>
|
||||
<widget class="TQTabWidget" row="0" column="0">
|
||||
<property name="name">
|
||||
<cstring>TabWidget2</cstring>
|
||||
</property>
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<widget class="TQWidget">
|
||||
<property name="name">
|
||||
<cstring>detailsTab</cstring>
|
||||
</property>
|
||||
<attribute name="title">
|
||||
<string>Kerberos MultiMasterReplication</string>
|
||||
</attribute>
|
||||
<grid>
|
||||
<property name="name">
|
||||
<cstring>unnamed</cstring>
|
||||
</property>
|
||||
<widget class="TQLayoutWidget" row="1" column="0" colspan="3">
|
||||
<property name="name">
|
||||
<cstring>unnamed_layoutwidget</cstring>
|
||||
</property>
|
||||
<grid>
|
||||
<property name="name">
|
||||
<cstring>unnamed</cstring>
|
||||
</property>
|
||||
<widget class="TQLabel" row="0" column="0" colspan="1">
|
||||
<property name="name">
|
||||
<cstring>detailsIcon</cstring>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy>
|
||||
<hsizetype>4</hsizetype>
|
||||
<vsizetype>5</vsizetype>
|
||||
<horstretch>1</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="TQLabel" row="0" column="1" colspan="1">
|
||||
<property name="name">
|
||||
<cstring>unnamed</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>LDAP master:</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="KLineEdit" row="0" column="2" colspan="1">
|
||||
<property name="name">
|
||||
<cstring>masterName</cstring>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy>
|
||||
<hsizetype>3</hsizetype>
|
||||
<vsizetype>5</vsizetype>
|
||||
<horstretch>1</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="TQLabel" row="0" column="3" colspan="1">
|
||||
<property name="name">
|
||||
<cstring>realmNameLabel</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string></string>
|
||||
</property>
|
||||
</widget>
|
||||
</grid>
|
||||
</widget>
|
||||
<widget class="TQLayoutWidget" row="2" column="0" colspan="3">
|
||||
<property name="name">
|
||||
<cstring>unnamed_layoutwidget</cstring>
|
||||
</property>
|
||||
<grid>
|
||||
<property name="name">
|
||||
<cstring>unnamed</cstring>
|
||||
</property>
|
||||
<widget class="TQLabel" row="0" column="0" colspan="1">
|
||||
<property name="name">
|
||||
<cstring>masterIDCaption</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Unique ID:</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="KIntNumInput" row="0" column="1" colspan="1" >
|
||||
<property name="name">
|
||||
<cstring>masterUID</cstring>
|
||||
</property>
|
||||
<property name="minValue">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="maxValue">
|
||||
<number>4095</number>
|
||||
</property>
|
||||
</widget>
|
||||
</grid>
|
||||
</widget>
|
||||
</grid>
|
||||
</widget>
|
||||
</widget>
|
||||
</grid>
|
||||
</widget>
|
||||
<includes>
|
||||
<include location="local" impldecl="in implementation">LDAPMultiMasterReplicationConfigBase.ui.h</include>
|
||||
</includes>
|
||||
<includes>
|
||||
<include location="local" impldecl="in implementation">kdialog.h</include>
|
||||
<include location="local" impldecl="in declaration">kpassdlg.h</include>
|
||||
</includes>
|
||||
<layoutdefaults spacing="3" margin="6"/>
|
||||
<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/>
|
||||
</UI>
|
@ -0,0 +1,85 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2013 by Timothy Pearson *
|
||||
* kb9vqf@pearsoncomputing.net *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
|
||||
#include <tdelocale.h>
|
||||
#include <klineedit.h>
|
||||
#include <ktextedit.h>
|
||||
#include <knuminput.h>
|
||||
#include <tdeactionselector.h>
|
||||
#include <tqlistbox.h>
|
||||
#include <kpushbutton.h>
|
||||
#include <tqpixmap.h>
|
||||
#include <tqiconset.h>
|
||||
#include <tqlabel.h>
|
||||
#include <kurlrequester.h>
|
||||
#include <kcombobox.h>
|
||||
#include <tqradiobutton.h>
|
||||
#include <tqcheckbox.h>
|
||||
#include <kdatetimewidget.h>
|
||||
#include <kiconloader.h>
|
||||
|
||||
#include "libtdeldap.h"
|
||||
#include "multimasterreplicationconfigdlg.h"
|
||||
|
||||
MultiMasterReplicationConfigDialog::MultiMasterReplicationConfigDialog(LDAPMasterReplicationMapping multimasterreplication, TQString realmName, TQWidget* parent, const char* name)
|
||||
: KDialogBase(parent, name, true, i18n("LDAP Multi-Master Replication Properties"), Ok|Cancel, Ok, true), m_replicationProperties(multimasterreplication), m_ldapconfig(parent), m_realmName(realmName)
|
||||
{
|
||||
m_base = new LDAPMultiMasterReplicationConfigBase(this);
|
||||
setMainWidget(m_base);
|
||||
|
||||
m_base->detailsIcon->setPixmap(SmallIcon("system.png"));
|
||||
|
||||
m_base->realmNameLabel->setText("."+realmName.lower());
|
||||
|
||||
connect(m_base->masterName, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(processLockouts()));
|
||||
|
||||
m_base->masterUID->setValue(m_replicationProperties.id);
|
||||
|
||||
TQString shortMasterName = m_replicationProperties.fqdn;
|
||||
if (shortMasterName.endsWith("." + m_realmName.lower())) {
|
||||
shortMasterName.truncate(shortMasterName.length() - TQString("." + m_realmName).length());
|
||||
}
|
||||
m_base->masterName->setText(shortMasterName);
|
||||
m_base->masterName->setFocus();
|
||||
|
||||
processLockouts();
|
||||
}
|
||||
|
||||
void MultiMasterReplicationConfigDialog::slotOk() {
|
||||
m_replicationProperties.fqdn = m_base->masterName->text() + "." + m_realmName.lower();
|
||||
m_replicationProperties.id = m_base->masterUID->value();
|
||||
|
||||
accept();
|
||||
}
|
||||
|
||||
void MultiMasterReplicationConfigDialog::processLockouts() {
|
||||
if (m_base->masterName->text() == "") {
|
||||
enableButton(KDialogBase::Ok, false);
|
||||
}
|
||||
else {
|
||||
enableButton(KDialogBase::Ok, true);
|
||||
}
|
||||
}
|
||||
|
||||
LDAPMasterReplicationMapping MultiMasterReplicationConfigDialog::replicationProperties() {
|
||||
return m_replicationProperties;
|
||||
}
|
||||
|
||||
#include "multimasterreplicationconfigdlg.moc"
|
@ -0,0 +1,50 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2013 by Timothy Pearson *
|
||||
* kb9vqf@pearsoncomputing.net *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef _MULTIMASTERREPLICATIONCONFIGDIALOG_H_
|
||||
#define _MULTIMASTERREPLICATIONCONFIGDIALOG_H_
|
||||
|
||||
#include <kdialogbase.h>
|
||||
|
||||
#include "libtdeldap.h"
|
||||
#include "multimasterreplicationconfigbase.h"
|
||||
|
||||
class MultiMasterReplicationConfigDialog : public KDialogBase
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
MultiMasterReplicationConfigDialog(LDAPMasterReplicationMapping multimasterreplication, TQString realmName, TQWidget* parent = 0, const char* name = 0);
|
||||
LDAPMasterReplicationMapping replicationProperties();
|
||||
|
||||
public slots:
|
||||
void slotOk();
|
||||
void processLockouts();
|
||||
|
||||
public:
|
||||
LDAPMultiMasterReplicationConfigBase *m_base;
|
||||
LDAPMasterReplicationMapping m_replicationProperties;
|
||||
|
||||
private:
|
||||
TQWidget* m_ldapconfig;
|
||||
TQString m_realmName;
|
||||
};
|
||||
|
||||
#endif // _MULTIMASTERREPLICATIONCONFIGDIALOG_H_
|
Loading…
Reference in new issue