main.cc 3.02 KB
Newer Older
Constantin Berzan's avatar
Constantin Berzan committed
1
2
3
4
5
/*
 * Copyright 1999  Reginald Stadlbauer <reggie@kde.org>
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as
6
 * published by the Free Software Foundation; either version 2 of
Constantin Berzan's avatar
Constantin Berzan committed
7
8
9
10
11
12
13
14
15
16
 * 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, see <http://www.gnu.org/licenses/>.
 */
17

Christoph Feck's avatar
Christoph Feck committed
18
19
#include <QApplication>
#include <QCommandLineParser>
20

Constantin Berzan's avatar
Constantin Berzan committed
21
#include <KAboutData>
22
#include <KCrash>
Christoph Feck's avatar
Christoph Feck committed
23
#include <KLocalizedString>
Laurent Montel's avatar
Laurent Montel committed
24
#include <Kdelibs4ConfigMigrator>
Christoph Feck's avatar
Christoph Feck committed
25
#include "kcharselectdia.h"
Waldo Bastian's avatar
Waldo Bastian committed
26

27
28
int main(int argc, char **argv)
{
29
  QApplication app( argc, argv );
30
  KCrash::initialize();
31

32
33
  KLocalizedString::setApplicationDomain("kcharselect");

34
35
36
37
38
  /**
   * enable high dpi support
   */
  app.setAttribute(Qt::AA_UseHighDpiPixmaps, true);

Laurent Montel's avatar
Laurent Montel committed
39
40
41
42
43
  Kdelibs4ConfigMigrator migrate(QLatin1String("kcharselect"));
  migrate.setConfigFiles(QStringList() << QLatin1String("kcharselectrc"));
  migrate.setUiFiles(QStringList() << QLatin1String("kcharselectui.rc"));
  migrate.migrate();

Christoph Feck's avatar
Christoph Feck committed
44
  KAboutData aboutData( "kcharselect", i18n("KCharSelect"),
45
    "1.13", i18n("KDE character selection utility"), KAboutLicense::GPL,
Christoph Feck's avatar
Christoph Feck committed
46
    QString(), i18n("A wrapper around the KCharSelect widget."), "http://utils.kde.org/projects/kcharselect" );
Constantin Berzan's avatar
Constantin Berzan committed
47

Christoph Feck's avatar
Christoph Feck committed
48
49
  aboutData.addAuthor(i18n("Christoph Feck"), i18n("KF5 port and current maintainer"), "cfeck@kde.org");
  aboutData.addAuthor(i18n("Daniel Laidig"), i18n("Author and previous maintainer"), "d.laidig@gmx.de" );
Christoph Feck's avatar
Christoph Feck committed
50
  aboutData.addAuthor(i18n("Reginald Stadlbauer"), i18n("Author"), "reggie@kde.org");
Constantin Berzan's avatar
Constantin Berzan committed
51

Christoph Feck's avatar
Christoph Feck committed
52
  aboutData.addCredit( i18n("Daniel Laidig"), i18n("New GUI, Unicode information, incremental search,"
53
        " and general improvements"), "d.laidig@gmx.de" );
Christoph Feck's avatar
Christoph Feck committed
54
  aboutData.addCredit( i18n("Laurent Montel"), i18n("Porting help"), "montel@kde.org" );
Christoph Feck's avatar
Christoph Feck committed
55
56
  aboutData.addCredit( i18n("Constantin Berzan"), i18n("Previous maintainer"), "exit3219@gmail.com" );
  aboutData.addCredit( i18n("Nadeem Hasan"), i18n( "GUI cleanup and fixes" ),
Nadeem Hasan's avatar
Nadeem Hasan committed
57
        "nhasan@kde.org" );
Christoph Feck's avatar
Christoph Feck committed
58
  aboutData.addCredit( i18n("Ryan Cumming"), i18n( "GUI cleanup and fixes" ),
Nadeem Hasan's avatar
Nadeem Hasan committed
59
        "bodnar42@phalynx.dhs.org" );
Christoph Feck's avatar
Christoph Feck committed
60
  aboutData.addCredit( i18n("Benjamin C. Meyer"), i18n("XMLUI conversion"),
Constantin Berzan's avatar
Constantin Berzan committed
61
        "ben+kcharselect@meyerhome.net" );
Christoph Feck's avatar
Christoph Feck committed
62
  aboutData.addCredit( i18n("Bryce Nesbitt"), i18n("RTL support") );
Constantin Berzan's avatar
Constantin Berzan committed
63

Christoph Feck's avatar
Christoph Feck committed
64
65
  KAboutData::setApplicationData( aboutData );
  app.setWindowIcon( QIcon::fromTheme( QLatin1String( "accessories-character-map" )));
Waldo Bastian's avatar
Waldo Bastian committed
66

Laurent Montel's avatar
Laurent Montel committed
67

Christoph Feck's avatar
Christoph Feck committed
68
69
70
  QCommandLineParser parser;
  parser.addHelpOption();
  parser.addVersionOption();
Laurent Montel's avatar
Laurent Montel committed
71
  aboutData.setupCommandLine(&parser);
Christoph Feck's avatar
Christoph Feck committed
72
  parser.process(app);
Laurent Montel's avatar
Laurent Montel committed
73
  aboutData.processCommandLine(&parser);
74

75
  KCharSelectDia *dia = new KCharSelectDia;
76
77
78
79
  dia->show();

  return app.exec();
}