summaryrefslogtreecommitdiffstats
path: root/tdecore/kconfig_compiler/example
diff options
context:
space:
mode:
Diffstat (limited to 'tdecore/kconfig_compiler/example')
-rw-r--r--tdecore/kconfig_compiler/example/Makefile.am27
-rw-r--r--tdecore/kconfig_compiler/example/autoexample.cpp64
-rw-r--r--tdecore/kconfig_compiler/example/example.cpp52
-rw-r--r--tdecore/kconfig_compiler/example/example.kcfg63
-rw-r--r--tdecore/kconfig_compiler/example/exampleprefs_base.kcfgc18
-rw-r--r--tdecore/kconfig_compiler/example/general_base.ui46
-rw-r--r--tdecore/kconfig_compiler/example/myoptions_base.ui35
7 files changed, 0 insertions, 305 deletions
diff --git a/tdecore/kconfig_compiler/example/Makefile.am b/tdecore/kconfig_compiler/example/Makefile.am
deleted file mode 100644
index 4e7a59fec..000000000
--- a/tdecore/kconfig_compiler/example/Makefile.am
+++ /dev/null
@@ -1,27 +0,0 @@
-AM_CPPFLAGS = -I$(top_srcdir)/tdecore -I$(top_srcdir) $(all_includes)
-
-check_PROGRAMS = example # autoexample
-EXTRA_PROGRAMS = autoexample
-
-example_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor
-example_LDADD = $(LIB_TDECORE)
-example_SOURCES = example.cpp exampleprefs_base.cpp
-
-autoexample_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor
-autoexample_LDADD = $(LIB_TDECORE) $(LIB_TDEUI)
-autoexample_SOURCES = exampleprefs_base.cpp general_base.ui myoptions_base.ui \
- autoexample.cpp
-
-example.o exampleprefs_base.o: exampleprefs_base.h
-# avoid running the below command in parallel
-exampleprefs_base.cpp: exampleprefs_base.h
-exampleprefs_base.cpp exampleprefs_base.h: $(srcdir)/example.kcfg ../kconfig_compiler $(srcdir)/exampleprefs_base.kcfgc
- ../kconfig_compiler $(srcdir)/example.kcfg $(srcdir)/exampleprefs_base.kcfgc
-
-METASOURCES = AUTO
-
-CLEANFILES = exampleprefs_base.h exampleprefs_base.cpp
-
-## The example's messages should not go into tdelibs.pot
-messages: rc.cpp
- true
diff --git a/tdecore/kconfig_compiler/example/autoexample.cpp b/tdecore/kconfig_compiler/example/autoexample.cpp
deleted file mode 100644
index 53e02f68d..000000000
--- a/tdecore/kconfig_compiler/example/autoexample.cpp
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- This file is part of KDE.
-
- Copyright (c) 2003 Cornelius Schumacher <[email protected]>
-
- 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 "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 <kconfigdialog.h>
-
-#include <tqlabel.h>
-
-int main( int argc, char **argv )
-{
- TDEAboutData aboutData( "example", I18N_NOOP("autoconfig example"), "0.1" );
- aboutData.addAuthor( "Cornelius Schumacher", 0, "[email protected]" );
-
- TDECmdLineArgs::init( argc, argv, &aboutData );
-
- TDEApplication app;
-
- ExamplePrefsBase configSkeleton( "dummy1", "dummy2" );
- configSkeleton.readConfig();
-
- TDEConfigDialog *dialog = new TDEConfigDialog( 0, "settings", &configSkeleton );
-
- GeneralBase *general = new GeneralBase( 0 );
- dialog->addPage( general, i18n("General"), "General", "" );
-
- MyOptionsBase *myOptions = new MyOptionsBase( 0 );
- dialog->addPage( myOptions, i18n("MyOptions"), "MyOptions", "" );
-
- app.setMainWidget( dialog );
-
- dialog->show();
-
- return app.exec();
-}
diff --git a/tdecore/kconfig_compiler/example/example.cpp b/tdecore/kconfig_compiler/example/example.cpp
deleted file mode 100644
index cf808c9b2..000000000
--- a/tdecore/kconfig_compiler/example/example.cpp
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- This file is part of KDE.
-
- Copyright (c) 2003 Cornelius Schumacher <[email protected]>
-
- 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>
-
-int main( int argc, char **argv )
-{
- TDEAboutData aboutData( "example", I18N_NOOP("cfgc example"), "0.1" );
- aboutData.addAuthor( "Cornelius Schumacher", 0, "[email protected]" );
-
- TDECmdLineArgs::init( argc, argv, &aboutData );
-
- TDEApplication app;
-
- ExamplePrefsBase *prefs = new ExamplePrefsBase("Trans1", "Folder2");
-
- prefs->readConfig();
-
- prefs->setAnotherOption(17);
-
- kdWarning() << "Another Option = " << prefs->anotherOption() << endl;
- kdWarning() << "Another Option2 = " << prefs->anotherOption2() << endl;
- kdWarning() << "MyPaths = " << prefs->myPaths() << endl;
- kdWarning() << "MyPaths2 = " << prefs->myPaths2() << endl;
-}
diff --git a/tdecore/kconfig_compiler/example/example.kcfg b/tdecore/kconfig_compiler/example/example.kcfg
deleted file mode 100644
index 076bfb644..000000000
--- a/tdecore/kconfig_compiler/example/example.kcfg
+++ /dev/null
@@ -1,63 +0,0 @@
-<?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" >
- <include>qdir.h</include>
- <kcfgfile name="examplerc">
- <parameter name="transport" />
- <parameter name="folder" />
- </kcfgfile>
- <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"/>
- <choice name="Two"/>
- <choice name="Three"/>
- </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="MyPath" type="Path">
- <label>This is a path</label>
- <default code="true">QDir::homeDirPath()+QString::fromLatin1(".hidden_file")</default>
- </entry>
- <entry name="MyPaths" type="PathList">
- <label>This is a list of paths</label>
- <default>/home,~</default>
- </entry>
- <entry name="MyPaths2" type="PathList">
- <label>This is a list of paths (test2)</label>
- <default code="true">QStringList(QDir::homeDirPath())</default>
- </entry>
- <entry name="AnotherOption2" type="Int" key="Another Option">
- <label>Another option</label>
- <default>10</default>
- </entry>
- <entry name="MyStringList" type="StringList">
- <default>up,down</default>
- </entry>
- <entry name="MyStringListHidden" hidden="true" type="StringList">
- <default>up,down</default>
- </entry>
- <entry name="MyNumber" type="Int64" key="List-$(transport)-$(folder)">
- <label>List Number</label>
- <default>1</default>
- </entry>
- </group>
-</kcfg>
diff --git a/tdecore/kconfig_compiler/example/exampleprefs_base.kcfgc b/tdecore/kconfig_compiler/example/exampleprefs_base.kcfgc
deleted file mode 100644
index a9ac98dc7..000000000
--- a/tdecore/kconfig_compiler/example/exampleprefs_base.kcfgc
+++ /dev/null
@@ -1,18 +0,0 @@
-# Code generation options for kconfig_compiler
-ClassName=ExamplePrefsBase
-#
-# Singleton=false
-#
-# Inherits=TDEConfigSkeleton
-#
-# IncludeFiles=libtdepim/kpimprefs.h
-#
-# MemberVariables=public
-#
-### The following line includes the file exampleprefs_base_addon.h
-### It can be used to add extra functions and variables to the
-### class.
-# CustomAdditions=true
-#
-### Provide setFooBar(int) style functions
-Mutators=true
diff --git a/tdecore/kconfig_compiler/example/general_base.ui b/tdecore/kconfig_compiler/example/general_base.ui
deleted file mode 100644
index 9b41370c7..000000000
--- a/tdecore/kconfig_compiler/example/general_base.ui
+++ /dev/null
@@ -1,46 +0,0 @@
-<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
-<class>GeneralBase</class>
-<widget class="QWidget">
- <property name="name">
- <cstring>GeneralBase</cstring>
- </property>
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>600</width>
- <height>486</height>
- </rect>
- </property>
- <property name="caption">
- <string>AutoExampleDialog</string>
- </property>
- <grid>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <widget class="QCheckBox" row="0" column="1">
- <property name="name">
- <cstring>kcfg_OneOption</cstring>
- </property>
- <property name="text">
- <string>OneOption</string>
- </property>
- </widget>
- <widget class="QSpinBox" row="1" column="1">
- <property name="name">
- <cstring>kcfg_AnotherOption2</cstring>
- </property>
- </widget>
- <widget class="QLabel" 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/tdecore/kconfig_compiler/example/myoptions_base.ui b/tdecore/kconfig_compiler/example/myoptions_base.ui
deleted file mode 100644
index 3c0c2e6cb..000000000
--- a/tdecore/kconfig_compiler/example/myoptions_base.ui
+++ /dev/null
@@ -1,35 +0,0 @@
-<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
-<class>MyOptionsBase</class>
-<widget class="QWidget">
- <property name="name">
- <cstring>MyOptionsBase</cstring>
- </property>
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>600</width>
- <height>486</height>
- </rect>
- </property>
- <grid>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <widget class="QLabel" row="0" column="0">
- <property name="name">
- <cstring>textLabel1</cstring>
- </property>
- <property name="text">
- <string>MyString:</string>
- </property>
- </widget>
- <widget class="QLineEdit" row="0" column="1">
- <property name="name">
- <cstring>kcfg_MyString</cstring>
- </property>
- </widget>
- </grid>
-</widget>
-<layoutdefaults spacing="6" margin="11"/>
-</UI>