summaryrefslogtreecommitdiffstats
path: root/kpat/main.cpp
blob: 110046c8f65c96b32f62e47de1938b822ba79b4c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
/*
     patience -- main program
      Copyright (C) 1995  Paul Olav Tvete

 * Permission to use, copy, modify, and distribute this software and its
 * documentation for any purpose and without fee is hereby granted,
 * provided that the above copyright notice appear in all copies and that
 * both that copyright notice and this permission notice appear in
 * supporting documentation.
 *
 * This file is provided AS IS with no warranties of any kind.  The author
 * shall have no liability with respect to the infringement of copyrights,
 * trade secrets or any patents by this file or any part thereof.  In no
 * event will the author be liable for any lost revenue or profits or
 * other special, indirect and consequential damages.

 */

#include <kapplication.h>
#include <kcmdlineargs.h>
#include <kaboutdata.h>

#include "version.h"
#include "pwidget.h"

static const char description[] = I18N_NOOP("TDE Patience Game");

static KCmdLineOptions options[] =
{
    { "+file",          I18N_NOOP("File to load"), 0 },
    KCmdLineLastOption
};

int main( int argc, char **argv )
{
    KAboutData aboutData( "kpat", I18N_NOOP("KPatience"),
                          KPAT_VERSION, description, KAboutData::License_GPL,
                          "(c) 1995, Paul Olav Tvete\n"
                          "(c) 2000 Stephan Kulow");
    aboutData.addAuthor("Paul Olav Tvete");
    aboutData.addAuthor("Mario Weilguni",0,"[email protected]");
    aboutData.addAuthor("Matthias Ettrich",0,"[email protected]");
    aboutData.addAuthor("Rodolfo Borges",I18N_NOOP("Some Game Types"),"[email protected]");
    aboutData.addAuthor("Peter H. Ruegg",0,"[email protected]");
    aboutData.addAuthor("Michael Koch", I18N_NOOP("Bug fixes"), "[email protected]");
    aboutData.addAuthor("Marcus Meissner", I18N_NOOP("Shuffle algorithm for game numbers"),
                        "[email protected]");
    aboutData.addAuthor("Shlomi Fish", I18N_NOOP("Freecell Solver"), "[email protected]");
    aboutData.addAuthor("Stephan Kulow", I18N_NOOP("Rewrite and current maintainer"),
                        "[email protected]");
    aboutData.addAuthor("Erik Sigra", I18N_NOOP("Improved Klondike"), "[email protected]");
    aboutData.addAuthor("Josh Metzler", I18N_NOOP("Spider Implementation"), "[email protected]");
    aboutData.addAuthor("Maren Pakura", I18N_NOOP("Documentation"), "[email protected]");
    aboutData.addAuthor("Inge Wallin", I18N_NOOP("Bug fixes"), "[email protected]");

    TDECmdLineArgs::init( argc, argv, &aboutData );
    TDECmdLineArgs::addCmdLineOptions (options);
    TDECmdLineArgs* args = TDECmdLineArgs::parsedArgs();

    TDEApplication a;
    KGlobal::locale()->insertCatalogue("libtdegames");

    if (a.isRestored())
        RESTORE(pWidget)
    else {
        pWidget *w = new pWidget;
        if (args->count())
            w->openGame(args->url(0));
        a.setMainWidget(w);
        w->show();
    }
    return a.exec();
}