main.cpp 2.48 KB
Newer Older
Sandro Andrade's avatar
Sandro Andrade committed
1 2
/****************************************************************************
**
Sandro Andrade's avatar
Sandro Andrade committed
3
** Copyright (C) 2016 by Sandro S. Andrade <sandroandrade@kde.org>
Sandro Andrade's avatar
Sandro Andrade committed
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
**
** This program 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) version 3 or any later version
** accepted by the membership of KDE e.V. (or its successor approved
** by the membership of KDE e.V.), which shall act as a proxy 
** defined in Section 14 of version 3 of the license.
**
** 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/>.
**
****************************************************************************/

23
#include "minuet.h"
Sandro Andrade's avatar
Sandro Andrade committed
24

25 26
#include "minuet_version.h"

Sandro Andrade's avatar
Sandro Andrade committed
27
#include <KCrash/KCrash>
28
#include <KCoreAddons/KAboutData>
29

Sandro Andrade's avatar
Sandro Andrade committed
30
#include <QCommandLineParser>
31

32 33
Q_DECLARE_LOGGING_CATEGORY(MINUET)
Q_LOGGING_CATEGORY(MINUET, "minuet")
Sandro Andrade's avatar
Sandro Andrade committed
34

35 36 37
//#include <QQmlDebuggingEnabler>
//QQmlDebuggingEnabler enabler;

38 39 40 41
int main(int argc, char **argv)
{
    QApplication application(argc, argv);

Sandro Andrade's avatar
Sandro Andrade committed
42 43
    KCrash::initialize();

44 45
    KLocalizedString::setApplicationDomain("minuet");
    KAboutData aboutData( QStringLiteral("minuet"),
Sandro Andrade's avatar
Sandro Andrade committed
46
                          i18n("Minuet"),
47
                          QStringLiteral(MINUET_VERSION_STRING),
Sandro Andrade's avatar
Sandro Andrade committed
48
                          i18n("A KDE application for music education"),
49
                          KAboutLicense::GPL,
Sandro Andrade's avatar
Sandro Andrade committed
50
                          i18n("(c) 2016, Sandro S. Andrade (sandroandrade@kde.org)"));
51

Sandro Andrade's avatar
Sandro Andrade committed
52 53
    aboutData.addAuthor(i18n("Sandro S. Andrade"),i18n("Developer"), QStringLiteral("sandroandrade@kde.org"));
    aboutData.addAuthor(i18n("Alessandro Longo"),i18n("Minuet Icon Designer"), QStringLiteral("alessandro.longo@kdemail.net"));
Sandro Andrade's avatar
Sandro Andrade committed
54
    application.setWindowIcon(QIcon::fromTheme(QStringLiteral("minuet")));
55 56 57 58 59 60 61 62
    QCommandLineParser parser;
    parser.addHelpOption();
    parser.addVersionOption();
    aboutData.setupCommandLine(&parser);
    parser.process(application);
    aboutData.processCommandLine(&parser);
    KAboutData::setApplicationData(aboutData);

Sandro Andrade's avatar
Sandro Andrade committed
63
    Minuet *appwindow = new Minuet;
64 65 66
    appwindow->show();
    return application.exec();
}