libtdepim

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
33#include <libtdepim/kprefsdialog.h>
34
35int main( int argc, char **argv )
36{
37 TDEAboutData aboutData( "example", I18N_NOOP("cfgc example"), "0.1" );
38 aboutData.addAuthor( "Cornelius Schumacher", 0, "schumacher@kde.org" );
39
40 TDECmdLineArgs::init( argc, argv, &aboutData );
41
42 TDEApplication app;
43
44 ExamplePrefsBase *prefs = ExamplePrefsBase::self();
45
46 KPrefsDialog *dialog = new KPrefsDialog( prefs );
47
48 dialog->autoCreate();
49
50 app.setMainWidget( dialog );
51
52 dialog->show();
53
54 return app.exec();
55}
Base class for a preferences dialog.
Definition: kprefsdialog.h:722