├── kernel ├── gui │ ├── icons │ │ ├── home.png │ │ ├── menu.png │ │ ├── account.png │ │ ├── clients.png │ │ ├── content.png │ │ ├── add.plus.png │ │ ├── arrow.toup.png │ │ ├── back.arrow.png │ │ ├── playlist.png │ │ ├── settings.png │ │ ├── arrow.todown.png │ │ ├── arrow.toleft.png │ │ └── arrow.toright.png │ ├── qml │ │ ├── popup │ │ │ ├── ListViewMenuPopup.qml │ │ │ ├── MyButton.qml │ │ │ ├── ErrorPopup.qml │ │ │ └── FreeAndUsedPlaylist.qml │ │ ├── dashboard │ │ │ ├── DashboardActivityPanel.qml │ │ │ ├── Dashboard.qml │ │ │ ├── DashboardQuickPanel.qml │ │ │ └── DashboardQuickItem.qml │ │ ├── navigation │ │ │ ├── NavigationMenu.qml │ │ │ ├── NavigationMenuModel.qml │ │ │ ├── TopMenu.qml │ │ │ └── NavigationMenuDelegate.qml │ │ ├── ThemeManager.qml │ │ ├── hardwareverwaltung │ │ │ ├── HardwareListViewHeader.qml │ │ │ └── HardwareVerwaltung.qml │ │ ├── accountverwaltung │ │ │ ├── UserListViewHeader.qml │ │ │ └── GroupListViewHeader.qml │ │ ├── playlistenverwaltung │ │ │ ├── PlaylistenVerwaltung.qml │ │ │ ├── PlanningListView.qml │ │ │ ├── PlanningListViewHeader.qml │ │ │ ├── PlaylistenListView.qml │ │ │ └── PlaylistenListViewHeader.qml │ │ └── contentverwaltung │ │ │ ├── ContentListViewHeader.qml │ │ │ └── ContentVerwaltung.qml │ ├── gui.pro │ ├── main.cpp │ ├── include │ │ ├── websocketclient.h │ │ ├── users.h │ │ ├── hardware.h │ │ ├── groups.h │ │ ├── content.h │ │ ├── playlist.h │ │ └── planning.h │ ├── main.qml │ ├── qml.qrc │ └── src │ │ ├── websocketclient.cpp │ │ ├── users.cpp │ │ └── hardware.cpp ├── raspberry │ ├── qml.qrc │ ├── include │ │ ├── managerconfig.h │ │ ├── md5worker.h │ │ └── manager.h │ ├── raspberry.pro │ ├── src │ │ ├── managerconfig.cpp │ │ └── md5worrker.cpp │ └── main.qml ├── kernel.pro ├── corelibrary │ ├── include │ │ ├── corelibrary_global.h │ │ ├── customevent.h │ │ ├── pluginmanager.h │ │ ├── eventmanager.h │ │ ├── corelibrary.h │ │ └── plugininterface.h │ ├── corelibrary.pro │ └── src │ │ ├── plugininterface.cpp │ │ ├── corelibrary.cpp │ │ ├── eventmanager.cpp │ │ ├── customevent.cpp │ │ └── pluginmanager.cpp └── cms │ └── cms.pro ├── OpenSignage.pro ├── plugins ├── plugins.pro ├── player │ ├── src │ │ └── playerconfig.cpp │ ├── include │ │ ├── player_global.h │ │ ├── playerconfig.h │ │ └── player.h │ └── player.pro ├── downloadclient │ ├── src │ │ └── downloadclientconfig.cpp │ ├── include │ │ ├── downloadclient_global.h │ │ ├── downloadclientconfig.h │ │ └── downloadclient.h │ └── downloadclient.pro ├── database │ ├── include │ │ ├── database_global.h │ │ ├── databaseconfig.h │ │ ├── filewatcher.h │ │ ├── databasegeneral.h │ │ └── database.h │ ├── database.pro │ └── src │ │ └── databaseconfig.cpp ├── downloadserver │ ├── include │ │ ├── downloadserver_global.h │ │ ├── downloadserverconfig.h │ │ ├── ssltcpserver.h │ │ └── downloadserver.h │ ├── src │ │ ├── downloadserverconfig.cpp │ │ └── ssltcpserver.cpp │ └── downloadserver.pro ├── communicationclient │ ├── include │ │ ├── communicationclient_global.h │ │ ├── communicationclientconfig.h │ │ └── communicationclient.h │ ├── src │ │ └── communicationclientconfig.cpp │ └── communicationclient.pro └── communicationserver │ ├── include │ ├── communicationserver_global.h │ ├── communicationserverconfig.h │ └── communicationserver.h │ ├── communicationserver.pro │ └── src │ └── communicationserverconfig.cpp └── README.md /kernel/gui/icons/home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidschedler/OpenSignage/HEAD/kernel/gui/icons/home.png -------------------------------------------------------------------------------- /kernel/gui/icons/menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidschedler/OpenSignage/HEAD/kernel/gui/icons/menu.png -------------------------------------------------------------------------------- /kernel/gui/icons/account.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidschedler/OpenSignage/HEAD/kernel/gui/icons/account.png -------------------------------------------------------------------------------- /kernel/gui/icons/clients.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidschedler/OpenSignage/HEAD/kernel/gui/icons/clients.png -------------------------------------------------------------------------------- /kernel/gui/icons/content.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidschedler/OpenSignage/HEAD/kernel/gui/icons/content.png -------------------------------------------------------------------------------- /kernel/gui/icons/add.plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidschedler/OpenSignage/HEAD/kernel/gui/icons/add.plus.png -------------------------------------------------------------------------------- /kernel/gui/icons/arrow.toup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidschedler/OpenSignage/HEAD/kernel/gui/icons/arrow.toup.png -------------------------------------------------------------------------------- /kernel/gui/icons/back.arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidschedler/OpenSignage/HEAD/kernel/gui/icons/back.arrow.png -------------------------------------------------------------------------------- /kernel/gui/icons/playlist.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidschedler/OpenSignage/HEAD/kernel/gui/icons/playlist.png -------------------------------------------------------------------------------- /kernel/gui/icons/settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidschedler/OpenSignage/HEAD/kernel/gui/icons/settings.png -------------------------------------------------------------------------------- /kernel/gui/icons/arrow.todown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidschedler/OpenSignage/HEAD/kernel/gui/icons/arrow.todown.png -------------------------------------------------------------------------------- /kernel/gui/icons/arrow.toleft.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidschedler/OpenSignage/HEAD/kernel/gui/icons/arrow.toleft.png -------------------------------------------------------------------------------- /kernel/gui/icons/arrow.toright.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidschedler/OpenSignage/HEAD/kernel/gui/icons/arrow.toright.png -------------------------------------------------------------------------------- /kernel/raspberry/qml.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | main.qml 4 | 5 | 6 | -------------------------------------------------------------------------------- /OpenSignage.pro: -------------------------------------------------------------------------------- 1 | VERSION = 1.0.0 2 | 3 | TARGET = OpenSignage 4 | TEMPLATE = subdirs 5 | 6 | !wasm: { 7 | SUBDIRS += plugins 8 | } 9 | SUBDIRS += kernel 10 | 11 | 12 | -------------------------------------------------------------------------------- /kernel/kernel.pro: -------------------------------------------------------------------------------- 1 | VERSION = 1.0.0 2 | 3 | TARGET = kernel 4 | TEMPLATE = subdirs 5 | 6 | !wasm: { 7 | SUBDIRS += corelibrary 8 | 9 | SUBDIRS += raspberry 10 | raspberry.depends = corelibrary 11 | 12 | SUBDIRS += cms 13 | cms.depends = corelibrary 14 | } 15 | 16 | SUBDIRS += gui 17 | -------------------------------------------------------------------------------- /plugins/plugins.pro: -------------------------------------------------------------------------------- 1 | VERSION = 1.0.0 2 | 3 | TARGET = plugins 4 | TEMPLATE = subdirs 5 | 6 | !wasm: { 7 | SUBDIRS += communicationserver 8 | SUBDIRS += database 9 | SUBDIRS += communicationclient 10 | SUBDIRS += downloadclient 11 | SUBDIRS += player 12 | } 13 | 14 | #SUBDIRS += downloadserver 15 | 16 | -------------------------------------------------------------------------------- /plugins/player/src/playerconfig.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2020 David Schedler (https://github.com/davidschedler/) 2 | * 3 | * This file is part of OpenSigange 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #include "include/playerconfig.h" 20 | 21 | PlayerConfig::PlayerConfig(QObject *parent) : QObject(parent) 22 | { 23 | 24 | } 25 | -------------------------------------------------------------------------------- /plugins/downloadclient/src/downloadclientconfig.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2020 David Schedler (https://github.com/davidschedler/) 2 | * 3 | * This file is part of OpenSigange 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #include "include/downloadclientconfig.h" 20 | 21 | DownloadClientConfig::DownloadClientConfig(QObject *parent) : QObject(parent) 22 | { 23 | 24 | } 25 | -------------------------------------------------------------------------------- /kernel/gui/qml/popup/ListViewMenuPopup.qml: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2020 David Schedler (https://github.com/davidschedler/) 2 | * 3 | * This file is part of OpenSigange 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | import QtQuick 2.13 20 | import QtQuick.Layouts 1.12 21 | import QtQuick.Controls 2.13 22 | import QtQuick.Window 2.13 23 | 24 | Menu { 25 | id: contextMenu 26 | MenuItem { text: "Add" } 27 | MenuItem { text: "Edit" } 28 | MenuItem { text: "Delete" } 29 | } 30 | 31 | -------------------------------------------------------------------------------- /plugins/player/include/player_global.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2020 David Schedler (https://github.com/davidschedler/) 2 | * 3 | * This file is part of OpenSigange 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef PLAYER_GLOBAL_H 20 | #define PLAYER_GLOBAL_H 21 | 22 | #include 23 | 24 | #if defined(PLAYER_LIBRARY) 25 | # define PLAYERSHARED_EXPORT Q_DECL_EXPORT 26 | #else 27 | # define PLAYERSHARED_EXPORT Q_DECL_IMPORT 28 | #endif 29 | 30 | #endif // PLAYER_GLOBAL_H 31 | -------------------------------------------------------------------------------- /plugins/player/include/playerconfig.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2020 David Schedler (https://github.com/davidschedler/) 2 | * 3 | * This file is part of OpenSigange 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef PLAYERCONFIG_H 20 | #define PLAYERCONFIG_H 21 | 22 | #include 23 | 24 | class PlayerConfig : public QObject 25 | { 26 | Q_OBJECT 27 | public: 28 | explicit PlayerConfig(QObject *parent = nullptr); 29 | 30 | 31 | private: 32 | 33 | }; 34 | 35 | #endif // PLAYERCONFIG_H 36 | -------------------------------------------------------------------------------- /plugins/database/include/database_global.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2020 David Schedler (https://github.com/davidschedler/) 2 | * 3 | * This file is part of OpenSigange 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef DATABASE_GLOBAL_H 20 | #define DATABASE_GLOBAL_H 21 | 22 | #include 23 | 24 | #if defined(DATABASE_LIBRARY) 25 | # define DATABASESHARED_EXPORT Q_DECL_EXPORT 26 | #else 27 | # define DATABASESHARED_EXPORT Q_DECL_IMPORT 28 | #endif 29 | 30 | #endif // DATABASE_GLOBAL_H 31 | -------------------------------------------------------------------------------- /kernel/corelibrary/include/corelibrary_global.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2020 David Schedler (https://github.com/davidschedler/) 2 | * 3 | * This file is part of OpenSigange 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef CORELIBRARY_GLOBAL_H 20 | #define CORELIBRARY_GLOBAL_H 21 | 22 | #include 23 | 24 | #if defined(CORELIBRARY_LIBRARY) 25 | # define CORELIBRARYSHARED_EXPORT Q_DECL_EXPORT 26 | #else 27 | # define CORELIBRARYSHARED_EXPORT Q_DECL_IMPORT 28 | #endif 29 | 30 | #endif // CORELIBRARY_GLOBAL_H 31 | -------------------------------------------------------------------------------- /kernel/cms/cms.pro: -------------------------------------------------------------------------------- 1 | VERSION = 1.0.0 2 | TARGET = cms 3 | 4 | QT += core network 5 | QT -= gui 6 | 7 | CONFIG += c++11 console 8 | CONFIG -= app_bundle 9 | 10 | # The following define makes your compiler emit warnings if you use 11 | # any Qt feature that has been marked deprecated (the exact warnings 12 | # depend on your compiler). Please consult the documentation of the 13 | # deprecated API in order to know how to port your code away from it. 14 | DEFINES += QT_DEPRECATED_WARNINGS 15 | 16 | # You can also make your code fail to compile if it uses deprecated APIs. 17 | # In order to do so, uncomment the following line. 18 | # You can also select to disable deprecated APIs only up to a certain version of Qt. 19 | #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 20 | INCLUDEPATH += ../corelibrary/include 21 | LIBS += -L$$OUT_PWD/../corelibrary 22 | LIBS += -lcorelibrary 23 | 24 | #QMAKE_RPATHDIR += $$OUT_PWD/../corelibrary 25 | 26 | SOURCES += \ 27 | main.cpp 28 | 29 | # Default rules for deployment. 30 | qnx: target.path = /tmp/$${TARGET}/bin 31 | else: unix:!android: target.path = /opt/$${TARGET}/bin 32 | !isEmpty(target.path): INSTALLS += target 33 | -------------------------------------------------------------------------------- /plugins/downloadclient/include/downloadclient_global.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2020 David Schedler (https://github.com/davidschedler/) 2 | * 3 | * This file is part of OpenSigange 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef DOWNLOADCLIENT_GLOBAL_H 20 | #define DOWNLOADCLIENT_GLOBAL_H 21 | 22 | #include 23 | 24 | #if defined(DOWNLOADCLIENT_LIBRARY) 25 | # define DOWNLOADCLIENTSHARED_EXPORT Q_DECL_EXPORT 26 | #else 27 | # define DOWNLOADCLIENTSHARED_EXPORT Q_DECL_IMPORT 28 | #endif 29 | 30 | #endif // DOWNLOADCLIENT_GLOBAL_H 31 | -------------------------------------------------------------------------------- /plugins/downloadclient/include/downloadclientconfig.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2020 David Schedler (https://github.com/davidschedler/) 2 | * 3 | * This file is part of OpenSigange 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef DOWNLOADCLIENTCONFIG_H 20 | #define DOWNLOADCLIENTCONFIG_H 21 | 22 | #include 23 | 24 | class DownloadClientConfig : public QObject 25 | { 26 | Q_OBJECT 27 | public: 28 | explicit DownloadClientConfig(QObject *parent = nullptr); 29 | 30 | 31 | private: 32 | 33 | }; 34 | 35 | #endif // DOWNLOADCLIENTCONFIG_H 36 | -------------------------------------------------------------------------------- /plugins/downloadserver/include/downloadserver_global.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2020 David Schedler (https://github.com/davidschedler/) 2 | * 3 | * This file is part of OpenSigange 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef DOWNLOADSERVER_GLOBAL_H 20 | #define DOWNLOADSERVER_GLOBAL_H 21 | 22 | #include 23 | 24 | #if defined(DOWNLOADSERVER_LIBRARY) 25 | # define DOWNLOADSERVERSHARED_EXPORT Q_DECL_EXPORT 26 | #else 27 | # define DOWNLOADSERVERSHARED_EXPORT Q_DECL_IMPORT 28 | #endif 29 | 30 | #endif // DOWNLOADCLIENT_GLOBAL_H 31 | -------------------------------------------------------------------------------- /plugins/communicationclient/include/communicationclient_global.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2020 David Schedler (https://github.com/davidschedler/) 2 | * 3 | * This file is part of OpenSigange 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef COMMUNICATIONCLIENT_GLOBAL_H 20 | #define COMMUNICATIONCLIENT_GLOBAL_H 21 | 22 | #include 23 | 24 | #if defined(COMMUNICATIONCLIENT_LIBRARY) 25 | # define COMMUNICATIONCLIENTSHARED_EXPORT Q_DECL_EXPORT 26 | #else 27 | # define COMMUNICATIONCLIENTSHARED_EXPORT Q_DECL_IMPORT 28 | #endif 29 | 30 | #endif // COMMUNICATIONCLIENT_GLOBAL_H 31 | -------------------------------------------------------------------------------- /plugins/communicationserver/include/communicationserver_global.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2020 David Schedler (https://github.com/davidschedler/) 2 | * 3 | * This file is part of OpenSigange 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef COMMUNICATIONSERVER_GLOBAL_H 20 | #define COMMUNICATIONSERVER_GLOBAL_H 21 | 22 | #include 23 | 24 | #if defined(COMMUNICATIONSERVER_LIBRARY) 25 | # define COMMUNICATIONSERVERSHARED_EXPORT Q_DECL_EXPORT 26 | #else 27 | # define COMMUNICATIONSERVERSHARED_EXPORT Q_DECL_IMPORT 28 | #endif 29 | 30 | #endif // COMMUNICATIONSERVER_GLOBAL_H 31 | -------------------------------------------------------------------------------- /kernel/gui/qml/dashboard/DashboardActivityPanel.qml: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2020 David Schedler (https://github.com/davidschedler/) 2 | * 3 | * This file is part of OpenSigange 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | import QtQuick 2.0 20 | 21 | Rectangle { 22 | color: "lightgrey" 23 | 24 | Text { 25 | id: name 26 | anchors.centerIn: parent 27 | text: qsTr("Nice to have - Aktivitäts-History") 28 | font.bold: themeManagerInstance.isBold 29 | color: themeManagerInstance.backColer 30 | font.pixelSize: themeManagerInstance.fontSizeExtraExtraBig 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /kernel/gui/qml/navigation/NavigationMenu.qml: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2020 David Schedler (https://github.com/davidschedler/) 2 | * 3 | * This file is part of OpenSigange 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | import QtQuick 2.13 20 | import QtQuick.Layouts 1.12 21 | import QtQuick.Controls 2.13 22 | 23 | Rectangle { 24 | id: wrapper 25 | color: themeManagerInstance.blue 26 | ListView { 27 | id: navigationMenu 28 | anchors.fill: parent 29 | interactive: false 30 | currentIndex: myEngine.navigationMenuIdx 31 | 32 | delegate: NavigationMenuDelegate {} 33 | model: NavigationMenuModel {} 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /plugins/database/include/databaseconfig.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2020 David Schedler (https://github.com/davidschedler/) 2 | * 3 | * This file is part of OpenSigange 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef DATABASECONFIG_H 20 | #define DATABASECONFIG_H 21 | 22 | #include 23 | 24 | class DatabaseConfig : public QObject 25 | { 26 | Q_OBJECT 27 | public: 28 | explicit DatabaseConfig(QObject *parent = nullptr); 29 | 30 | QString dbPath() const; 31 | void setDbPath(const QString &dbPath); 32 | 33 | QString connectionName() const; 34 | void setConnectionName(const QString &connectionName); 35 | 36 | private: 37 | QString m_dbPath; 38 | QString m_connectionName; 39 | }; 40 | 41 | #endif // DATABASECONFIG_H 42 | -------------------------------------------------------------------------------- /kernel/raspberry/include/managerconfig.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2020 David Schedler (https://github.com/davidschedler/) 2 | * 3 | * This file is part of OpenSigange 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef MANAGERCONFIG_H 20 | #define MANAGERCONFIG_H 21 | 22 | #include 23 | 24 | class ManagerConfig : public QObject 25 | { 26 | Q_OBJECT 27 | public: 28 | explicit ManagerConfig(QObject *parent = nullptr); 29 | 30 | QString getMac() const; 31 | void setMac(const QString &mac); 32 | QString getRefreshTimer() const; 33 | void setRefreshTimer(const QString &value); 34 | 35 | signals: 36 | 37 | public slots: 38 | 39 | private: 40 | QString m_mac; 41 | QString refreshTimer; 42 | }; 43 | 44 | #endif // MANAGERCONFIG_H 45 | -------------------------------------------------------------------------------- /plugins/downloadserver/include/downloadserverconfig.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2020 David Schedler (https://github.com/davidschedler/) 2 | * 3 | * This file is part of OpenSigange 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef DOWNLOADSERVERCONFIG_H 20 | #define DOWNLOADSERVERCONFIG_H 21 | 22 | #include 23 | 24 | class DownloadServerConfig : public QObject 25 | { 26 | Q_OBJECT 27 | public: 28 | explicit DownloadServerConfig(QObject *parent = nullptr); 29 | 30 | quint16 port() const; 31 | void setPort(const quint16 &port); 32 | 33 | QString socketUrl() const; 34 | void setSocketUrl(const QString &socketUrl); 35 | 36 | private: 37 | quint16 m_port; 38 | QString m_socketUrl; 39 | }; 40 | 41 | #endif // DOWNLOADSERVERCONFIG_H 42 | -------------------------------------------------------------------------------- /plugins/downloadserver/src/downloadserverconfig.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2020 David Schedler (https://github.com/davidschedler/) 2 | * 3 | * This file is part of OpenSigange 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #include "include/downloadserverconfig.h" 20 | 21 | DownloadServerConfig::DownloadServerConfig(QObject *parent) : QObject(parent) 22 | { 23 | 24 | } 25 | 26 | quint16 DownloadServerConfig::port() const 27 | { 28 | return m_port; 29 | } 30 | 31 | void DownloadServerConfig::setPort(const quint16 &port) 32 | { 33 | m_port = port; 34 | } 35 | 36 | QString DownloadServerConfig::socketUrl() const 37 | { 38 | return m_socketUrl; 39 | } 40 | 41 | void DownloadServerConfig::setSocketUrl(const QString &socketUrl) 42 | { 43 | m_socketUrl = socketUrl; 44 | } 45 | 46 | -------------------------------------------------------------------------------- /plugins/communicationclient/include/communicationclientconfig.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2020 David Schedler (https://github.com/davidschedler/) 2 | * 3 | * This file is part of OpenSigange 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef COMMUNICATIONCLIENTCONFIG_H 20 | #define COMMUNICATIONCLIENTCONFIG_H 21 | 22 | #include 23 | 24 | class CommunicationClientConfig : public QObject 25 | { 26 | Q_OBJECT 27 | public: 28 | explicit CommunicationClientConfig(QObject *parent = nullptr); 29 | 30 | quint16 port() const; 31 | void setPort(const quint16 &port); 32 | 33 | QString socketUrl() const; 34 | void setSocketUrl(const QString &socketUrl); 35 | 36 | private: 37 | quint16 m_port; 38 | QString m_socketUrl; 39 | }; 40 | 41 | #endif // COMMUNICATIONCLIENTCONFIG_H 42 | -------------------------------------------------------------------------------- /plugins/communicationserver/include/communicationserverconfig.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2020 David Schedler (https://github.com/davidschedler/) 2 | * 3 | * This file is part of OpenSigange 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef COMMUNICATIONSERVERCONFIG_H 20 | #define COMMUNICATIONSERVERCONFIG_H 21 | 22 | #include 23 | 24 | class CommunicationServerConfig : public QObject 25 | { 26 | Q_OBJECT 27 | public: 28 | explicit CommunicationServerConfig(QObject *parent = nullptr); 29 | 30 | quint16 port() const; 31 | void setPort(const quint16 &port); 32 | 33 | QString socketName() const; 34 | void setSocketName(const QString &socketName); 35 | 36 | private: 37 | quint16 m_port; 38 | QString m_socketName; 39 | }; 40 | 41 | #endif // COMMUNICATIONSERVERCONFIG_H 42 | -------------------------------------------------------------------------------- /plugins/communicationclient/src/communicationclientconfig.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2020 David Schedler (https://github.com/davidschedler/) 2 | * 3 | * This file is part of OpenSigange 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #include "include/communicationclientconfig.h" 20 | 21 | CommunicationClientConfig::CommunicationClientConfig(QObject *parent) : QObject(parent) 22 | { 23 | 24 | } 25 | 26 | quint16 CommunicationClientConfig::port() const 27 | { 28 | return m_port; 29 | } 30 | 31 | void CommunicationClientConfig::setPort(const quint16 &port) 32 | { 33 | m_port = port; 34 | } 35 | 36 | QString CommunicationClientConfig::socketUrl() const 37 | { 38 | return m_socketUrl; 39 | } 40 | 41 | void CommunicationClientConfig::setSocketUrl(const QString &socketUrl) 42 | { 43 | m_socketUrl = socketUrl; 44 | } 45 | 46 | -------------------------------------------------------------------------------- /plugins/player/player.pro: -------------------------------------------------------------------------------- 1 | #------------------------------------------------- 2 | # 3 | # Project created by QtCreator 2019-09-05T17:48:42 4 | # 5 | #------------------------------------------------- 6 | VERSION = 1.0.0 7 | 8 | QT += network core 9 | QT -= gui 10 | 11 | CONFIG += c++11 12 | 13 | TARGET = player 14 | TEMPLATE = lib 15 | QTPLUGIN = qPlayer 16 | DESTDIR = ../_plugins/raspberry 17 | 18 | DEFINES += PLAYER_LIBRARY 19 | 20 | # The following define makes your compiler emit warnings if you use 21 | # any feature of Qt which has been marked as deprecated (the exact warnings 22 | # depend on your compiler). Please consult the documentation of the 23 | # deprecated API in order to know how to port your code away from it. 24 | DEFINES += QT_DEPRECATED_WARNINGS 25 | 26 | # You can also make your code fail to compile if you use deprecated APIs. 27 | # In order to do so, uncomment the following line. 28 | # You can also select to disable deprecated APIs only up to a certain version of Qt. 29 | #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 30 | INCLUDEPATH += $PWD "include" 31 | INCLUDEPATH += ../../kernel/corelibrary/include #PluginInterface 32 | 33 | LIBS = -L../../kernel/corelibrary 34 | LIBS += -lvlc -lX11 35 | 36 | SOURCES += \ 37 | src/player.cpp \ 38 | src/playerconfig.cpp 39 | 40 | HEADERS += \ 41 | include/player.h \ 42 | include/player_global.h \ 43 | include/playerconfig.h 44 | 45 | unix { 46 | target.path = /usr/lib 47 | INSTALLS += target 48 | } 49 | -------------------------------------------------------------------------------- /plugins/downloadserver/include/ssltcpserver.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2020 David Schedler (https://github.com/davidschedler/) 2 | * 3 | * This file is part of OpenSigange 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef SSLTCPSERVER_H 20 | #define SSLTCPSERVER_H 21 | 22 | #include 23 | #include 24 | #include 25 | 26 | class SslTcpServer : public QTcpServer 27 | { 28 | Q_OBJECT 29 | 30 | public: 31 | SslTcpServer(QObject *parent = nullptr); 32 | 33 | public slots: 34 | void process(); 35 | 36 | signals: 37 | void finished(); 38 | void error(QString err); 39 | 40 | private: 41 | QSslKey key; 42 | QSslCertificate cert; 43 | 44 | private slots: 45 | void sslErrors(const QList &errors); 46 | void link(); 47 | void rx(); 48 | void disconnected(); 49 | 50 | protected: 51 | void incomingConnection(qintptr socketDescriptor); 52 | }; 53 | 54 | #endif // SSLTCPSERVER_H 55 | -------------------------------------------------------------------------------- /plugins/downloadclient/downloadclient.pro: -------------------------------------------------------------------------------- 1 | #------------------------------------------------- 2 | # 3 | # Project created by QtCreator 2019-09-05T17:48:42 4 | # 5 | #------------------------------------------------- 6 | VERSION = 1.0.0 7 | 8 | QT += network core 9 | QT -= gui 10 | 11 | CONFIG += c++11 12 | 13 | TARGET = downloadclient 14 | TEMPLATE = lib 15 | QTPLUGIN = qDownloadClient 16 | DESTDIR = ../_plugins/raspberry 17 | 18 | DEFINES += DOWNLOADCLIENT_LIBRARY 19 | 20 | # The following define makes your compiler emit warnings if you use 21 | # any feature of Qt which has been marked as deprecated (the exact warnings 22 | # depend on your compiler). Please consult the documentation of the 23 | # deprecated API in order to know how to port your code away from it. 24 | DEFINES += QT_DEPRECATED_WARNINGS 25 | 26 | # You can also make your code fail to compile if you use deprecated APIs. 27 | # In order to do so, uncomment the following line. 28 | # You can also select to disable deprecated APIs only up to a certain version of Qt. 29 | #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 30 | INCLUDEPATH += $PWD "include" 31 | INCLUDEPATH += ../../kernel/corelibrary/include #PluginInterface 32 | 33 | LIBS = -L../../kernel/corelibrary 34 | 35 | SOURCES += \ 36 | src/downloadclient.cpp \ 37 | src/downloadclientconfig.cpp 38 | 39 | HEADERS += \ 40 | include/downloadclient.h \ 41 | include/downloadclient_global.h \ 42 | include/downloadclientconfig.h 43 | 44 | unix { 45 | target.path = /usr/lib 46 | INSTALLS += target 47 | } 48 | -------------------------------------------------------------------------------- /kernel/corelibrary/corelibrary.pro: -------------------------------------------------------------------------------- 1 | #------------------------------------------------- 2 | # 3 | # Project created by QtCreator 2019-09-04T22:09:13 4 | # 5 | #------------------------------------------------- 6 | VERSION = 1.0.0 7 | 8 | QT += network core 9 | QT -= gui 10 | 11 | CONFIG += c++11 12 | 13 | TARGET = corelibrary 14 | TEMPLATE = lib 15 | 16 | DEFINES += CORELIBRARY_LIBRARY 17 | 18 | # The following define makes your compiler emit warnings if you use 19 | # any feature of Qt which has been marked as deprecated (the exact warnings 20 | # depend on your compiler). Please consult the documentation of the 21 | # deprecated API in order to know how to port your code away from it. 22 | DEFINES += QT_DEPRECATED_WARNINGS 23 | 24 | # You can also make your code fail to compile if you use deprecated APIs. 25 | # In order to do so, uncomment the following line. 26 | # You can also select to disable deprecated APIs only up to a certain version of Qt. 27 | #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 28 | INCLUDEPATH += $PWD "include" 29 | 30 | SOURCES += \ 31 | src/corelibrary.cpp \ 32 | src/customevent.cpp \ 33 | src/eventmanager.cpp \ 34 | src/plugininterface.cpp \ 35 | src/pluginmanager.cpp 36 | 37 | HEADERS += \ 38 | include/corelibrary.h \ 39 | include/corelibrary_global.h \ 40 | include/customevent.h \ 41 | include/eventmanager.h \ 42 | include/plugininterface.h \ 43 | include/pluginmanager.h 44 | 45 | unix { 46 | target.path = /usr/lib 47 | INSTALLS += target 48 | } 49 | -------------------------------------------------------------------------------- /kernel/raspberry/include/md5worker.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2020 David Schedler (https://github.com/davidschedler/) 2 | * 3 | * This file is part of OpenSigange 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef MD5WORKER_H 20 | #define MD5WORKER_H 21 | 22 | #include 23 | #include 24 | #include 25 | #include 26 | 27 | class MD5Worker : public QObject 28 | { 29 | Q_OBJECT 30 | public: 31 | explicit MD5Worker(QString contentPath, QObject *parent = nullptr); 32 | 33 | enum WorkerState { IDLING=0, WORKING }; 34 | 35 | public slots: 36 | void process(); 37 | void generateMD5Sum(QString id_content, QString filePath); 38 | 39 | signals: 40 | void finished(); 41 | void readyGeneratedMD5(QString id_content, QString filePath, QString md5Sum); 42 | void error(QString err); 43 | 44 | private: 45 | QString m_contentPath; 46 | QStringList m_jobList; 47 | }; 48 | 49 | #endif // MD5WORKER_H 50 | 51 | 52 | -------------------------------------------------------------------------------- /kernel/gui/qml/navigation/NavigationMenuModel.qml: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2020 David Schedler (https://github.com/davidschedler/) 2 | * 3 | * This file is part of OpenSigange 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | import QtQuick 2.0 20 | 21 | ListModel { 22 | id: myModel 23 | 24 | ListElement { title: "Dashboard"; source: "qrc:/qml/dashboard/Dashboard.qml"; img: "qrc:/icons/home.png" } 25 | ListElement { title: "Account-Verwaltung"; source: "qrc:/qml/accountverwaltung/AccountVerwaltung.qml" ; img: "qrc:/icons/account.png" } 26 | ListElement { title: "Content-Verwaltung"; source: "qrc:/qml/contentverwaltung/ContentVerwaltung.qml" ; img: "qrc:/icons/content.png" } 27 | ListElement { title: "Playlist-Verwaltung"; source: "qrc:/qml/playlistenverwaltung/PlaylistenVerwaltung.qml"; img: "qrc:/icons/playlist.png" } 28 | ListElement { title: "Clients-Verwaltung"; source: "qrc:/qml/hardwareverwaltung/HardwareVerwaltung.qml"; img: "qrc:/icons/clients.png" } 29 | } 30 | -------------------------------------------------------------------------------- /kernel/corelibrary/src/plugininterface.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2020 David Schedler (https://github.com/davidschedler/) 2 | * 3 | * This file is part of OpenSigange 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #include "plugininterface.h" 20 | 21 | /** 22 | * @brief PluginInterface::PluginInterface Default-Konstruktor 23 | */ 24 | PluginInterface::PluginInterface() : 25 | QObject(), 26 | corelibrary(nullptr) 27 | { 28 | 29 | } 30 | 31 | /** 32 | * @brief PluginInterface::~PluginInterface Default-Destruktor 33 | */ 34 | PluginInterface::~PluginInterface() 35 | { 36 | 37 | } 38 | 39 | /** 40 | * @brief PluginInterface::event Prüfe ob Event ein CustomEvent ist 41 | * @param customEvent Benutzerdefiniertes Event 42 | * @return onFail = in Eventloop lasse, onSuccess = in onEvent leiten 43 | */ 44 | bool PluginInterface::event(QEvent *customEvent) 45 | { 46 | if (customEvent->type() == QEvent::User+1) 47 | return onEvent((CustomEvent*)customEvent); 48 | return QObject::event(customEvent); 49 | } 50 | -------------------------------------------------------------------------------- /plugins/communicationserver/communicationserver.pro: -------------------------------------------------------------------------------- 1 | #------------------------------------------------- 2 | # 3 | # Project created by QtCreator 2019-09-05T17:48:42 4 | # 5 | #------------------------------------------------- 6 | VERSION = 1.0.0 7 | 8 | QT += network core websockets 9 | QT -= gui 10 | 11 | CONFIG += c++11 12 | 13 | TARGET = communicationserver 14 | TEMPLATE = lib 15 | QTPLUGIN = qCommunicationServer 16 | DESTDIR = ../_plugins/cms 17 | 18 | DEFINES += COMMUNICATIONSERVER_LIBRARY 19 | 20 | # The following define makes your compiler emit warnings if you use 21 | # any feature of Qt which has been marked as deprecated (the exact warnings 22 | # depend on your compiler). Please consult the documentation of the 23 | # deprecated API in order to know how to port your code away from it. 24 | DEFINES += QT_DEPRECATED_WARNINGS 25 | 26 | # You can also make your code fail to compile if you use deprecated APIs. 27 | # In order to do so, uncomment the following line. 28 | # You can also select to disable deprecated APIs only up to a certain version of Qt. 29 | #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 30 | INCLUDEPATH += $PWD "include" 31 | INCLUDEPATH += ../../kernel/corelibrary/include #PluginInterface 32 | 33 | LIBS = -L../../kernel/corelibrary 34 | 35 | SOURCES += \ 36 | src/communicationserver.cpp \ 37 | src/communicationserverconfig.cpp 38 | 39 | HEADERS += \ 40 | include/communicationserver.h \ 41 | include/communicationserver_global.h \ 42 | include/communicationserverconfig.h 43 | 44 | unix { 45 | target.path = /usr/lib 46 | INSTALLS += target 47 | } 48 | -------------------------------------------------------------------------------- /plugins/communicationclient/communicationclient.pro: -------------------------------------------------------------------------------- 1 | #------------------------------------------------- 2 | # 3 | # Project created by QtCreator 2019-09-05T17:48:42 4 | # 5 | #------------------------------------------------- 6 | VERSION = 1.0.0 7 | 8 | QT += network core websockets 9 | QT -= gui 10 | 11 | CONFIG += c++11 12 | 13 | TARGET = communicationclient 14 | TEMPLATE = lib 15 | QTPLUGIN = qCommunicationClient 16 | DESTDIR = ../_plugins/raspberry 17 | 18 | DEFINES += COMMUNICATIONCLIENT_LIBRARY 19 | 20 | # The following define makes your compiler emit warnings if you use 21 | # any feature of Qt which has been marked as deprecated (the exact warnings 22 | # depend on your compiler). Please consult the documentation of the 23 | # deprecated API in order to know how to port your code away from it. 24 | DEFINES += QT_DEPRECATED_WARNINGS 25 | 26 | # You can also make your code fail to compile if you use deprecated APIs. 27 | # In order to do so, uncomment the following line. 28 | # You can also select to disable deprecated APIs only up to a certain version of Qt. 29 | #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 30 | INCLUDEPATH += $PWD "include" 31 | INCLUDEPATH += ../../kernel/corelibrary/include #PluginInterface 32 | 33 | LIBS = -L../../kernel/corelibrary 34 | 35 | SOURCES += \ 36 | src/communicationclient.cpp \ 37 | src/communicationclientconfig.cpp 38 | 39 | HEADERS += \ 40 | include/communicationclient.h \ 41 | include/communicationclient_global.h \ 42 | include/communicationclientconfig.h 43 | 44 | unix { 45 | target.path = /usr/lib 46 | INSTALLS += target 47 | } 48 | -------------------------------------------------------------------------------- /plugins/downloadserver/downloadserver.pro: -------------------------------------------------------------------------------- 1 | #------------------------------------------------- 2 | # 3 | # Project created by QtCreator 2019-09-05T17:48:42 4 | # 5 | #------------------------------------------------- 6 | VERSION = 1.0.0 7 | 8 | QT += network core 9 | QT -= gui 10 | 11 | CONFIG += c++11 12 | 13 | TARGET = downloadserver 14 | TEMPLATE = lib 15 | QTPLUGIN = qDownloadServer 16 | DESTDIR = ../_plugins/cms 17 | 18 | DEFINES += DOWNLOADSERVER_LIBRARY 19 | 20 | # The following define makes your compiler emit warnings if you use 21 | # any feature of Qt which has been marked as deprecated (the exact warnings 22 | # depend on your compiler). Please consult the documentation of the 23 | # deprecated API in order to know how to port your code away from it. 24 | DEFINES += QT_DEPRECATED_WARNINGS 25 | 26 | # You can also make your code fail to compile if you use deprecated APIs. 27 | # In order to do so, uncomment the following line. 28 | # You can also select to disable deprecated APIs only up to a certain version of Qt. 29 | #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 30 | INCLUDEPATH += $PWD "include" 31 | INCLUDEPATH += ../../kernel/corelibrary/include #PluginInterface 32 | 33 | LIBS = -L../../kernel/corelibrary 34 | 35 | SOURCES += \ 36 | src/downloadserver.cpp \ 37 | src/downloadserverconfig.cpp \ 38 | src/ssltcpserver.cpp 39 | 40 | HEADERS += \ 41 | include/downloadserver.h \ 42 | include/downloadserver_global.h \ 43 | include/downloadserverconfig.h \ 44 | include/ssltcpserver.h 45 | 46 | unix { 47 | target.path = /usr/lib 48 | INSTALLS += target 49 | } 50 | -------------------------------------------------------------------------------- /kernel/raspberry/raspberry.pro: -------------------------------------------------------------------------------- 1 | VERSION = 1.0.0 2 | TARGET = raspberry 3 | 4 | QT += quick core websockets 5 | 6 | CONFIG += c++11 7 | 8 | # The following define makes your compiler emit warnings if you use 9 | # any Qt feature that has been marked deprecated (the exact warnings 10 | # depend on your compiler). Refer to the documentation for the 11 | # deprecated API to know how to port your code away from it. 12 | DEFINES += QT_DEPRECATED_WARNINGS 13 | 14 | # You can also make your code fail to compile if it uses deprecated APIs. 15 | # In order to do so, uncomment the following line. 16 | # You can also select to disable deprecated APIs only up to a certain version of Qt. 17 | #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 18 | INCLUDEPATH += $PWD "include" 19 | INCLUDEPATH += ../corelibrary/include 20 | LIBS += -L$$OUT_PWD/../corelibrary 21 | LIBS += -lcorelibrary 22 | 23 | SOURCES += \ 24 | main.cpp \ 25 | src/manager.cpp \ 26 | src/managerconfig.cpp \ 27 | src/playlistitem.cpp \ 28 | src/md5worrker.cpp 29 | 30 | RESOURCES += qml.qrc 31 | 32 | # Additional import path used to resolve QML modules in Qt Creator's code model 33 | QML_IMPORT_PATH = 34 | 35 | # Additional import path used to resolve QML modules just for Qt Quick Designer 36 | QML_DESIGNER_IMPORT_PATH = 37 | 38 | # Default rules for deployment. 39 | qnx: target.path = /tmp/$${TARGET}/bin 40 | else: unix:!android: target.path = /opt/$${TARGET}/bin 41 | !isEmpty(target.path): INSTALLS += target 42 | 43 | DISTFILES += 44 | 45 | HEADERS += \ 46 | include/manager.h \ 47 | include/managerconfig.h \ 48 | include/playlistitem.h \ 49 | include/md5worker.h 50 | -------------------------------------------------------------------------------- /plugins/database/database.pro: -------------------------------------------------------------------------------- 1 | #------------------------------------------------- 2 | # 3 | # Project created by QtCreator 2019-09-06T22:42:42 4 | # 5 | #------------------------------------------------- 6 | VERSION = 1.0.0 7 | 8 | QT += network core sql 9 | QT -= gui 10 | 11 | CONFIG += c++11 12 | 13 | TARGET = database 14 | TEMPLATE = lib 15 | QTPLUGIN = qDatabase 16 | DESTDIR = ../_plugins/cms 17 | 18 | DEFINES += DATABASE_LIBRARY 19 | 20 | # The following define makes your compiler emit warnings if you use 21 | # any feature of Qt which has been marked as deprecated (the exact warnings 22 | # depend on your compiler). Please consult the documentation of the 23 | # deprecated API in order to know how to port your code away from it. 24 | DEFINES += QT_DEPRECATED_WARNINGS 25 | 26 | # You can also make your code fail to compile if you use deprecated APIs. 27 | # In order to do so, uncomment the following line. 28 | # You can also select to disable deprecated APIs only up to a certain version of Qt. 29 | #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 30 | INCLUDEPATH += $PWD "include" 31 | INCLUDEPATH += ../../kernel/corelibrary/include #PluginInterface 32 | 33 | LIBS = -L../../kernel/corelibrary 34 | 35 | SOURCES += \ 36 | src/databaseconfig.cpp \ 37 | src/databasegeneral.cpp \ 38 | src/database.cpp \ 39 | src/filewatcher.cpp 40 | 41 | HEADERS += \ 42 | include/databaseconfig.h \ 43 | include/databasegeneral.h \ 44 | include/database.h \ 45 | include/database_global.h \ 46 | include/filewatcher.h 47 | 48 | unix { 49 | target.path = /usr/lib 50 | INSTALLS += target 51 | } 52 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # OpenSignage 2 | A plugin based digital signage system for embedded systems (Raspberry Pi 4) created with Qt WebAssembly 3 | 4 | Im Rahmen dieser Arbeit wurde ein System entwickelt, das aus drei Anwendungen besteht. Ziel dieses Systems 5 | ist eine kostengünstige Lösung zur Anzeige von digitalen Inhalten. Im Mittelpunkt steht dabei die Möglichkeit, 6 | den Inhalt durch eine Vielzahl von Attributen adäquat zu verwalten und zu planen. 7 | 8 | Mithilfe der Grafikschnittstelle der Verwaltungsanwendung (Server-Anwendung) ist der Anwender in der Lage, 9 | einzelne Videos und Bilder unter anderem für bestimmte Wochentage, Tagesabschnitte und Ereignisse in Abspiel- 10 | einheiten komfortabel zu planen. Die Speicherung der gewonnenen Daten erfolgt durch die Datenbankschnittstelle 11 | der Verwaltungsanwendung. Die Abspielanwendung (Client-Anwendung) übernimmt hierbei sowohl die Auswertung der 12 | konfigurierten Abspieleinheiten als auch den Download und die Anzeige des gewünschten digitalen Inhalts auf dem Einplatinencomputer „Raspberry Pi 4“. 13 | 14 | Umgesetzt wurde das System mit dem plattformübergreifenden Anwendungsframework Qt sowie der neuen Webtechnologie „WebAssembly“. 15 | 16 | ![Account-Management](https://s19.directupload.net/images/200117/7t8473l2.png) 17 | ![Content-Management](https://s19.directupload.net/images/200117/tgpbt8qj.png) 18 | ![Playlist-Management 1](https://s19.directupload.net/images/200117/r3jc3uf2.png) 19 | ![Playlist-Management 2](https://s19.directupload.net/images/200117/mpfn9ojm.png) 20 | ![Planning-Management 1](https://s19.directupload.net/images/200117/95zlfum9.png) 21 | ![Planning-Management 2](https://s19.directupload.net/images/200117/c9z4ys4s.png) 22 | ![Hardware-Management](https://s19.directupload.net/images/200117/ujckxlj3.png) 23 | -------------------------------------------------------------------------------- /kernel/gui/qml/dashboard/Dashboard.qml: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2020 David Schedler (https://github.com/davidschedler/) 2 | * 3 | * This file is part of OpenSigange 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | import QtQuick 2.13 20 | import QtQuick.Layouts 1.12 21 | import QtQuick.Controls 2.13 22 | 23 | import "./../" 24 | 25 | ColumnLayout { 26 | id: dashboard 27 | spacing: 20 28 | 29 | ThemeManager { id: themeManagerInstance } 30 | 31 | Text { 32 | text: qsTr("Dashboard") 33 | font.pixelSize: themeManagerInstance.fontSizeExtraBig 34 | } 35 | 36 | Rectangle { 37 | Layout.preferredHeight: 2 38 | Layout.fillWidth: true 39 | color: themeManagerInstance.background 40 | } 41 | 42 | DashboardQuickPanel { 43 | Layout.preferredHeight: 100 44 | Layout.maximumHeight: 100 45 | Layout.fillWidth: true 46 | 47 | Layout.leftMargin: parent.width / 6 48 | Layout.rightMargin: parent.width / 6 49 | } 50 | 51 | DashboardActivityPanel { 52 | Layout.fillWidth: true 53 | Layout.fillHeight: true 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /kernel/gui/gui.pro: -------------------------------------------------------------------------------- 1 | VERSION = 1.0.0 2 | TARGET = gui 3 | 4 | QT += quick core websockets 5 | CONFIG += c++11 6 | 7 | # The following define makes your compiler emit warnings if you use 8 | # any Qt feature that has been marked deprecated (the exact warnings 9 | # depend on your compiler). Refer to the documentation for the 10 | # deprecated API to know how to port your code away from it. 11 | DEFINES += QT_DEPRECATED_WARNINGS 12 | 13 | # You can also make your code fail to compile if it uses deprecated APIs. 14 | # In order to do so, uncomment the following line. 15 | # You can also select to disable deprecated APIs only up to a certain version of Qt. 16 | #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 17 | INCLUDEPATH += $PWD "include" 18 | SOURCES += \ 19 | main.cpp \ 20 | src/content.cpp \ 21 | src/engine.cpp \ 22 | src/groups.cpp \ 23 | src/hardware.cpp \ 24 | src/planning.cpp \ 25 | src/playlist.cpp \ 26 | src/users.cpp \ 27 | src/websocketclient.cpp 28 | 29 | RESOURCES += qml.qrc 30 | 31 | # Additional import path used to resolve QML modules in Qt Creator's code model 32 | QML_IMPORT_PATH = 33 | 34 | # Additional import path used to resolve QML modules just for Qt Quick Designer 35 | QML_DESIGNER_IMPORT_PATH = 36 | 37 | # Default rules for deployment. 38 | qnx: target.path = /tmp/$${TARGET}/bin 39 | else: unix:!android: target.path = /opt/$${TARGET}/bin 40 | !isEmpty(target.path): INSTALLS += target 41 | 42 | HEADERS += \ 43 | include/content.h \ 44 | include/engine.h \ 45 | include/groups.h \ 46 | include/hardware.h \ 47 | include/planning.h \ 48 | include/playlist.h \ 49 | include/users.h \ 50 | include/websocketclient.h 51 | 52 | DISTFILES += 53 | -------------------------------------------------------------------------------- /kernel/raspberry/src/managerconfig.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2020 David Schedler (https://github.com/davidschedler/) 2 | * 3 | * This file is part of OpenSigange 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #include "include/managerconfig.h" 20 | 21 | /** 22 | * @brief ManagerConfig::ManagerConfig Default-Konstruktor 23 | * @param parent QObject 24 | */ 25 | ManagerConfig::ManagerConfig(QObject *parent) : 26 | QObject(parent) 27 | { 28 | 29 | } 30 | 31 | /** 32 | * @brief ManagerConfig::getMac Hole MAC 33 | * @return MAC 34 | */ 35 | QString ManagerConfig::getMac() const 36 | { 37 | return m_mac; 38 | } 39 | 40 | /** 41 | * @brief ManagerConfig::setMac Setze MAC 42 | * @param mac MAC 43 | */ 44 | void ManagerConfig::setMac(const QString &mac) 45 | { 46 | m_mac = mac; 47 | } 48 | 49 | /** 50 | * @brief ManagerConfig::getRefreshTimer Hole RefreshTimer 51 | * @return 52 | */ 53 | QString ManagerConfig::getRefreshTimer() const 54 | { 55 | return refreshTimer; 56 | } 57 | 58 | /** 59 | * @brief ManagerConfig::setRefreshTimer Setze RefreshTimer 60 | * @param value 61 | */ 62 | void ManagerConfig::setRefreshTimer(const QString &value) 63 | { 64 | refreshTimer = value; 65 | } 66 | 67 | -------------------------------------------------------------------------------- /kernel/corelibrary/include/customevent.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2020 David Schedler (https://github.com/davidschedler/) 2 | * 3 | * This file is part of OpenSigange 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef CUSTOMEVENT_H 20 | #define CUSTOMEVENT_H 21 | 22 | #include 23 | #include 24 | 25 | #define SENDER "SENDER" 26 | #define COMMAND "COMMAND" 27 | #define TYPE "TYPE" 28 | #define IDENT "IDENT" 29 | #define PWD "PWD" 30 | #define DATA "DATA" 31 | 32 | class Q_DECL_EXPORT CustomEvent : public QEvent 33 | { 34 | 35 | public: 36 | CustomEvent(); 37 | CustomEvent(CustomEvent *mySelf); 38 | 39 | virtual ~CustomEvent(); 40 | 41 | /* creation and deleation */ 42 | void addCustomEvent(QString key, QString value); 43 | void delCustomEvent(QString key); 44 | 45 | /* task handling */ 46 | QString getCustomEvent(QString key, QString value = ""); 47 | QStringList getCustomEventList(); 48 | bool containsCustomEvent(QString key); 49 | bool isCustomEventEmpty(); 50 | 51 | protected: 52 | /* structure of a task => value => key */ 53 | QHash p_customEvent; 54 | }; 55 | 56 | #endif // CUSTOMEVENT_H 57 | -------------------------------------------------------------------------------- /kernel/gui/main.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2020 David Schedler (https://github.com/davidschedler/) 2 | * 3 | * This file is part of OpenSigange 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #include 20 | #include 21 | #include 22 | 23 | #include "engine.h" 24 | 25 | int main(int argc, char *argv[]) 26 | { 27 | QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); 28 | 29 | QGuiApplication app(argc, argv); 30 | QQmlApplicationEngine engine; 31 | 32 | for (int i = 0 ; i < argc ; i++) 33 | { 34 | if (argv[i] == QString("--debug")) 35 | { 36 | //#define DEBUG 37 | } 38 | } 39 | 40 | Engine myEngine; 41 | QQmlContext *ctx = engine.rootContext(); 42 | ctx->setContextProperty("myEngine", &myEngine); 43 | 44 | const QUrl url(QStringLiteral("qrc:/main.qml")); 45 | QObject::connect(&engine, &QQmlApplicationEngine::objectCreated, 46 | &app, [url](QObject *obj, const QUrl &objUrl) { 47 | if (!obj && url == objUrl) 48 | QCoreApplication::exit(-1); 49 | }, Qt::QueuedConnection); 50 | engine.load(url); 51 | 52 | return app.exec(); 53 | } 54 | -------------------------------------------------------------------------------- /kernel/corelibrary/include/pluginmanager.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2020 David Schedler (https://github.com/davidschedler/) 2 | * 3 | * This file is part of OpenSigange 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef PLUGINMANAGER_H 20 | #define PLUGINMANAGER_H 21 | 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | 28 | #include "plugininterface.h" 29 | 30 | QT_FORWARD_DECLARE_CLASS(CoreLibrary); 31 | QT_FORWARD_DECLARE_CLASS(PluginInterface); 32 | 33 | class PluginManager : public QObject 34 | { 35 | Q_OBJECT 36 | 37 | public: 38 | explicit PluginManager(CoreLibrary *corelibrary, QObject *parent = nullptr); 39 | 40 | /* gerneral */ 41 | void setupDirectories(); 42 | 43 | /* load plugins */ 44 | void loadAllPlugins(QString pluginLocation); 45 | void loadPlugin(QString fileName); 46 | 47 | /* plugin handling */ 48 | PluginInterface* getPlugin(QString pid); 49 | bool containsPlugin(QString pid); 50 | QList getAllPlugins(); 51 | 52 | private: 53 | /* plugin handling*/ 54 | CoreLibrary *m_coreLibrary; 55 | QList m_pluginList; 56 | }; 57 | 58 | #endif // PLUGINMANAGER_H 59 | -------------------------------------------------------------------------------- /kernel/gui/qml/ThemeManager.qml: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2020 David Schedler (https://github.com/davidschedler/) 2 | * 3 | * This file is part of OpenSigange 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | import QtQuick 2.0 20 | 21 | Item { 22 | id: themeManager 23 | 24 | // Color for Layers 25 | property string background: "#323232" 26 | property string midground: "#eaeaea" 27 | property string foreground: "#ffffff" 28 | 29 | // Color for Highlights 30 | property string blue: "#2a3f54" 31 | property string blueHighlight: "#354a5f" 32 | 33 | // Coler & Size for Fonts 34 | property string fontColer: "#ffffff" 35 | property string backColer: "#000000" 36 | property int fontSizeDefault: 12 37 | property int fontSizeMiddle: 14 38 | property int fontSizeBig: 16 39 | property int fontSizeExtraBig: 24 40 | property int fontSizeExtraExtraBig: 30 41 | property bool isBold: false 42 | 43 | // Default colors 44 | property string black: "black" 45 | property string white: "white" 46 | property string green: "#1ed760" 47 | 48 | property int navigationMenuHeight: 50 49 | property int groupMenuHeight: 50 50 | property int navigationMenuMargin: 10 51 | property int navigationTopMenuHeight: 75 52 | } 53 | -------------------------------------------------------------------------------- /kernel/raspberry/src/md5worrker.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2020 David Schedler (https://github.com/davidschedler/) 2 | * 3 | * This file is part of OpenSigange 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #include "include/md5worker.h" 20 | 21 | /** 22 | * @brief MD5Worker::MD5Worker Default-Konstruktor 23 | * @param contentPath Arbeitsverzeichnis 24 | * @param parent QObject 25 | */ 26 | MD5Worker::MD5Worker(QString contentPath, QObject *parent) : 27 | QObject(parent), 28 | m_contentPath(contentPath) 29 | 30 | { 31 | 32 | } 33 | 34 | /** 35 | * @brief MD5Worker::process Starte Thread 36 | */ 37 | void MD5Worker::process() 38 | { 39 | 40 | } 41 | 42 | /** 43 | * @brief MD5Worker::generateMD5Sum Generiere einen MD5-Hash eines gewünschten Contents 44 | * @param id_content ID des Contents 45 | * @param filePath Pfad des Contents 46 | */ 47 | void MD5Worker::generateMD5Sum(QString id_content, QString filePath) 48 | { 49 | QByteArray finalHash; 50 | QFile f(filePath); 51 | if (f.open(QFile::ReadOnly)) { 52 | QCryptographicHash hash(QCryptographicHash::Md5); 53 | if (hash.addData(&f)) { 54 | finalHash = hash.result().toHex(); 55 | } 56 | } 57 | 58 | emit readyGeneratedMD5(id_content, filePath, finalHash); 59 | } 60 | 61 | -------------------------------------------------------------------------------- /kernel/gui/include/websocketclient.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2020 David Schedler (https://github.com/davidschedler/) 2 | * 3 | * This file is part of OpenSigange 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef WEBSOCKETCLIENT_H 20 | #define WEBSOCKETCLIENT_H 21 | 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | 28 | #include "groups.h" 29 | 30 | class WebSocketClient : public QObject 31 | { 32 | Q_OBJECT 33 | 34 | public: 35 | explicit WebSocketClient(const QUrl &url, QObject *parent = nullptr); 36 | 37 | /* gui requests */ 38 | void getDatabaseData(QByteArray message); 39 | 40 | signals: 41 | /* to inform engine */ 42 | void disconnected(); 43 | void connected(); 44 | void parsedGroup(QObject *groupList); 45 | void incommingMessage(QByteArray message); 46 | 47 | private slots: 48 | /* websocket handling */ 49 | void onConnected(); 50 | void onTextMessageReceived(QString message); 51 | void onBinaryMessageReceived(QByteArray message); 52 | void tryToReconnect(); 53 | 54 | private: 55 | /* websocket handling */ 56 | QWebSocket m_webSocket; 57 | QUrl m_url; 58 | QTimer m_timer; 59 | }; 60 | 61 | #endif // WEBSOCKETCLIENT_H 62 | -------------------------------------------------------------------------------- /kernel/gui/qml/popup/MyButton.qml: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2020 David Schedler (https://github.com/davidschedler/) 2 | * 3 | * This file is part of OpenSigange 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | import QtQuick 2.0 20 | import QtQuick.Controls 2.5 21 | 22 | Button { 23 | id: mybutton 24 | text: myText 25 | property bool isActive: false 26 | property bool doReset: false 27 | property string myText: "" 28 | onIsActiveChanged: { 29 | background.color = (isActive === true) ? themeManagerInstance.blue : "lightgrey" 30 | label.color = (isActive === true) ? "white" : "black" 31 | } 32 | 33 | background: Rectangle { 34 | id: background 35 | implicitWidth: 75 36 | implicitHeight: 40 37 | opacity: enabled ? 1 : 0.3 38 | border.color: (parent.isActive === true) ? themeManagerInstance.blue : "lightgrey" 39 | border.width: 1 40 | radius: 2 41 | } 42 | contentItem: Text { 43 | id: label 44 | text: mybutton.text 45 | font: mybutton.font 46 | opacity: enabled ? 1.0 : 0.3 47 | color: (parent.isActive === true) ? "white" : "black" 48 | horizontalAlignment: Text.AlignHCenter 49 | verticalAlignment: Text.AlignVCenter 50 | elide: Text.ElideRight 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /kernel/gui/qml/dashboard/DashboardQuickPanel.qml: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2020 David Schedler (https://github.com/davidschedler/) 2 | * 3 | * This file is part of OpenSigange 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | import QtQuick 2.13 20 | import QtQuick.Layouts 1.12 21 | import QtQuick.Controls 2.13 22 | 23 | RowLayout { 24 | spacing: 25 25 | 26 | DashboardQuickItem { 27 | Layout.fillWidth: true 28 | Layout.fillHeight: true 29 | backgroundColor: themeManagerInstance.midground 30 | numberString: myEngine.calculateDashboardInfo(textString) 31 | textString: "Contents" 32 | icon: "qrc:/icons/content.png" 33 | } 34 | DashboardQuickItem { 35 | Layout.fillWidth: true 36 | Layout.fillHeight: true 37 | backgroundColor: themeManagerInstance.midground 38 | numberString: myEngine.calculateDashboardInfo(textString) 39 | textString: "Playlisten" 40 | icon: "qrc:/icons/playlist.png" 41 | } 42 | DashboardQuickItem { 43 | Layout.fillWidth: true 44 | Layout.fillHeight: true 45 | backgroundColor: themeManagerInstance.midground 46 | numberString: myEngine.calculateDashboardInfo(textString) 47 | textString: "Clients" 48 | icon: "qrc:/icons/clients.png" 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /plugins/database/include/filewatcher.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2020 David Schedler (https://github.com/davidschedler/) 2 | * 3 | * This file is part of OpenSigange 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef FILEWATCHER_H 20 | #define FILEWATCHER_H 21 | 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | 30 | class FileWatcher : public QObject 31 | { 32 | Q_OBJECT 33 | public: 34 | explicit FileWatcher(QString pathToWatch, QStringList m_contentFromDb, QObject *parent = nullptr); 35 | 36 | /* helper functions */ 37 | void scanDir(QDir dir, QString extendedBy); 38 | void generateMd5(QString filePath); 39 | bool isFileSizeIncreasing(QString filePath); 40 | 41 | public slots: 42 | void process(); 43 | void showModifiedDirectory(QString modifiedDirectory); 44 | 45 | signals: 46 | void finished(); 47 | void contentChecked(); 48 | void detectedNewContent(QStringList data); 49 | void error(QString err); 50 | 51 | private: 52 | /* MD5 handling */ 53 | QString m_watcherPath; 54 | QStringList m_contentFromDb; 55 | QStringList m_contentFromHdd; 56 | QStringList m_contentModified; 57 | QFileSystemWatcher *m_watcher; 58 | }; 59 | 60 | #endif // FILEWATCHER_H 61 | -------------------------------------------------------------------------------- /kernel/corelibrary/include/eventmanager.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2020 David Schedler (https://github.com/davidschedler/) 2 | * 3 | * This file is part of OpenSigange 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef EVENTMANAGER_H 20 | #define EVENTMANAGER_H 21 | 22 | #include 23 | #include 24 | #include 25 | 26 | #include "customevent.h" 27 | #include "plugininterface.h" 28 | #include "pluginmanager.h" 29 | 30 | QT_FORWARD_DECLARE_CLASS(CustomEvent); 31 | QT_FORWARD_DECLARE_CLASS(PluginManagerInterface); 32 | QT_FORWARD_DECLARE_CLASS(PluginManager); 33 | 34 | class EventManager : public QObject 35 | { 36 | Q_OBJECT 37 | 38 | public: 39 | explicit EventManager(PluginManager *pluginManager, QObject *parent = nullptr); 40 | 41 | /* event handling */ 42 | void addEvent(CustomEvent *customEvent); 43 | void subscribeEvent(QString message, PluginInterface *receiver); 44 | void subscribeEvents(QStringList messages, PluginInterface *receiver); 45 | 46 | private: 47 | /* plugin handling */ 48 | PluginManager *m_pluginManager; 49 | 50 | // Plugins can subscribe to certain MediaEvents. 51 | // This hash table holds for every message a list of plugin UUIDs, which subscribed to the message. 52 | QHash *> m_subscriptions; 53 | }; 54 | 55 | #endif // EVENTMANAGER_H 56 | -------------------------------------------------------------------------------- /plugins/downloadserver/include/downloadserver.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2020 David Schedler (https://github.com/davidschedler/) 2 | * 3 | * This file is part of OpenSigange 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef DOWNLOADSERVER_H 20 | #define DOWNLOADSERVER_H 21 | 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | 29 | #include "plugininterface.h" 30 | #include "corelibrary.h" 31 | #include "downloadserverconfig.h" 32 | #include "downloadserver_global.h" 33 | #include "ssltcpserver.h" 34 | 35 | class DOWNLOADSERVERSHARED_EXPORT DownloadServer : public PluginInterface 36 | { 37 | Q_OBJECT 38 | Q_PLUGIN_METADATA(IID "DownloadServer_iid") 39 | Q_INTERFACES(PluginInterface) 40 | 41 | public: 42 | DownloadServer(); 43 | ~DownloadServer(); 44 | 45 | /* interface implementation */ 46 | QString get(int type) const; 47 | int onInit(int type); 48 | bool onEvent(CustomEvent *customEvent); 49 | void loadSettings(); 50 | void saveSettings(); 51 | 52 | Q_SIGNALS: 53 | 54 | 55 | private Q_SLOTS: 56 | 57 | private: 58 | /* qsslsocket handling */ 59 | SslTcpServer *m_sslTcpServer; 60 | QThread *m_serverThread; 61 | 62 | /* settings */ 63 | DownloadServerConfig *m_config; 64 | }; 65 | 66 | #endif // DOWNLOADSERVER_H 67 | -------------------------------------------------------------------------------- /plugins/player/include/player.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2020 David Schedler (https://github.com/davidschedler/) 2 | * 3 | * This file is part of OpenSigange 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef PLAYER_H 20 | #define PLAYER_H 21 | 22 | #include 23 | #include 24 | 25 | #include "plugininterface.h" 26 | #include "corelibrary.h" 27 | #include "playerconfig.h" 28 | #include "player_global.h" 29 | #include "vlc/vlc.h" 30 | 31 | #define qtu( i ) ((i).toUtf8().constData()) 32 | 33 | class PLAYERSHARED_EXPORT Player : public PluginInterface 34 | { 35 | Q_OBJECT 36 | Q_PLUGIN_METADATA(IID "Player_iid") 37 | Q_INTERFACES(PluginInterface) 38 | 39 | public: 40 | Player(); 41 | ~Player(); 42 | 43 | /* interface implementation */ 44 | QString get(int type) const; 45 | int onInit(int type); 46 | bool onEvent(CustomEvent *customEvent); 47 | void loadSettings(); 48 | void saveSettings(); 49 | 50 | uint32_t getWinID() const; 51 | void setWinID(const uint32_t &winID); 52 | 53 | Q_SIGNALS: 54 | 55 | public Q_SLOTS: 56 | 57 | 58 | private Q_SLOTS: 59 | 60 | 61 | private: 62 | /* player handling */ 63 | libvlc_instance_t *vlcInstance; 64 | libvlc_media_player_t *vlcPlayer; 65 | 66 | uint32_t m_winID; 67 | 68 | /* settings */ 69 | PlayerConfig *m_config; 70 | }; 71 | 72 | #endif // PLAYER_H 73 | -------------------------------------------------------------------------------- /plugins/database/src/databaseconfig.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2020 David Schedler (https://github.com/davidschedler/) 2 | * 3 | * This file is part of OpenSigange 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #include "include/databaseconfig.h" 20 | 21 | /** 22 | * @brief DatabaseConfig::DatabaseConfig Default-Konstruktor 23 | * @param parent 24 | */ 25 | DatabaseConfig::DatabaseConfig(QObject *parent) : 26 | QObject(parent) 27 | { 28 | 29 | } 30 | 31 | /** 32 | * @brief DatabaseConfig::dbPath Hole Datenbank-Pfad 33 | * @return Datenbank-Path 34 | */ 35 | QString DatabaseConfig::dbPath() const 36 | { 37 | return m_dbPath; 38 | } 39 | 40 | /** 41 | * @brief DatabaseConfig::setDbPath Setze Datenbank-Pfad 42 | * @param dbPath Datenbank-Pfad 43 | */ 44 | void DatabaseConfig::setDbPath(const QString &dbPath) 45 | { 46 | m_dbPath = dbPath; 47 | } 48 | 49 | /** 50 | * @brief DatabaseConfig::connectionName Hole Datenbank Verbindungsname 51 | * @return Datenbank Verbindungsname 52 | */ 53 | QString DatabaseConfig::connectionName() const 54 | { 55 | return m_connectionName; 56 | } 57 | 58 | /** 59 | * @brief DatabaseConfig::setConnectionName Setze Datenbank Verbindungsname 60 | * @param connectionName Datenbank Verbindungsname 61 | */ 62 | void DatabaseConfig::setConnectionName(const QString &connectionName) 63 | { 64 | m_connectionName = connectionName; 65 | } 66 | -------------------------------------------------------------------------------- /plugins/communicationserver/src/communicationserverconfig.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2020 David Schedler (https://github.com/davidschedler/) 2 | * 3 | * This file is part of OpenSigange 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #include "include/communicationserverconfig.h" 20 | 21 | /** 22 | * @brief CommunicationServerConfig::CommunicationServerConfig Default-Konstruktor 23 | * @param parent QObject 24 | */ 25 | CommunicationServerConfig::CommunicationServerConfig(QObject *parent) : 26 | QObject(parent) 27 | { 28 | 29 | } 30 | 31 | /** 32 | * @brief CommunicationServerConfig::port Hole Port 33 | * @return Port 34 | */ 35 | quint16 CommunicationServerConfig::port() const 36 | { 37 | return m_port; 38 | } 39 | 40 | /** 41 | * @brief CommunicationServerConfig::setPort Setze Port 42 | * @param port Port 43 | */ 44 | void CommunicationServerConfig::setPort(const quint16 &port) 45 | { 46 | m_port = port; 47 | } 48 | 49 | /** 50 | * @brief CommunicationServerConfig::socketName Hole Socketname 51 | * @return Socketname 52 | */ 53 | QString CommunicationServerConfig::socketName() const 54 | { 55 | return m_socketName; 56 | } 57 | 58 | /** 59 | * @brief CommunicationServerConfig::setSocketName Setze Socketname 60 | * @param socketName Socketname 61 | */ 62 | void CommunicationServerConfig::setSocketName(const QString &socketName) 63 | { 64 | m_socketName = socketName; 65 | } 66 | -------------------------------------------------------------------------------- /kernel/corelibrary/include/corelibrary.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2020 David Schedler (https://github.com/davidschedler/) 2 | * 3 | * This file is part of OpenSigange 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef CORELIBRARY_H 20 | #define CORELIBRARY_H 21 | 22 | #define ERROR 0 23 | #define WARNING 1 24 | #define SUCCESS 2 25 | 26 | #define CORE "CORE" 27 | 28 | #include 29 | 30 | #include "customevent.h" 31 | #include "eventmanager.h" 32 | #include "plugininterface.h" 33 | #include "pluginmanager.h" 34 | #include "corelibrary_global.h" 35 | 36 | QT_FORWARD_DECLARE_CLASS(CustomEvent); 37 | 38 | class CORELIBRARYSHARED_EXPORT CoreLibrary : public QObject 39 | { 40 | Q_OBJECT 41 | 42 | friend class CustomEvent; 43 | 44 | public: 45 | explicit CoreLibrary(QString appPath, QObject *parent = nullptr); 46 | 47 | /* gerneral */ 48 | QDir getAppDir(); 49 | 50 | /* init plugins */ 51 | void initPlugins(QString pluginLocation); 52 | 53 | /* event handling */ 54 | void subscribeEvent(QString message, PluginInterface *plugin); 55 | void subscribeEvents(QStringList messages, PluginInterface *plugin); 56 | void addEvent(CustomEvent *customEvent); 57 | 58 | private: 59 | /* general */ 60 | QString m_appPath; 61 | 62 | /* corelibrary handling */ 63 | PluginManager *m_pluginManager; 64 | EventManager *m_eventManager; 65 | }; 66 | 67 | #endif // CORELIBRARY_H 68 | -------------------------------------------------------------------------------- /plugins/database/include/databasegeneral.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2020 David Schedler (https://github.com/davidschedler/) 2 | * 3 | * This file is part of OpenSigange 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef DATABASEGENERAL_H 20 | #define DATABASEGENERAL_H 21 | 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | 30 | #include 31 | 32 | class DatabaseGeneral : public QObject 33 | { 34 | Q_OBJECT 35 | public: 36 | explicit DatabaseGeneral(QObject *parent = nullptr); 37 | ~DatabaseGeneral(); 38 | 39 | int initDatabase(QString databaseName); 40 | int saveDatabaseToFile(QString fileUrl); 41 | int loadDatabaseFromFile(QString fileUrl); 42 | int importDataBase(QString fileUrl); 43 | int exportDataBase(QString fileUrl); 44 | int addDatabaseEntry(QString sqlStatement); 45 | int removeDatabaseEntry(QString sqlStatement); 46 | int createDatabaseTable(QString sqlQuery); 47 | 48 | int beginTransaction(); 49 | int commitTransaction(); 50 | int rollback(); 51 | 52 | void sqlMemoryDBLoadorSave(QSqlDatabase& memdb, const QString& filedb_path, bool load); 53 | void sqlDBCopy(QSqlDatabase& srcdb, QSqlDatabase& destdb); 54 | QSqlDatabase& getDB(); 55 | 56 | 57 | private: 58 | QSqlDatabase m_database; 59 | QString m_filename; 60 | }; 61 | 62 | #endif // DATABASEGENERAL_H 63 | -------------------------------------------------------------------------------- /kernel/corelibrary/include/plugininterface.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2020 David Schedler (https://github.com/davidschedler/) 2 | * 3 | * This file is part of OpenSigange 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef PLUGININTERFACE_H 20 | #define PLUGININTERFACE_H 21 | 22 | #define FIRSTINIT 0 23 | #define EXTENDEDINIT 1 24 | #define EXIT 2 25 | 26 | #define PID 0 27 | #define NAME 1 28 | #define PTYPE 2 29 | #define PSETTINGS 3 30 | #define VERSION 4 31 | 32 | #include 33 | #include 34 | #include 35 | #include 36 | 37 | #include "customevent.h" 38 | 39 | QT_FORWARD_DECLARE_CLASS(CoreLibrary); 40 | QT_FORWARD_DECLARE_CLASS(CustomEvent); 41 | 42 | class PluginInterface : public QObject 43 | { 44 | Q_OBJECT 45 | 46 | friend class PluginManager; 47 | 48 | public: 49 | explicit PluginInterface(); 50 | virtual ~PluginInterface(); 51 | 52 | /* to access core */ 53 | CoreLibrary *corelibrary; 54 | 55 | /* general */ 56 | QSettings *settings; 57 | 58 | /* interface functions */ 59 | virtual QString get(int type) const = 0; 60 | virtual int onInit(int type) = 0; 61 | virtual bool onEvent(CustomEvent *customEvent) = 0; 62 | virtual void loadSettings() = 0; 63 | virtual void saveSettings() = 0; 64 | 65 | /* redirect qevent to onEvent */ 66 | bool event(QEvent *customEvent); 67 | 68 | private: 69 | 70 | }; 71 | 72 | Q_DECLARE_INTERFACE(PluginInterface, "PluginInterface_iid") 73 | 74 | #endif // PLUGININTERFACE_H 75 | -------------------------------------------------------------------------------- /kernel/gui/qml/navigation/TopMenu.qml: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2020 David Schedler (https://github.com/davidschedler/) 2 | * 3 | * This file is part of OpenSigange 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | import QtQuick 2.12 20 | import QtQuick.Layouts 1.12 21 | import QtQuick.Controls 2.12 22 | 23 | Rectangle { 24 | id: topMenu 25 | 26 | height: themeManagerInstance.navigationTopMenuHeight 27 | color: themeManagerInstance.background 28 | 29 | RowLayout { 30 | anchors.fill: parent 31 | anchors.margins: 10 32 | spacing: 20 33 | 34 | Text { 35 | text: qsTr("OpenSignage - CMS") 36 | color: themeManagerInstance.fontColer 37 | font.pointSize: themeManagerInstance.fontSizeDefault 38 | font.bold: themeManagerInstance.isBold 39 | } 40 | Text { 41 | text: myEngine.ident 42 | Layout.fillWidth: true 43 | verticalAlignment: Text.AlignVCenter 44 | horizontalAlignment: Text.AlignRight 45 | Layout.alignment: Qt.AlignRight | Qt.AlignVCenter 46 | color: themeManagerInstance.fontColer 47 | font.pointSize: themeManagerInstance.fontSizeDefault 48 | font.bold: themeManagerInstance.isBold 49 | } 50 | Image { 51 | Layout.alignment: Qt.AlignRight | Qt.AlignVCenter 52 | horizontalAlignment: Image.AlignHCenter 53 | verticalAlignment: Image.AlignVCenter 54 | fillMode: Image.Pad 55 | source: "qrc:/icons/settings.png" 56 | } 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /plugins/communicationclient/include/communicationclient.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2020 David Schedler (https://github.com/davidschedler/) 2 | * 3 | * This file is part of OpenSigange 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef COMMUNICATIONCLIENT_H 20 | #define COMMUNICATIONCLIENT_H 21 | 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | 29 | 30 | #include "plugininterface.h" 31 | #include "corelibrary.h" 32 | #include "communicationclientconfig.h" 33 | #include "communicationclient_global.h" 34 | 35 | class COMMUNICATIONCLIENTSHARED_EXPORT CommunicationClient : public PluginInterface 36 | { 37 | Q_OBJECT 38 | Q_PLUGIN_METADATA(IID "CommunicationClient_iid") 39 | Q_INTERFACES(PluginInterface) 40 | 41 | public: 42 | CommunicationClient(); 43 | ~CommunicationClient(); 44 | 45 | /* interface implementation */ 46 | QString get(int type) const; 47 | int onInit(int type); 48 | bool onEvent(CustomEvent *customEvent); 49 | void loadSettings(); 50 | void saveSettings(); 51 | 52 | Q_SIGNALS: 53 | void closed(); 54 | void incommingMessage(QByteArray message); 55 | 56 | private Q_SLOTS: 57 | /* websocket handling */ 58 | void onConnected(); 59 | void onTextMessageReceived(QString message); 60 | void onBinaryMessageReceived(QByteArray message); 61 | 62 | private: 63 | /* websocket handling */ 64 | QWebSocket m_webSocket; 65 | QUrl m_url; 66 | 67 | /* settings */ 68 | CommunicationClientConfig *m_config; 69 | }; 70 | 71 | #endif // COMMUNICATIONCLIENT_H 72 | -------------------------------------------------------------------------------- /kernel/gui/qml/popup/ErrorPopup.qml: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2020 David Schedler (https://github.com/davidschedler/) 2 | * 3 | * This file is part of OpenSigange 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | import QtQuick 2.12 20 | import QtQuick.Layouts 1.12 21 | import QtQuick.Controls 2.13 22 | import QtQuick.Window 2.13 23 | 24 | Popup { 25 | id: popup 26 | padding: 75 27 | 28 | parent: Overlay.overlay 29 | 30 | x: Math.round((parent.width - width) / 2) 31 | y: Math.round((parent.height - height) / 2) 32 | 33 | property string errorMsg: "" 34 | property bool visibleButton: true 35 | 36 | function tryToOpen(msg) { 37 | if (popup.opened) 38 | popup.close() 39 | popup.open() 40 | errorMsg = msg 41 | } 42 | 43 | ColumnLayout { 44 | anchors.fill: parent 45 | spacing: 25 46 | 47 | Text { 48 | id: errorMessage 49 | text: errorMsg 50 | verticalAlignment: Text.AlignVCenter 51 | horizontalAlignment: Text.AlignHCenter 52 | Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter 53 | Layout.fillHeight: true 54 | Layout.fillWidth: true 55 | 56 | font.bold: themeManagerInstance.isBold 57 | color: themeManagerInstance.backColer 58 | font.pointSize: themeManagerInstance.fontSizeDefault 59 | 60 | } 61 | 62 | Button { 63 | id: okButton 64 | text: "Ok" 65 | visible: visibleButton 66 | Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter 67 | onClicked: popup.close() 68 | } 69 | } 70 | } 71 | 72 | -------------------------------------------------------------------------------- /kernel/gui/main.qml: -------------------------------------------------------------------------------- 1 | import QtQuick 2.12 2 | import QtQuick.Window 2.12 3 | import QtQuick.Layouts 1.12 4 | import QtQuick.Controls 2.12 5 | 6 | import "qml/" 7 | import "qml/navigation" 8 | import "qml/popup" 9 | 10 | Window { 11 | id: openSignage 12 | visible: true 13 | width: 1600 14 | height: 960 15 | title: qsTr("OpenSignage - CMS") 16 | 17 | ErrorPopup { 18 | id: error 19 | errorMsg: "Websocket kann keine Verbindung herstellen!" 20 | visibleButton: false 21 | modal: true 22 | closePolicy: Popup.NoAutoClose 23 | } 24 | 25 | Connections { 26 | target: myEngine 27 | onIsWebsocketConnectedChanged: { (isWebsocketConnected) ? error.close() : error.open() 28 | } 29 | } 30 | 31 | ThemeManager { id: themeManagerInstance } 32 | 33 | Rectangle { 34 | anchors.fill: parent 35 | color: themeManagerInstance.foreground 36 | } 37 | 38 | Rectangle { 39 | id: wrapper 40 | color: themeManagerInstance.foreground 41 | anchors.fill: parent 42 | visible: !myEngine.isAuthenticated 43 | LoginPage { 44 | id: loginPage 45 | height: 400 46 | width: 500 47 | anchors.centerIn: parent 48 | 49 | } 50 | } 51 | 52 | ColumnLayout { 53 | id: mainLayout 54 | anchors.fill: parent 55 | visible: myEngine.isAuthenticated 56 | spacing: 0 57 | 58 | TopMenu { 59 | id: menuBarInstance 60 | Layout.fillWidth: true 61 | Layout.preferredHeight: 50 62 | } 63 | 64 | RowLayout { 65 | Layout.fillWidth: true 66 | Layout.fillHeight: true 67 | spacing: 0 68 | 69 | NavigationMenu { 70 | id: navigationMenuInstance 71 | Layout.preferredWidth: 300 72 | Layout.fillHeight: true 73 | } 74 | Loader { 75 | id: loader 76 | source: "qrc:/qml/dashboard/Dashboard.qml" 77 | Layout.fillWidth: true 78 | Layout.fillHeight: true 79 | Layout.margins: 25 80 | } 81 | } 82 | } 83 | } 84 | 85 | /*##^## Designer { 86 | D{i:0;autoSize:true;height:480;width:640} 87 | } 88 | ##^##*/ 89 | -------------------------------------------------------------------------------- /kernel/raspberry/main.qml: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2020 David Schedler (https://github.com/davidschedler/) 2 | * 3 | * This file is part of OpenSigange 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | import QtQuick 2.11 20 | import QtQuick.Window 2.11 21 | import QtQuick.Layouts 1.11 22 | import QtQuick.Controls 2.4 23 | 24 | 25 | Window { 26 | id: openSignageMainWindow 27 | visible: true 28 | width: Screen.width 29 | height: Screen.height 30 | flags: Qt.FramelessWindowHint 31 | title: qsTr("OpenSignage - Raspberry") 32 | 33 | Connections { 34 | target: myManager 35 | onCurrentPictureChanged: { 36 | showCurrentPicture.source = "file://" + currentPicture 37 | } 38 | } 39 | Connections { 40 | target: myManager 41 | onCurrentVideoChanged: { 42 | movieIsPlaying.text = currentVideo 43 | } 44 | } 45 | 46 | Image { 47 | id: showCurrentPicture 48 | anchors.fill: parent 49 | source: "" 50 | } 51 | 52 | // Text { 53 | // id: movieIsPlaying 54 | // x: 100 55 | // y: 100 56 | // width: 500 57 | // color: "#3dff16" 58 | // text: "" 59 | // font.pointSize: 22 60 | // } 61 | 62 | // Button { 63 | // id: button 64 | // z: 5 65 | // x: 150 66 | // y: 150 67 | // width: 100 68 | // height: 80 69 | // text: qsTr("Button") 70 | // onClicked: myManager.requestPlaylistFromMac(); 71 | // } 72 | 73 | // Button { 74 | // id: button2 75 | // x: 159 76 | // y: 400 77 | // width: 100 78 | // height: 142 79 | // text: qsTr("Button") 80 | // onClicked: myManager.checkThis(); 81 | // } 82 | } 83 | -------------------------------------------------------------------------------- /plugins/downloadclient/include/downloadclient.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2020 David Schedler (https://github.com/davidschedler/) 2 | * 3 | * This file is part of OpenSigange 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef DOWNLOADCLIENT_H 20 | #define DOWNLOADCLIENT_H 21 | 22 | #include 23 | #include 24 | #include 25 | #include 26 | 27 | #include "plugininterface.h" 28 | #include "corelibrary.h" 29 | #include "downloadclientconfig.h" 30 | #include "downloadclient_global.h" 31 | 32 | class DOWNLOADCLIENTSHARED_EXPORT DownloadClient : public PluginInterface 33 | { 34 | Q_OBJECT 35 | Q_PLUGIN_METADATA(IID "DownloadClient_iid") 36 | Q_INTERFACES(PluginInterface) 37 | 38 | public: 39 | DownloadClient(); 40 | ~DownloadClient(); 41 | 42 | /* interface implementation */ 43 | QString get(int type) const; 44 | int onInit(int type); 45 | bool onEvent(CustomEvent *customEvent); 46 | void loadSettings(); 47 | void saveSettings(); 48 | 49 | Q_SIGNALS: 50 | void downloadCompleted(QString fileName); 51 | void downloadError(QString fileName); 52 | 53 | public Q_SLOTS: 54 | void downloadPlaylistItem(QString fileName, QString url); 55 | 56 | private Q_SLOTS: 57 | void slotReadyRead(); 58 | void slotRequestFinished(QNetworkReply* reply); 59 | void slotError(QNetworkReply::NetworkError err); 60 | void slotSslErrors(QList sslErr); 61 | 62 | private: 63 | /* qsslsocket handling */ 64 | QNetworkAccessManager *m_networkManager; 65 | QNetworkReply *m_reply; 66 | QFile m_file; 67 | QString m_fileName; 68 | QString m_md5; 69 | 70 | /* settings */ 71 | DownloadClientConfig *m_config; 72 | }; 73 | 74 | #endif // DOWNLOADCLIENT_H 75 | -------------------------------------------------------------------------------- /kernel/gui/qml/popup/FreeAndUsedPlaylist.qml: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2020 David Schedler (https://github.com/davidschedler/) 2 | * 3 | * This file is part of OpenSigange 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | import QtQuick 2.12 20 | import QtQuick.Layouts 1.12 21 | import QtQuick.Controls 2.12 22 | import QtQuick.Window 2.12 23 | 24 | ListView { 25 | id: freeClientsListView 26 | Layout.fillWidth: true 27 | Layout.fillHeight: true 28 | model: freeClientsModel 29 | clip: true 30 | header: Rectangle { 31 | height: 30 32 | width: parent.width 33 | color: themeManagerInstance.blue 34 | Text { 35 | text: "Free Clients" 36 | anchors.centerIn: parent 37 | font.bold: themeManagerInstance.isBold 38 | color: themeManagerInstance.fontColer 39 | font.pointSize: themeManagerInstance.fontSizeDefault 40 | } 41 | } 42 | 43 | delegate: Component { 44 | id: contactDelegate 45 | Rectangle { 46 | width: parent.width 47 | height: 30 48 | color: ListView.isCurrentItem ? "grey" : "lightgrey" 49 | Column { 50 | id: column 51 | Text { 52 | text: modelData 53 | verticalAlignment: Text.AlignVCenter 54 | clip: true 55 | } 56 | } 57 | MouseArea { 58 | anchors.fill: parent 59 | onClicked: { 60 | console.log(freeClientsListView.currentIndex) 61 | if (freeClientsListView.currentIndex !== index) 62 | freeClientsListView.currentIndex = index 63 | } 64 | } 65 | } 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /plugins/communicationserver/include/communicationserver.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2020 David Schedler (https://github.com/davidschedler/) 2 | * 3 | * This file is part of OpenSigange 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef COMMUNICATIONSERVER_H 20 | #define COMMUNICATIONSERVER_H 21 | 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | 29 | 30 | #include "plugininterface.h" 31 | #include "corelibrary.h" 32 | #include "communicationserverconfig.h" 33 | #include "communicationserver_global.h" 34 | 35 | QT_FORWARD_DECLARE_CLASS(QWebSocketServer) 36 | QT_FORWARD_DECLARE_CLASS(QWebSocket) 37 | 38 | class COMMUNICATIONSERVERSHARED_EXPORT CommunicationServer : public PluginInterface 39 | { 40 | Q_OBJECT 41 | Q_PLUGIN_METADATA(IID "Communication_iid") 42 | Q_INTERFACES(PluginInterface) 43 | 44 | public: 45 | CommunicationServer(); 46 | ~CommunicationServer(); 47 | 48 | /* interface implementation */ 49 | QString get(int type) const; 50 | int onInit(int type); 51 | bool onEvent(CustomEvent *customEvent); 52 | void loadSettings(); 53 | void saveSettings(); 54 | 55 | Q_SIGNALS: 56 | /* websocket signals */ 57 | void closed(); 58 | 59 | private Q_SLOTS: 60 | /* websocket slots */ 61 | void onNewConnection(); 62 | void processTextMessage(QString message); 63 | void processBinaryMessage(QByteArray message); 64 | void socketDisconnected(); 65 | 66 | /* helper functions */ 67 | QWebSocket* findWebSocket(QString mac); 68 | QByteArray generateByteMessage(QString command, QString type, QString data = ""); 69 | 70 | 71 | private: 72 | /* websocket handling */ 73 | QWebSocketServer *m_webSocketServer; 74 | QList m_clients; 75 | 76 | /* settings */ 77 | CommunicationServerConfig *m_config; 78 | }; 79 | 80 | #endif // COMMUNICATIONSERVER_H 81 | -------------------------------------------------------------------------------- /kernel/gui/qml/hardwareverwaltung/HardwareListViewHeader.qml: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2020 David Schedler (https://github.com/davidschedler/) 2 | * 3 | * This file is part of OpenSigange 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | import QtQuick 2.13 20 | import QtQuick.Layouts 1.12 21 | import QtQuick.Controls 2.13 22 | 23 | Rectangle { 24 | width: parent.width 25 | z: 3 26 | height: themeManagerInstance.groupMenuHeight 27 | color: themeManagerInstance.blue 28 | 29 | RowLayout { 30 | anchors.fill: parent 31 | anchors.margins: 5 32 | spacing: 0 33 | Text { 34 | text: "MAC" 35 | Layout.fillHeight: true 36 | Layout.preferredWidth: 200 37 | verticalAlignment: Text.AlignVCenter 38 | 39 | font.bold: themeManagerInstance.isBold 40 | color: themeManagerInstance.fontColer 41 | font.pointSize: themeManagerInstance.fontSizeDefault 42 | } 43 | Text { 44 | text: "Location" 45 | Layout.fillHeight: true 46 | Layout.preferredWidth: 200 47 | verticalAlignment: Text.AlignVCenter 48 | 49 | font.bold: themeManagerInstance.isBold 50 | color: themeManagerInstance.fontColer 51 | font.pointSize: themeManagerInstance.fontSizeDefault 52 | } 53 | Text { 54 | text: "Version" 55 | Layout.fillHeight: true 56 | Layout.preferredWidth: 200 57 | verticalAlignment: Text.AlignVCenter 58 | 59 | font.bold: themeManagerInstance.isBold 60 | color: themeManagerInstance.fontColer 61 | font.pointSize: themeManagerInstance.fontSizeDefault 62 | } 63 | Text { 64 | text: "Group" 65 | Layout.fillHeight: true 66 | Layout.preferredWidth: 200 67 | verticalAlignment: Text.AlignVCenter 68 | 69 | font.bold: themeManagerInstance.isBold 70 | color: themeManagerInstance.fontColer 71 | font.pointSize: themeManagerInstance.fontSizeDefault 72 | } 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /kernel/corelibrary/src/corelibrary.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2020 David Schedler (https://github.com/davidschedler/) 2 | * 3 | * This file is part of OpenSigange 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #include "corelibrary.h" 20 | 21 | /** 22 | * @brief CoreLibrary::CoreLibrary Default-Konstruktor 23 | * @param appPath Programmpfad 24 | * @param parent QObject 25 | */ 26 | CoreLibrary::CoreLibrary(QString appPath, QObject *parent) : 27 | QObject (parent), 28 | m_appPath(appPath), 29 | m_pluginManager(new PluginManager(this)), 30 | m_eventManager(new EventManager(m_pluginManager)) 31 | { 32 | 33 | } 34 | 35 | /** 36 | * @brief CoreLibrary::getAppDir Hole Programmpfad 37 | * @return Programmpfad 38 | */ 39 | QDir CoreLibrary::getAppDir() 40 | { 41 | return m_appPath; 42 | } 43 | 44 | /** 45 | * @brief CoreLibrary::initPlugins PluginManager lade Plugin 46 | * @param pluginLocation Pluginpfad 47 | */ 48 | void CoreLibrary::initPlugins(QString pluginLocation) 49 | { 50 | m_pluginManager->loadAllPlugins(pluginLocation); 51 | } 52 | 53 | /** 54 | * @brief CoreLibrary::subscribeEvent Plugin abonniert Thema (Command) 55 | * @param message Thema (Command) 56 | * @param plugin Plugin, welches ein Thema abonnieren möchte 57 | */ 58 | void CoreLibrary::subscribeEvent(QString message, PluginInterface *plugin) 59 | { 60 | m_eventManager->subscribeEvent(message, plugin); 61 | } 62 | 63 | /** 64 | * @brief CoreLibrary::subscribeEvents Plugin abonniert Themen (Commands) 65 | * @param messages Themen (Commands) 66 | * @param plugin Plugins, welches Themen abonnieren möchte 67 | */ 68 | void CoreLibrary::subscribeEvents(QStringList messages, PluginInterface *plugin) 69 | { 70 | QString message; 71 | foreach (message, messages) 72 | { 73 | m_eventManager->subscribeEvent(message, plugin); 74 | } 75 | } 76 | 77 | /** 78 | * @brief CoreLibrary::addEvent EventManager füge Benutzerdefiniertes Event der Eventloop hinzu. 79 | * @param customEvent Benutzerdefiniertes Event 80 | */ 81 | void CoreLibrary::addEvent(CustomEvent *customEvent) 82 | { 83 | m_eventManager->addEvent(customEvent); 84 | } 85 | -------------------------------------------------------------------------------- /kernel/gui/include/users.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2020 David Schedler (https://github.com/davidschedler/) 2 | * 3 | * This file is part of OpenSigange 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef USERS_H 20 | #define USERS_H 21 | 22 | #include 23 | 24 | class Users : public QObject 25 | { 26 | Q_OBJECT 27 | Q_PROPERTY(int id READ id WRITE setId NOTIFY idChanged) 28 | Q_PROPERTY(QString firstName READ firstName WRITE setFirstName NOTIFY firstNameChanged) 29 | Q_PROPERTY(QString lastName READ lastName WRITE setLastName NOTIFY lastNameChanged) 30 | Q_PROPERTY(QString groupName READ groupName WRITE setGroupName NOTIFY groupNameChanged) 31 | Q_PROPERTY(QString groupType READ groupType WRITE setGroupType NOTIFY groupTypeChanged) 32 | Q_PROPERTY(QString eMail READ eMail WRITE setEMail NOTIFY eMailChanged) 33 | 34 | private: 35 | int m_id; 36 | QString m_firstName; 37 | QString m_lastName; 38 | QString m_groupName; 39 | QString m_groupType; 40 | QString m_eMail; 41 | 42 | public: 43 | Users(QObject *parent = nullptr); 44 | Users(int id, QString firstName, QString lastName, QString groupName, 45 | QString groupType, QString eMail, QObject *parent = nullptr); 46 | ~Users(); 47 | 48 | int id() const { return m_id; } 49 | QString firstName() const { return m_firstName; } 50 | QString lastName() const { return m_lastName; } 51 | QString groupName() const { return m_groupName; } 52 | QString groupType() const { return m_groupType; } 53 | QString eMail() const { return m_eMail; } 54 | 55 | signals: 56 | void idChanged(int id); 57 | void firstNameChanged(QString firstName); 58 | void lastNameChanged(QString lastName); 59 | void groupNameChanged(QString groupName); 60 | void groupTypeChanged(QString groupType); 61 | void eMailChanged(QString eMail); 62 | 63 | public slots: 64 | void setId(int id); 65 | void setFirstName(QString firstName); 66 | void setLastName(QString lastName); 67 | void setGroupName(QString groupName); 68 | void setGroupType(QString groupType); 69 | void setEMail(QString eMail); 70 | }; 71 | 72 | #endif // USERS_H 73 | -------------------------------------------------------------------------------- /kernel/gui/qml.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | main.qml 4 | qml/ThemeManager.qml 5 | qml/navigation/TopMenu.qml 6 | icons/home.png 7 | icons/menu.png 8 | icons/settings.png 9 | qml/navigation/NavigationMenu.qml 10 | qml/dashboard/Dashboard.qml 11 | qml/contentverwaltung/ContentVerwaltung.qml 12 | qml/hardwareverwaltung/HardwareVerwaltung.qml 13 | qml/navigation/NavigationMenuModel.qml 14 | qml/navigation/NavigationMenuDelegate.qml 15 | qml/dashboard/DashboardQuickPanel.qml 16 | qml/dashboard/DashboardActivityPanel.qml 17 | qml/dashboard/DashboardQuickItem.qml 18 | qml/accountverwaltung/AccountVerwaltung.qml 19 | qml/playlistenverwaltung/PlaylistenVerwaltung.qml 20 | qml/accountverwaltung/GroupListViewDelegate.qml 21 | qml/accountverwaltung/GroupListViewHeader.qml 22 | qml/accountverwaltung/UserListViewHeader.qml 23 | qml/accountverwaltung/UserListViewDelegate.qml 24 | qml/hardwareverwaltung/HardwareListViewDelegate.qml 25 | qml/hardwareverwaltung/HardwareListViewHeader.qml 26 | qml/popup/ActionPopup.qml 27 | qml/playlistenverwaltung/PlaylistenListView.qml 28 | qml/playlistenverwaltung/PlanningListView.qml 29 | qml/playlistenverwaltung/PlaylistenListViewHeader.qml 30 | qml/playlistenverwaltung/PlaylistenListViewDelegate.qml 31 | qml/playlistenverwaltung/PlanningListViewHeader.qml 32 | qml/playlistenverwaltung/PlanningListViewDelegate.qml 33 | qml/LoginPage.qml 34 | qml/popup/ErrorPopup.qml 35 | qml/contentverwaltung/ContentListViewDelegate.qml 36 | qml/contentverwaltung/ContentListViewHeader.qml 37 | icons/back.arrow.png 38 | qml/popup/ListViewMenuPopup.qml 39 | icons/add.plus.png 40 | qml/popup/FreeAndUsedPlaylist.qml 41 | icons/arrow.toleft.png 42 | icons/arrow.toright.png 43 | qml/popup/MyButton.qml 44 | icons/account.png 45 | icons/clients.png 46 | icons/content.png 47 | icons/playlist.png 48 | icons/arrow.todown.png 49 | icons/arrow.toup.png 50 | 51 | 52 | -------------------------------------------------------------------------------- /kernel/gui/qml/accountverwaltung/UserListViewHeader.qml: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2020 David Schedler (https://github.com/davidschedler/) 2 | * 3 | * This file is part of OpenSigange 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | import QtQuick 2.13 20 | import QtQuick.Layouts 1.12 21 | import QtQuick.Controls 2.13 22 | 23 | import "./../popup/" 24 | 25 | Rectangle { 26 | width: parent.width 27 | z: 3 28 | height: themeManagerInstance.groupMenuHeight 29 | color: themeManagerInstance.blue 30 | 31 | RowLayout { 32 | anchors.fill: parent 33 | anchors.margins: 5 34 | spacing: 0 35 | Text { 36 | text: "ID" 37 | Layout.fillHeight: true 38 | Layout.preferredWidth: 50 39 | Layout.minimumWidth: 50 40 | Layout.maximumWidth: 50 41 | verticalAlignment: Text.AlignVCenter 42 | 43 | font.bold: themeManagerInstance.isBold 44 | color: themeManagerInstance.fontColer 45 | font.pointSize: themeManagerInstance.fontSizeDefault 46 | } 47 | Text { 48 | text: "First-Name" 49 | Layout.fillHeight: true 50 | Layout.preferredWidth: 350 51 | verticalAlignment: Text.AlignVCenter 52 | 53 | font.bold: themeManagerInstance.isBold 54 | color: themeManagerInstance.fontColer 55 | font.pointSize: themeManagerInstance.fontSizeDefault 56 | } 57 | Text { 58 | text: "Last-Name" 59 | Layout.fillHeight: true 60 | Layout.preferredWidth: 350 61 | verticalAlignment: Text.AlignVCenter 62 | 63 | font.bold: themeManagerInstance.isBold 64 | color: themeManagerInstance.fontColer 65 | font.pointSize: themeManagerInstance.fontSizeDefault 66 | } 67 | Text { 68 | text: "e-Mail" 69 | Layout.fillHeight: true 70 | Layout.fillWidth: true 71 | verticalAlignment: Text.AlignVCenter 72 | 73 | font.bold: themeManagerInstance.isBold 74 | color: themeManagerInstance.fontColer 75 | font.pointSize: themeManagerInstance.fontSizeDefault 76 | } 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /kernel/gui/include/hardware.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2020 David Schedler (https://github.com/davidschedler/) 2 | * 3 | * This file is part of OpenSigange 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef HARDWARE_H 20 | #define HARDWARE_H 21 | 22 | #include 23 | 24 | class Hardware : public QObject 25 | { 26 | Q_OBJECT 27 | Q_PROPERTY(QString mac READ mac WRITE setMac NOTIFY macChanged) 28 | Q_PROPERTY(QString groupName READ groupName WRITE setGroupName NOTIFY groupNameChanged) 29 | Q_PROPERTY(QString groupType READ groupType WRITE setGroupType NOTIFY groupTypeChanged) 30 | Q_PROPERTY(QString location READ location WRITE setLocation NOTIFY locationChanged) 31 | Q_PROPERTY(QString version READ version WRITE setVersion NOTIFY versionChanged) 32 | Q_PROPERTY(int planedonPlaylist READ planedonPlaylist WRITE setPlanedonPlaylist NOTIFY planedonPlaylistChanged) 33 | 34 | private: 35 | QString m_mac; 36 | QString m_groupName; 37 | QString m_groupType; 38 | QString m_location; 39 | QString m_version; 40 | int m_planedonPlaylist; 41 | 42 | public: 43 | Hardware(QObject *parent = nullptr); 44 | Hardware(QString mac, QString groupName, QString groupType, QString location, QString version, int planedonPlaylist, QObject *parent = nullptr); 45 | ~Hardware(); 46 | 47 | QString mac() const { return m_mac; } 48 | QString groupName() const { return m_groupName; } 49 | QString groupType() const { return m_groupType; } 50 | QString location() const { return m_location; } 51 | QString version() const { return m_version; } 52 | int planedonPlaylist() const { return m_planedonPlaylist; } 53 | 54 | signals: 55 | void macChanged(QString mac); 56 | void groupNameChanged(QString groupName); 57 | void groupTypeChanged(QString groupType); 58 | void locationChanged(QString location); 59 | void versionChanged(QString version); 60 | void planedonPlaylistChanged(int planedonPlaylist); 61 | 62 | public slots: 63 | void setMac(QString mac); 64 | void setGroupName(QString groupName); 65 | void setGroupType(QString groupType); 66 | void setLocation(QString location); 67 | void setVersion(QString version); 68 | void setPlanedonPlaylist(int planedonPlaylist); 69 | }; 70 | 71 | #endif // HARDWARE_H 72 | -------------------------------------------------------------------------------- /kernel/corelibrary/src/eventmanager.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2020 David Schedler (https://github.com/davidschedler/) 2 | * 3 | * This file is part of OpenSigange 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #include "eventmanager.h" 20 | 21 | /** 22 | * @brief EventManager::EventManager Default-Konstruktor 23 | * @param pluginManager Pointer auf den PluginManger 24 | * @param parent QObject 25 | */ 26 | EventManager::EventManager(PluginManager *pluginManager, QObject *parent) : 27 | QObject(parent), 28 | m_pluginManager(pluginManager) 29 | { 30 | 31 | } 32 | 33 | /** 34 | * @brief EventManager::addEvent Füge Event der Eventloop hinzu 35 | * @param customEvent Benutzerdefiniertes Event 36 | */ 37 | void EventManager::addEvent(CustomEvent *customEvent) 38 | { 39 | PluginInterface *sender = nullptr; 40 | QString senderName = "unknown"; 41 | 42 | sender = m_pluginManager->getPlugin(customEvent->getCustomEvent(SENDER)); 43 | if (sender) 44 | senderName = sender->get(NAME); 45 | 46 | QList receivers; 47 | QList *list = m_subscriptions.value(customEvent->getCustomEvent(COMMAND)); 48 | if (list) 49 | { 50 | PluginInterface *plugin = nullptr; 51 | foreach (plugin, *list) 52 | { 53 | CustomEvent *task = new CustomEvent(*customEvent); 54 | QCoreApplication::postEvent((QObject*)plugin, task); 55 | receivers << plugin; 56 | } 57 | } 58 | } 59 | 60 | /** 61 | * @brief EventManager::subscribeEvent Füge Empfänger für Abonnement hinzu 62 | * @param message Thema (Command) 63 | * @param receiver Plugin, welches Thema abonnieren möchte 64 | */ 65 | void EventManager::subscribeEvent(QString message, PluginInterface *receiver) 66 | { 67 | if (!m_subscriptions.contains(message)) 68 | m_subscriptions.insert(message, new QList()); 69 | 70 | m_subscriptions.value(message)->append(receiver); 71 | } 72 | 73 | /** 74 | * @brief EventManager::subscribeEvents Füge Empfänger für Abonnement hinzu 75 | * @param messages Themen (Commands) 76 | * @param receiver Plguins, welches Themen abonnieren möchten 77 | */ 78 | void EventManager::subscribeEvents(QStringList messages, PluginInterface *receiver) 79 | { 80 | QString message; 81 | foreach (message, messages) 82 | { 83 | subscribeEvent(message, receiver); 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /kernel/gui/include/groups.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2020 David Schedler (https://github.com/davidschedler/) 2 | * 3 | * This file is part of OpenSigange 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef GROUPS_H 20 | #define GROUPS_H 21 | 22 | #include 23 | #include "users.h" 24 | 25 | class Groups : public QObject 26 | { 27 | Q_OBJECT 28 | Q_PROPERTY(int id READ id WRITE setId NOTIFY idChanged) 29 | Q_PROPERTY(QString groupName READ groupName WRITE setGroupName NOTIFY groupNameChanged) 30 | Q_PROPERTY(QString groupType READ groupType WRITE setGroupType NOTIFY groupTypeChanged) 31 | Q_PROPERTY(int userInGroup READ userInGroup WRITE setUserInGroup NOTIFY userInGroupChanged) 32 | Q_PROPERTY(QList usersList READ usersList WRITE setUsersList NOTIFY usersListChanged) 33 | Q_PROPERTY(int id_grouptype READ id_grouptype WRITE setId_grouptype NOTIFY id_grouptypeChanged) 34 | 35 | private: 36 | int m_id; 37 | QString m_groupName; 38 | QString m_groupType; 39 | int m_userInGroup; 40 | QList m_usersList; 41 | int m_id_grouptype; 42 | 43 | public: 44 | Groups(QObject *parent = nullptr); 45 | Groups(int id, QString groupName, QString groupType, int id_groupType, QObject *parent = nullptr); 46 | ~Groups(); 47 | 48 | int id() const { return m_id; } 49 | QString groupName() const { return m_groupName; } 50 | QString groupType() const { return m_groupType; } 51 | int userInGroup() const { return m_usersList.count(); } 52 | QList usersList() const { return m_usersList; } 53 | int id_grouptype() const { return m_id_grouptype; } 54 | 55 | /* helper functions */ 56 | Users* getUserById(int id); 57 | void addUser(Users *addUser); 58 | void deleteUser(int idx); 59 | void clearUserList(); 60 | 61 | signals: 62 | void idChanged(int id); 63 | void groupNameChanged(QString groupName); 64 | void groupTypeChanged(QString groupType); 65 | void userInGroupChanged(int userInGroup); 66 | void usersListChanged(QList usersList); 67 | void id_grouptypeChanged(int id_grouptype); 68 | 69 | public slots: 70 | void setId(int id); 71 | void setGroupName(QString groupName); 72 | void setGroupType(QString groupType); 73 | void setUserInGroup(int userInGroup); 74 | void setUsersList(QList usersList); 75 | void setId_grouptype(int id_grouptype); 76 | }; 77 | 78 | #endif // GROUPS_H 79 | -------------------------------------------------------------------------------- /kernel/gui/qml/dashboard/DashboardQuickItem.qml: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2020 David Schedler (https://github.com/davidschedler/) 2 | * 3 | * This file is part of OpenSigange 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | import QtQuick 2.13 20 | import QtQuick.Layouts 1.12 21 | import QtQuick.Controls 2.13 22 | 23 | Rectangle { 24 | id: dashboardQuickItem 25 | 26 | property string backgroundColor: "green" 27 | property string icon: "" 28 | property string numberString: "" 29 | property string textString: "" 30 | 31 | color: themeManagerInstance.blue 32 | radius: 5 33 | 34 | RowLayout { 35 | anchors.fill: parent 36 | anchors.margins: 10 37 | 38 | Image { 39 | Layout.preferredHeight: 64 40 | Layout.preferredWidth: 64 41 | Layout.alignment: Qt.AlignRight | Qt.AlignVCenter 42 | horizontalAlignment: Image.AlignHCenter 43 | verticalAlignment: Image.AlignVCenter 44 | sourceSize.width: 64 45 | sourceSize.height: 64 46 | fillMode: Image.Stretch 47 | source: icon 48 | } 49 | 50 | ColumnLayout { 51 | Layout.fillWidth: true 52 | Layout.fillHeight: true 53 | 54 | Text { 55 | Layout.fillWidth: true 56 | Layout.fillHeight: true 57 | verticalAlignment: Text.AlignVCenter 58 | horizontalAlignment: Text.AlignRight 59 | text: numberString 60 | Layout.alignment: Qt.AlignRight | Qt.AlignVCenter 61 | 62 | font.bold: themeManagerInstance.isBold 63 | color: themeManagerInstance.fontColer 64 | font.pixelSize: themeManagerInstance.fontSizeExtraExtraBig 65 | } 66 | Text { 67 | Layout.fillWidth: true 68 | Layout.fillHeight: true 69 | verticalAlignment: Text.AlignVCenter 70 | horizontalAlignment: Text.AlignRight 71 | text: textString 72 | Layout.alignment: Qt.AlignRight | Qt.AlignVCenter 73 | 74 | font.bold: themeManagerInstance.isBold 75 | color: themeManagerInstance.fontColer 76 | font.pixelSize: themeManagerInstance.fontSizeExtraBig 77 | } 78 | } 79 | } 80 | 81 | MouseArea { 82 | onClicked: { 83 | 84 | } 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /kernel/gui/qml/playlistenverwaltung/PlaylistenVerwaltung.qml: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2020 David Schedler (https://github.com/davidschedler/) 2 | * 3 | * This file is part of OpenSigange 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | import QtQuick 2.13 20 | import QtQuick.Layouts 1.12 21 | import QtQuick.Controls 2.13 22 | import QtQuick.Window 2.13 23 | import "./../" 24 | import "./../popup/" 25 | import "./../contentverwaltung/" 26 | 27 | ColumnLayout { 28 | id: accountVerwaltung 29 | spacing: 20 30 | 31 | Connections { 32 | id: chooser 33 | target: myEngine 34 | onNextStackItemChanged: { 35 | if (nextStackItem == "Playlist") { 36 | stackview.pop("PlanningListView.qml") 37 | } 38 | if (nextStackItem == "Planning") { 39 | stackview.push("PlanningListView.qml") 40 | } 41 | if (nextStackItem == "Content_PUSH") { 42 | stackview.push("qrc:/qml/contentverwaltung/ContentVerwaltung.qml") 43 | } 44 | if (nextStackItem == "Content_POP") { 45 | stackview.pop("qrc:/qml/contentverwaltung/ContentVerwaltung.qml") 46 | } 47 | if (nextStackItem == "Default") { 48 | stackview.pop("qrc:/qml/contentverwaltung/ContentVerwaltung.qml") 49 | stackview.pop("PlanningListView.qml") 50 | } 51 | } 52 | } 53 | StackView { 54 | id: stackview 55 | Layout.fillHeight: true 56 | Layout.fillWidth: true 57 | initialItem: PlaylistenListView {} 58 | 59 | pushEnter: Transition { 60 | PropertyAnimation { 61 | property: "opacity" 62 | from: 0 63 | to:1 64 | duration: 100 65 | } 66 | } 67 | pushExit: Transition { 68 | PropertyAnimation { 69 | property: "opacity" 70 | from: 1 71 | to:0 72 | duration:100 73 | } 74 | } 75 | popEnter: Transition { 76 | PropertyAnimation { 77 | property: "opacity" 78 | from: 0 79 | to:1 80 | duration: 100 81 | } 82 | } 83 | popExit: Transition { 84 | PropertyAnimation { 85 | property: "opacity" 86 | from: 1 87 | to:0 88 | duration: 100 89 | } 90 | } 91 | } 92 | } 93 | 94 | -------------------------------------------------------------------------------- /kernel/gui/include/content.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2020 David Schedler (https://github.com/davidschedler/) 2 | * 3 | * This file is part of OpenSigange 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef CONTENT_H 20 | #define CONTENT_H 21 | 22 | #include 23 | 24 | class Content : public QObject 25 | { 26 | Q_OBJECT 27 | Q_PROPERTY(int id READ id WRITE setId NOTIFY idChanged) 28 | Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged) 29 | Q_PROPERTY(QString md5 READ md5 WRITE setMd5 NOTIFY md5Changed) 30 | Q_PROPERTY(QString filePath READ filePath WRITE setFilePath NOTIFY filePathChanged) 31 | Q_PROPERTY(QString fileType READ fileType WRITE setFileType NOTIFY fileTypeChanged) 32 | Q_PROPERTY(QString reso READ reso WRITE setReso NOTIFY resoChanged) 33 | Q_PROPERTY(QString size READ size WRITE setSize NOTIFY sizeChanged) 34 | Q_PROPERTY(QString time READ time WRITE setTime NOTIFY timeChanged) 35 | 36 | private: 37 | int m_id; 38 | QString m_name; 39 | QString m_md5; 40 | QString m_filePath; 41 | QString m_fileType; 42 | QString m_reso; 43 | QString m_size; 44 | QString m_time; 45 | 46 | public: 47 | Content(QObject *parent = nullptr); 48 | Content(int id, QString name, QString md5, QString filePath, QString fileType, 49 | QString reso, QString size, QString time, QObject *parent = nullptr); 50 | 51 | int id() const { return m_id; } 52 | QString name() const { return m_name; } 53 | QString md5() const { return m_md5; } 54 | QString filePath() const { return m_filePath; } 55 | QString fileType() const { return m_fileType; } 56 | QString reso() const { return m_reso; } 57 | QString size() const { return m_size; } 58 | QString time() const { return m_time; } 59 | 60 | /* helper functions */ 61 | int getTimeAsDurationInMS(); 62 | 63 | signals: 64 | void idChanged(int id); 65 | void nameChanged(QString name); 66 | void md5Changed(QString md5); 67 | void filePathChanged(QString filePath); 68 | void fileTypeChanged(QString fileType); 69 | void resoChanged(QString reso); 70 | void sizeChanged(QString size); 71 | void timeChanged(QString time); 72 | 73 | public slots: 74 | void setId(int id); 75 | void setName(QString name); 76 | void setMd5(QString md5); 77 | void setFilePath(QString filePath); 78 | void setFileType(QString fileType); 79 | void setReso(QString reso); 80 | void setSize(QString size); 81 | void setTime(QString time); 82 | }; 83 | 84 | #endif // CONTENT_H 85 | -------------------------------------------------------------------------------- /plugins/downloadserver/src/ssltcpserver.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2020 David Schedler (https://github.com/davidschedler/) 2 | * 3 | * This file is part of OpenSigange 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #include "include/ssltcpserver.h" 20 | #include 21 | #include 22 | 23 | SslTcpServer::SslTcpServer(QObject *parent) : 24 | QTcpServer(parent) 25 | { 26 | 27 | } 28 | 29 | void SslTcpServer::process() 30 | { 31 | QFile keyFile("/home/david/Downloads/QSslSocket-example-master/certificates/red_local.key"); 32 | keyFile.open(QIODevice::ReadOnly); 33 | key = QSslKey(keyFile.readAll(), QSsl::Rsa); 34 | keyFile.close(); 35 | 36 | QFile certFile("/home/david/Downloads/QSslSocket-example-master/certificates/red_local.pem"); 37 | certFile.open(QIODevice::ReadOnly); 38 | cert = QSslCertificate(certFile.readAll()); 39 | certFile.close(); 40 | 41 | if (!listen(QHostAddress("127.0.0.1"), 12345)) { // FQDN in red_local.pem is set to 127.0.0.1. If you change this, it will not authenticate. 42 | qCritical() << "Unable to start the TCP server"; 43 | //exit(0); 44 | } 45 | else { 46 | qInfo("\"TcpServer\" listining on port 12345"); 47 | } 48 | connect(this, &SslTcpServer::newConnection, this, &SslTcpServer::link); 49 | } 50 | 51 | void SslTcpServer::incomingConnection(qintptr socketDescriptor) 52 | { 53 | QSslSocket *sslSocket = new QSslSocket(this); 54 | 55 | connect(sslSocket, SIGNAL(sslErrors(QList)), this, SLOT(sslErrors(QList))); 56 | sslSocket->setSocketDescriptor(socketDescriptor); 57 | sslSocket->setPrivateKey(key); 58 | sslSocket->setLocalCertificate(cert); 59 | sslSocket->setPeerVerifyMode(QSslSocket::VerifyNone); 60 | sslSocket->startServerEncryption(); 61 | 62 | addPendingConnection(sslSocket); 63 | } 64 | 65 | void SslTcpServer::sslErrors(const QList &errors) 66 | { 67 | foreach (const QSslError &error, errors) 68 | qInfo() << error.errorString(); 69 | } 70 | 71 | void SslTcpServer::link() 72 | { 73 | QTcpSocket *clientSocket; 74 | 75 | clientSocket = nextPendingConnection(); 76 | connect(clientSocket, &QTcpSocket::readyRead, this, &SslTcpServer::rx); 77 | connect(clientSocket, &QTcpSocket::disconnected, this, &SslTcpServer::disconnected); 78 | } 79 | 80 | void SslTcpServer::rx() 81 | { 82 | QTcpSocket* clientSocket = qobject_cast(sender()); 83 | qInfo() << clientSocket->readAll(); 84 | clientSocket->write("Server says Hello"); 85 | } 86 | 87 | void SslTcpServer::disconnected() 88 | { 89 | qInfo("Client Disconnected"); 90 | QTcpSocket* clientSocket = qobject_cast(sender()); 91 | clientSocket->deleteLater(); 92 | } 93 | -------------------------------------------------------------------------------- /kernel/gui/include/playlist.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2020 David Schedler (https://github.com/davidschedler/) 2 | * 3 | * This file is part of OpenSigange 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef PLAYLIST_H 20 | #define PLAYLIST_H 21 | 22 | #include 23 | #include "planning.h" 24 | 25 | class Playlist : public QObject 26 | { 27 | Q_OBJECT 28 | Q_PROPERTY(int id READ id WRITE setId NOTIFY idChanged) 29 | Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged) 30 | Q_PROPERTY(QString orientation READ orientation WRITE setOrientation NOTIFY orientationChanged) 31 | Q_PROPERTY(QString groupName READ groupName WRITE setGroupName NOTIFY groupNameChanged) 32 | Q_PROPERTY(QList planningList READ planningList WRITE setPlanningList NOTIFY planningListChanged) 33 | Q_PROPERTY(int planningsInPlaylist READ planningsInPlaylist WRITE setPlanningsInPlaylist NOTIFY planningsInPlaylistChanged) 34 | Q_PROPERTY(QString planedon READ planedon WRITE setPlanedon NOTIFY planedonChanged) 35 | 36 | private: 37 | int m_id; 38 | QString m_name; 39 | QString m_orientation; 40 | QString m_groupName; 41 | QList m_planningList; 42 | int m_planningsInPlaylist; 43 | QString m_planedon; 44 | 45 | public: 46 | Playlist(QObject *parent = nullptr); 47 | Playlist(int id, QString name, QString orientation, QString groupName, QString planedon, QObject *parent = nullptr); 48 | 49 | int id() const { return m_id; } 50 | QString name() const { return m_name;} 51 | QString orientation() const { return m_orientation; } 52 | QString groupName() const { return m_groupName; } 53 | QList planningList() const { return m_planningList;} 54 | int planningsInPlaylist() const { return m_planningsInPlaylist; } 55 | QString planedon() const { return m_planedon; } 56 | 57 | /* helper functions */ 58 | void deletePlanning(int idx); 59 | void clearPlanningList(); 60 | Planning *getPlanningById(int id); 61 | void addPlanning(Planning *newPlanning); 62 | void swapPlanning(int oldIdx, int newIdx); 63 | QPair swapPlanningInformation(int target1, int target2); 64 | 65 | signals: 66 | void idChanged(int id); 67 | void nameChanged(QString name); 68 | void orientationChanged(QString orientation); 69 | void groupNameChanged(QString groupName); 70 | void planningListChanged(QList planningList); 71 | void planningsInPlaylistChanged(int planningsInPlaylist); 72 | void planedonChanged(QString planedon); 73 | 74 | public slots: 75 | void setId(int id); 76 | void setName(QString name); 77 | void setOrientation(QString orientation); 78 | void setGroupName(QString groupName); 79 | void setPlanningList(QList planningList); 80 | void setPlanningsInPlaylist(int planningsInPlaylist); 81 | void setPlanedon(QString planedon); 82 | }; 83 | 84 | #endif // PLAYLIST_H 85 | -------------------------------------------------------------------------------- /kernel/corelibrary/src/customevent.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2020 David Schedler (https://github.com/davidschedler/) 2 | * 3 | * This file is part of OpenSigange 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #include "customevent.h" 20 | 21 | /** 22 | * @brief CustomEvent::CustomEvent Default-Konstruktor 23 | */ 24 | CustomEvent::CustomEvent() : 25 | QEvent (QEvent::Type(QEvent::User+1)) 26 | { 27 | 28 | } 29 | 30 | /** 31 | * @brief CustomEvent::CustomEvent Konstruktor auf sich selbst 32 | * @param mySelf 33 | */ 34 | CustomEvent::CustomEvent(CustomEvent *mySelf) : 35 | QEvent (QEvent::Type(QEvent::User+1)) 36 | { 37 | if (mySelf) 38 | p_customEvent = mySelf->p_customEvent; 39 | } 40 | 41 | /** 42 | * @brief CustomEvent::~CustomEvent Default-Destruktor 43 | */ 44 | CustomEvent::~CustomEvent() 45 | { 46 | 47 | } 48 | 49 | /** 50 | * @brief CustomEvent::addCustomEvent Füge benutzerdefiniertes Event hinzu 51 | * @param key Event-Key (Anweisung) 52 | * @param value Event-Value (Daten) 53 | */ 54 | void CustomEvent::addCustomEvent(QString key, QString value) 55 | { 56 | p_customEvent.insert(key, value); 57 | } 58 | 59 | /** 60 | * @brief CustomEvent::delCustomEvent Lösche benutzerdefiniertes Event 61 | * @param key Event-Key (Anweisung) 62 | */ 63 | void CustomEvent::delCustomEvent(QString key) 64 | { 65 | p_customEvent.remove(key); 66 | } 67 | 68 | /** 69 | * @brief CustomEvent::getCustomEvent Hole Daten von benutzerdefiniertes Event 70 | * @param key Event-Key (Anweisung) 71 | * @param value Event-Value (Daten) 72 | * @return Daten des benutzerdefinierten Events anhand des Event-Keys 73 | */ 74 | QString CustomEvent::getCustomEvent(QString key, QString value) 75 | { 76 | if (p_customEvent.contains(key)) 77 | return p_customEvent.value(key); 78 | else 79 | return value; 80 | } 81 | 82 | /** 83 | * @brief CustomEvent::getCustomEventList Hole Liste aller benutzerdefiniertens Event-Keys 84 | * @return alle Event-Keys 85 | */ 86 | QStringList CustomEvent::getCustomEventList() 87 | { 88 | QStringList list; 89 | QString key; 90 | foreach (key, p_customEvent.keys()) 91 | { 92 | list.append(key); 93 | } 94 | return list; 95 | } 96 | 97 | /** 98 | * @brief CustomEvent::containsCustomEvent Prüfe ob benutzerdefiniertes Event den Event-Key beinhaltet 99 | * @param key Event-Key 100 | * @return onFail = false, onSuccess = true 101 | */ 102 | bool CustomEvent::containsCustomEvent(QString key) 103 | { 104 | if (p_customEvent.contains(key)) 105 | return true; 106 | else 107 | return false; 108 | } 109 | 110 | /** 111 | * @brief CustomEvent::isCustomEventEmpty Prüfe ob benutzerdefiniertes Event leer ist 112 | * @return empty = false, !empty = true 113 | */ 114 | bool CustomEvent::isCustomEventEmpty() 115 | { 116 | return p_customEvent.isEmpty(); 117 | } 118 | -------------------------------------------------------------------------------- /kernel/gui/include/planning.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2020 David Schedler (https://github.com/davidschedler/) 2 | * 3 | * This file is part of OpenSigange 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef PLANNING_H 20 | #define PLANNING_H 21 | 22 | #include 23 | 24 | class Planning : public QObject 25 | { 26 | Q_OBJECT 27 | Q_PROPERTY(int id READ id WRITE setId NOTIFY idChanged) 28 | Q_PROPERTY(int id_content READ id_content WRITE setId_content NOTIFY id_contentChanged) 29 | Q_PROPERTY(QString contentName READ contentName WRITE setContentName NOTIFY contentNameChanged) 30 | Q_PROPERTY(QString validPeriod READ validPeriod WRITE setValidPeriod NOTIFY validPeriodChanged) 31 | Q_PROPERTY(QString weekdays READ weekdays WRITE setWeekdays NOTIFY weekdaysChanged) 32 | Q_PROPERTY(QString validTime READ validTime WRITE setValidTime NOTIFY validTimeChanged) 33 | Q_PROPERTY(QString type READ type WRITE setType NOTIFY typeChanged) 34 | Q_PROPERTY(int id_order READ id_order WRITE setId_order NOTIFY id_orderChanged) 35 | Q_PROPERTY(int duration READ duration WRITE setDuration NOTIFY durationChanged) 36 | 37 | private: 38 | int m_id; 39 | int m_id_content; 40 | QString m_contentName; 41 | QString m_validPeriod; 42 | QString m_weekdays; 43 | QString m_validTime; 44 | QString m_type; 45 | int m_id_order; 46 | int m_duration; 47 | 48 | public: 49 | Planning(QObject *parent = nullptr); 50 | Planning(int id, int id_content, QString contentName, QString validPeriod, QString weekdays, 51 | QString validTime, QString type, int id_order, int duration, QObject *parent = nullptr); 52 | 53 | int id() const { return m_id; } 54 | int id_content() const { return m_id_content; } 55 | QString contentName() const { return m_contentName; } 56 | QString validPeriod() const { return m_validPeriod; } 57 | QString weekdays() const { return m_weekdays; } 58 | QString validTime() const { return m_validTime; } 59 | QString type() const { return m_type; } 60 | int id_order() const { return m_id_order; } 61 | int duration() const { return m_duration; } 62 | 63 | signals: 64 | void idChanged(int id); 65 | void id_contentChanged(int id_content); 66 | void contentNameChanged(QString contentName); 67 | void validPeriodChanged(QString validPeriod); 68 | void weekdaysChanged(QString weekdays); 69 | void validTimeChanged(QString validTime); 70 | void typeChanged(QString type); 71 | void id_orderChanged(int id_order); 72 | void durationChanged(int duration); 73 | 74 | public slots: 75 | void setId(int id); 76 | void setId_content(int id_content); 77 | void setContentName(QString contentName); 78 | void setValidPeriod(QString validPeriod); 79 | void setWeekdays(QString weekdays); 80 | void setValidTime(QString validTime); 81 | void setType(QString type); 82 | void setId_order(int id_order); 83 | void setDuration(int duration); 84 | }; 85 | 86 | #endif // PLANNING_H 87 | -------------------------------------------------------------------------------- /kernel/gui/src/websocketclient.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2020 David Schedler (https://github.com/davidschedler/) 2 | * 3 | * This file is part of OpenSigange 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #include "websocketclient.h" 20 | 21 | /** 22 | * @brief WebSocketClient::WebSocketClient Default-Konstruktor 23 | * @param url Verbindungs-Url des Websockets 24 | * @param parent QObject 25 | */ 26 | WebSocketClient::WebSocketClient(const QUrl &url, QObject *parent) : 27 | QObject(parent), 28 | m_url(url) 29 | { 30 | qDebug() << "WebSocket server:" << url; 31 | connect(&m_webSocket, &QWebSocket::connected, this, &WebSocketClient::onConnected); 32 | connect(&m_webSocket, &QWebSocket::connected, this, &WebSocketClient::connected); 33 | connect(&m_webSocket, &QWebSocket::disconnected, this, &WebSocketClient::disconnected); 34 | 35 | connect(&m_webSocket, &QWebSocket::disconnected, this, &WebSocketClient::tryToReconnect); 36 | connect(&m_timer, &QTimer::timeout, this, &WebSocketClient::tryToReconnect); 37 | 38 | QNetworkRequest request{url}; 39 | request.setRawHeader("Sec-WebSocket-Protocol", "binary"); 40 | m_webSocket.open(request); 41 | 42 | m_timer.setSingleShot(true); 43 | m_timer.start(7000); 44 | } 45 | 46 | /** 47 | * @brief WebSocketClient::getDatabaseData Schickt eine binäre Nachricht über den Websocket an den Server 48 | * @param message 49 | */ 50 | void WebSocketClient::getDatabaseData(QByteArray message) 51 | { 52 | m_webSocket.sendBinaryMessage(message); 53 | } 54 | 55 | /** 56 | * @brief WebSocketClient::onConnected Erfolgreicher Verbindungsaufbau mit dem Websocketserver 57 | */ 58 | void WebSocketClient::onConnected() 59 | { 60 | qDebug() << "WebSocket connected"; 61 | connect(&m_webSocket, &QWebSocket::textMessageReceived, 62 | this, &WebSocketClient::onTextMessageReceived); 63 | connect(&m_webSocket, &QWebSocket::binaryMessageReceived, 64 | this, &WebSocketClient::onBinaryMessageReceived); 65 | //m_webSocket.sendBinaryMessage(QByteArray("getAuth,David.Schedler,pass123")); 66 | } 67 | 68 | /** 69 | * @brief WebSocketClient::onTextMessageReceived Eingehende textuelle-Nachricht 70 | * @param message textuelle-Nachricht 71 | */ 72 | void WebSocketClient::onTextMessageReceived(QString message) 73 | { 74 | qDebug() << "Message received:" << message; 75 | } 76 | 77 | /** 78 | * @brief WebSocketClient::onBinaryMessageReceived Eingehende binäre-Nachricht 79 | * @param message binäre-Nachricht 80 | */ 81 | void WebSocketClient::onBinaryMessageReceived(QByteArray message) 82 | { 83 | emit incommingMessage(message); 84 | } 85 | 86 | /** 87 | * @brief WebSocketClient::tryToReconnect Bei Verbindungsabbruch erneuter Verbindungsaufbau alle 5 Sekunden 88 | */ 89 | void WebSocketClient::tryToReconnect() 90 | { 91 | if (m_webSocket.isValid()) 92 | return; 93 | 94 | QNetworkRequest request{m_url}; 95 | request.setRawHeader("Sec-WebSocket-Protocol", "binary"); 96 | m_webSocket.open(request); 97 | m_timer.start(5000); 98 | } 99 | -------------------------------------------------------------------------------- /kernel/gui/qml/playlistenverwaltung/PlanningListView.qml: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2020 David Schedler (https://github.com/davidschedler/) 2 | * 3 | * This file is part of OpenSigange 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | import QtQuick 2.13 20 | import QtQuick.Layouts 1.12 21 | import QtQuick.Controls 2.13 22 | import QtQuick.Window 2.13 23 | import "./../" 24 | import "./../popup/" 25 | 26 | ColumnLayout { 27 | id: planningVerwaltung 28 | spacing: 25 29 | 30 | ThemeManager { id: themeManagerInstance } 31 | 32 | ActionPopup { 33 | id: actionPopupInstance 34 | } 35 | 36 | RowLayout { 37 | Image { 38 | id: img 39 | Layout.preferredHeight: 25 40 | Layout.preferredWidth: 25 41 | source: "qrc:/icons/back.arrow.png" 42 | MouseArea { 43 | anchors.fill: parent 44 | onClicked: myEngine.setNextStackItem("Playlist"); 45 | } 46 | } 47 | Text { 48 | text: qsTr("Planning-Management") 49 | //Layout.fillWidth: true 50 | font.pixelSize: themeManagerInstance.fontSizeExtraBig 51 | } 52 | Item { Layout.fillWidth: true } 53 | 54 | ComboBox { 55 | id: sortTypeCombo 56 | model: ListModel { 57 | id: model 58 | ListElement { text: "ID" } 59 | ListElement { text: "Name" } 60 | ListElement { text: "Valid-Period" } 61 | ListElement { text: "Weekdays" } 62 | ListElement { text: "Valid-Time" } 63 | ListElement { text: "Type" } 64 | } 65 | onCurrentIndexChanged: myEngine.sortAlgorithm(4,sortTypeCombo.currentIndex,sortOrderCombo.currentIndex) 66 | } 67 | ComboBox { 68 | id: sortOrderCombo 69 | model: ListModel { 70 | id: model2 71 | ListElement { text: "Aufsteigend" } 72 | ListElement { text: "Absteigend" } 73 | } 74 | onCurrentIndexChanged: myEngine.sortAlgorithm(4,sortTypeCombo.currentIndex,sortOrderCombo.currentIndex) 75 | } 76 | } 77 | 78 | Rectangle { 79 | Layout.preferredHeight: 2 80 | Layout.fillWidth: true 81 | color: themeManagerInstance.background 82 | } 83 | 84 | ListView { 85 | id: planningListView 86 | Layout.fillWidth: true 87 | Layout.fillHeight: true 88 | currentIndex: myEngine.planningIdx 89 | clip: true 90 | 91 | headerPositioning: ListView.OverlayHeader 92 | header: PlanningListViewHeader {} 93 | 94 | delegate: PlanningListViewDelegate {} 95 | ScrollBar.vertical: ScrollBar {} 96 | model: myEngine.playlistList[myEngine.playlistIdx].planningList 97 | Component.onCompleted: myEngine.sortAlgorithm(4,sortTypeCombo.currentIndex,sortOrderCombo.currentIndex) 98 | } 99 | } 100 | -------------------------------------------------------------------------------- /plugins/database/include/database.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2020 David Schedler (https://github.com/davidschedler/) 2 | * 3 | * This file is part of OpenSigange 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef DATABASE_H 20 | #define DATABASE_H 21 | 22 | #include 23 | #include 24 | #include 25 | #include 26 | 27 | #include "databaseconfig.h" 28 | #include "databasegeneral.h" 29 | #include "plugininterface.h" 30 | #include "corelibrary.h" 31 | #include "database_global.h" 32 | #include "filewatcher.h" 33 | 34 | class DATABASESHARED_EXPORT Database : public PluginInterface 35 | { 36 | Q_OBJECT 37 | Q_PLUGIN_METADATA(IID "Database_iid") 38 | Q_INTERFACES(PluginInterface) 39 | 40 | public: 41 | Database(); 42 | ~Database(); 43 | 44 | enum DataBaseOperation { 45 | GET=0, 46 | INSERT, 47 | UPDATE, 48 | DELETE, 49 | UNKNOWN 50 | }; 51 | 52 | /*interface implementation */ 53 | QString get(int type) const; 54 | int onInit(int type); 55 | bool onEvent(CustomEvent *customEvent); 56 | void loadSettings(); 57 | void saveSettings(); 58 | 59 | public slots: 60 | void addNewContentToDB(QStringList newContent); 61 | 62 | private: 63 | /* settings */ 64 | DatabaseConfig *m_config; 65 | 66 | /* db handling */ 67 | DatabaseGeneral m_databaseGeneral; 68 | int createInitialTables(); 69 | int testFillTables(); 70 | 71 | /* FIles handling */ 72 | FileWatcher *m_fileWatcher; 73 | QThread *m_fileWatcherThread; 74 | 75 | /* helper functions */ 76 | QJsonDocument generateJsonDocument(QString command, QString array, QList data); 77 | QStringList generateDataList(QString data); 78 | 79 | QList getAuth(QString ident, QString pwd); 80 | QList getAuthPi(QString ident); 81 | 82 | QString getGroupFromIdent(QString ident); 83 | QString getUserIdFromIdent(QString ident); 84 | QString expandQueryTextWithGroup(QString querytext, QString group, QString id_user); 85 | 86 | QList getUsers(QString ident); 87 | QList getGroups(QString ident); 88 | QList getPlaylists(QString ident); 89 | QList getPlannings(QString ident); 90 | QList getHardware(QString ident); 91 | QList getContent(QString ident); 92 | QList getClientPlaylist(QString ident); 93 | QList getDownloadUrlFromFile(QString ident, QString id_content); 94 | 95 | int groupOperation(QStringList data, int operationType); 96 | int userOperation(QStringList data, int operationType); 97 | int hardwareOperation(QStringList data, int operationType); 98 | int playlistOperation(QStringList data, int operationType); 99 | int planningOperation(QStringList data, int operationType); 100 | int contentOperation(QStringList data, int operationType); 101 | }; 102 | 103 | #endif // DATABASE_H 104 | -------------------------------------------------------------------------------- /kernel/gui/src/users.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2020 David Schedler (https://github.com/davidschedler/) 2 | * 3 | * This file is part of OpenSigange 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #include "include/users.h" 20 | 21 | /** 22 | * @brief Users::Users Default-Konstruktor 23 | * @param parent 24 | */ 25 | Users::Users(QObject *parent) : 26 | QObject(parent) 27 | { 28 | 29 | } 30 | 31 | /** 32 | * @brief Users::Users Default-Konstruktor für einen gültigen Benutzer 33 | * @param id Benutzer-ID 34 | * @param firstName Benutzer-Vorname 35 | * @param lastName Benutzer-Nachname 36 | * @param groupName Benutzer-Gruppenzugehörigkeit 37 | * @param groupType Benutzer-Gruppentyp 38 | * @param eMail Benutzer-eMail 39 | * @param parent QObject 40 | */ 41 | Users::Users(int id, QString firstName, QString lastName, QString groupName, QString groupType, QString eMail, QObject *parent) : 42 | QObject(parent), 43 | m_id(id), 44 | m_firstName(firstName), 45 | m_lastName(lastName), 46 | m_groupName(groupName), 47 | m_groupType(groupType), 48 | m_eMail(eMail) 49 | { 50 | 51 | } 52 | 53 | /** 54 | * @brief Users::~Users Lösche Benutzer 55 | */ 56 | Users::~Users() 57 | { 58 | this->deleteLater(); 59 | } 60 | 61 | /** 62 | * @brief Users::setId Setze Benutzer-ID 63 | * @param id Benutzer-ID 64 | */ 65 | void Users::setId(int id) 66 | { 67 | if (m_id == id) 68 | return; 69 | 70 | m_id = id; 71 | emit idChanged(m_id); 72 | } 73 | 74 | /** 75 | * @brief Users::setFirstName Setze Benutzer-Vorname 76 | * @param firstName Benutzer-Vorname 77 | */ 78 | void Users::setFirstName(QString firstName) 79 | { 80 | if (m_firstName == firstName) 81 | return; 82 | 83 | m_firstName = firstName; 84 | emit firstNameChanged(m_firstName); 85 | } 86 | 87 | /** 88 | * @brief Users::setLastName Setze Benutzer-Nachname 89 | * @param lastName Benutzer-Nachname 90 | */ 91 | void Users::setLastName(QString lastName) 92 | { 93 | if (m_lastName == lastName) 94 | return; 95 | 96 | m_lastName = lastName; 97 | emit lastNameChanged(m_lastName); 98 | } 99 | 100 | /** 101 | * @brief Users::setGroupName Setze Benutzer-Gruppenzugehörigkeit 102 | * @param groupName Benutzer-GruppenName 103 | */ 104 | void Users::setGroupName(QString groupName) 105 | { 106 | if (m_groupName == groupName) 107 | return; 108 | 109 | m_groupName = groupName; 110 | emit groupNameChanged(m_groupName); 111 | } 112 | 113 | /** 114 | * @brief Users::setGroupType Setze Benutzer-Gruppentyp 115 | * @param groupType Benutzer-Gruppentyp 116 | */ 117 | void Users::setGroupType(QString groupType) 118 | { 119 | if (m_groupType == groupType) 120 | return; 121 | 122 | m_groupType = groupType; 123 | emit groupTypeChanged(m_groupType); 124 | } 125 | 126 | /** 127 | * @brief Users::setEMail Setze Benutzer-eMail 128 | * @param eMail Benutzer-eMail 129 | */ 130 | void Users::setEMail(QString eMail) 131 | { 132 | if (m_eMail == eMail) 133 | return; 134 | 135 | m_eMail = eMail; 136 | emit eMailChanged(m_eMail); 137 | } 138 | -------------------------------------------------------------------------------- /kernel/gui/qml/playlistenverwaltung/PlanningListViewHeader.qml: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2020 David Schedler (https://github.com/davidschedler/) 2 | * 3 | * This file is part of OpenSigange 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | import QtQuick 2.12 20 | import QtQuick.Layouts 1.12 21 | import QtQuick.Controls 2.12 22 | 23 | import "./../popup/" 24 | 25 | Rectangle { 26 | width: parent.width 27 | z: 3 28 | height: themeManagerInstance.groupMenuHeight 29 | color: themeManagerInstance.blue 30 | 31 | RowLayout { 32 | anchors.fill: parent 33 | anchors.margins: 5 34 | spacing: 0 35 | Text { 36 | text: "Position" 37 | horizontalAlignment: Text.AlignHCenter 38 | Layout.fillHeight: true 39 | Layout.preferredWidth: 100 40 | Layout.minimumWidth: 100 41 | Layout.maximumWidth: 100 42 | verticalAlignment: Text.AlignVCenter 43 | 44 | font.bold: themeManagerInstance.isBold 45 | color: themeManagerInstance.fontColer 46 | font.pointSize: themeManagerInstance.fontSizeDefault 47 | } 48 | Item { 49 | Layout.preferredWidth: 25 50 | Layout.minimumWidth: 25 51 | Layout.maximumWidth: 25 52 | } 53 | Text { 54 | text: "Content-Name" 55 | Layout.fillHeight: true 56 | Layout.fillWidth: true 57 | verticalAlignment: Text.AlignVCenter 58 | 59 | font.bold: themeManagerInstance.isBold 60 | color: themeManagerInstance.fontColer 61 | font.pointSize: themeManagerInstance.fontSizeDefault 62 | } 63 | Text { 64 | text: "Valid-Period" 65 | Layout.fillHeight: true 66 | Layout.preferredWidth: 230 67 | verticalAlignment: Text.AlignVCenter 68 | 69 | font.bold: themeManagerInstance.isBold 70 | color: themeManagerInstance.fontColer 71 | font.pointSize: themeManagerInstance.fontSizeDefault 72 | } 73 | Text { 74 | text: "Weekdays" 75 | Layout.fillHeight: true 76 | Layout.preferredWidth: 200 77 | verticalAlignment: Text.AlignVCenter 78 | 79 | font.bold: themeManagerInstance.isBold 80 | color: themeManagerInstance.fontColer 81 | font.pointSize: themeManagerInstance.fontSizeDefault 82 | } 83 | Text { 84 | text: "Valid-Time" 85 | Layout.fillHeight: true 86 | Layout.preferredWidth: 200 87 | verticalAlignment: Text.AlignVCenter 88 | 89 | font.bold: themeManagerInstance.isBold 90 | color: themeManagerInstance.fontColer 91 | font.pointSize: themeManagerInstance.fontSizeDefault 92 | } 93 | Text { 94 | text: "Type" 95 | Layout.fillHeight: true 96 | Layout.preferredWidth: 100 97 | verticalAlignment: Text.AlignVCenter 98 | 99 | font.bold: themeManagerInstance.isBold 100 | color: themeManagerInstance.fontColer 101 | font.pointSize: themeManagerInstance.fontSizeDefault 102 | } 103 | } 104 | } 105 | -------------------------------------------------------------------------------- /kernel/gui/src/hardware.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2020 David Schedler (https://github.com/davidschedler/) 2 | * 3 | * This file is part of OpenSigange 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #include "include/hardware.h" 20 | 21 | /** 22 | * @brief Hardware::Hardware Defaul-Konstruktor 23 | * @param parent QObject 24 | */ 25 | Hardware::Hardware(QObject *parent) : 26 | QObject(parent) 27 | { 28 | 29 | } 30 | 31 | /** 32 | * @brief Hardware::Hardware Default-Konstruktor für eine gültige Hardware 33 | * @param mac Hardware-Mac 34 | * @param groupName Hardware-Gruppen-Name 35 | * @param groupType Hardware-Gruppen-Typ 36 | * @param location Hardware-Standplatz 37 | * @param version Hardware-Version 38 | * @param planedonPlaylist Hardware-Eingehängt auf Playliste 39 | * @param parent QObject 40 | */ 41 | Hardware::Hardware(QString mac, QString groupName, QString groupType, QString location, QString version, int planedonPlaylist, QObject *parent): 42 | QObject(parent), 43 | m_mac(mac), 44 | m_groupName(groupName), 45 | m_groupType(groupType), 46 | m_location(location), 47 | m_version(version), 48 | m_planedonPlaylist(planedonPlaylist) 49 | { 50 | 51 | } 52 | 53 | /** 54 | * @brief Hardware::~Hardware Default-Destruktor 55 | */ 56 | Hardware::~Hardware() 57 | { 58 | this->deleteLater(); 59 | } 60 | 61 | /** 62 | * @brief Hardware::setMac Setze Hardware-MAC 63 | * @param mac Hardware-MAC 64 | */ 65 | void Hardware::setMac(QString mac) 66 | { 67 | if (m_mac == mac) 68 | return; 69 | 70 | m_mac = mac; 71 | emit macChanged(m_mac); 72 | } 73 | 74 | /** 75 | * @brief Hardware::setGroupName Setze Hardware-Gruppen-Name 76 | * @param groupName Hardware-Gruppen-Name 77 | */ 78 | void Hardware::setGroupName(QString groupName) 79 | { 80 | if (m_groupName == groupName) 81 | return; 82 | 83 | m_groupName = groupName; 84 | emit groupNameChanged(m_groupName); 85 | } 86 | 87 | /** 88 | * @brief Hardware::setGroupType Setze Hardware-Gruppen-Typ 89 | * @param groupType Hardware-Gruppen-Typ 90 | */ 91 | void Hardware::setGroupType(QString groupType) 92 | { 93 | if (m_groupType == groupType) 94 | return; 95 | 96 | m_groupType = groupType; 97 | emit groupTypeChanged(m_groupType); 98 | } 99 | 100 | /** 101 | * @brief Hardware::setLocation Setze Hardware-Standplatz 102 | * @param location Hardware-Standplatz 103 | */ 104 | void Hardware::setLocation(QString location) 105 | { 106 | if (m_location == location) 107 | return; 108 | 109 | m_location = location; 110 | emit locationChanged(m_location); 111 | } 112 | 113 | /** 114 | * @brief Hardware::setVersion Setze Hardware-Version 115 | * @param version Hardware-Version 116 | */ 117 | void Hardware::setVersion(QString version) 118 | { 119 | if (m_version == version) 120 | return; 121 | 122 | m_version = version; 123 | emit versionChanged(m_version); 124 | } 125 | 126 | /** 127 | * @brief Hardware::setPlanedonPlaylist Setze Playlisten_ID welche die Hardware nutzt 128 | * @param planedonPlaylist Playlisten-ID 129 | */ 130 | void Hardware::setPlanedonPlaylist(int planedonPlaylist) 131 | { 132 | if (m_planedonPlaylist == planedonPlaylist) 133 | return; 134 | 135 | m_planedonPlaylist = planedonPlaylist; 136 | emit planedonPlaylistChanged(m_planedonPlaylist); 137 | } 138 | 139 | 140 | -------------------------------------------------------------------------------- /kernel/gui/qml/playlistenverwaltung/PlaylistenListView.qml: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2020 David Schedler (https://github.com/davidschedler/) 2 | * 3 | * This file is part of OpenSigange 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | import QtQuick 2.13 20 | import QtQuick.Layouts 1.12 21 | import QtQuick.Controls 2.13 22 | import QtQuick.Window 2.13 23 | import "./../" 24 | import "./../popup/" 25 | 26 | ColumnLayout { 27 | id: playlistVerwaltung 28 | spacing: 25 29 | 30 | ThemeManager { id: themeManagerInstance } 31 | 32 | ActionPopup { 33 | id: actionPopupInstance 34 | 35 | } 36 | 37 | RowLayout { 38 | Text { 39 | text: qsTr("Playlist-Management") 40 | //Layout.fillWidth: true 41 | font.pixelSize: themeManagerInstance.fontSizeExtraBig 42 | } 43 | Image { 44 | id: createPlaylist 45 | Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter 46 | Layout.preferredHeight: 25 47 | Layout.preferredWidth: 25 48 | source: "qrc:/icons/add.plus.png" 49 | MouseArea { 50 | anchors.fill: parent 51 | onClicked: { 52 | myEngine.setPlaylistIdx(0) 53 | myEngine.createClientModels("FREE"); 54 | myEngine.createClientModels("USED"); 55 | actionPopupInstance.tryToOpen("playlist") 56 | actionPopupInstance.groupNameModel = myEngine.getGroupNames() 57 | myEngine.setGroupNameComboIdx(0) 58 | 59 | } 60 | } 61 | } 62 | Item { Layout.fillWidth: true } 63 | 64 | ComboBox { 65 | id: sortTypeCombo 66 | model: ListModel { 67 | id: model 68 | ListElement { text: "ID" } 69 | ListElement { text: "Name" } 70 | ListElement { text: "GroupName" } 71 | ListElement { text: "Orientation" } 72 | ListElement { text: "Planed On" } 73 | ListElement { text: "Count" } 74 | } 75 | onCurrentIndexChanged: myEngine.sortAlgorithm(3,sortTypeCombo.currentIndex,sortOrderCombo.currentIndex) 76 | } 77 | ComboBox { 78 | id: sortOrderCombo 79 | model: ListModel { 80 | id: model2 81 | ListElement { text: "Aufsteigend" } 82 | ListElement { text: "Absteigend" } 83 | } 84 | onCurrentIndexChanged: myEngine.sortAlgorithm(3,sortTypeCombo.currentIndex,sortOrderCombo.currentIndex) 85 | } 86 | } 87 | 88 | Rectangle { 89 | Layout.preferredHeight: 2 90 | Layout.fillWidth: true 91 | color: themeManagerInstance.background 92 | } 93 | 94 | ListView { 95 | id: playlistListView 96 | Layout.fillWidth: true 97 | Layout.fillHeight: true 98 | currentIndex: myEngine.playlistIdx 99 | clip: true 100 | 101 | headerPositioning: ListView.OverlayHeader 102 | header: PlaylistenListViewHeader {} 103 | 104 | delegate: PlaylistenListViewDelegate {} 105 | ScrollBar.vertical: ScrollBar {} 106 | model: myEngine.playlistList 107 | Component.onCompleted: myEngine.sortAlgorithm(3,sortTypeCombo.currentIndex,sortOrderCombo.currentIndex) 108 | } 109 | } 110 | -------------------------------------------------------------------------------- /kernel/gui/qml/playlistenverwaltung/PlaylistenListViewHeader.qml: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2020 David Schedler (https://github.com/davidschedler/) 2 | * 3 | * This file is part of OpenSigange 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | import QtQuick 2.13 20 | import QtQuick.Layouts 1.12 21 | import QtQuick.Controls 2.13 22 | 23 | import "./../popup/" 24 | 25 | Rectangle { 26 | width: parent.width 27 | z: 3 28 | height: themeManagerInstance.groupMenuHeight 29 | color: themeManagerInstance.blue 30 | 31 | RowLayout { 32 | anchors.fill: parent 33 | anchors.margins: 5 34 | spacing: 0 35 | Text { 36 | text: "ID" 37 | Layout.fillHeight: true 38 | Layout.preferredWidth: 50 39 | Layout.minimumWidth: 50 40 | Layout.maximumWidth: 50 41 | verticalAlignment: Text.AlignVCenter 42 | 43 | font.bold: themeManagerInstance.isBold 44 | color: themeManagerInstance.fontColer 45 | font.pointSize: themeManagerInstance.fontSizeDefault 46 | } 47 | Text { 48 | text: "Playlist-Name" 49 | Layout.fillHeight: true 50 | Layout.fillWidth: true 51 | verticalAlignment: Text.AlignVCenter 52 | 53 | font.bold: themeManagerInstance.isBold 54 | color: themeManagerInstance.fontColer 55 | font.pointSize: themeManagerInstance.fontSizeDefault 56 | } 57 | Text { 58 | text: "Group-Name" 59 | Layout.fillHeight: true 60 | Layout.preferredWidth: 350 61 | verticalAlignment: Text.AlignVCenter 62 | 63 | font.bold: themeManagerInstance.isBold 64 | color: themeManagerInstance.fontColer 65 | font.pointSize: themeManagerInstance.fontSizeDefault 66 | } 67 | Text { 68 | text: "Orientation" 69 | Layout.fillHeight: true 70 | Layout.preferredWidth: 150 71 | verticalAlignment: Text.AlignVCenter 72 | 73 | font.bold: themeManagerInstance.isBold 74 | color: themeManagerInstance.fontColer 75 | font.pointSize: themeManagerInstance.fontSizeDefault 76 | } 77 | Text { 78 | text: "Plannings" 79 | Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter 80 | Layout.fillHeight: true 81 | Layout.preferredWidth: 100 82 | Layout.minimumWidth: 100 83 | Layout.maximumWidth: 100 84 | horizontalAlignment: Text.AlignHCenter 85 | verticalAlignment: Text.AlignVCenter 86 | 87 | font.bold: themeManagerInstance.isBold 88 | color: themeManagerInstance.fontColer 89 | font.pointSize: themeManagerInstance.fontSizeDefault 90 | } 91 | Text { 92 | text: "Clients" 93 | Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter 94 | Layout.fillHeight: true 95 | Layout.preferredWidth: 100 96 | Layout.minimumWidth: 100 97 | Layout.maximumWidth: 100 98 | horizontalAlignment: Text.AlignHCenter 99 | verticalAlignment: Text.AlignVCenter 100 | 101 | font.bold: themeManagerInstance.isBold 102 | color: themeManagerInstance.fontColer 103 | font.pointSize: themeManagerInstance.fontSizeDefault 104 | } 105 | } 106 | } 107 | -------------------------------------------------------------------------------- /kernel/gui/qml/navigation/NavigationMenuDelegate.qml: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2020 David Schedler (https://github.com/davidschedler/) 2 | * 3 | * This file is part of OpenSigange 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | import QtQuick 2.0 20 | 21 | Component { 22 | Item { 23 | id: navigationMenuDelegate 24 | width: parent.width 25 | height: themeManagerInstance.navigationMenuHeight 26 | 27 | Rectangle { 28 | anchors.fill: parent 29 | color: navigationMenuDelegate.ListView.isCurrentItem ? 30 | themeManagerInstance.blueHighlight : themeManagerInstance.blue 31 | } 32 | Rectangle { 33 | height: parent.height / 2 ; width: parent.height / 2 34 | anchors.verticalCenter: parent.verticalCenter 35 | anchors.horizontalCenter: parent.right 36 | visible: navigationMenuDelegate.ListView.isCurrentItem ? 1 : 0 37 | color: themeManagerInstance.foreground 38 | rotation: 45 39 | } 40 | Image { 41 | id: img 42 | anchors.top: parent.top 43 | anchors.left: parent.left 44 | sourceSize.height: parent.height - 20 45 | sourceSize.width: parent.height - 20 46 | 47 | anchors.topMargin: themeManagerInstance.navigationMenuMargin 48 | anchors.leftMargin: themeManagerInstance.navigationMenuMargin 49 | source: model.img 50 | } 51 | Text { 52 | text: title 53 | anchors.horizontalCenter: parent.horizontalCenter 54 | anchors.verticalCenter: parent.verticalCenter 55 | font.bold: themeManagerInstance.isBold 56 | color: themeManagerInstance.fontColer 57 | font.pointSize: themeManagerInstance.fontSizeDefault 58 | } 59 | MouseArea{ 60 | id: mouseArea 61 | anchors.fill: parent 62 | onClicked: 63 | { 64 | if (myEngine.navigationMenuIdx !== index) { 65 | myEngine.setNavigationMenuIdx(index) 66 | 67 | if (myEngine.navigationMenuIdx == 1) { //account 68 | myEngine.getDatabaseData("GETDATA","GROUPS") 69 | myEngine.getDatabaseData("GETDATA","USERS") 70 | } 71 | if (myEngine.navigationMenuIdx == 2) { //account 72 | myEngine.getDatabaseData("GETDATA","CONTENT") 73 | } 74 | if (myEngine.navigationMenuIdx == 3) { //account 75 | myEngine.getDatabaseData("GETDATA","PLAYLISTS") 76 | myEngine.getDatabaseData("GETDATA","PLANNINGS") 77 | myEngine.getDatabaseData("GETDATA","HARDWARE") 78 | } 79 | if (myEngine.navigationMenuIdx == 4) { //hardware 80 | myEngine.getDatabaseData("GETDATA","PLAYLISTS") 81 | myEngine.getDatabaseData("GETDATA","HARDWARE") 82 | 83 | } 84 | myEngine.setNextStackItem("Default") 85 | myEngine.setGroupsIdx(0) 86 | myEngine.setUsersIdx(0) 87 | myEngine.setContentIdx(0) 88 | myEngine.setPlaylistIdx(0) 89 | myEngine.setPlanningIdx(0) 90 | myEngine.setHardwareIdx(0) 91 | } 92 | loader.source = source 93 | } 94 | } 95 | } 96 | } 97 | -------------------------------------------------------------------------------- /kernel/gui/qml/hardwareverwaltung/HardwareVerwaltung.qml: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2020 David Schedler (https://github.com/davidschedler/) 2 | * 3 | * This file is part of OpenSigange 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | import QtQuick 2.13 20 | import QtQuick.Layouts 1.12 21 | import QtQuick.Controls 2.13 22 | import QtQuick.Window 2.13 23 | import "./../" 24 | import "./../popup/" 25 | 26 | ColumnLayout { 27 | id: accountVerwaltung 28 | spacing: 20 29 | 30 | ThemeManager { id: themeManagerInstance } 31 | 32 | ActionPopup { 33 | id: actionPopupInstance 34 | 35 | } 36 | ErrorPopup { 37 | id: errorPopupInstance 38 | } 39 | 40 | RowLayout { 41 | Text { 42 | text: qsTr("Hardware-Management") 43 | //Layout.fillWidth: true 44 | font.pixelSize: themeManagerInstance.fontSizeExtraBig 45 | } 46 | Image { 47 | id: addHardware 48 | Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter 49 | Layout.preferredHeight: 25 50 | Layout.preferredWidth: 25 51 | source: "qrc:/icons/add.plus.png" 52 | MouseArea { 53 | anchors.fill: parent 54 | onClicked: { 55 | if (myEngine.currentUserGroup === "CMS-Administrator" || myEngine.currentUserGroup === "Group-Administrator") { 56 | actionPopupInstance.tryToOpen("hardware") 57 | actionPopupInstance.groupNameModel = myEngine.getGroupNames() 58 | myEngine.setGroupNameComboIdx(-1) 59 | actionPopupInstance._comboIDX = -1 60 | } 61 | else 62 | errorPopupInstance.tryToOpen("You are not allowed to create new Clients.") 63 | 64 | } 65 | } 66 | } 67 | Item { Layout.fillWidth: true } 68 | ComboBox { 69 | id: sortTypeCombo 70 | model: ListModel { 71 | id: model 72 | ListElement { text: "MAC" } 73 | ListElement { text: "Location" } 74 | ListElement { text: "Version" } 75 | ListElement { text: "Group" } 76 | } 77 | onCurrentIndexChanged: myEngine.sortAlgorithm(5,sortTypeCombo.currentIndex,sortOrderCombo.currentIndex) 78 | } 79 | ComboBox { 80 | id: sortOrderCombo 81 | model: ListModel { 82 | id: model2 83 | ListElement { text: "Aufsteigend" } 84 | ListElement { text: "Absteigend" } 85 | } 86 | onCurrentIndexChanged: myEngine.sortAlgorithm(5,sortTypeCombo.currentIndex,sortOrderCombo.currentIndex) 87 | } 88 | } 89 | 90 | Rectangle { 91 | Layout.preferredHeight: 2 92 | Layout.fillWidth: true 93 | color: themeManagerInstance.background 94 | } 95 | 96 | ListView { 97 | id: hardwareListView 98 | Layout.fillWidth: true 99 | Layout.fillHeight: true 100 | currentIndex: myEngine.hardwareIdx 101 | clip: true 102 | 103 | headerPositioning: ListView.OverlayHeader 104 | header: HardwareListViewHeader {} 105 | 106 | delegate: HardwareListViewDelegate {} 107 | ScrollBar.vertical: ScrollBar {} 108 | model: myEngine.hardwareList 109 | Component.onCompleted: myEngine.sortAlgorithm(5,sortTypeCombo.currentIndex,sortOrderCombo.currentIndex) 110 | 111 | } 112 | } 113 | -------------------------------------------------------------------------------- /kernel/corelibrary/src/pluginmanager.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2020 David Schedler (https://github.com/davidschedler/) 2 | * 3 | * This file is part of OpenSigange 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #include "pluginmanager.h" 20 | 21 | /** 22 | * @brief PluginManager::PluginManager Default-Konstruktor 23 | * @param corelibrary Pointer auf die Corelibrary 24 | * @param parent QObject 25 | */ 26 | PluginManager::PluginManager(CoreLibrary *corelibrary, QObject *parent) : 27 | QObject(parent), 28 | m_coreLibrary(corelibrary) 29 | { 30 | 31 | } 32 | 33 | /** 34 | * @brief PluginManager::setupDirectories Setze Ordner 35 | */ 36 | void PluginManager::setupDirectories() 37 | { 38 | 39 | } 40 | 41 | /** 42 | * @brief PluginManager::loadAllPlugins Lade alle Plugins von einem Verzeichnis 43 | * @param pluginLocation Plugin-Verzeichnis 44 | */ 45 | void PluginManager::loadAllPlugins(QString pluginLocation) 46 | { 47 | QDir path(pluginLocation); 48 | qDebug() << "Loading plugins from: " << path.path(); 49 | 50 | QString fileName; 51 | foreach (fileName, path.entryList(QStringList("*.so"),QDir::Files)) 52 | { 53 | loadPlugin(path.absolutePath() + "/" + fileName); 54 | } 55 | } 56 | 57 | /** 58 | * @brief PluginManager::loadPlugin Lade ein Plugin mit spezifischen Namen 59 | * @param fileName Name des Plugins 60 | */ 61 | void PluginManager::loadPlugin(QString fileName) 62 | { 63 | qDebug() << "Loading plugin named: " << fileName; 64 | 65 | QPluginLoader loader(fileName); 66 | QObject *possiblePlugin = loader.instance(); 67 | 68 | if (possiblePlugin) 69 | { 70 | PluginInterface *plugin = qobject_cast(possiblePlugin); 71 | if (plugin) 72 | { 73 | qInfo() << "Loaded plugin: " << plugin->get(NAME); 74 | 75 | plugin->corelibrary = this->m_coreLibrary; 76 | plugin->onInit(FIRSTINIT); 77 | plugin->onInit(EXTENDEDINIT); 78 | m_pluginList.append(plugin); 79 | } 80 | } 81 | else 82 | { 83 | qInfo() << "Can't load plugin: " << fileName << " = " << loader.errorString(); 84 | } 85 | } 86 | 87 | /** 88 | * @brief PluginManager::getPlugin Hole Plugin 89 | * @param pid Plugin PID (Identifikations ID) 90 | * @return onFail = nullptr, onSuccess = Plugin 91 | */ 92 | PluginInterface *PluginManager::getPlugin(QString pid) 93 | { 94 | PluginInterface *plugin = nullptr; 95 | if (!m_pluginList.isEmpty()) 96 | { 97 | foreach (plugin, m_pluginList) 98 | { 99 | if (plugin->get(PID) == pid) 100 | { 101 | return plugin; 102 | } 103 | } 104 | } 105 | return plugin; 106 | } 107 | 108 | /** 109 | * @brief PluginManager::containsPlugin Prüfe ob Plugin vorhanden ist 110 | * @param pid Plugin PID (Identifikations ID) 111 | * @return onFail = nullptr, onSuccess = Plugin 112 | */ 113 | bool PluginManager::containsPlugin(QString pid) 114 | { 115 | PluginInterface *plugin = nullptr; 116 | if (!m_pluginList.isEmpty()) 117 | { 118 | foreach (plugin, m_pluginList) 119 | { 120 | if (plugin->get(PID) == pid) 121 | { 122 | return true; 123 | } 124 | } 125 | } 126 | return false; 127 | } 128 | 129 | /** 130 | * @brief PluginManager::getAllPlugins Hole alle geladenen Plugins 131 | * @return Lister aller geladenen Plugins 132 | */ 133 | QList PluginManager::getAllPlugins() 134 | { 135 | return m_pluginList; 136 | } 137 | -------------------------------------------------------------------------------- /kernel/gui/qml/contentverwaltung/ContentListViewHeader.qml: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2020 David Schedler (https://github.com/davidschedler/) 2 | * 3 | * This file is part of OpenSigange 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | import QtQuick 2.13 20 | import QtQuick.Layouts 1.12 21 | import QtQuick.Controls 2.13 22 | 23 | import "./../popup/" 24 | 25 | Rectangle { 26 | width: parent.width 27 | z: 3 28 | height: themeManagerInstance.groupMenuHeight 29 | color: themeManagerInstance.blue 30 | 31 | RowLayout { 32 | anchors.fill: parent 33 | anchors.margins: 5 34 | spacing: 0 35 | Text { 36 | text: "ID" 37 | Layout.fillHeight: true 38 | Layout.preferredWidth: 30 39 | Layout.minimumWidth: 30 40 | Layout.maximumWidth: 30 41 | verticalAlignment: Text.AlignVCenter 42 | 43 | font.bold: themeManagerInstance.isBold 44 | color: themeManagerInstance.fontColer 45 | font.pointSize: themeManagerInstance.fontSizeDefault 46 | } 47 | Text { 48 | text: "File-Name" 49 | Layout.fillHeight: true 50 | Layout.preferredWidth: 450 51 | Layout.minimumWidth: 450 52 | Layout.maximumWidth: 450 53 | verticalAlignment: Text.AlignVCenter 54 | 55 | font.bold: themeManagerInstance.isBold 56 | color: themeManagerInstance.fontColer 57 | font.pointSize: themeManagerInstance.fontSizeDefault 58 | } 59 | Text { 60 | text: "Resolution" 61 | Layout.fillHeight: true 62 | Layout.preferredWidth: 120 63 | Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter 64 | horizontalAlignment: Text.AlignHCenter 65 | verticalAlignment: Text.AlignVCenter 66 | 67 | font.bold: themeManagerInstance.isBold 68 | color: themeManagerInstance.fontColer 69 | font.pointSize: themeManagerInstance.fontSizeDefault 70 | } 71 | Text { 72 | text: "Size" 73 | Layout.fillHeight: true 74 | Layout.preferredWidth: 120 75 | Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter 76 | horizontalAlignment: Text.AlignHCenter 77 | verticalAlignment: Text.AlignVCenter 78 | 79 | font.bold: themeManagerInstance.isBold 80 | color: themeManagerInstance.fontColer 81 | font.pointSize: themeManagerInstance.fontSizeDefault 82 | } 83 | Text { 84 | text: "Time" 85 | Layout.fillHeight: true 86 | Layout.preferredWidth: 120 87 | Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter 88 | horizontalAlignment: Text.AlignHCenter 89 | verticalAlignment: Text.AlignVCenter 90 | 91 | font.bold: themeManagerInstance.isBold 92 | color: themeManagerInstance.fontColer 93 | font.pointSize: themeManagerInstance.fontSizeDefault 94 | } 95 | Text { 96 | text: "TYPE" 97 | Layout.fillHeight: true 98 | Layout.preferredWidth: 50 99 | Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter 100 | horizontalAlignment: Text.AlignHCenter 101 | verticalAlignment: Text.AlignVCenter 102 | 103 | font.bold: themeManagerInstance.isBold 104 | color: themeManagerInstance.fontColer 105 | font.pointSize: themeManagerInstance.fontSizeDefault 106 | } 107 | } 108 | } 109 | -------------------------------------------------------------------------------- /kernel/gui/qml/accountverwaltung/GroupListViewHeader.qml: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2020 David Schedler (https://github.com/davidschedler/) 2 | * 3 | * This file is part of OpenSigange 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | import QtQuick 2.13 20 | import QtQuick.Layouts 1.12 21 | import QtQuick.Controls 2.13 22 | 23 | import "./../popup/" 24 | 25 | Rectangle { 26 | width: parent.width 27 | z: 3 28 | height: themeManagerInstance.groupMenuHeight 29 | color: themeManagerInstance.blue 30 | 31 | RowLayout { 32 | anchors.fill: parent 33 | anchors.margins: 5 34 | spacing: 0 35 | Text { 36 | text: "ID" 37 | Layout.fillHeight: true 38 | Layout.preferredWidth: 50 39 | Layout.minimumWidth: 50 40 | Layout.maximumWidth: 50 41 | verticalAlignment: Text.AlignVCenter 42 | 43 | font.bold: themeManagerInstance.isBold 44 | color: themeManagerInstance.fontColer 45 | font.pointSize: themeManagerInstance.fontSizeDefault 46 | } 47 | Text { 48 | text: "Name" 49 | Layout.fillHeight: true 50 | Layout.fillWidth: true 51 | verticalAlignment: Text.AlignVCenter 52 | 53 | font.bold: themeManagerInstance.isBold 54 | color: themeManagerInstance.fontColer 55 | font.pointSize: themeManagerInstance.fontSizeDefault 56 | } 57 | Text { 58 | text: "Type" 59 | Layout.fillHeight: true 60 | Layout.preferredWidth: 200 61 | verticalAlignment: Text.AlignVCenter 62 | 63 | font.bold: themeManagerInstance.isBold 64 | color: themeManagerInstance.fontColer 65 | font.pointSize: themeManagerInstance.fontSizeDefault 66 | } 67 | Text { 68 | text: "Users" 69 | Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter 70 | Layout.fillHeight: true 71 | Layout.preferredWidth: 100 72 | Layout.minimumWidth: 100 73 | Layout.maximumWidth: 100 74 | horizontalAlignment: Text.AlignHCenter 75 | verticalAlignment: Text.AlignVCenter 76 | 77 | font.bold: themeManagerInstance.isBold 78 | color: themeManagerInstance.fontColer 79 | font.pointSize: themeManagerInstance.fontSizeDefault 80 | } 81 | Text { 82 | text: "Playlists" 83 | Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter 84 | Layout.fillHeight: true 85 | Layout.preferredWidth: 100 86 | Layout.minimumWidth: 100 87 | Layout.maximumWidth: 100 88 | horizontalAlignment: Text.AlignHCenter 89 | verticalAlignment: Text.AlignVCenter 90 | 91 | font.bold: themeManagerInstance.isBold 92 | color: themeManagerInstance.fontColer 93 | font.pointSize: themeManagerInstance.fontSizeDefault 94 | } 95 | Text { 96 | text: "Clients" 97 | Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter 98 | Layout.fillHeight: true 99 | Layout.preferredWidth: 100 100 | Layout.minimumWidth: 100 101 | Layout.maximumWidth: 100 102 | horizontalAlignment: Text.AlignHCenter 103 | verticalAlignment: Text.AlignVCenter 104 | 105 | font.bold: themeManagerInstance.isBold 106 | color: themeManagerInstance.fontColer 107 | font.pointSize: themeManagerInstance.fontSizeDefault 108 | } 109 | } 110 | } 111 | -------------------------------------------------------------------------------- /kernel/gui/qml/contentverwaltung/ContentVerwaltung.qml: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2020 David Schedler (https://github.com/davidschedler/) 2 | * 3 | * This file is part of OpenSigange 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | import QtQuick 2.13 20 | import QtQuick.Layouts 1.12 21 | import QtQuick.Controls 2.13 22 | import "./../" 23 | import "./../popup/" 24 | 25 | ColumnLayout { 26 | id: accountVerwaltung 27 | spacing: 20 28 | 29 | ThemeManager { id: themeManagerInstance } 30 | 31 | ActionPopup { 32 | id: actionPopupInstance 33 | 34 | } 35 | 36 | RowLayout { 37 | Image { 38 | id: img 39 | visible: myEngine.showContentToAddPlanning 40 | Layout.preferredHeight: 25 41 | Layout.preferredWidth: 25 42 | source: "qrc:/icons/back.arrow.png" 43 | MouseArea { 44 | anchors.fill: parent 45 | onClicked: myEngine.setNextStackItem("Content_POP"); 46 | } 47 | } 48 | Text { 49 | text: qsTr("Content-Management") 50 | //Layout.fillWidth: true 51 | font.pixelSize: themeManagerInstance.fontSizeExtraBig 52 | } 53 | Image { 54 | id: addContent 55 | Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter 56 | Layout.preferredHeight: 25 57 | Layout.preferredWidth: 25 58 | source: "qrc:/icons/add.plus.png" 59 | MouseArea { 60 | anchors.fill: parent 61 | onClicked: addContentTip.show("Noch nicht implementiert",3000) 62 | } 63 | ToolTip { id: addContentTip } 64 | } 65 | Item { Layout.fillWidth: true } 66 | ComboBox { 67 | id: sortTypeCombo 68 | model: ListModel { 69 | id: model 70 | ListElement { text: "ID" } 71 | ListElement { text: "Name" } 72 | ListElement { text: "Type" } 73 | } 74 | onCurrentIndexChanged: myEngine.sortAlgorithm(0,sortTypeCombo.currentIndex,sortOrderCombo.currentIndex) 75 | } 76 | ComboBox { 77 | id: sortOrderCombo 78 | model: ListModel { 79 | id: model2 80 | ListElement { text: "Aufsteigend" } 81 | ListElement { text: "Absteigend" } 82 | } 83 | onCurrentIndexChanged: myEngine.sortAlgorithm(0,sortTypeCombo.currentIndex,sortOrderCombo.currentIndex) 84 | } 85 | } 86 | Rectangle { 87 | Layout.preferredHeight: 2 88 | Layout.fillWidth: true 89 | color: themeManagerInstance.background 90 | } 91 | 92 | RowLayout { 93 | TextField { 94 | id: seachField 95 | Layout.fillWidth: true 96 | onTextEdited: { 97 | myEngine.searchAlgorithm(0,searchCombo.currentIndex,text) 98 | } 99 | } 100 | ComboBox { 101 | id: searchCombo 102 | currentIndex: 1 103 | model: ListModel { 104 | id: search 105 | ListElement { text: "ID" } 106 | ListElement { text: "Name" } 107 | ListElement { text: "Type" } 108 | } 109 | } 110 | } 111 | 112 | ListView { 113 | id: userListView 114 | Layout.fillWidth: true 115 | Layout.fillHeight: true 116 | currentIndex: myEngine.contentIdx 117 | clip: true 118 | 119 | headerPositioning: ListView.OverlayHeader 120 | header: ContentListViewHeader {} 121 | 122 | delegate: ContentListViewDelegate {} 123 | ScrollBar.vertical: ScrollBar {} 124 | model: myEngine.contentList 125 | Component.onCompleted: myEngine.searchAlgorithm(0,searchCombo.currentIndex,"") 126 | } 127 | 128 | } 129 | -------------------------------------------------------------------------------- /kernel/raspberry/include/manager.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2020 David Schedler (https://github.com/davidschedler/) 2 | * 3 | * This file is part of OpenSigange 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef MANAGER_H 20 | #define MANAGER_H 21 | 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | #include 32 | #include 33 | 34 | #include 35 | 36 | #include "plugininterface.h" 37 | #include "corelibrary.h" 38 | #include "managerconfig.h" 39 | #include "md5worker.h" 40 | #include "playlistitem.h" 41 | 42 | class Q_DECL_EXPORT Manager : public PluginInterface 43 | { 44 | Q_OBJECT 45 | Q_PLUGIN_METADATA(IID "Manager_iid") 46 | Q_INTERFACES(PluginInterface) 47 | 48 | Q_PROPERTY(QList playlist READ playlist WRITE setPlaylist NOTIFY playlistChanged) 49 | Q_PROPERTY(QString currentPicture READ currentPicture WRITE setCurrentPicture NOTIFY currentPictureChanged) 50 | Q_PROPERTY(QString currentVideo READ currentVideo WRITE setCurrentVideo NOTIFY currentVideoChanged) 51 | 52 | 53 | public: 54 | Manager(); 55 | 56 | enum PlayerState { WAIT=0, READY }; 57 | 58 | Q_INVOKABLE void requestPlaylistFromMac(); 59 | Q_INVOKABLE void checkThis(); 60 | //QJsonDocument generateJsonDocument(QString command, QString array, QList data); 61 | QByteArray generateByteMessage(QString command, QString type, QString data); 62 | void newCommunicationDataToParse(QByteArray newData); 63 | void newDownloadUrl(CustomEvent event); 64 | 65 | /* interface implementation */ 66 | QString get(int type) const; 67 | int onInit(int type); 68 | bool onEvent(CustomEvent *customEvent); 69 | void loadSettings(); 70 | void saveSettings(); 71 | 72 | QList playlist() const { return m_playlist; } 73 | QString currentPicture() const { return m_currentPicture; } 74 | 75 | QString currentVideo() const 76 | { 77 | return m_currentVideo; 78 | } 79 | 80 | public slots: 81 | void setPlaylist(QList playlist); 82 | void incomingCheckedMD5(QString id_content, QString filePath, QString md5Sum); 83 | void setCurrentPicture(QString currentPicture); 84 | void requestPlayliste(); 85 | void playerStateMachine(); 86 | 87 | void setCurrentVideo(QString currentVideo) 88 | { 89 | if (m_currentVideo == currentVideo) 90 | return; 91 | 92 | m_currentVideo = currentVideo; 93 | emit currentVideoChanged(m_currentVideo); 94 | } 95 | 96 | Q_SIGNALS: 97 | void playlistChanged(QList playlist); 98 | void checkMD5Sum(QString id_content, QString filePath); 99 | void currentPictureChanged(QString currentPicture); 100 | 101 | void currentVideoChanged(QString currentVideo); 102 | 103 | private Q_SLOTS: 104 | 105 | private: 106 | /* settings */ 107 | ManagerConfig *m_config; 108 | 109 | /* ContentWorker */ 110 | MD5Worker *m_md5Worker; 111 | QThread *m_contentThread; 112 | 113 | /* player */ 114 | int m_playerState; 115 | int m_playerPosition; 116 | 117 | QTimer m_playerStateTimer; 118 | 119 | /* helpfer */ 120 | QList m_playlist; 121 | QList m_newParsedPlaylist; 122 | QList m_playlistToDownload; 123 | QList m_playlistToCheckMD5; 124 | PlaylistItem* getPlaylistItemByID(int id_planning); 125 | bool itemAvailableToCheckMD5(); 126 | QJsonDocument generateJsonDocument(QString command, QString array, QList data); 127 | QTimer m_refreshPlayliste; 128 | QString m_currentPicture; 129 | QString m_currentVideo; 130 | }; 131 | 132 | #endif // MANAGER_H 133 | --------------------------------------------------------------------------------