2019-03-16 21:05:26 +01:00
|
|
|
/*
|
|
|
|
DasSchmalter - The smart switch
|
|
|
|
Copyright (C) 2019 Itsblue Development ( contact@itsblue.de )
|
|
|
|
|
|
|
|
This program is free software: you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU Affero General Public License as published
|
|
|
|
by the Free Software Foundation, either version 3 of 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 Affero General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU Affero General Public License
|
|
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
2019-03-07 22:13:23 +01:00
|
|
|
#include <QQuickStyle>
|
|
|
|
#include <QStandardPaths>
|
|
|
|
#include <QtNetwork>
|
|
|
|
#include <QQmlApplicationEngine>
|
|
|
|
#include <QFile>
|
|
|
|
#include <QDesktopServices>
|
|
|
|
|
|
|
|
#include <QtCore/QUrl>
|
|
|
|
#include <QtCore/QCommandLineOption>
|
|
|
|
#include <QtCore/QCommandLineParser>
|
2019-02-23 10:33:02 +01:00
|
|
|
#include <QGuiApplication>
|
2019-03-07 22:13:23 +01:00
|
|
|
#include <QStyleHints>
|
|
|
|
#include <QScreen>
|
2019-02-23 10:33:02 +01:00
|
|
|
#include <QQmlApplicationEngine>
|
2019-02-23 21:49:41 +01:00
|
|
|
#include <QtQml/QQmlContext>
|
|
|
|
|
|
|
|
#include "appsettings.h"
|
2019-02-23 10:33:02 +01:00
|
|
|
|
|
|
|
int main(int argc, char *argv[])
|
|
|
|
{
|
|
|
|
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
|
|
|
|
|
|
|
QGuiApplication app(argc, argv);
|
|
|
|
|
2019-02-23 21:49:41 +01:00
|
|
|
QQuickStyle::setStyle("Material");
|
|
|
|
|
2019-03-16 19:57:03 +01:00
|
|
|
qmlRegisterType<AppSettings>("com.itsblue.dasschmalter", 1, 0, "AppSettings");
|
|
|
|
|
2019-02-23 10:33:02 +01:00
|
|
|
QQmlApplicationEngine engine;
|
|
|
|
engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
|
2019-02-23 21:49:41 +01:00
|
|
|
|
2019-02-23 10:33:02 +01:00
|
|
|
if (engine.rootObjects().isEmpty())
|
|
|
|
return -1;
|
|
|
|
|
|
|
|
return app.exec();
|
|
|
|
}
|