File indexing completed on 2024-04-28 03:40:29

0001 /***************************************************************************
0002                           main.cpp  -  description
0003                              -------------------
0004     begin                : Mon Feb 12 23:45:41 EST 2001
0005     copyright            : (C) 2001-2003 by Sarang Lakare
0006     email                : sarang#users.sf.net
0007  ***************************************************************************/
0008 
0009 /***************************************************************************
0010  *                                                                         *
0011  *   This program is free software; you can redistribute it and/or modify  *
0012  *   it under the terms of the GNU General Public License as published by  *
0013  *   the Free Software Foundation; either version 2 of the License, or     *
0014  *   (at your option) any later version.                                   *
0015  *                                                                         *
0016  ***************************************************************************/
0017 
0018 // Qt
0019 #include <QApplication>
0020 #include <QCommandLineParser>
0021 
0022 // KF5
0023 #include <KAboutData>
0024 #include <KLocalizedString>
0025 
0026 #include "kmag.h"
0027 
0028 #include "kmag_version.h"
0029 
0030 KmagApp *kmagapp;
0031 
0032 int main(int argc, char *argv[])
0033 {
0034   QApplication app(argc, argv);
0035   KLocalizedString::setApplicationDomain(QByteArrayLiteral("kmag"));
0036 
0037   // about the application
0038   KAboutData aboutData(QStringLiteral("kmag"), i18n("KMagnifier"), QStringLiteral(KMAG_VERSION_STRING),
0039                                          i18n("Screen magnifier created by KDE"),
0040                                          KAboutLicense::GPL,
0041                                          i18n("Copyright 2001-2003 Sarang Lakare\nCopyright 2003-2004 Olaf Schmidt\nCopyright 2008 Matthew Woehlke"), QString(),
0042                                          QStringLiteral("https://accessibility.kde.org/"));
0043 
0044   // about the authors
0045   aboutData.addAuthor(i18n("Sarang Lakare"),
0046                        i18n("Rewrite"),QStringLiteral("sarang@users.sf.net"));
0047   aboutData.addAuthor(i18n("Michael Forster"),
0048                        i18n("Original idea and author (KDE1)"), QStringLiteral("forster@fmi.uni-passau.de"));
0049   aboutData.addAuthor(i18n("Olaf Schmidt"), i18n("Rework of the user interface, improved selection window, speed optimization, rotation, bug fixes"), QStringLiteral("ojschmidt@kde.org"));
0050   aboutData.addCredit(i18n("Matthew Woehlke"), i18n("Color-blindness simulation"), QStringLiteral("mw_triad@users.sourceforge.net"));
0051   aboutData.addCredit(i18n("Sebastian Sauer"), i18n("Focus tracking"), QStringLiteral("sebsauer@kdab.com"));
0052   aboutData.addCredit(i18n("Claudiu Costin"), i18n("Some tips"), QStringLiteral("claudiuc@work.ro"), QStringLiteral("https://ro.kde.org"));
0053 
0054   KAboutData::setApplicationData(aboutData);
0055 
0056   QApplication::setWindowIcon(QIcon::fromTheme(QStringLiteral("kmag")));
0057 
0058   if (app.isSessionRestored())
0059   {
0060     kRestoreMainWindows<KmagApp>();
0061   }
0062   else
0063   {
0064     QCommandLineParser parser;
0065     aboutData.setupCommandLine(&parser);
0066     parser.process(app);
0067 
0068     kmagapp = new KmagApp();
0069     kmagapp->show();
0070   }
0071 
0072   return app.exec();
0073 }