diff options
author | Stephane Desneux <stephane.desneux@iot.bzh> | 2016-12-08 00:05:07 +0000 |
---|---|---|
committer | Jan-Simon Möller <jsmoeller@linuxfoundation.org> | 2016-12-08 20:26:53 +0100 |
commit | 20f5c1b9315ab94e512d5b2eaac854b239235161 (patch) | |
tree | f427b067c718d68225b6aafb5e4d1267ddb52429 /main.cpp | |
parent | ff3c0101b178b23ce026f038ba9b55601d63294a (diff) |
Initial import from CES2017/apps/Controls
The content of the source directory was copied as is in this repository.
v2 (jsmoeller): Add requested files and also a .gitreview file
Change-Id: If3b8eb34cad3c8319d9fe74753bf72d8c4cf3efd
Signed-off-by: Stephane Desneux <stephane.desneux@iot.bzh>
Signed-off-by: Jan-Simon Möller <jsmoeller@linuxfoundation.org>
Diffstat (limited to 'main.cpp')
-rw-r--r-- | main.cpp | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/main.cpp b/main.cpp new file mode 100644 index 0000000..2adca37 --- /dev/null +++ b/main.cpp @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2016 The Qt Company Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include <QtCore/QDebug> +#include <QtGui/QGuiApplication> +#include <QtQml/QQmlApplicationEngine> +#include <QtQuickControls2/QQuickStyle> + +#ifdef HAVE_LIBHOMESCREEN +#include <libhomescreen.hpp> +#endif + +int main(int argc, char *argv[]) +{ +#ifdef HAVE_LIBHOMESCREEN + LibHomeScreen libHomeScreen; + + if (!libHomeScreen.renderAppToAreaAllowed(0, 1)) { + qWarning() << "renderAppToAreaAllowed is denied"; + return -1; + } +#endif + + QGuiApplication app(argc, argv); + + QQuickStyle::setStyle("AGL"); + + QQmlApplicationEngine engine; + engine.load(QUrl(QStringLiteral("qrc:/Controls.qml"))); + + return app.exec(); +} + |