summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorMarius Vlad <marius.vlad@collabora.com>2020-05-15 14:43:07 +0300
committerMarius Vlad <marius.vlad@collabora.com>2020-06-24 18:13:10 +0300
commit1cdeaaa97e3e40812e2b0c6f7ed0ad56b98fdd8c (patch)
treebca933e6157a669dc59c69e1b65b264914ad67d0 /app
parent4d2c81532462b8054fac05d7638f1eef2eca787c (diff)
Remove windowmanager deps
Bug-AGL: SPEC-3447 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: Iad417b60fc3b2c4639396d5ed5aaddbd7018e10e
Diffstat (limited to 'app')
-rw-r--r--app/CMakeLists.txt8
-rw-r--r--app/Mixer.qml9
-rw-r--r--app/main.cpp13
3 files changed, 17 insertions, 13 deletions
diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt
index d77c0c8..71afe8f 100644
--- a/app/CMakeLists.txt
+++ b/app/CMakeLists.txt
@@ -23,7 +23,7 @@ set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(OE_QMAKE_PATH_EXTERNAL_HOST_BINS $ENV{OE_QMAKE_PATH_HOST_BINS})
-find_package(Qt5 COMPONENTS WebSockets AGLExtras REQUIRED)
+find_package(Qt5 COMPONENTS Core Gui QuickControls2 QuickWidgets WebSockets REQUIRED)
PROJECT_TARGET_ADD(mixer)
@@ -43,15 +43,15 @@ add_executable(mixer
set_target_properties(mixer PROPERTIES
LABELS "EXECUTABLE"
PREFIX ""
- COMPILE_FLAGS "${EXTRAS_CFLAGS} -DFOR_AFB_BINDING"
+ COMPILE_FLAGS " -DFOR_AFB_BINDING"
LINK_FLAGS "${BINDINGS_LINK_FLAG}"
- LINK_LIBRARIES "${EXTRAS_LIBRARIES}"
OUTPUT_NAME "${TARGET_NAME}"
)
target_link_libraries(mixer
- Qt5::AGLExtras
Qt5::WebSockets
+ Qt5::QuickWidgets
+ Qt5::QuickControls2
json-c
libafb-helpers-qt.a
)
diff --git a/app/Mixer.qml b/app/Mixer.qml
index a012645..80c3d77 100644
--- a/app/Mixer.qml
+++ b/app/Mixer.qml
@@ -20,6 +20,8 @@ import QtQuick.Controls 2.0
import AGL.Demo.Controls 1.0
import Mixer 1.0
+import QtQuick.Window 2.13
+
ApplicationWindow {
// ----- Signals
@@ -28,8 +30,8 @@ ApplicationWindow {
// ----- Setup
id: root
- width: 1080 * roles.scale
- height: 1487 * roles.scale
+ width: Screen.width * roles.scale
+ height: Screen.height * roles.scale
// ----- Childs
Label {
@@ -52,7 +54,8 @@ ApplicationWindow {
ListView {
id: roles
model: mixer.roles
- scale: scale_factor
+ //scale: scale_factor
+ scale: 1
anchors.margins: 80
anchors.top: title.bottom
diff --git a/app/main.cpp b/app/main.cpp
index 4921bf2..41b5892 100644
--- a/app/main.cpp
+++ b/app/main.cpp
@@ -16,9 +16,10 @@
* limitations under the License.
*/
-
+#include <QGuiApplication>
+#include <QtGui/QGuiApplication>
+#include <QtQml/QQmlContext>
#include <QtQml/QQmlApplicationEngine>
-#include <QtAGLExtras/AGLApplication>
#include <QtQml/qqml.h>
#include "mixer.hpp"
@@ -26,12 +27,12 @@
int main(int argc, char *argv[])
{
- AGLApplication app(argc, argv);
- app.setApplicationName("Mixer");
- app.setupApplicationRole("mixer");
+ QGuiApplication app(argc, argv);
+ app.setDesktopFileName("mixer");
+ QQmlApplicationEngine engine;
qmlRegisterType<Mixer>("Mixer", 1, 0, "Mixer");
- app.load(QUrl(QStringLiteral("qrc:/Mixer.qml")));
+ engine.load(QUrl(QStringLiteral("qrc:/Mixer.qml")));
return app.exec();
}