summaryrefslogtreecommitdiff
path: root/src/frontend
diff options
context:
space:
mode:
Diffstat (limited to 'src/frontend')
-rw-r--r--src/frontend/qtquick/main.cpp25
-rw-r--r--src/frontend/qtquick/main.qml25
-rw-r--r--src/frontend/qtquick/qml.qrc5
3 files changed, 55 insertions, 0 deletions
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 <QGuiApplication>
+#include <QQmlApplicationEngine>
+
+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 @@
+<RCC>
+ <qresource prefix="/">
+ <file>main.qml</file>
+ </qresource>
+</RCC>