libtdepim

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 <libtdepim/kprefsdialog.h>
26
27#include <tdeaboutdata.h>
28#include <tdeapplication.h>
29#include <kdebug.h>
30#include <tdelocale.h>
31#include <tdecmdlineargs.h>
32#include <tdeglobal.h>
33#include <tdeconfig.h>
34#include <tdestandarddirs.h>
35#include <kautoconfigdialog.h>
36
37#include <tqlabel.h>
38
39int main( int argc, char **argv )
40{
41 TDEAboutData aboutData( "example", I18N_NOOP("autoconfig example"), "0.1" );
42 aboutData.addAuthor( "Cornelius Schumacher", 0, "schumacher@kde.org" );
43
44 TDECmdLineArgs::init( argc, argv, &aboutData );
45
46 TDEApplication app;
47
48 // Create a new dialog with the same name as the above checking code.
49 KAutoConfigDialog *dialog = new KAutoConfigDialog(0, "settings");
50
51 // Add the general page. Store the settings in the General group and
52 // use the icon package_settings.
53 GeneralBase *general = new GeneralBase( 0 );
54 dialog->addPage( general, i18n("General"), "General", "" );
55
56 MyOptionsBase *myOptions = new MyOptionsBase( 0 );
57
58// myOptions->show();
59 dialog->addPage( myOptions, i18n("MyOptions"), "MyOptions", "" );
60
61// app.setMainWidget( dialog );
62
63 dialog->show();
64
65 return app.exec();
66}