File indexing completed on 2024-04-28 03:40:29
0001 /* 0002 SPDX-FileCopyrightText: 2002 Jeff Roush <jeff@mousetool.com> 0003 SPDX-FileCopyrightText: 2003 Olaf Schmidt <ojschmidt@kde.org> 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #include "kmousetool.h" 0008 0009 #include <KAboutData> 0010 #include <KConfigGroup> 0011 #include <KDBusService> 0012 #include <KLocalizedString> 0013 #include <KSharedConfig> 0014 0015 #include <QCommandLineParser> 0016 0017 int main(int argc, char *argv[]) 0018 { 0019 QApplication app(argc, argv); 0020 KLocalizedString::setApplicationDomain(QByteArrayLiteral("kmousetool")); 0021 0022 KAboutData aboutData(QStringLiteral("kmousetool"), 0023 i18n("KMouseTool"), 0024 QStringLiteral(KMOUSETOOL_VERSION), 0025 i18n("KMouseTool"), 0026 KAboutLicense::GPL, 0027 i18n("(c) 2002-2003, Jeff Roush\n(c) 2003 Gunnar Schmidt "), 0028 QString(), 0029 QStringLiteral("https://www.kde.org/applications/utilities/kmousetool/"), 0030 QStringLiteral("gunnar@schmi-dt.de")); 0031 0032 aboutData.addAuthor(i18n("Gunnar Schmidt"), i18n("Current maintainer"), QStringLiteral("gunnar@schmi-dt.de"), QStringLiteral("http://www.schmi-dt.de")); 0033 aboutData.addAuthor(i18n("Olaf Schmidt"), i18n("Usability improvements"), QStringLiteral("ojschmidt@kde.org")); 0034 aboutData.addAuthor(i18n("Jeff Roush"), i18n("Original author"), QStringLiteral("jeff@mousetool.com")); 0035 0036 aboutData.addCredit(i18n("Joe Betts")); 0037 aboutData.setDesktopFileName(QStringLiteral("org.kde.kmousetool")); 0038 0039 QCommandLineParser parser; 0040 KAboutData::setApplicationData(aboutData); 0041 0042 aboutData.setupCommandLine(&parser); 0043 parser.process(app); 0044 aboutData.processCommandLine(&parser); 0045 0046 KDBusService service(KDBusService::Unique, &app); 0047 0048 KMouseTool *kmousetool = new KMouseTool(); 0049 0050 if (!KSharedConfig::openConfig()->group(QStringLiteral("UserOptions")).readEntry("IsMinimized", false)) 0051 kmousetool->show(); 0052 0053 return app.exec(); 0054 }