Subversion Repositories public

Rev

Rev 43 | Details | Compare with Previous | Last modification | View Log | RSS feed

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