From 68ce496b5dd082881dde7536677f295bc40ee055 Mon Sep 17 00:00:00 2001 From: Louie S Date: Wed, 24 Jul 2024 11:58:00 -0400 Subject: First commit of qtquick branch --- src/frontend/qtquick/main.cpp | 25 +++++++++++++++++++++++++ src/frontend/qtquick/main.qml | 25 +++++++++++++++++++++++++ src/frontend/qtquick/qml.qrc | 5 +++++ 3 files changed, 55 insertions(+) create mode 100644 src/frontend/qtquick/main.cpp create mode 100644 src/frontend/qtquick/main.qml create mode 100644 src/frontend/qtquick/qml.qrc (limited to 'src/frontend') diff --git a/src/frontend/qtquick/main.cpp b/src/frontend/qtquick/main.cpp new file mode 100644 index 0000000..c2c84fc --- /dev/null +++ b/src/frontend/qtquick/main.cpp @@ -0,0 +1,25 @@ +#include +#include + +int main(int argc, char *argv[]) +{ +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) + QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); +#endif + QGuiApplication app(argc, argv); + + QQmlApplicationEngine engine; + const QUrl url(QStringLiteral("qrc:/main.qml")); + QObject::connect( + &engine, + &QQmlApplicationEngine::objectCreated, + &app, + [url](QObject *obj, const QUrl &objUrl) { + if (!obj && url == objUrl) + QCoreApplication::exit(-1); + }, + Qt::QueuedConnection); + engine.load(url); + + return app.exec(); +} diff --git a/src/frontend/qtquick/main.qml b/src/frontend/qtquick/main.qml new file mode 100644 index 0000000..18936fd --- /dev/null +++ b/src/frontend/qtquick/main.qml @@ -0,0 +1,25 @@ +import QtQuick 2.15 +import QtQuick.Controls 2.15 +import QtQuick.Window 2.15 + +Window { + width: 640 + height: 480 + visible: true + // TODO grab this from config.h + title: qsTr("Assignment List") + + // DropDown for groups (including an "all" option) + Item { + width: parent.width + height: 50 + ComboBox { + anchors.fill: parent + id: groupComboBox + model: [ + "all" + //... + ] + } + } +} diff --git a/src/frontend/qtquick/qml.qrc b/src/frontend/qtquick/qml.qrc new file mode 100644 index 0000000..5f6483a --- /dev/null +++ b/src/frontend/qtquick/qml.qrc @@ -0,0 +1,5 @@ + + + main.qml + + -- cgit