From: Bocklage, Jens Date: Mon, 12 Dec 2016 16:11:06 +0000 (+0100) Subject: Remove HomeScreenNG X-Git-Tag: 3.0.0~32 X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?p=staging%2FHomeScreen.git;a=commitdiff_plain;h=4088de47844451c7b331a612d41a0ec5fc7db53a Remove HomeScreenNG This was already integrated into the main HomeScreen app Signed-off-by: Bocklage, Jens --- diff --git a/HomeScreen.pro b/HomeScreen.pro index da6077b..f805682 100644 --- a/HomeScreen.pro +++ b/HomeScreen.pro @@ -28,8 +28,7 @@ SUBDIRS = interfaces \ SampleHomeScreenInterfaceApp \ SampleNavigationApp \ SampleMediaApp \ - sample-qml \ - HomeScreenNG + sample-qml HomeScreen.depends = interfaces HomeScreenSimulator.depends = interfaces @@ -37,6 +36,5 @@ HomeScreenAppFrameworkBinderAGL.depends = interfaces InputEventManager.depends = interfaces SampleAppTimeDate.depends = interfaces WindowManager.depends = interfaces -HomeScreenNG.depends = interfaces SampleHomeScreenInterfaceApp.depends = libhomescreen diff --git a/HomeScreenNG/HomeScreenNG.pro b/HomeScreenNG/HomeScreenNG.pro deleted file mode 100644 index 450395c..0000000 --- a/HomeScreenNG/HomeScreenNG.pro +++ /dev/null @@ -1,33 +0,0 @@ -TEMPLATE = app -QT = quick dbus - -include(../interfaces/interfaces.pri) - -HEADERS += \ - statusbarmodel.h \ - statusbarserver.h \ - applicationlauncher.h - -SOURCES += main.cpp \ - statusbarmodel.cpp \ - statusbarserver.cpp \ - applicationlauncher.cpp - -RESOURCES += \ - qml/images/MediaPlayer/mediaplayer.qrc \ - qml/images/MediaMusic/mediamusic.qrc \ - qml/images/Weather/weather.qrc \ - qml/images/Shortcut/shortcut.qrc \ - qml/images/Status/status.qrc \ - qml/images/images.qrc \ - qml/qml.qrc - -# The following define makes your compiler emit warnings if you use -# any feature of Qt which as been marked deprecated (the exact warnings -# depend on your compiler). Please consult the documentation of the -# deprecated API in order to know how to port your code away from it. -DEFINES += QT_DEPRECATED_WARNINGS - -target.path = /opt/$${TARGET}/bin -INSTALLS += target - diff --git a/HomeScreenNG/applicationlauncher.cpp b/HomeScreenNG/applicationlauncher.cpp deleted file mode 100644 index c4254ce..0000000 --- a/HomeScreenNG/applicationlauncher.cpp +++ /dev/null @@ -1,13 +0,0 @@ -#include "applicationlauncher.h" - -#include - -ApplicationLauncher::ApplicationLauncher(QObject *parent) - : QObject(parent) -{ -} - -void ApplicationLauncher::launch(const QString &application) -{ - qDebug() << "launch" << application; -} diff --git a/HomeScreenNG/applicationlauncher.h b/HomeScreenNG/applicationlauncher.h deleted file mode 100644 index 409de25..0000000 --- a/HomeScreenNG/applicationlauncher.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef APPLICATIONLAUNCHER_H -#define APPLICATIONLAUNCHER_H - -#include - -class ApplicationLauncher : public QObject -{ - Q_OBJECT -public: - explicit ApplicationLauncher(QObject *parent = nullptr); - -public slots: - void launch(const QString &application); -}; - -#endif // APPLICATIONLAUNCHER_H diff --git a/HomeScreenNG/main.cpp b/HomeScreenNG/main.cpp deleted file mode 100644 index dad4c7d..0000000 --- a/HomeScreenNG/main.cpp +++ /dev/null @@ -1,26 +0,0 @@ -#include -#include -#include -#include -#include - -#include "applicationlauncher.h" -#include "statusbarmodel.h" - -int main(int argc, char *argv[]) -{ - QCoreApplication::setOrganizationDomain(QStringLiteral("automotivelinux.org")); - QCoreApplication::setOrganizationName(QStringLiteral("AutomotiveGradeLinux")); - QCoreApplication::setApplicationName(QStringLiteral("HomeScreen")); - QCoreApplication::setApplicationVersion(QStringLiteral("0.0.1")); - - QGuiApplication app(argc, argv); - - qmlRegisterType("HomeScreen", 1, 0, "ApplicationLauncher"); - qmlRegisterType("HomeScreen", 1, 0, "StatusBarModel"); - - QQmlApplicationEngine engine; - engine.load(QUrl(QStringLiteral("qrc:/main.qml"))); - - return app.exec(); -} diff --git a/HomeScreenNG/qml/MediaArea.qml b/HomeScreenNG/qml/MediaArea.qml deleted file mode 100644 index 16ceb27..0000000 --- a/HomeScreenNG/qml/MediaArea.qml +++ /dev/null @@ -1,40 +0,0 @@ -import QtQuick 2.7 -import QtQuick.Controls 2.0 - -StackView { - id: root - width: 1080 - height: 215 - - initialItem: blank - - Component { - id: blank - MediaAreaBlank { - MouseArea { - anchors.fill: parent - onClicked: root.push(mouse.x < 540 ? music : radio) - } - } - } - - Component { - id: music - MediaAreaMusic { - MouseArea { - anchors.fill: parent - onClicked: root.pop() - } - } - } - - Component { - id: radio - MediaAreaRadio { - MouseArea { - anchors.fill: parent - onClicked: root.pop() - } - } - } -} diff --git a/HomeScreenNG/qml/MediaAreaBlank.qml b/HomeScreenNG/qml/MediaAreaBlank.qml deleted file mode 100644 index 7698e18..0000000 --- a/HomeScreenNG/qml/MediaAreaBlank.qml +++ /dev/null @@ -1,12 +0,0 @@ -import QtQuick 2.7 - -Image { - width: 1080 - height: 215 - source: './images/Utility_Logo_Background-01.png' - - Image { - anchors.centerIn: parent - source: './images/Utility_Logo_Colour-01.png' - } -} diff --git a/HomeScreenNG/qml/MediaAreaMusic.qml b/HomeScreenNG/qml/MediaAreaMusic.qml deleted file mode 100644 index 3bd0077..0000000 --- a/HomeScreenNG/qml/MediaAreaMusic.qml +++ /dev/null @@ -1,68 +0,0 @@ -import QtQuick 2.6 -import QtQuick.Layouts 1.1 -import QtQuick.Controls 2.0 - -Image { - width: 1080 - height: 215 - source: './images/Utility_Music_Background-01.png' - - ColumnLayout { - anchors.fill: parent - spacing: 1 - RowLayout { - Layout.fillWidth: true - Layout.fillHeight: true - Layout.preferredHeight: 107 - spacing: 10 - Image { - source: './images/MediaMusic/AlbumArtwork.png' - width: 105.298 - height: 110.179 - fillMode: Image.PreserveAspectFit - } - Label { - text: 'Come Together - The Beatles' - font.family: 'Roboto' - font.pixelSize: 32 - color: 'white' - } - } - - RowLayout { - Layout.fillWidth: true - Layout.fillHeight: true - Layout.preferredHeight: 107 - Image { - source: './images/MediaPlayer/AGL_MediaPlayer_BackArrow.png' - } - Image { - source: './images/MediaPlayer/AGL_MediaPlayer_Player_Pause.png' - } - Image { - source: './images/MediaPlayer/AGL_MediaPlayer_ForwardArrow.png' - } - - ProgressBar { - Layout.fillWidth: true - Layout.preferredWidth: 2 - } - - Label { - text: '2:12/4:19' - font.family: 'Roboto' - font.pixelSize: 20 - } - Image { - source: './images/MediaPlayer/AGL_MediaPlayer_Shuffle_Active.png' - } - Image { - source: './images/MediaPlayer/AGL_MediaPlayer_Shuffle_Active.png' - } - ProgressBar { - Layout.fillWidth: true - Layout.preferredWidth: 1 - } - } - } -} diff --git a/HomeScreenNG/qml/MediaAreaRadio.qml b/HomeScreenNG/qml/MediaAreaRadio.qml deleted file mode 100644 index b2a9a33..0000000 --- a/HomeScreenNG/qml/MediaAreaRadio.qml +++ /dev/null @@ -1,7 +0,0 @@ -import QtQuick 2.6 - -Image { - width: 1080 - height: 215 - source: './images/Utility_Radio_Background-01.png' -} diff --git a/HomeScreenNG/qml/ShortcutArea.qml b/HomeScreenNG/qml/ShortcutArea.qml deleted file mode 100644 index a98bec2..0000000 --- a/HomeScreenNG/qml/ShortcutArea.qml +++ /dev/null @@ -1,53 +0,0 @@ -import QtQuick 2.7 -import QtQuick.Layouts 1.1 -import HomeScreen 1.0 - -Item { - id: root - width: 785 - height: 218 - - ApplicationLauncher { - id: launcher - } - - ListModel { - id: applicationModel - ListElement { - name: 'Home' - application: 'launcher' - } - ListElement { - name: 'Multimedia' - application: 'musicplayer' - } - ListElement { - name: 'HVAC' - application: 'hvac' - } - ListElement { - name: 'Navigation' - application: 'navigation' - } - } - - property int currentIndex: -1 // TODO: to be moved to whereever right - - RowLayout { - anchors.fill: parent - spacing: 2 - Repeater { - model: applicationModel - delegate: ShortcutIcon { - Layout.fillWidth: true - Layout.fillHeight: true - name: model.name - active: model.index === root.currentIndex - onClicked: { - root.currentIndex = active ? -1 : model.index - launcher.launch(model.application) - } - } - } - } -} diff --git a/HomeScreenNG/qml/ShortcutIcon.qml b/HomeScreenNG/qml/ShortcutIcon.qml deleted file mode 100644 index 84550d9..0000000 --- a/HomeScreenNG/qml/ShortcutIcon.qml +++ /dev/null @@ -1,37 +0,0 @@ -import QtQuick 2.6 - -MouseArea { - id: root - width: 195 - height: 216.8 - property string name: 'Home' - property bool active: false - Image { - id: icon - anchors.fill: parent - source: './images/Shortcut/HMI_Shortcut_%1-01.png'.arg(root.name) - } - Image { - anchors.fill: parent - source: './images/Shortcut/HMI_Shortcut_%1_Active-01.png'.arg(root.name) - opacity: 1.0 - icon.opacity - } - states: [ - State { - when: root.active - PropertyChanges { - target: icon - opacity: 0.0 - } - } - ] - - transitions: [ - Transition { - NumberAnimation { - properties: 'opacity' - easing.type: Easing.OutExpo - } - } - ] -} diff --git a/HomeScreenNG/qml/StatusArea.qml b/HomeScreenNG/qml/StatusArea.qml deleted file mode 100644 index 6dda3ba..0000000 --- a/HomeScreenNG/qml/StatusArea.qml +++ /dev/null @@ -1,86 +0,0 @@ -import QtQuick 2.7 -import QtQuick.Layouts 1.1 -import QtQuick.Controls 2.0 -import HomeScreen 1.0 - -Item { - id: root - width: 295 - height: 218 - - property date now: new Date - Timer { - interval: 100; running: true; repeat: true; - onTriggered: root.now = new Date - } - - RowLayout { - anchors.fill: parent - spacing: 0 - Item { - Layout.fillWidth: true - Layout.fillHeight: true - Layout.preferredWidth: 295 - 76 - ColumnLayout { - anchors.fill: parent - anchors.margins: 40 - spacing: 0 - Label { - Layout.fillWidth: true - Layout.fillHeight: true - text: Qt.formatDate(now, 'dddd').toUpperCase() - font.family: 'Roboto' - font.pixelSize: 13 - color: 'white' - verticalAlignment: Text.AlignVCenter -// Rectangle { -// anchors.fill: parent -// anchors.margins: 5 -// color: 'red' -// border.color: 'blue' -// border.width: 1 -// z: -1 -// } - } - Label { - Layout.fillWidth: true - Layout.fillHeight: true - text: Qt.formatTime(now, 'h:mm ap').toUpperCase() - font.family: 'Roboto' - font.pixelSize: 40 - color: 'white' - horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter - } - RowLayout { - Layout.fillWidth: true - Layout.fillHeight: true - Layout.preferredHeight: 20 - Image { - source: './images/Weather/WeatherIcons_Rain-01.png' - } - Label { - text: '64°F' - color: 'white' - font.family: 'Helvetica' - font.pixelSize: 32 - } - } - } - } - ColumnLayout { - id: icons - Layout.fillWidth: true - Layout.fillHeight: true - Layout.preferredWidth: 76 - spacing: -10 - Repeater { - model: StatusBarModel {} - delegate: Image { - source: model.modelData - fillMode: Image.PreserveAspectFit - } - } - } - } -} diff --git a/HomeScreenNG/qml/TopArea.qml b/HomeScreenNG/qml/TopArea.qml deleted file mode 100644 index 8de8a8d..0000000 --- a/HomeScreenNG/qml/TopArea.qml +++ /dev/null @@ -1,26 +0,0 @@ -import QtQuick 2.7 -import QtQuick.Layouts 1.1 - -Image { - width: 1920 - height: 218 - source: './images/TopSection_NoText_NoIcons-01.png' - fillMode: Image.PreserveAspectCrop - - RowLayout { - anchors.fill: parent - spacing: 0 - ShortcutArea { - id: shortcutArea - Layout.fillWidth: true - Layout.fillHeight: true - Layout.preferredWidth: 785 - } - StatusArea { - id: statusArea - Layout.fillWidth: true - Layout.fillHeight: true - Layout.preferredWidth: 295 - } - } -} diff --git a/HomeScreenNG/qml/images/AGL_HMI_Background_NoCar-01.png b/HomeScreenNG/qml/images/AGL_HMI_Background_NoCar-01.png deleted file mode 100644 index 595f742..0000000 Binary files a/HomeScreenNG/qml/images/AGL_HMI_Background_NoCar-01.png and /dev/null differ diff --git a/HomeScreenNG/qml/images/MediaMusic/AlbumArtwork.png b/HomeScreenNG/qml/images/MediaMusic/AlbumArtwork.png deleted file mode 100644 index 3716ab3..0000000 Binary files a/HomeScreenNG/qml/images/MediaMusic/AlbumArtwork.png and /dev/null differ diff --git a/HomeScreenNG/qml/images/MediaMusic/BackArrow.png b/HomeScreenNG/qml/images/MediaMusic/BackArrow.png deleted file mode 100644 index 63e38d9..0000000 Binary files a/HomeScreenNG/qml/images/MediaMusic/BackArrow.png and /dev/null differ diff --git a/HomeScreenNG/qml/images/MediaMusic/ForwardArrow.png b/HomeScreenNG/qml/images/MediaMusic/ForwardArrow.png deleted file mode 100644 index a513705..0000000 Binary files a/HomeScreenNG/qml/images/MediaMusic/ForwardArrow.png and /dev/null differ diff --git a/HomeScreenNG/qml/images/MediaMusic/ShuffleIcon.png b/HomeScreenNG/qml/images/MediaMusic/ShuffleIcon.png deleted file mode 100644 index 30f75c5..0000000 Binary files a/HomeScreenNG/qml/images/MediaMusic/ShuffleIcon.png and /dev/null differ diff --git a/HomeScreenNG/qml/images/MediaMusic/Volume_Loud.png b/HomeScreenNG/qml/images/MediaMusic/Volume_Loud.png deleted file mode 100644 index 8ea4402..0000000 Binary files a/HomeScreenNG/qml/images/MediaMusic/Volume_Loud.png and /dev/null differ diff --git a/HomeScreenNG/qml/images/MediaMusic/Volume_Medium.png b/HomeScreenNG/qml/images/MediaMusic/Volume_Medium.png deleted file mode 100644 index ae5c82e..0000000 Binary files a/HomeScreenNG/qml/images/MediaMusic/Volume_Medium.png and /dev/null differ diff --git a/HomeScreenNG/qml/images/MediaMusic/Volume_Off.png b/HomeScreenNG/qml/images/MediaMusic/Volume_Off.png deleted file mode 100644 index 07e3353..0000000 Binary files a/HomeScreenNG/qml/images/MediaMusic/Volume_Off.png and /dev/null differ diff --git a/HomeScreenNG/qml/images/MediaMusic/mediamusic.qrc b/HomeScreenNG/qml/images/MediaMusic/mediamusic.qrc deleted file mode 100644 index b1138c0..0000000 --- a/HomeScreenNG/qml/images/MediaMusic/mediamusic.qrc +++ /dev/null @@ -1,11 +0,0 @@ - - - AlbumArtwork.png - BackArrow.png - ForwardArrow.png - ShuffleIcon.png - Volume_Loud.png - Volume_Medium.png - Volume_Off.png - - diff --git a/HomeScreenNG/qml/images/MediaPlayer/AGL_MediaPlayer_AlbumArtwork.png b/HomeScreenNG/qml/images/MediaPlayer/AGL_MediaPlayer_AlbumArtwork.png deleted file mode 100644 index 14a52b2..0000000 Binary files a/HomeScreenNG/qml/images/MediaPlayer/AGL_MediaPlayer_AlbumArtwork.png and /dev/null differ diff --git a/HomeScreenNG/qml/images/MediaPlayer/AGL_MediaPlayer_BackArrow.png b/HomeScreenNG/qml/images/MediaPlayer/AGL_MediaPlayer_BackArrow.png deleted file mode 100644 index 0ec1f67..0000000 Binary files a/HomeScreenNG/qml/images/MediaPlayer/AGL_MediaPlayer_BackArrow.png and /dev/null differ diff --git a/HomeScreenNG/qml/images/MediaPlayer/AGL_MediaPlayer_Bluetooth_Active.png b/HomeScreenNG/qml/images/MediaPlayer/AGL_MediaPlayer_Bluetooth_Active.png deleted file mode 100644 index bc2df1d..0000000 Binary files a/HomeScreenNG/qml/images/MediaPlayer/AGL_MediaPlayer_Bluetooth_Active.png and /dev/null differ diff --git a/HomeScreenNG/qml/images/MediaPlayer/AGL_MediaPlayer_Bluetooth_Inactive.png b/HomeScreenNG/qml/images/MediaPlayer/AGL_MediaPlayer_Bluetooth_Inactive.png deleted file mode 100644 index 8d8fc02..0000000 Binary files a/HomeScreenNG/qml/images/MediaPlayer/AGL_MediaPlayer_Bluetooth_Inactive.png and /dev/null differ diff --git a/HomeScreenNG/qml/images/MediaPlayer/AGL_MediaPlayer_CD_Active.png b/HomeScreenNG/qml/images/MediaPlayer/AGL_MediaPlayer_CD_Active.png deleted file mode 100644 index 94fe38f..0000000 Binary files a/HomeScreenNG/qml/images/MediaPlayer/AGL_MediaPlayer_CD_Active.png and /dev/null differ diff --git a/HomeScreenNG/qml/images/MediaPlayer/AGL_MediaPlayer_CD_Inactive.png b/HomeScreenNG/qml/images/MediaPlayer/AGL_MediaPlayer_CD_Inactive.png deleted file mode 100644 index 12609e1..0000000 Binary files a/HomeScreenNG/qml/images/MediaPlayer/AGL_MediaPlayer_CD_Inactive.png and /dev/null differ diff --git a/HomeScreenNG/qml/images/MediaPlayer/AGL_MediaPlayer_DividingLine.png b/HomeScreenNG/qml/images/MediaPlayer/AGL_MediaPlayer_DividingLine.png deleted file mode 100644 index 299903e..0000000 Binary files a/HomeScreenNG/qml/images/MediaPlayer/AGL_MediaPlayer_DividingLine.png and /dev/null differ diff --git a/HomeScreenNG/qml/images/MediaPlayer/AGL_MediaPlayer_ForwardArrow.png b/HomeScreenNG/qml/images/MediaPlayer/AGL_MediaPlayer_ForwardArrow.png deleted file mode 100644 index 33cc700..0000000 Binary files a/HomeScreenNG/qml/images/MediaPlayer/AGL_MediaPlayer_ForwardArrow.png and /dev/null differ diff --git a/HomeScreenNG/qml/images/MediaPlayer/AGL_MediaPlayer_Loop_Active.png b/HomeScreenNG/qml/images/MediaPlayer/AGL_MediaPlayer_Loop_Active.png deleted file mode 100644 index 9bdb14d..0000000 Binary files a/HomeScreenNG/qml/images/MediaPlayer/AGL_MediaPlayer_Loop_Active.png and /dev/null differ diff --git a/HomeScreenNG/qml/images/MediaPlayer/AGL_MediaPlayer_Loop_Inactive.png b/HomeScreenNG/qml/images/MediaPlayer/AGL_MediaPlayer_Loop_Inactive.png deleted file mode 100644 index 76b0fc9..0000000 Binary files a/HomeScreenNG/qml/images/MediaPlayer/AGL_MediaPlayer_Loop_Inactive.png and /dev/null differ diff --git a/HomeScreenNG/qml/images/MediaPlayer/AGL_MediaPlayer_Player_Pause.png b/HomeScreenNG/qml/images/MediaPlayer/AGL_MediaPlayer_Player_Pause.png deleted file mode 100644 index c423005..0000000 Binary files a/HomeScreenNG/qml/images/MediaPlayer/AGL_MediaPlayer_Player_Pause.png and /dev/null differ diff --git a/HomeScreenNG/qml/images/MediaPlayer/AGL_MediaPlayer_Player_Play.png b/HomeScreenNG/qml/images/MediaPlayer/AGL_MediaPlayer_Player_Play.png deleted file mode 100644 index beece66..0000000 Binary files a/HomeScreenNG/qml/images/MediaPlayer/AGL_MediaPlayer_Player_Play.png and /dev/null differ diff --git a/HomeScreenNG/qml/images/MediaPlayer/AGL_MediaPlayer_PlaylistToggle_Active.png b/HomeScreenNG/qml/images/MediaPlayer/AGL_MediaPlayer_PlaylistToggle_Active.png deleted file mode 100644 index eec608f..0000000 Binary files a/HomeScreenNG/qml/images/MediaPlayer/AGL_MediaPlayer_PlaylistToggle_Active.png and /dev/null differ diff --git a/HomeScreenNG/qml/images/MediaPlayer/AGL_MediaPlayer_PlaylistToggle_Inactive.png b/HomeScreenNG/qml/images/MediaPlayer/AGL_MediaPlayer_PlaylistToggle_Inactive.png deleted file mode 100644 index d392a90..0000000 Binary files a/HomeScreenNG/qml/images/MediaPlayer/AGL_MediaPlayer_PlaylistToggle_Inactive.png and /dev/null differ diff --git a/HomeScreenNG/qml/images/MediaPlayer/AGL_MediaPlayer_Playlist_Active.png b/HomeScreenNG/qml/images/MediaPlayer/AGL_MediaPlayer_Playlist_Active.png deleted file mode 100644 index 22319c9..0000000 Binary files a/HomeScreenNG/qml/images/MediaPlayer/AGL_MediaPlayer_Playlist_Active.png and /dev/null differ diff --git a/HomeScreenNG/qml/images/MediaPlayer/AGL_MediaPlayer_Playlist_Inactive.png b/HomeScreenNG/qml/images/MediaPlayer/AGL_MediaPlayer_Playlist_Inactive.png deleted file mode 100644 index 9fd42e2..0000000 Binary files a/HomeScreenNG/qml/images/MediaPlayer/AGL_MediaPlayer_Playlist_Inactive.png and /dev/null differ diff --git a/HomeScreenNG/qml/images/MediaPlayer/AGL_MediaPlayer_Radio_Active.png b/HomeScreenNG/qml/images/MediaPlayer/AGL_MediaPlayer_Radio_Active.png deleted file mode 100644 index eb61b39..0000000 Binary files a/HomeScreenNG/qml/images/MediaPlayer/AGL_MediaPlayer_Radio_Active.png and /dev/null differ diff --git a/HomeScreenNG/qml/images/MediaPlayer/AGL_MediaPlayer_Radio_Inactive.png b/HomeScreenNG/qml/images/MediaPlayer/AGL_MediaPlayer_Radio_Inactive.png deleted file mode 100644 index de305f0..0000000 Binary files a/HomeScreenNG/qml/images/MediaPlayer/AGL_MediaPlayer_Radio_Inactive.png and /dev/null differ diff --git a/HomeScreenNG/qml/images/MediaPlayer/AGL_MediaPlayer_Shuffle_Active.png b/HomeScreenNG/qml/images/MediaPlayer/AGL_MediaPlayer_Shuffle_Active.png deleted file mode 100644 index d97feec..0000000 Binary files a/HomeScreenNG/qml/images/MediaPlayer/AGL_MediaPlayer_Shuffle_Active.png and /dev/null differ diff --git a/HomeScreenNG/qml/images/MediaPlayer/AGL_MediaPlayer_Shuffle_Inactive.png b/HomeScreenNG/qml/images/MediaPlayer/AGL_MediaPlayer_Shuffle_Inactive.png deleted file mode 100644 index 7f6445d..0000000 Binary files a/HomeScreenNG/qml/images/MediaPlayer/AGL_MediaPlayer_Shuffle_Inactive.png and /dev/null differ diff --git a/HomeScreenNG/qml/images/MediaPlayer/Albums_Active.png b/HomeScreenNG/qml/images/MediaPlayer/Albums_Active.png deleted file mode 100644 index 1f66e23..0000000 Binary files a/HomeScreenNG/qml/images/MediaPlayer/Albums_Active.png and /dev/null differ diff --git a/HomeScreenNG/qml/images/MediaPlayer/Albums_Inactive.png b/HomeScreenNG/qml/images/MediaPlayer/Albums_Inactive.png deleted file mode 100644 index e0e7f00..0000000 Binary files a/HomeScreenNG/qml/images/MediaPlayer/Albums_Inactive.png and /dev/null differ diff --git a/HomeScreenNG/qml/images/MediaPlayer/DividingLine.png b/HomeScreenNG/qml/images/MediaPlayer/DividingLine.png deleted file mode 100644 index 87f2122..0000000 Binary files a/HomeScreenNG/qml/images/MediaPlayer/DividingLine.png and /dev/null differ diff --git a/HomeScreenNG/qml/images/MediaPlayer/GreenLine.png b/HomeScreenNG/qml/images/MediaPlayer/GreenLine.png deleted file mode 100644 index 0210b83..0000000 Binary files a/HomeScreenNG/qml/images/MediaPlayer/GreenLine.png and /dev/null differ diff --git a/HomeScreenNG/qml/images/MediaPlayer/Music_Active.png b/HomeScreenNG/qml/images/MediaPlayer/Music_Active.png deleted file mode 100644 index 36afac7..0000000 Binary files a/HomeScreenNG/qml/images/MediaPlayer/Music_Active.png and /dev/null differ diff --git a/HomeScreenNG/qml/images/MediaPlayer/Music_Inactive.png b/HomeScreenNG/qml/images/MediaPlayer/Music_Inactive.png deleted file mode 100644 index 9dae353..0000000 Binary files a/HomeScreenNG/qml/images/MediaPlayer/Music_Inactive.png and /dev/null differ diff --git a/HomeScreenNG/qml/images/MediaPlayer/Podcasts_Active.png b/HomeScreenNG/qml/images/MediaPlayer/Podcasts_Active.png deleted file mode 100644 index fd2d2c0..0000000 Binary files a/HomeScreenNG/qml/images/MediaPlayer/Podcasts_Active.png and /dev/null differ diff --git a/HomeScreenNG/qml/images/MediaPlayer/Podcasts_Inactive.png b/HomeScreenNG/qml/images/MediaPlayer/Podcasts_Inactive.png deleted file mode 100644 index b76b04c..0000000 Binary files a/HomeScreenNG/qml/images/MediaPlayer/Podcasts_Inactive.png and /dev/null differ diff --git a/HomeScreenNG/qml/images/MediaPlayer/Popup_Highlight.png b/HomeScreenNG/qml/images/MediaPlayer/Popup_Highlight.png deleted file mode 100644 index ac63673..0000000 Binary files a/HomeScreenNG/qml/images/MediaPlayer/Popup_Highlight.png and /dev/null differ diff --git a/HomeScreenNG/qml/images/MediaPlayer/Popup_PauseIcon.png b/HomeScreenNG/qml/images/MediaPlayer/Popup_PauseIcon.png deleted file mode 100644 index 2627add..0000000 Binary files a/HomeScreenNG/qml/images/MediaPlayer/Popup_PauseIcon.png and /dev/null differ diff --git a/HomeScreenNG/qml/images/MediaPlayer/Popup_PlayIcon.png b/HomeScreenNG/qml/images/MediaPlayer/Popup_PlayIcon.png deleted file mode 100644 index 0483e07..0000000 Binary files a/HomeScreenNG/qml/images/MediaPlayer/Popup_PlayIcon.png and /dev/null differ diff --git a/HomeScreenNG/qml/images/MediaPlayer/Popup_VerticalLine.png b/HomeScreenNG/qml/images/MediaPlayer/Popup_VerticalLine.png deleted file mode 100644 index 6a9db00..0000000 Binary files a/HomeScreenNG/qml/images/MediaPlayer/Popup_VerticalLine.png and /dev/null differ diff --git a/HomeScreenNG/qml/images/MediaPlayer/X.png b/HomeScreenNG/qml/images/MediaPlayer/X.png deleted file mode 100644 index ab392cb..0000000 Binary files a/HomeScreenNG/qml/images/MediaPlayer/X.png and /dev/null differ diff --git a/HomeScreenNG/qml/images/MediaPlayer/mediaplayer.qrc b/HomeScreenNG/qml/images/MediaPlayer/mediaplayer.qrc deleted file mode 100644 index 1cb17ab..0000000 --- a/HomeScreenNG/qml/images/MediaPlayer/mediaplayer.qrc +++ /dev/null @@ -1,37 +0,0 @@ - - - AGL_MediaPlayer_AlbumArtwork.png - AGL_MediaPlayer_BackArrow.png - AGL_MediaPlayer_Bluetooth_Active.png - AGL_MediaPlayer_Bluetooth_Inactive.png - AGL_MediaPlayer_CD_Active.png - AGL_MediaPlayer_CD_Inactive.png - AGL_MediaPlayer_DividingLine.png - AGL_MediaPlayer_ForwardArrow.png - AGL_MediaPlayer_Loop_Active.png - AGL_MediaPlayer_Loop_Inactive.png - AGL_MediaPlayer_Player_Pause.png - AGL_MediaPlayer_Player_Play.png - AGL_MediaPlayer_Playlist_Active.png - AGL_MediaPlayer_Playlist_Inactive.png - AGL_MediaPlayer_PlaylistToggle_Active.png - AGL_MediaPlayer_PlaylistToggle_Inactive.png - AGL_MediaPlayer_Radio_Active.png - AGL_MediaPlayer_Radio_Inactive.png - AGL_MediaPlayer_Shuffle_Active.png - AGL_MediaPlayer_Shuffle_Inactive.png - Albums_Active.png - Albums_Inactive.png - DividingLine.png - GreenLine.png - Music_Active.png - Music_Inactive.png - Podcasts_Active.png - Podcasts_Inactive.png - Popup_Highlight.png - Popup_PauseIcon.png - Popup_PlayIcon.png - Popup_VerticalLine.png - X.png - - diff --git a/HomeScreenNG/qml/images/Shortcut/HMI_Shortcut_HVAC-01.png b/HomeScreenNG/qml/images/Shortcut/HMI_Shortcut_HVAC-01.png deleted file mode 100644 index f5188f5..0000000 Binary files a/HomeScreenNG/qml/images/Shortcut/HMI_Shortcut_HVAC-01.png and /dev/null differ diff --git a/HomeScreenNG/qml/images/Shortcut/HMI_Shortcut_HVAC_Active-01.png b/HomeScreenNG/qml/images/Shortcut/HMI_Shortcut_HVAC_Active-01.png deleted file mode 100644 index abe92d2..0000000 Binary files a/HomeScreenNG/qml/images/Shortcut/HMI_Shortcut_HVAC_Active-01.png and /dev/null differ diff --git a/HomeScreenNG/qml/images/Shortcut/HMI_Shortcut_Home-01.png b/HomeScreenNG/qml/images/Shortcut/HMI_Shortcut_Home-01.png deleted file mode 100644 index 9aca151..0000000 Binary files a/HomeScreenNG/qml/images/Shortcut/HMI_Shortcut_Home-01.png and /dev/null differ diff --git a/HomeScreenNG/qml/images/Shortcut/HMI_Shortcut_Home_Active-01.png b/HomeScreenNG/qml/images/Shortcut/HMI_Shortcut_Home_Active-01.png deleted file mode 100644 index 696168f..0000000 Binary files a/HomeScreenNG/qml/images/Shortcut/HMI_Shortcut_Home_Active-01.png and /dev/null differ diff --git a/HomeScreenNG/qml/images/Shortcut/HMI_Shortcut_Multimedia-01.png b/HomeScreenNG/qml/images/Shortcut/HMI_Shortcut_Multimedia-01.png deleted file mode 100644 index 229860c..0000000 Binary files a/HomeScreenNG/qml/images/Shortcut/HMI_Shortcut_Multimedia-01.png and /dev/null differ diff --git a/HomeScreenNG/qml/images/Shortcut/HMI_Shortcut_Multimedia_Active-01.png b/HomeScreenNG/qml/images/Shortcut/HMI_Shortcut_Multimedia_Active-01.png deleted file mode 100644 index b0a023c..0000000 Binary files a/HomeScreenNG/qml/images/Shortcut/HMI_Shortcut_Multimedia_Active-01.png and /dev/null differ diff --git a/HomeScreenNG/qml/images/Shortcut/HMI_Shortcut_Navigation-01.png b/HomeScreenNG/qml/images/Shortcut/HMI_Shortcut_Navigation-01.png deleted file mode 100644 index 34b0671..0000000 Binary files a/HomeScreenNG/qml/images/Shortcut/HMI_Shortcut_Navigation-01.png and /dev/null differ diff --git a/HomeScreenNG/qml/images/Shortcut/HMI_Shortcut_Navigation_Active-01.png b/HomeScreenNG/qml/images/Shortcut/HMI_Shortcut_Navigation_Active-01.png deleted file mode 100644 index 98e6146..0000000 Binary files a/HomeScreenNG/qml/images/Shortcut/HMI_Shortcut_Navigation_Active-01.png and /dev/null differ diff --git a/HomeScreenNG/qml/images/Shortcut/shortcut.qrc b/HomeScreenNG/qml/images/Shortcut/shortcut.qrc deleted file mode 100644 index fe31006..0000000 --- a/HomeScreenNG/qml/images/Shortcut/shortcut.qrc +++ /dev/null @@ -1,12 +0,0 @@ - - - HMI_Shortcut_Home_Active-01.png - HMI_Shortcut_Home-01.png - HMI_Shortcut_HVAC_Active-01.png - HMI_Shortcut_HVAC-01.png - HMI_Shortcut_Multimedia_Active-01.png - HMI_Shortcut_Multimedia-01.png - HMI_Shortcut_Navigation_Active-01.png - HMI_Shortcut_Navigation-01.png - - diff --git a/HomeScreenNG/qml/images/Status/HMI_Status_Bluetooth_Inactive-01.png b/HomeScreenNG/qml/images/Status/HMI_Status_Bluetooth_Inactive-01.png deleted file mode 100644 index 10bd5a5..0000000 Binary files a/HomeScreenNG/qml/images/Status/HMI_Status_Bluetooth_Inactive-01.png and /dev/null differ diff --git a/HomeScreenNG/qml/images/Status/HMI_Status_Bluetooth_On-01.png b/HomeScreenNG/qml/images/Status/HMI_Status_Bluetooth_On-01.png deleted file mode 100644 index 1ff96e1..0000000 Binary files a/HomeScreenNG/qml/images/Status/HMI_Status_Bluetooth_On-01.png and /dev/null differ diff --git a/HomeScreenNG/qml/images/Status/HMI_Status_Signal_1Bars-01.png b/HomeScreenNG/qml/images/Status/HMI_Status_Signal_1Bars-01.png deleted file mode 100644 index 44ef700..0000000 Binary files a/HomeScreenNG/qml/images/Status/HMI_Status_Signal_1Bars-01.png and /dev/null differ diff --git a/HomeScreenNG/qml/images/Status/HMI_Status_Signal_2Bars-01.png b/HomeScreenNG/qml/images/Status/HMI_Status_Signal_2Bars-01.png deleted file mode 100644 index fe4e776..0000000 Binary files a/HomeScreenNG/qml/images/Status/HMI_Status_Signal_2Bars-01.png and /dev/null differ diff --git a/HomeScreenNG/qml/images/Status/HMI_Status_Signal_3Bars-01.png b/HomeScreenNG/qml/images/Status/HMI_Status_Signal_3Bars-01.png deleted file mode 100644 index 892c6ec..0000000 Binary files a/HomeScreenNG/qml/images/Status/HMI_Status_Signal_3Bars-01.png and /dev/null differ diff --git a/HomeScreenNG/qml/images/Status/HMI_Status_Signal_4Bars-01.png b/HomeScreenNG/qml/images/Status/HMI_Status_Signal_4Bars-01.png deleted file mode 100644 index f4f033b..0000000 Binary files a/HomeScreenNG/qml/images/Status/HMI_Status_Signal_4Bars-01.png and /dev/null differ diff --git a/HomeScreenNG/qml/images/Status/HMI_Status_Signal_Full-01.png b/HomeScreenNG/qml/images/Status/HMI_Status_Signal_Full-01.png deleted file mode 100644 index 18070b9..0000000 Binary files a/HomeScreenNG/qml/images/Status/HMI_Status_Signal_Full-01.png and /dev/null differ diff --git a/HomeScreenNG/qml/images/Status/HMI_Status_Signal_NoBars-01.png b/HomeScreenNG/qml/images/Status/HMI_Status_Signal_NoBars-01.png deleted file mode 100644 index 1b77207..0000000 Binary files a/HomeScreenNG/qml/images/Status/HMI_Status_Signal_NoBars-01.png and /dev/null differ diff --git a/HomeScreenNG/qml/images/Status/HMI_Status_Wifi_1Bar-01.png b/HomeScreenNG/qml/images/Status/HMI_Status_Wifi_1Bar-01.png deleted file mode 100644 index c72461f..0000000 Binary files a/HomeScreenNG/qml/images/Status/HMI_Status_Wifi_1Bar-01.png and /dev/null differ diff --git a/HomeScreenNG/qml/images/Status/HMI_Status_Wifi_2Bars-01.png b/HomeScreenNG/qml/images/Status/HMI_Status_Wifi_2Bars-01.png deleted file mode 100644 index 448dd36..0000000 Binary files a/HomeScreenNG/qml/images/Status/HMI_Status_Wifi_2Bars-01.png and /dev/null differ diff --git a/HomeScreenNG/qml/images/Status/HMI_Status_Wifi_3Bars-01.png b/HomeScreenNG/qml/images/Status/HMI_Status_Wifi_3Bars-01.png deleted file mode 100644 index 3e407ad..0000000 Binary files a/HomeScreenNG/qml/images/Status/HMI_Status_Wifi_3Bars-01.png and /dev/null differ diff --git a/HomeScreenNG/qml/images/Status/HMI_Status_Wifi_Full-01.png b/HomeScreenNG/qml/images/Status/HMI_Status_Wifi_Full-01.png deleted file mode 100644 index 6f95e97..0000000 Binary files a/HomeScreenNG/qml/images/Status/HMI_Status_Wifi_Full-01.png and /dev/null differ diff --git a/HomeScreenNG/qml/images/Status/HMI_Status_Wifi_NoBars-01.png b/HomeScreenNG/qml/images/Status/HMI_Status_Wifi_NoBars-01.png deleted file mode 100644 index 07f4f09..0000000 Binary files a/HomeScreenNG/qml/images/Status/HMI_Status_Wifi_NoBars-01.png and /dev/null differ diff --git a/HomeScreenNG/qml/images/Status/status.qrc b/HomeScreenNG/qml/images/Status/status.qrc deleted file mode 100644 index d29c91a..0000000 --- a/HomeScreenNG/qml/images/Status/status.qrc +++ /dev/null @@ -1,17 +0,0 @@ - - - HMI_Status_Wifi_NoBars-01.png - HMI_Status_Bluetooth_Inactive-01.png - HMI_Status_Bluetooth_On-01.png - HMI_Status_Signal_1Bars-01.png - HMI_Status_Signal_2Bars-01.png - HMI_Status_Signal_3Bars-01.png - HMI_Status_Signal_4Bars-01.png - HMI_Status_Signal_Full-01.png - HMI_Status_Signal_NoBars-01.png - HMI_Status_Wifi_1Bar-01.png - HMI_Status_Wifi_2Bars-01.png - HMI_Status_Wifi_3Bars-01.png - HMI_Status_Wifi_Full-01.png - - diff --git a/HomeScreenNG/qml/images/TopSection_NoText_NoIcons-01.png b/HomeScreenNG/qml/images/TopSection_NoText_NoIcons-01.png deleted file mode 100644 index cf9ec4e..0000000 Binary files a/HomeScreenNG/qml/images/TopSection_NoText_NoIcons-01.png and /dev/null differ diff --git a/HomeScreenNG/qml/images/Utility_Logo_Background-01.png b/HomeScreenNG/qml/images/Utility_Logo_Background-01.png deleted file mode 100644 index 21a602d..0000000 Binary files a/HomeScreenNG/qml/images/Utility_Logo_Background-01.png and /dev/null differ diff --git a/HomeScreenNG/qml/images/Utility_Logo_Colour-01.png b/HomeScreenNG/qml/images/Utility_Logo_Colour-01.png deleted file mode 100644 index 6519a2d..0000000 Binary files a/HomeScreenNG/qml/images/Utility_Logo_Colour-01.png and /dev/null differ diff --git a/HomeScreenNG/qml/images/Utility_Music_Background-01.png b/HomeScreenNG/qml/images/Utility_Music_Background-01.png deleted file mode 100644 index c3e9f91..0000000 Binary files a/HomeScreenNG/qml/images/Utility_Music_Background-01.png and /dev/null differ diff --git a/HomeScreenNG/qml/images/Utility_Radio_Background-01.png b/HomeScreenNG/qml/images/Utility_Radio_Background-01.png deleted file mode 100644 index b755843..0000000 Binary files a/HomeScreenNG/qml/images/Utility_Radio_Background-01.png and /dev/null differ diff --git a/HomeScreenNG/qml/images/Weather/WeatherIcons_ALL-01.png b/HomeScreenNG/qml/images/Weather/WeatherIcons_ALL-01.png deleted file mode 100644 index f5f8b19..0000000 Binary files a/HomeScreenNG/qml/images/Weather/WeatherIcons_ALL-01.png and /dev/null differ diff --git a/HomeScreenNG/qml/images/Weather/WeatherIcons_Cloudy-01.png b/HomeScreenNG/qml/images/Weather/WeatherIcons_Cloudy-01.png deleted file mode 100644 index 3603a55..0000000 Binary files a/HomeScreenNG/qml/images/Weather/WeatherIcons_Cloudy-01.png and /dev/null differ diff --git a/HomeScreenNG/qml/images/Weather/WeatherIcons_Moon-01.png b/HomeScreenNG/qml/images/Weather/WeatherIcons_Moon-01.png deleted file mode 100644 index 8fe1e18..0000000 Binary files a/HomeScreenNG/qml/images/Weather/WeatherIcons_Moon-01.png and /dev/null differ diff --git a/HomeScreenNG/qml/images/Weather/WeatherIcons_PartiallyCloudy-01.png b/HomeScreenNG/qml/images/Weather/WeatherIcons_PartiallyCloudy-01.png deleted file mode 100644 index 09cd84f..0000000 Binary files a/HomeScreenNG/qml/images/Weather/WeatherIcons_PartiallyCloudy-01.png and /dev/null differ diff --git a/HomeScreenNG/qml/images/Weather/WeatherIcons_Rain-01.png b/HomeScreenNG/qml/images/Weather/WeatherIcons_Rain-01.png deleted file mode 100644 index 125b413..0000000 Binary files a/HomeScreenNG/qml/images/Weather/WeatherIcons_Rain-01.png and /dev/null differ diff --git a/HomeScreenNG/qml/images/Weather/WeatherIcons_Snow-01.png b/HomeScreenNG/qml/images/Weather/WeatherIcons_Snow-01.png deleted file mode 100644 index d0a9520..0000000 Binary files a/HomeScreenNG/qml/images/Weather/WeatherIcons_Snow-01.png and /dev/null differ diff --git a/HomeScreenNG/qml/images/Weather/WeatherIcons_Sun-01.png b/HomeScreenNG/qml/images/Weather/WeatherIcons_Sun-01.png deleted file mode 100644 index ee3a744..0000000 Binary files a/HomeScreenNG/qml/images/Weather/WeatherIcons_Sun-01.png and /dev/null differ diff --git a/HomeScreenNG/qml/images/Weather/WeatherIcons_Thunderstorm-01.png b/HomeScreenNG/qml/images/Weather/WeatherIcons_Thunderstorm-01.png deleted file mode 100644 index f6959f4..0000000 Binary files a/HomeScreenNG/qml/images/Weather/WeatherIcons_Thunderstorm-01.png and /dev/null differ diff --git a/HomeScreenNG/qml/images/Weather/weather.qrc b/HomeScreenNG/qml/images/Weather/weather.qrc deleted file mode 100644 index 2668fec..0000000 --- a/HomeScreenNG/qml/images/Weather/weather.qrc +++ /dev/null @@ -1,12 +0,0 @@ - - - WeatherIcons_ALL-01.png - WeatherIcons_Cloudy-01.png - WeatherIcons_Moon-01.png - WeatherIcons_PartiallyCloudy-01.png - WeatherIcons_Rain-01.png - WeatherIcons_Snow-01.png - WeatherIcons_Sun-01.png - WeatherIcons_Thunderstorm-01.png - - diff --git a/HomeScreenNG/qml/images/images.qrc b/HomeScreenNG/qml/images/images.qrc deleted file mode 100644 index 2d8e902..0000000 --- a/HomeScreenNG/qml/images/images.qrc +++ /dev/null @@ -1,10 +0,0 @@ - - - TopSection_NoText_NoIcons-01.png - Utility_Logo_Background-01.png - Utility_Logo_Colour-01.png - Utility_Music_Background-01.png - Utility_Radio_Background-01.png - AGL_HMI_Background_NoCar-01.png - - diff --git a/HomeScreenNG/qml/main.qml b/HomeScreenNG/qml/main.qml deleted file mode 100644 index e9774ae..0000000 --- a/HomeScreenNG/qml/main.qml +++ /dev/null @@ -1,44 +0,0 @@ -import QtQuick 2.7 -import QtQuick.Window 2.2 -import QtQuick.Layouts 1.1 - -Window { - visible: true - flags: Qt.FramelessWindowHint - width: container.width * container.scale - height: container.height * container.scale - title: 'HomeScreen' - - Image { - id: container - anchors.centerIn: parent - width: 1080 - height: 1920 - scale: 0.7 - source: './images/AGL_HMI_Background_NoCar-01.png' - - ColumnLayout { - anchors.fill: parent - spacing: 0 - TopArea { - id: topArea - Layout.fillWidth: true - Layout.preferredHeight: 218 - } - - Item { - id: applicationArea - Layout.fillWidth: true - Layout.fillHeight: true - Layout.preferredHeight: 1920 - 218 - 215 - } - - MediaArea { - id: mediaArea - Layout.fillWidth: true - Layout.fillHeight: true - Layout.preferredHeight: 215 - } - } - } -} diff --git a/HomeScreenNG/qml/qml.qrc b/HomeScreenNG/qml/qml.qrc deleted file mode 100644 index a916b03..0000000 --- a/HomeScreenNG/qml/qml.qrc +++ /dev/null @@ -1,13 +0,0 @@ - - - main.qml - MediaArea.qml - MediaAreaBlank.qml - MediaAreaMusic.qml - MediaAreaRadio.qml - ShortcutArea.qml - ShortcutIcon.qml - StatusArea.qml - TopArea.qml - - diff --git a/HomeScreenNG/statusbarmodel.cpp b/HomeScreenNG/statusbarmodel.cpp deleted file mode 100644 index b844525..0000000 --- a/HomeScreenNG/statusbarmodel.cpp +++ /dev/null @@ -1,76 +0,0 @@ -#include "statusbarmodel.h" -#include "statusbarserver.h" - -#include - -class StatusBarModel::Private -{ -public: - Private(StatusBarModel *parent); - -private: - StatusBarModel *q; -public: - StatusBarServer server; - QString iconList[StatusBarServer::SupportedCount]; -}; - -StatusBarModel::Private::Private(StatusBarModel *parent) - : q(parent) -{ - QDBusConnection dbus = QDBusConnection::sessionBus(); - dbus.registerObject("/StatusBar", &server); - dbus.registerService("org.agl.homescreen"); - connect(&server, &StatusBarServer::statusIconChanged, [&](int placeholderIndex, const QString &icon) { - if (placeholderIndex < 0 || StatusBarServer::SupportedCount <= placeholderIndex) return; - if (iconList[placeholderIndex] == icon) return; - iconList[placeholderIndex] = icon; - emit q->dataChanged(q->index(placeholderIndex), q->index(placeholderIndex)); - }); - for (int i = 0; i < StatusBarServer::SupportedCount; i++) { - iconList[i] = server.getStatusIcon(i); - } -} - -StatusBarModel::StatusBarModel(QObject *parent) - : QAbstractListModel(parent) - , d(new Private(this)) -{ -} - -StatusBarModel::~StatusBarModel() -{ - delete d; -} - -int StatusBarModel::rowCount(const QModelIndex &parent) const -{ - if (parent.isValid()) - return 0; - - return StatusBarServer::SupportedCount; -} - -QVariant StatusBarModel::data(const QModelIndex &index, int role) const -{ - QVariant ret; - if (!index.isValid()) - return ret; - - switch (role) { - case Qt::DisplayRole: - ret = d->iconList[index.row()]; - break; - default: - break; - } - - return ret; -} - -QHash StatusBarModel::roleNames() const -{ - QHash roles; - roles[Qt::DisplayRole] = "icon"; - return roles; -} diff --git a/HomeScreenNG/statusbarmodel.h b/HomeScreenNG/statusbarmodel.h deleted file mode 100644 index 743e816..0000000 --- a/HomeScreenNG/statusbarmodel.h +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef STATUSBARMODEL_H -#define STATUSBARMODEL_H - -#include - -class StatusBarModel : public QAbstractListModel -{ - Q_OBJECT -public: - explicit StatusBarModel(QObject *parent = nullptr); - ~StatusBarModel(); - - int rowCount(const QModelIndex &parent = QModelIndex()) const override; - - QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; - QHash roleNames() const override; - -private: - class Private; - Private *d; -}; - -#endif // STATUSBARMODEL_H diff --git a/HomeScreenNG/statusbarserver.cpp b/HomeScreenNG/statusbarserver.cpp deleted file mode 100644 index 53fea3c..0000000 --- a/HomeScreenNG/statusbarserver.cpp +++ /dev/null @@ -1,74 +0,0 @@ -#include "statusbarserver.h" -#include "statusbar_adaptor.h" - -class StatusBarServer::Private -{ -public: - Private(StatusBarServer *parent); - QString texts[SupportedCount]; - QString icons[SupportedCount]; - StatusbarAdaptor adaptor; -}; - -StatusBarServer::Private::Private(StatusBarServer *parent) - : adaptor(parent) -{ - icons[0] = QStringLiteral("./images/Status/HMI_Status_Wifi_Full-01.png"); - icons[1] = QStringLiteral("./images/Status/HMI_Status_Bluetooth_Inactive-01.png"); - icons[2] = QStringLiteral("./images/Status/HMI_Status_Signal_Full-01.png"); -} - -StatusBarServer::StatusBarServer(QObject *parent) - : QObject(parent) - , d(new Private(this)) -{ -} - -StatusBarServer::~StatusBarServer() -{ - delete d; -} - -QList StatusBarServer::getAvailablePlaceholders() const -{ - QList ret; - for (int i = 0; i < SupportedCount; ++i){ - ret.append(i); - } - return ret; -} - -QString StatusBarServer::getStatusIcon(int placeholderIndex) const -{ - QString ret; - if (-1 < placeholderIndex && placeholderIndex < SupportedCount) - ret = d->icons[placeholderIndex]; - return ret; -} - -void StatusBarServer::setStatusIcon(int placeholderIndex, const QString &icon) -{ - if (-1 < placeholderIndex && placeholderIndex < SupportedCount) { - if (d->icons[placeholderIndex] == icon) return; - d->icons[placeholderIndex] = icon; - emit statusIconChanged(placeholderIndex, icon); - } -} - -QString StatusBarServer::getStatusText(int placeholderIndex) const -{ - QString ret; - if (-1 < placeholderIndex && placeholderIndex < SupportedCount) { - ret = d->texts[placeholderIndex]; - } - return ret; -} - -void StatusBarServer::setStatusText(int placeholderIndex, const QString &text) -{ - if (-1 < placeholderIndex && placeholderIndex < SupportedCount) { - if (d->texts[placeholderIndex] == text) return; - d->texts[placeholderIndex] = text; - emit statusTextChanged(placeholderIndex, text); - } -} diff --git a/HomeScreenNG/statusbarserver.h b/HomeScreenNG/statusbarserver.h deleted file mode 100644 index b9c8716..0000000 --- a/HomeScreenNG/statusbarserver.h +++ /dev/null @@ -1,33 +0,0 @@ -#ifndef STATUSBARSERVER_H -#define STATUSBARSERVER_H - -#include - -class StatusBarServer : public QObject -{ - Q_OBJECT -public: - enum { - SupportedCount = 3, - }; - explicit StatusBarServer(QObject *parent = nullptr); - ~StatusBarServer(); - - Q_INVOKABLE QList getAvailablePlaceholders() const; - Q_INVOKABLE QString getStatusIcon(int placeholderIndex) const; - Q_INVOKABLE QString getStatusText(int placeholderIndex) const; - -public slots: - void setStatusIcon(int placeholderIndex, const QString &icon); - void setStatusText(int placeholderIndex, const QString &text); - -signals: - void statusIconChanged(int placeholderIndex, const QString &icon); - void statusTextChanged(int placeholderIndex, const QString &text); - -private: - class Private; - Private *d; -}; - -#endif // STATUSBARSERVER_H