Subversion Repositories public

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
43 root 1
/***************************************************************************
2
 *   Copyright (C) 2007 by Andreas Theofilu   *
3
 *   andreas@TheoSys.at   *
4
 *                                                                         *
5
 *   This program is free software; you can redistribute it and/or modify  *
6
 *   it under the terms of the GNU General Public License as published by  *
7
 *   the Free Software Foundation; either version 2 of the License, or     *
8
 *   (at your option) any later version.                                   *
9
 *                                                                         *
10
 *   This program is distributed in the hope that it will be useful,       *
11
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
12
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
13
 *   GNU General Public License for more details.                          *
14
 *                                                                         *
15
 *   You should have received a copy of the GNU General Public License     *
16
 *   along with this program; if not, write to the                         *
17
 *   Free Software Foundation, Inc.,                                       *
18
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
19
 ***************************************************************************/
20
 
21
 
22
#include "tilgungsplan.h"
23
#include <kapplication.h>
24
#include <kaboutdata.h>
25
#include <kcmdlineargs.h>
26
#include <klocale.h>
27
 
28
static const char description[] =
29
    I18N_NOOP("A KDE KPart Application");
30
 
31
static const char version[] = "0.1";
32
 
33
static KCmdLineOptions options[] =
34
{
35
//    { "+[URL]", I18N_NOOP( "Document to open" ), 0 },
36
    KCmdLineLastOption
37
};
38
 
39
int main(int argc, char **argv)
40
{
41
    KAboutData about("tilgungsplan", I18N_NOOP("tilgungsplan"), version, description,
42
                     KAboutData::License_GPL, "(C) 2007 Andreas Theofilu", 0, 0, "andreas@TheoSys.at");
43
    about.addAuthor( "Andreas Theofilu", 0, "andreas@TheoSys.at" );
44
    KCmdLineArgs::init(argc, argv, &about);
45
    KCmdLineArgs::addCmdLineOptions( options );
46
    KApplication app;
47
    tilgungsplan *mainWin = 0;
48
 
49
    if (app.isRestored())
50
    {
51
        RESTORE(tilgungsplan);
52
    }
53
    else
54
    {
55
        // no session.. just start up normally
56
        KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
57
 
58
        /// @todo do something with the command line args here
59
 
60
        mainWin = new tilgungsplan();
61
        app.setMainWidget( mainWin );
62
        mainWin->show();
63
 
64
        args->clear();
65
    }
66
 
67
    // mainWin has WDestructiveClose flag by default, so it will delete itself.
68
    return app.exec();
69
}
70