main.cpp 2.04 KB
Newer Older
1 2
/*
    Copyright (C) 1998-2001 Andreas Zehender <az@azweb.de>
3

4
    This program is free software; you can redistribute it and/or modify
5 6 7 8 9 10 11 12 13 14 15 16 17 18
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
*/

Laurent Montel's avatar
Port++  
Laurent Montel committed
19
#include <KAboutData>
Frederik Schwarzer's avatar
Frederik Schwarzer committed
20
#include <KCrash>
Andreas Sturmlechner's avatar
Andreas Sturmlechner committed
21
#include <KDBusService>
Laurent Montel's avatar
Laurent Montel committed
22
#include <KLocalizedString>
23 24

#include <QApplication>
Laurent Montel's avatar
Port++  
Laurent Montel committed
25
#include <QCommandLineParser>
Waldo Bastian's avatar
Waldo Bastian committed
26 27

#include "version.h"
Andreas Zehender's avatar
Andreas Zehender committed
28 29
#include "topwidget.h"

Andy Goossens's avatar
Andy Goossens committed
30
static const char description[] = I18N_NOOP("KDE Space Game");
Waldo Bastian's avatar
Waldo Bastian committed
31

Andreas Zehender's avatar
Andreas Zehender committed
32 33
int main(int argc,char **argv)
{
Laurent Montel's avatar
Laurent Montel committed
34 35
    QApplication app(argc, argv);

36 37
    KLocalizedString::setApplicationDomain("kspaceduel");

Laurent Montel's avatar
Laurent Montel committed
38
    KAboutData aboutData( QStringLiteral("kspaceduel"), i18n("KSpaceDuel"), 
Frederik Schwarzer's avatar
Frederik Schwarzer committed
39
            KSPACEDUEL_VERSION, i18n(description), KAboutLicense::GPL, 
40
            i18n("(c) 1998-2001, Andreas Zehender"),  QStringLiteral("https://kde.org/applications/games/org.kde.kspaceduel") );
Laurent Montel's avatar
Laurent Montel committed
41 42
    aboutData.addAuthor(i18n("Andreas Zehender"),i18n("Original Program"), QStringLiteral("az@azweb.de"));
    aboutData.addAuthor(i18n("Branan Riley"),i18n("SVG Renderer"), QStringLiteral("branan@gmail.com"));
Laurent Montel's avatar
Port++  
Laurent Montel committed
43 44
    QCommandLineParser parser;
    KAboutData::setApplicationData(aboutData);
Frederik Schwarzer's avatar
Frederik Schwarzer committed
45
    KCrash::initialize();
Laurent Montel's avatar
Port++  
Laurent Montel committed
46 47 48
    aboutData.setupCommandLine(&parser);
    parser.process(app);
    aboutData.processCommandLine(&parser);
Andreas Sturmlechner's avatar
Andreas Sturmlechner committed
49
    KDBusService service;
50

Frederik Schwarzer's avatar
Frederik Schwarzer committed
51 52 53
    MyTopLevelWidget *top = new MyTopLevelWidget;
    top->show();
    top->start();
Frederik Schwarzer's avatar
Frederik Schwarzer committed
54

Frederik Schwarzer's avatar
Frederik Schwarzer committed
55
    app.setWindowIcon(QIcon::fromTheme(QStringLiteral("kspaceduel")));
Frederik Schwarzer's avatar
Frederik Schwarzer committed
56

Frederik Schwarzer's avatar
Frederik Schwarzer committed
57
    return app.exec();
Andreas Zehender's avatar
Andreas Zehender committed
58
}
59