diff options
author | Timothy Pearson <[email protected]> | 2012-05-31 01:31:04 -0500 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2012-05-31 01:31:04 -0500 |
commit | 47aae9120db93e3120a35ce145ae7b7358890ae4 (patch) | |
tree | fae83f6474ecb71bada1833afd016435f211d903 /src | |
download | kcmldapcontroller-47aae9120db93e3120a35ce145ae7b7358890ae4.tar.gz kcmldapcontroller-47aae9120db93e3120a35ce145ae7b7358890ae4.zip |
Initial import of skeleton for development
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.am | 19 | ||||
-rw-r--r-- | src/ldapcontroller.cpp | 82 | ||||
-rw-r--r-- | src/ldapcontroller.desktop | 17 | ||||
-rw-r--r-- | src/ldapcontroller.h | 54 | ||||
-rw-r--r-- | src/ldapcontrollerconfigbase.ui | 85 |
5 files changed, 257 insertions, 0 deletions
diff --git a/src/Makefile.am b/src/Makefile.am new file mode 100644 index 0000000..e78843e --- /dev/null +++ b/src/Makefile.am @@ -0,0 +1,19 @@ +INCLUDES = $(all_includes) +METASOURCES = AUTO + +# Install this plugin in the KDE modules directory +kde_module_LTLIBRARIES = kcm_ldapcontroller.la + +kcm_ldapcontroller_la_SOURCES = ldapcontroller.cpp ldapcontrollerconfigbase.ui +kcm_ldapcontroller_la_LIBADD = -lkio $(LIB_TDEUI) +kcm_ldapcontroller_la_LDFLAGS = -avoid-version -module -no-undefined \ + $(all_libraries) + + +xdg_apps_DATA = ldapcontroller.desktop + + +messages: rc.cpp + $(EXTRACTRC) `find -name \*.ui -o -name \*.rc` > rc.cpp + $(XGETTEXT) *.cpp -o $(podir)/kcmldapcontroller.pot + diff --git a/src/ldapcontroller.cpp b/src/ldapcontroller.cpp new file mode 100644 index 0000000..addb8ad --- /dev/null +++ b/src/ldapcontroller.cpp @@ -0,0 +1,82 @@ +/*************************************************************************** + * Copyright (C) 2012 by Timothy Pearson * + * [email protected] * + * * + * 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 <tqlayout.h> + +#include <klocale.h> +#include <kglobal.h> +#include <kparts/genericfactory.h> +#include <ksimpleconfig.h> +#include <kglobalsettings.h> +#include <kstandarddirs.h> +#include <kurlrequester.h> +#include <klistview.h> +#include <kopenwith.h> +#include <kpropertiesdialog.h> +#include <kio/job.h> +#include <tqdir.h> +#include <tqheader.h> + +#include "ldapcontroller.h" + +typedef KGenericFactory<LDAPController, TQWidget> ldapFactory; + +K_EXPORT_COMPONENT_FACTORY( kcm_ldapcontroller, ldapFactory("kcmldapcontroller")) + +LDAPController::LDAPController(TQWidget *parent, const char *name, const TQStringList&) + : KCModule(parent, name), myAboutData(0) +{ + // FIXME + // Add UI base widget to 'this' + + load(); + + KAboutData* about = new KAboutData("ldapcontroller", I18N_NOOP("TDE LDAP Controller"), "0.1", + I18N_NOOP("TDE LDAP Controller Control Panel Module"), + KAboutData::License_GPL, + I18N_NOOP("(c) 2012 Timothy Pearson"), 0, 0); + + about->addAuthor("Timothy Pearson", 0, "[email protected]"); + setAboutData( about ); +}; + +LDAPController::~LDAPController() { +} + +void LDAPController::load() { + // +} + +void LDAPController::defaults() { + // +} + +void LDAPController::save() { + // +} + +int LDAPController::buttons() { + return KCModule::Apply|KCModule::Help; +} + +TQString LDAPController::quickHelp() const +{ + return i18n("This module configures an LDAP Realm Controller."); +} diff --git a/src/ldapcontroller.desktop b/src/ldapcontroller.desktop new file mode 100644 index 0000000..006b8b5 --- /dev/null +++ b/src/ldapcontroller.desktop @@ -0,0 +1,17 @@ +[Desktop Entry] +Encoding=UTF-8 +Exec=kcmshell ldapcontroller +Icon=tdmconfig +Type=Application + +X-KDE-ModuleType=Library +X-KDE-Library=ldapcontroller +X-KDE-HasReadOnlyMode=false +X-KDE-ParentApp=kcontrol + +[Desktop Entry] +Encoding=UTF-8 +Comment=A KControl tool for configuring an LDAP Realm Controller +Keywords=ldap controller +Name=LDAP Realm Controller +Categories=Qt;KDE;X-KDE-settings-components; diff --git a/src/ldapcontroller.h b/src/ldapcontroller.h new file mode 100644 index 0000000..9fdac57 --- /dev/null +++ b/src/ldapcontroller.h @@ -0,0 +1,54 @@ +/*************************************************************************** + * Copyright (C) 2012 by Timothy Pearson * + * [email protected] * + * * + * 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 _LDAPCONTROLLER_H_ +#define _LDAPCONTROLLER_H_ + +#include <kcmodule.h> +#include <kaboutdata.h> +#include <kpushbutton.h> +#include <klistview.h> +#include <kfileitem.h> +#include <kglobalsettings.h> +#include <tqpushbutton.h> +#include <tqcombobox.h> + +#include "ldapconfigbase.h" + +class LDAPController: public KCModule +{ + Q_OBJECT + + public: + LDAPController( TQWidget *parent=0, const char *name=0, const TQStringList& = TQStringList() ); + ~LDAPController(); + + virtual void load(); + virtual void save(); + virtual void defaults(); + virtual int buttons(); + virtual TQString quickHelp() const; + virtual const KAboutData *aboutData() const { return myAboutData; }; + + private: + KAboutData *myAboutData; +}; + +#endif // _LDAPCONTROLLER_H_ diff --git a/src/ldapcontrollerconfigbase.ui b/src/ldapcontrollerconfigbase.ui new file mode 100644 index 0000000..ecb0d87 --- /dev/null +++ b/src/ldapcontrollerconfigbase.ui @@ -0,0 +1,85 @@ +<!DOCTYPE UI><UI version="3.0" stdsetdef="1"> +<class>LDAPControllerConfigBase</class> +<widget class="TQWidget"> + <property name="name"> + <cstring>LDAPControllerConfigBase</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>tab</cstring> + </property> + <attribute name="title"> + <string>LDAP Realms</string> + </attribute> + <grid> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <widget class="TQGroupBox" row="0" column="0"> + <property name="name"> + <cstring>groupGlobal</cstring> + </property> + <property name="title"> + <string>Global Settings</string> + </property> + <grid> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <widget class="KComboBox" row="0" column="0" colspan="2"> + <property name="name"> + <cstring>systemRole</cstring> + </property> + </widget> + </grid> + </widget> + <spacer row="4" column="0"> + <property name="name" stdset="0"> + <cstring>Spacer4</cstring> + </property> + <property name="orientation"> + <enum>Vertical</enum> + </property> + <property name="sizeType"> + <enum>Expanding</enum> + </property> + <property name="sizeHint"> + <size> + <width>20</width> + <height>20</height> + </size> + </property> + </spacer> + </grid> + </widget> + </widget> + </grid> +</widget> +<includes> + <include location="local" impldecl="in implementation">LDAPControllerConfigBase.ui.h</include> +</includes> +<includes> + <include location="local" impldecl="in implementation">kdialog.h</include> +</includes> +<layoutdefaults spacing="3" margin="6"/> +<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> +</UI> |