• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdecore
 

tdecore

  • tdecore
  • tdeconfig_compiler
  • example
example.cpp
1/*
2 This file is part of KDE.
3
4 Copyright (c) 2003 Cornelius Schumacher <schumacher@kde.org>
5
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Library General Public
8 License as published by the Free Software Foundation; either
9 version 2 of the License, or (at your option) any later version.
10
11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Library General Public License for more details.
15
16 You should have received a copy of the GNU Library General Public License
17 along with this library; see the file COPYING.LIB. If not, write to
18 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 Boston, MA 02110-1301, USA.
20*/
21
22#include "exampleprefs_base.h"
23
24#include <tdeaboutdata.h>
25#include <tdeapplication.h>
26#include <kdebug.h>
27#include <tdelocale.h>
28#include <tdecmdlineargs.h>
29#include <tdeglobal.h>
30#include <tdeconfig.h>
31#include <tdestandarddirs.h>
32
33int main( int argc, char **argv )
34{
35 TDEAboutData aboutData( "example", I18N_NOOP("cfgc example"), "0.1" );
36 aboutData.addAuthor( "Cornelius Schumacher", 0, "schumacher@kde.org" );
37
38 TDECmdLineArgs::init( argc, argv, &aboutData );
39
40 TDEApplication app;
41
42 ExamplePrefsBase *prefs = new ExamplePrefsBase("Trans1", "Folder2");
43
44 prefs->readConfig();
45
46 prefs->setAnotherOption(17);
47
48 kdWarning() << "Another Option = " << prefs->anotherOption() << endl;
49 kdWarning() << "Another Option2 = " << prefs->anotherOption2() << endl;
50 kdWarning() << "MyPaths = " << prefs->myPaths() << endl;
51 kdWarning() << "MyPaths2 = " << prefs->myPaths2() << endl;
52}
TDEAboutData
This class is used to store information about a program.
Definition: tdeaboutdata.h:183
TDEApplication
Controls and provides information to all KDE applications.
Definition: tdeapplication.h:95
TDECmdLineArgs::init
static void init(int _argc, char **_argv, const char *_appname, const char *programName, const char *_description, const char *_version, bool noTDEApp=false)
Initialize class.
Definition: tdecmdlineargs.cpp:127
TDELocale::I18N_NOOP
#define I18N_NOOP(x)
I18N_NOOP marks a string to be translated without translating it.
Definition: tdelocale.h:51
TDEGlobal::kdWarning
kdbgstream kdWarning(int area=0)
Returns a warning stream.
Definition: kdebug.cpp:376
TDEGlobal::endl
kdbgstream & endl(kdbgstream &s)
Prints an "\n".
Definition: kdebug.h:430
tdelocale.h

tdecore

Skip menu "tdecore"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

tdecore

Skip menu "tdecore"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdecore by doxygen 1.9.4
This website is maintained by Timothy Pearson.