File indexing completed on 2023-05-30 10:42:19
0001 /* 0002 KmPlot - a math. function plotter for the KDE-Desktop 0003 0004 SPDX-FileCopyrightText: 1998, 1999, 2000, 2002 Klaus-Dieter Möller <kd.moeller@t-online.de> 0005 0006 This file is part of the KDE Project. 0007 KmPlot is part of the KDE-EDU Project. 0008 0009 SPDX-License-Identifier: GPL-2.0-or-later 0010 0011 */ 0012 0013 // local includes 0014 #include "kmplot.h" 0015 #include "kmplot_version.h" 0016 0017 // Qt 0018 #include <QApplication> 0019 #include <QCommandLineParser> 0020 0021 // KDE includes 0022 #include <KAboutData> 0023 #include <KCrash> 0024 #include <KDBusService> 0025 #include <KLocalizedString> 0026 0027 int main(int argc, char **argv) 0028 { 0029 #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) 0030 /** 0031 * enable high dpi support 0032 */ 0033 QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps, true); 0034 QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling, true); 0035 #endif 0036 QApplication qapp(argc, argv); 0037 KCrash::initialize(); 0038 0039 KLocalizedString::setApplicationDomain("kmplot"); 0040 0041 KAboutData aboutData(QStringLiteral("kmplot"), 0042 i18n("KmPlot"), 0043 KMPLOT_VERSION_STRING, 0044 i18n("Mathematical function plotter by KDE"), 0045 KAboutLicense::GPL, 0046 i18n("(c) 2000-2002, Klaus-Dieter Möller"), 0047 QString(), 0048 QStringLiteral("https://kde.org/applications/education/kmplot")); 0049 0050 aboutData.addAuthor(i18n("Klaus-Dieter Möller"), i18n("Original Author"), QStringLiteral("kdmoeller@foni.net")); 0051 aboutData.addAuthor(i18n("Matthias Meßmer"), i18n("GUI"), QStringLiteral("bmlmessmer@web.de")); 0052 aboutData.addAuthor(i18n("Fredrik Edemar"), i18n("Various improvements"), QStringLiteral("f_edemar@linux.se")); 0053 aboutData.addAuthor(i18n("David Saxton"), i18n("Porting to Qt 4, UI improvements, features"), QStringLiteral("david@bluehaze.org")); 0054 0055 aboutData.addCredit(i18n("David Vignoni"), i18n("svg icon"), QStringLiteral("david80v@tin.it")); 0056 aboutData.addCredit(i18n("Albert Astals Cid"), i18n("command line options, MIME type"), QStringLiteral("aacid@kde.org")); 0057 KAboutData::setApplicationData(aboutData); 0058 0059 QCommandLineParser parser; 0060 parser.addOption(QCommandLineOption(QStringList{"function", "f"}, i18n("Initial functions to plot"), i18n("argument"))); 0061 parser.addPositionalArgument(QStringLiteral("URL"), i18n("URLs to open"), QStringLiteral("[url...]")); 0062 aboutData.setupCommandLine(&parser); 0063 parser.process(qapp); 0064 aboutData.processCommandLine(&parser); 0065 KDBusService service; 0066 new KmPlot(parser); 0067 return qapp.exec(); 0068 }