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

kdecore

  • kdecore
  • kconfig_compiler
  • example
autoexample.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 "general_base.h"
23 #include "myoptions_base.h"
24 
25 #include "exampleprefs_base.h"
26 
27 #include <kaboutdata.h>
28 #include <kapplication.h>
29 #include <kdebug.h>
30 #include <klocale.h>
31 #include <kcmdlineargs.h>
32 #include <kglobal.h>
33 #include <kconfig.h>
34 #include <kstandarddirs.h>
35 #include <kconfigdialog.h>
36 
37 #include <tqlabel.h>
38 
39 int main( int argc, char **argv )
40 {
41  KAboutData aboutData( "example", I18N_NOOP("autoconfig example"), "0.1" );
42  aboutData.addAuthor( "Cornelius Schumacher", 0, "schumacher@kde.org" );
43 
44  KCmdLineArgs::init( argc, argv, &aboutData );
45 
46  KApplication app;
47 
48  ExamplePrefsBase configSkeleton( "dummy1", "dummy2" );
49  configSkeleton.readConfig();
50 
51  KConfigDialog *dialog = new KConfigDialog( 0, "settings", &configSkeleton );
52 
53  GeneralBase *general = new GeneralBase( 0 );
54  dialog->addPage( general, i18n("General"), "General", "" );
55 
56  MyOptionsBase *myOptions = new MyOptionsBase( 0 );
57  dialog->addPage( myOptions, i18n("MyOptions"), "MyOptions", "" );
58 
59  app.setMainWidget( dialog );
60 
61  dialog->show();
62 
63  return app.exec();
64 }
KApplication
Controls and provides information to all KDE applications.
Definition: kapplication.h:96
KLocale::i18n
TQString i18n(const char *text)
Definition: klocale.cpp:1977
klocale.h
KConfigDialog
KLocale::I18N_NOOP
#define I18N_NOOP(x)
Definition: klocale.h:52
KAboutData
This class is used to store information about a program.
Definition: kaboutdata.h:182
KCmdLineArgs::init
static void init(int _argc, char **_argv, const char *_appname, const char *programName, const char *_description, const char *_version, bool noKApp=false)
Initialize class.
Definition: kcmdlineargs.cpp:127
KConfigDialog::show
virtual void show()
KConfigDialog::addPage
void addPage(TQWidget *page, const TQString &itemName, const TQString &pixmapName, const TQString &header=TQString::null, bool manage=true)

kdecore

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

kdecore

Skip menu "kdecore"
  • arts
  • dcop
  • dnssd
  • interfaces
  •     interface
  •     library
  •   kspeech
  •   ktexteditor
  • kabc
  • kate
  • kcmshell
  • kdecore
  • kded
  • kdefx
  • kdeprint
  • kdesu
  • kdeui
  • kdoctools
  • khtml
  • kimgio
  • kinit
  • kio
  •   bookmarks
  •   httpfilter
  •   kfile
  •   kio
  •   kioexec
  •   kpasswdserver
  •   kssl
  • kioslave
  •   http
  • kjs
  • kmdi
  •   kmdi
  • knewstuff
  • kparts
  • krandr
  • kresources
  • kspell2
  • kunittest
  • kutils
  • kwallet
  • libkmid
  • libkscreensaver
Generated for kdecore by doxygen 1.8.13
This website is maintained by Timothy Pearson.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. |