diff --git a/CMakeLists.txt b/CMakeLists.txt --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -30,6 +30,7 @@ add_subdirectory(src) add_subdirectory(autotests) add_subdirectory(qml) +add_subdirectory(qmlUiKirigami) add_subdirectory(icons) feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES) diff --git a/qmlUiKirigami/CMakeLists.txt b/qmlUiKirigami/CMakeLists.txt new file mode 100644 --- /dev/null +++ b/qmlUiKirigami/CMakeLists.txt @@ -0,0 +1 @@ +install(DIRECTORY ./ DESTINATION ${DATA_INSTALL_DIR}/koko/ui PATTERN "*.qml") diff --git a/qmlUiKirigami/main.qml b/qmlUiKirigami/main.qml new file mode 100644 --- /dev/null +++ b/qmlUiKirigami/main.qml @@ -0,0 +1,29 @@ +/* + * Copyright (C) 2017 Atul Sharma + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) version 3, or any + * later version accepted by the membership of KDE e.V. (or its + * successor approved by the membership of KDE e.V.), which shall + * act as a proxy defined in Section 6 of version 3 of the license. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + */ + +import QtQuick 2.1 +import QtQuick.Controls 2.0 as Controls + +import org.kde.kirigami 2.0 as Kirigami + +Kirigami.ApplicationWindow { + id: root +} diff --git a/src/main.cpp b/src/main.cpp --- a/src/main.cpp +++ b/src/main.cpp @@ -50,6 +50,7 @@ QCommandLineParser parser; parser.addOption(QCommandLineOption("reset", i18n("Reset the database"))); parser.addOption(QCommandLineOption("phone", i18n("Run the phone version of koko"))); + parser.addOption(QCommandLineOption("kirigami", i18n("Run the kirigami version of koko"))); parser.addHelpOption(); parser.process(app); @@ -92,6 +93,8 @@ QString path; if (parser.isSet("phone") || qgetenv("PLASMA_PLATFORM") == QByteArray("phone")) { path = QStandardPaths::locate(QStandardPaths::DataLocation, "mobilemain.qml"); + } else if( parser.isSet("kirigami") || qgetenv("PLASMA_PLATFORM") == QByteArray("kirigami")) { + path = QStandardPaths::locate(QStandardPaths::DataLocation, "ui/main.qml"); } else { path = QStandardPaths::locate(QStandardPaths::DataLocation, "main.qml"); }