~ubuntu-branches/ubuntu/karmic/ggz-kde-client/karmic

« back to all changes in this revision

Viewing changes to ggzap/main.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Stephen Zander
  • Date: 2004-02-24 02:06:08 UTC
  • Revision ID: james.westby@ubuntu.com-20040224020608-wnioafbneq1g2mw4
Tags: upstream-0.0.7
ImportĀ upstreamĀ versionĀ 0.0.7

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// GGZap - GGZ quick start application for the KDE panel
 
2
// Copyright (C) 2001 - 2003 Josef Spillner, josef@ggzgamingzone.org
 
3
//
 
4
// This program is free software; you can redistribute it and/or modify
 
5
// it under the terms of the GNU General Public License as published by
 
6
// the Free Software Foundation; either version 2 of the License, or
 
7
// (at your option) any later version.
 
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 Free Software
 
16
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
17
 
 
18
// GGZap includes
 
19
#include "ggzap.h"
 
20
 
 
21
// KDE includes
 
22
#include <kapplication.h>
 
23
#include <kcmdlineargs.h>
 
24
#include <kaboutdata.h>
 
25
#include <klocale.h>
 
26
 
 
27
// Main function
 
28
int main(int argc, char **argv)
 
29
{
 
30
        GGZap *zap;
 
31
        KAboutData *aboutData;
 
32
        KCmdLineArgs *args;
 
33
        static const KCmdLineOptions op[] =
 
34
        {
 
35
                {"module <modulename>", I18N_NOOP("Specify module to launch"), 0},
 
36
                {"frontend <frontendtype>", I18N_NOOP("Preferred frontend"), 0},
 
37
                {0, 0, 0}
 
38
        };
 
39
 
 
40
        aboutData = new KAboutData("ggzap",
 
41
                I18N_NOOP("GGZ Quick Launcher"),
 
42
                "0.3",
 
43
                I18N_NOOP("Tool to start GGZ games directly."),
 
44
                KAboutData::License_GPL,
 
45
                "(C) 2000 - 2003 Josef Spillner\n"
 
46
                "The MindX Open Source Project",
 
47
                I18N_NOOP("GGZap"),
 
48
                "http://ggz.sourceforge.net/coreclients/ggzap",
 
49
                "josef@ggzgamingzone.org");
 
50
 
 
51
        aboutData->addAuthor("Josef Spillner", I18N_NOOP("Author"), "josef@ggzgamingzone.org", "http://mindx.sourceforge.net");
 
52
 
 
53
        KCmdLineArgs::init(argc, argv, aboutData);
 
54
        KCmdLineArgs::addCmdLineOptions(op);
 
55
 
 
56
        args = KCmdLineArgs::parsedArgs();
 
57
 
 
58
        KApplication a;
 
59
        zap = new GGZap();
 
60
        if(args->isSet("module")) zap->setModule(args->getOption("module"));
 
61
        if(args->isSet("frontend")) zap->setFrontend(args->getOption("frontend"));
 
62
        zap->launch();
 
63
        a.setMainWidget(zap->gui());
 
64
        return a.exec();
 
65
}
 
66