From 2c2fbd828ca474671bb9e03681b30b115d8d6035 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Sun, 6 Nov 2011 15:57:02 -0600 Subject: Actually move the kde files that were renamed in the last commit --- libtdepim/cfgc/Makefile.am | 14 ++++++++ libtdepim/cfgc/README | 6 ++++ libtdepim/cfgc/autoexample.cpp | 66 ++++++++++++++++++++++++++++++++++ libtdepim/cfgc/example.cfg | 40 +++++++++++++++++++++ libtdepim/cfgc/example.cpp | 55 ++++++++++++++++++++++++++++ libtdepim/cfgc/exampleprefs_base.kcfg | 42 ++++++++++++++++++++++ libtdepim/cfgc/exampleprefs_base.kcfgc | 11 ++++++ libtdepim/cfgc/general_base.ui | 46 ++++++++++++++++++++++++ libtdepim/cfgc/myoptions_base.ui | 46 ++++++++++++++++++++++++ 9 files changed, 326 insertions(+) create mode 100644 libtdepim/cfgc/Makefile.am create mode 100644 libtdepim/cfgc/README create mode 100644 libtdepim/cfgc/autoexample.cpp create mode 100644 libtdepim/cfgc/example.cfg create mode 100644 libtdepim/cfgc/example.cpp create mode 100644 libtdepim/cfgc/exampleprefs_base.kcfg create mode 100644 libtdepim/cfgc/exampleprefs_base.kcfgc create mode 100644 libtdepim/cfgc/general_base.ui create mode 100644 libtdepim/cfgc/myoptions_base.ui (limited to 'libtdepim/cfgc') 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 +. 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 + + 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 + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +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 @@ + + + + + + + + + + OneOption + + true + + + Another Option + + 5 + + + + One + Two + Three + + ListOption + One + + + + + MyString + + Default String + + + MyStringList + up,down + + + 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 + + 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 +#include +#include +#include +#include +#include +#include +#include + +#include + +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 @@ + + + + + + + true + + + + 5 + + + + And this is a longer description of this option. Just wondering, how will the translations of those be handled? + + + + + + + + + + + + One + + + + + + Default String + + + up,down + + + 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 @@ + +GeneralBase + + + GeneralBase + + + + 0 + 0 + 600 + 480 + + + + AutoExampleDialog + + + + unnamed + + + + OneOption + + + OneOption + + + + + Another_Option + + + + + textLabel1 + + + AnotherOption: + + + + + + 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 @@ + +MyOptionsBase + + + MyOptionsBase + + + + 0 + 0 + 600 + 480 + + + + + textLabel1 + + + + 30 + 180 + 70 + 20 + + + + MyString: + + + + + MyString + + + + 130 + 180 + 123 + 22 + + + + + + -- cgit v1.2.3