summaryrefslogtreecommitdiffstats
path: root/libtdepim/cfgc
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-11-06 15:57:02 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-11-06 15:57:02 -0600
commit2c2fbd828ca474671bb9e03681b30b115d8d6035 (patch)
tree526a9da418f8d3d7ccf515c37048d3dfc80f2843 /libtdepim/cfgc
parentf0610eece3676b6fe99f42cf4ef2b19a39a5c4e8 (diff)
downloadtdepim-2c2fbd828ca474671bb9e03681b30b115d8d6035.tar.gz
tdepim-2c2fbd828ca474671bb9e03681b30b115d8d6035.zip
Actually move the kde files that were renamed in the last commit
Diffstat (limited to 'libtdepim/cfgc')
-rw-r--r--libtdepim/cfgc/Makefile.am14
-rw-r--r--libtdepim/cfgc/README6
-rw-r--r--libtdepim/cfgc/autoexample.cpp66
-rw-r--r--libtdepim/cfgc/example.cfg40
-rw-r--r--libtdepim/cfgc/example.cpp55
-rw-r--r--libtdepim/cfgc/exampleprefs_base.kcfg42
-rw-r--r--libtdepim/cfgc/exampleprefs_base.kcfgc11
-rw-r--r--libtdepim/cfgc/general_base.ui46
-rw-r--r--libtdepim/cfgc/myoptions_base.ui46
9 files changed, 326 insertions, 0 deletions
diff --git a/libtdepim/cfgc/Makefile.am b/libtdepim/cfgc/Makefile.am
new file mode 100644
index 00000000..ec9f505f
--- /dev/null
+++ b/libtdepim/cfgc/Makefile.am
@@ -0,0 +1,14 @@
+AM_CPPFLAGS = -I$(top_builddir)/libtdepim -I$(top_srcdir) $(all_includes)
+
+check_PROGRAMS = example
+#autoexample
+
+example_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_KDECORE) $(LIB_KDEUI) -ltdefx $(LIB_KIO) -lktexteditor
+example_LDADD = ../libtdepim.la $(LIB_KDECORE)
+example_SOURCES = example.cpp exampleprefs_base.kcfgc
+
+#autoexample_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_KDECORE) $(LIB_KDEUI) -ltdefx $(LIB_KIO) -lktexteditor
+#autoexample_LDADD = ../libtdepim.la $(LIB_KDECORE)
+#autoexample_SOURCES = general_base.ui myoptions_base.ui autoexample.cpp
+
+METASOURCES = AUTO
diff --git a/libtdepim/cfgc/README b/libtdepim/cfgc/README
new file mode 100644
index 00000000..6a778381
--- /dev/null
+++ b/libtdepim/cfgc/README
@@ -0,0 +1,6 @@
+This directory contains text and example code for automatic creation of
+configuration dialogs based on KConfigSkeleton, kconfig_compiler and
+KPrefsDialog.
+
+If you have questions or comments please contact Cornelius Schumacher
+<schumacher@kde.org>.
diff --git a/libtdepim/cfgc/autoexample.cpp b/libtdepim/cfgc/autoexample.cpp
new file mode 100644
index 00000000..45617e6f
--- /dev/null
+++ b/libtdepim/cfgc/autoexample.cpp
@@ -0,0 +1,66 @@
+/*
+ This file is part of KDE.
+
+ Copyright (c) 2003 Cornelius Schumacher <schumacher@kde.org>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library 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
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "general_base.h"
+#include "myoptions_base.h"
+
+#include <libtdepim/kprefsdialog.h>
+
+#include <kaboutdata.h>
+#include <kapplication.h>
+#include <kdebug.h>
+#include <klocale.h>
+#include <kcmdlineargs.h>
+#include <kglobal.h>
+#include <kconfig.h>
+#include <kstandarddirs.h>
+#include <kautoconfigdialog.h>
+
+#include <tqlabel.h>
+
+int main( int argc, char **argv )
+{
+ KAboutData aboutData( "example", I18N_NOOP("autoconfig example"), "0.1" );
+ aboutData.addAuthor( "Cornelius Schumacher", 0, "schumacher@kde.org" );
+
+ KCmdLineArgs::init( argc, argv, &aboutData );
+
+ KApplication app;
+
+ // Create a new dialog with the same name as the above checking code.
+ KAutoConfigDialog *dialog = new KAutoConfigDialog(0, "settings");
+
+ // Add the general page. Store the settings in the General group and
+ // use the icon package_settings.
+ GeneralBase *general = new GeneralBase( 0 );
+ dialog->addPage( general, i18n("General"), "General", "" );
+
+ MyOptionsBase *myOptions = new MyOptionsBase( 0 );
+
+// myOptions->show();
+ dialog->addPage( myOptions, i18n("MyOptions"), "MyOptions", "" );
+
+// app.setMainWidget( dialog );
+
+ dialog->show();
+
+ return app.exec();
+}
diff --git a/libtdepim/cfgc/example.cfg b/libtdepim/cfgc/example.cfg
new file mode 100644
index 00000000..18c7b8b1
--- /dev/null
+++ b/libtdepim/cfgc/example.cfg
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE cfg SYSTEM "cfg.dtd">
+<cfg>
+ <cfgfile name="examplerc"/>
+ <class name="ExamplePrefsBase" file="exampleprefs_base" singleton="true">
+ <include file="libtdepim/kpimprefs.h" />
+ </class>
+ <group name="General">
+ <entry type="bool">
+ <name>OneOption</name>
+ <label>One option</label>
+ <default>true</default>
+ </entry>
+ <entry type="int">
+ <key>Another Option</key>
+ <label>Another option</label>
+ <default>5</default>
+ </entry>
+ <entry type="int">
+ <values>
+ <value>One</value>
+ <value>Two</value>
+ <value>Three</value>
+ </values>
+ <name>ListOption</name>
+ <default>One</default>
+ </entry>
+ </group>
+ <group name="MyOptions">
+ <entry type=TQSTRING_OBJECT_NAME_STRING>
+ <name>MyString</name>
+ <label>This is a string</label>
+ <default>Default String</default>
+ </entry>
+ <entry type=TQSTRINGLIST_OBJECT_NAME_STRING>
+ <name>MyStringList</name>
+ <default>up,down</default>
+ </entry>
+ </group>
+</cfg>
diff --git a/libtdepim/cfgc/example.cpp b/libtdepim/cfgc/example.cpp
new file mode 100644
index 00000000..4f818e90
--- /dev/null
+++ b/libtdepim/cfgc/example.cpp
@@ -0,0 +1,55 @@
+/*
+ This file is part of KDE.
+
+ Copyright (c) 2003 Cornelius Schumacher <schumacher@kde.org>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library 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
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "exampleprefs_base.h"
+
+#include <kaboutdata.h>
+#include <kapplication.h>
+#include <kdebug.h>
+#include <klocale.h>
+#include <kcmdlineargs.h>
+#include <kglobal.h>
+#include <kconfig.h>
+#include <kstandarddirs.h>
+
+#include <libtdepim/kprefsdialog.h>
+
+int main( int argc, char **argv )
+{
+ KAboutData aboutData( "example", I18N_NOOP("cfgc example"), "0.1" );
+ aboutData.addAuthor( "Cornelius Schumacher", 0, "schumacher@kde.org" );
+
+ KCmdLineArgs::init( argc, argv, &aboutData );
+
+ KApplication app;
+
+ ExamplePrefsBase *prefs = ExamplePrefsBase::self();
+
+ KPrefsDialog *dialog = new KPrefsDialog( prefs );
+
+ dialog->autoCreate();
+
+ app.setMainWidget( dialog );
+
+ dialog->show();
+
+ return app.exec();
+}
diff --git a/libtdepim/cfgc/exampleprefs_base.kcfg b/libtdepim/cfgc/exampleprefs_base.kcfg
new file mode 100644
index 00000000..e197ae7c
--- /dev/null
+++ b/libtdepim/cfgc/exampleprefs_base.kcfg
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<kcfg xmlns="http://www.kde.org/standards/kcfg/1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.kde.org/standards/kcfg/1.0
+ http://www.kde.org/standards/kcfg/1.0/kcfg.xsd" >
+ <kcfgfile name="examplerc"/>
+ <group name="General-$(folder)">
+ <entry name="OneOption" type="Bool">
+ <label>One option</label>
+ <default>true</default>
+ </entry>
+ <entry name="AnotherOption" type="Int" key="Another Option">
+ <label>Another option</label>
+ <default>5</default>
+ </entry>
+ <entry name="ListOption" type="Enum">
+ <label>This is some funky option</label>
+ <whatsthis>And this is a longer description of this option. Just wondering, how will the translations of those be handled?</whatsthis>
+ <choices>
+ <choice name="One">
+ <label>One</label>
+ </choice>
+ <choice name="Two">
+ <label>Two</label>
+ </choice>
+ <choice name="Three">
+ <label>Three</label>
+ </choice>
+ </choices>
+ <default>One</default>
+ </entry>
+ </group>
+ <group name="MyOptions">
+ <entry name="MyString" type="String">
+ <label>This is a string</label>
+ <default>Default String</default>
+ </entry>
+ <entry name="MyStringList" type="StringList">
+ <default>up,down</default>
+ </entry>
+ </group>
+</kcfg>
diff --git a/libtdepim/cfgc/exampleprefs_base.kcfgc b/libtdepim/cfgc/exampleprefs_base.kcfgc
new file mode 100644
index 00000000..36e5ed4e
--- /dev/null
+++ b/libtdepim/cfgc/exampleprefs_base.kcfgc
@@ -0,0 +1,11 @@
+# Code generation options for kconfig_compiler
+File=exampleprefs_base.kcfg
+ClassName=ExamplePrefsBase
+Singleton=true
+Mutators=true
+Inherits=KPimPrefs
+IncludeFiles=libtdepim/kpimprefs.h
+MemberVariables=public
+GlobalEnums=true
+ItemAccessors=true
+SetUserTexts=true
diff --git a/libtdepim/cfgc/general_base.ui b/libtdepim/cfgc/general_base.ui
new file mode 100644
index 00000000..7cafaa01
--- /dev/null
+++ b/libtdepim/cfgc/general_base.ui
@@ -0,0 +1,46 @@
+<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
+<class>GeneralBase</class>
+<widget class="TQWidget">
+ <property name="name">
+ <cstring>GeneralBase</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>600</width>
+ <height>480</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>AutoExampleDialog</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="TQCheckBox" row="0" column="1">
+ <property name="name">
+ <cstring>OneOption</cstring>
+ </property>
+ <property name="text">
+ <string>OneOption</string>
+ </property>
+ </widget>
+ <widget class="TQSpinBox" row="1" column="1">
+ <property name="name">
+ <cstring>Another_Option</cstring>
+ </property>
+ </widget>
+ <widget class="TQLabel" row="1" column="0">
+ <property name="name">
+ <cstring>textLabel1</cstring>
+ </property>
+ <property name="text">
+ <string>AnotherOption:</string>
+ </property>
+ </widget>
+ </grid>
+</widget>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/libtdepim/cfgc/myoptions_base.ui b/libtdepim/cfgc/myoptions_base.ui
new file mode 100644
index 00000000..4d4f8247
--- /dev/null
+++ b/libtdepim/cfgc/myoptions_base.ui
@@ -0,0 +1,46 @@
+<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
+<class>MyOptionsBase</class>
+<widget class="TQWidget">
+ <property name="name">
+ <cstring>MyOptionsBase</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>600</width>
+ <height>480</height>
+ </rect>
+ </property>
+ <widget class="TQLabel">
+ <property name="name">
+ <cstring>textLabel1</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>30</x>
+ <y>180</y>
+ <width>70</width>
+ <height>20</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>MyString:</string>
+ </property>
+ </widget>
+ <widget class="TQLineEdit">
+ <property name="name">
+ <cstring>MyString</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>130</x>
+ <y>180</y>
+ <width>123</width>
+ <height>22</height>
+ </rect>
+ </property>
+ </widget>
+</widget>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>