File: main.cpp

package info (click to toggle)
kmahjongg 4:4.14.0-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 1,968 kB
  • ctags: 427
  • sloc: cpp: 3,945; makefile: 9; sh: 2
file content (65 lines) | stat: -rw-r--r-- 2,969 bytes parent folder | download
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
/* Copyright (C) 1997 Mathias Mueller   <in5y158@public.uni-hamburg.de>
 *
 * Kmahjongg is free software; you can redistribute it and/or modify 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. */

#include "kmahjongg.h"
#include "version.h"

#include <kapplication.h>
#include <kcmdlineargs.h>
#include <kaboutdata.h>
#include <kimageio.h>
#include <klocale.h>
#include <kglobal.h>


static const char description[] = I18N_NOOP("Mahjongg Solitaire for KDE");

int main(int argc, char** argv)
{
    KAboutData aboutData("kmahjongg", 0, ki18n("KMahjongg"), KMAHJONGG_VERSION, ki18n(description),
        KAboutData::License_GPL, ki18n("(c) 1997, Mathias Mueller\n(c) 2006, Mauricio Piacentini\n("
        "c) 2011, Christian Krippendorf"), KLocalizedString(), "http://games.kde.org/kmahjongg");
    aboutData.addAuthor(ki18n("Mathias Mueller"), ki18n("Original Author"), "in5y158@public.uni-ham"
        "burg.de");
    aboutData.addAuthor(ki18n("Christian Krippendorf"), ki18n("Current maintainer"), "Coding@Christ"
        "ian-Krippendorf.de");
    aboutData.addAuthor(ki18n("Albert Astals Cid"), ki18n("Bug fixes"), "aacid@kde.org");
    aboutData.addAuthor(ki18n("David Black"), ki18n("KDE 3 rewrite and Extension"), "david.black@lu"
        "tris.com");
    aboutData.addAuthor(ki18n("Michael Haertjens"), ki18n("Solvable game generation\nbased on algor"
        "ithm by Michael Meeks in GNOME mahjongg"), "mhaertjens@modusoperandi.com");
    aboutData.addCredit(ki18n("Raquel Ravanini"), ki18n("SVG Tileset for KDE4"), "raquel@tabuleiro."
        "com");
    aboutData.addCredit(ki18n("Richard Lohman"), ki18n("Tile set contributor and current web page m"
        "aintainer"),"richardjlohman@yahoo.com");
    aboutData.addCredit(ki18n("Osvaldo Stark"), ki18n("Tile set contributor and original web page m"
        "aintainer"), "starko@dnet.it");
    aboutData.addCredit(ki18n("Benjamin Meyer"), ki18n("Code cleanup"), "ben+kmahjongg@meyerhome.ne"
        "t");

    KCmdLineArgs::init(argc, argv, &aboutData);

    KApplication application;
    KGlobal::locale()->insertCatalog(QLatin1String("libkdegames"));
    KGlobal::locale()->insertCatalog(QLatin1String("libkmahjongg"));

    if (application.isSessionRestored()) {
        RESTORE(KMahjongg)
    } else {
        KMahjongg *window = new KMahjongg();
        window->show();
    }

    return application.exec();
}