From 0fc128b369ebc1a7513489216f4aa39ac40334f7 Mon Sep 17 00:00:00 2001 From: 0xFEEDC0DE64 Date: Tue, 21 Feb 2023 20:28:53 +0100 Subject: [PATCH] app binary renamed to scheincommander --- CMakeLists.txt | 16 +++++++++------- DeviceTypeRegisterTypesModel.qml | 2 +- DeviceTypesSettingsPage.qml | 2 +- DevicesSettingsPage.qml | 2 +- HomePage.qml | 2 +- IconsModel.qml | 2 +- LampRegistersPanel.qml | 2 +- LightControlWindow.qml | 2 +- LightSliderPane.qml | 2 +- README.md | 2 +- RegisterGroupsSettingsPage.qml | 2 +- RegistersSettingsItem.qml | 2 +- deviceregistervaluehelper.cpp | 2 +- devicesmodel.cpp | 2 +- devicetyperegistersmodel.cpp | 2 +- devicetypesmodel.cpp | 2 +- dmxcontroller.cpp | 3 ++- dmxcontroller.h | 1 + lightproject.cpp | 2 +- main.cpp | 9 ++++++++- registergroupmodel.cpp | 2 +- registergroupsmodel.cpp | 2 +- 22 files changed, 38 insertions(+), 27 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a9795c8..6a634d8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.16) -project(lightcontrol VERSION 0.1 LANGUAGES CXX) +project(scheincommander VERSION 0.9 LANGUAGES CXX) set(CMAKE_AUTOMOC ON) #set(CMAKE_CXX_STANDARD 23) @@ -10,7 +10,7 @@ add_compile_options(-std=c++2b) find_package(Qt6 6.2 REQUIRED COMPONENTS SerialPort Quick) -qt_add_executable(applightcontrol +qt_add_executable(appscheincommander main.cpp devicetypesmodel.h devicetypesmodel.cpp dmxcontroller.h dmxcontroller.cpp @@ -24,8 +24,8 @@ qt_add_executable(applightcontrol projectloader.h projectloader.cpp ) -qt_add_qml_module(applightcontrol - URI lightcontrol +qt_add_qml_module(appscheincommander + URI scheincommander VERSION 1.0 RESOURCES icons/movinghead.png @@ -55,7 +55,9 @@ qt_add_qml_module(applightcontrol AnimatedStackView.qml ) -set_target_properties(applightcontrol PROPERTIES +add_definitions(-DCMAKE_PROJECT_VERSION=${CMAKE_PROJECT_VERSION}) + +set_target_properties(appscheincommander PROPERTIES MACOSX_BUNDLE_GUI_IDENTIFIER my.example.com MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION} MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR} @@ -63,12 +65,12 @@ set_target_properties(applightcontrol PROPERTIES WIN32_EXECUTABLE TRUE ) -target_link_libraries(applightcontrol +target_link_libraries(appscheincommander PRIVATE Qt6::SerialPort Qt6::Quick ) -install(TARGETS applightcontrol +install(TARGETS appscheincommander BUNDLE DESTINATION . LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) diff --git a/DeviceTypeRegisterTypesModel.qml b/DeviceTypeRegisterTypesModel.qml index 13b63ee..57f8ddb 100644 --- a/DeviceTypeRegisterTypesModel.qml +++ b/DeviceTypeRegisterTypesModel.qml @@ -1,6 +1,6 @@ import QtQuick -import lightcontrol +import scheincommander ListModel { ListElement { text: qsTr('Dummy'); value: DeviceTypeRegisterType.Dummy } diff --git a/DeviceTypesSettingsPage.qml b/DeviceTypesSettingsPage.qml index 7686488..fe8cac5 100644 --- a/DeviceTypesSettingsPage.qml +++ b/DeviceTypesSettingsPage.qml @@ -3,7 +3,7 @@ import QtQuick.Controls import QtQuick.Controls.Material import QtQuick.Layouts -import lightcontrol +import scheincommander ColumnLayout { Label { diff --git a/DevicesSettingsPage.qml b/DevicesSettingsPage.qml index 072775f..c536dcc 100644 --- a/DevicesSettingsPage.qml +++ b/DevicesSettingsPage.qml @@ -3,7 +3,7 @@ import QtQuick.Controls import QtQuick.Controls.Material import QtQuick.Layouts -import lightcontrol +import scheincommander ColumnLayout { Label { diff --git a/HomePage.qml b/HomePage.qml index 86b0573..d3759f2 100644 --- a/HomePage.qml +++ b/HomePage.qml @@ -2,7 +2,7 @@ import QtQuick import QtQuick.Controls.Material import QtQuick.Layouts -import lightcontrol +import scheincommander Item { id: homePage diff --git a/IconsModel.qml b/IconsModel.qml index 3a41f65..87ce116 100644 --- a/IconsModel.qml +++ b/IconsModel.qml @@ -2,6 +2,6 @@ import QtQuick import Qt.labs.folderlistmodel 2.4 FolderListModel { - folder: "qrc:/lightcontrol/icons/" + folder: "qrc:/scheincommander/icons/" showDirs: false } diff --git a/LampRegistersPanel.qml b/LampRegistersPanel.qml index 39c3b17..9155712 100644 --- a/LampRegistersPanel.qml +++ b/LampRegistersPanel.qml @@ -2,7 +2,7 @@ import QtQuick import QtQuick.Controls.Material import QtQuick.Layouts -import lightcontrol +import scheincommander Flickable { id: lampRegistersPanel diff --git a/LightControlWindow.qml b/LightControlWindow.qml index 2f34882..2325680 100644 --- a/LightControlWindow.qml +++ b/LightControlWindow.qml @@ -14,7 +14,7 @@ ApplicationWindow { FontLoader { id: materialIcons - source: "qrc:/lightcontrol/ui-icons/MaterialIcons-Regular.ttf" + source: "qrc:/scheincommander/ui-icons/MaterialIcons-Regular.ttf" } ColumnLayout { diff --git a/LightSliderPane.qml b/LightSliderPane.qml index 3eee413..00db6ff 100644 --- a/LightSliderPane.qml +++ b/LightSliderPane.qml @@ -2,7 +2,7 @@ import QtQuick import QtQuick.Controls.Material import QtQuick.Layouts -import lightcontrol +import scheincommander Pane { property variant light diff --git a/README.md b/README.md index cc64af0..4ff878f 100644 --- a/README.md +++ b/README.md @@ -8,5 +8,5 @@ mkdir build cd build cmake .. make -j4096 -./applightcontrol +./appscheincommander ``` diff --git a/RegisterGroupsSettingsPage.qml b/RegisterGroupsSettingsPage.qml index 21e2bee..1b65624 100644 --- a/RegisterGroupsSettingsPage.qml +++ b/RegisterGroupsSettingsPage.qml @@ -3,7 +3,7 @@ import QtQuick.Controls import QtQuick.Controls.Material import QtQuick.Layouts -import lightcontrol +import scheincommander ColumnLayout { property bool needsRegler: true diff --git a/RegistersSettingsItem.qml b/RegistersSettingsItem.qml index 78651c0..8f00bf2 100644 --- a/RegistersSettingsItem.qml +++ b/RegistersSettingsItem.qml @@ -2,7 +2,7 @@ import QtQuick import QtQuick.Controls.Material import QtQuick.Layouts -import lightcontrol 1.0 +import scheincommander 1.0 Pane { property alias deviceTypeId: model.deviceTypeId diff --git a/deviceregistervaluehelper.cpp b/deviceregistervaluehelper.cpp index 105c5c9..0780e74 100644 --- a/deviceregistervaluehelper.cpp +++ b/deviceregistervaluehelper.cpp @@ -142,7 +142,7 @@ void DeviceRegisterValueHelper::sliderStatesChanged() namespace { void registrierDenShit() { - qmlRegisterType("lightcontrol", 1, 0, "DeviceRegisterValueHelper"); + qmlRegisterType("scheincommander", 1, 0, "DeviceRegisterValueHelper"); } } Q_COREAPP_STARTUP_FUNCTION(registrierDenShit) diff --git a/devicesmodel.cpp b/devicesmodel.cpp index 875b16b..4ea240d 100644 --- a/devicesmodel.cpp +++ b/devicesmodel.cpp @@ -464,7 +464,7 @@ void DevicesModel::otherDevicePositionChanged(int row, const QVector3D &position namespace { void registrierDenShit() { - qmlRegisterType("lightcontrol", 1, 0, "DevicesModel"); + qmlRegisterType("scheincommander", 1, 0, "DevicesModel"); } } Q_COREAPP_STARTUP_FUNCTION(registrierDenShit) diff --git a/devicetyperegistersmodel.cpp b/devicetyperegistersmodel.cpp index 47cc59c..0b23300 100644 --- a/devicetyperegistersmodel.cpp +++ b/devicetyperegistersmodel.cpp @@ -450,7 +450,7 @@ void DeviceTypeRegistersModel::otherDeviceTypeRegisterTypeChanged(const DeviceTy namespace { void registrierDenShit() { - qmlRegisterType("lightcontrol", 1, 0, "DeviceTypeRegistersModel"); + qmlRegisterType("scheincommander", 1, 0, "DeviceTypeRegistersModel"); } } Q_COREAPP_STARTUP_FUNCTION(registrierDenShit) diff --git a/devicetypesmodel.cpp b/devicetypesmodel.cpp index c529d90..f5df8a1 100644 --- a/devicetypesmodel.cpp +++ b/devicetypesmodel.cpp @@ -383,7 +383,7 @@ void DeviceTypesModel::otherDeviceTypeIconNameChanged(int row, const QString &na namespace { void registrierDenShit() { - qmlRegisterType("lightcontrol", 1, 0, "DeviceTypesModel"); + qmlRegisterType("scheincommander", 1, 0, "DeviceTypesModel"); } } Q_COREAPP_STARTUP_FUNCTION(registrierDenShit) diff --git a/dmxcontroller.cpp b/dmxcontroller.cpp index 760c51a..2bda8e2 100644 --- a/dmxcontroller.cpp +++ b/dmxcontroller.cpp @@ -130,7 +130,8 @@ DmxController::DmxController(QObject *parent) : { } -bool DmxController::loadProject(QString name) { +bool DmxController::loadProject(QString name) +{ QFile readJsonFile(name); if (!readJsonFile.exists()) { diff --git a/dmxcontroller.h b/dmxcontroller.h index d007827..359fa8d 100644 --- a/dmxcontroller.h +++ b/dmxcontroller.h @@ -18,6 +18,7 @@ public: bool loadProject(QString name); bool saveProject(QString name); + bool start(); Q_INVOKABLE void setRegisterGroupSlider(int registerGroupId, quint8 value); diff --git a/lightproject.cpp b/lightproject.cpp index adb4507..48c734e 100644 --- a/lightproject.cpp +++ b/lightproject.cpp @@ -6,7 +6,7 @@ namespace { void registrierDenShit() { - qmlRegisterUncreatableMetaObject(hilfe::staticMetaObject, "lightcontrol", 1, 0, "DeviceTypeRegisterType", "lass es du depp"); + qmlRegisterUncreatableMetaObject(hilfe::staticMetaObject, "scheincommander", 1, 0, "DeviceTypeRegisterType", "lass es du depp"); } } Q_COREAPP_STARTUP_FUNCTION(registrierDenShit) diff --git a/main.cpp b/main.cpp index f86c2df..31287b3 100644 --- a/main.cpp +++ b/main.cpp @@ -5,6 +5,8 @@ #include #include "dmxcontroller.h" +#define STR(x) #x + int main(int argc, char *argv[]) { qSetMessagePattern(QStringLiteral("%{time dd.MM.yyyy HH:mm:ss.zzz} " @@ -20,6 +22,11 @@ int main(int argc, char *argv[]) qputenv("QT_IM_MODULE", QByteArray("qtvirtualkeyboard")); + QCoreApplication::setOrganizationDomain("com.büro"); + QCoreApplication::setOrganizationName("büro"); + QCoreApplication::setApplicationName("scheincommander"); + QCoreApplication::setApplicationVersion(STR(CMAKE_PROJECT_VERSION)); + QGuiApplication app{argc, argv}; QCommandLineParser parser; @@ -49,7 +56,7 @@ int main(int argc, char *argv[]) engine.rootContext()->setContextProperty("__controller", &controller); engine.rootContext()->setContextProperty("__windowed", windowed); - const QUrl url{u"qrc:/lightcontrol/main.qml"_qs}; + const QUrl url{u"qrc:/scheincommander/main.qml"_qs}; QObject::connect(&engine, &QQmlApplicationEngine::objectCreated, &app, [url](QObject *obj, const QUrl &objUrl) { if (!obj && url == objUrl) diff --git a/registergroupmodel.cpp b/registergroupmodel.cpp index 317d486..f6aa2c3 100644 --- a/registergroupmodel.cpp +++ b/registergroupmodel.cpp @@ -212,7 +212,7 @@ void RegisterGroupModel::setPattern(int n, int k, DeviceTypeRegisterType registe namespace { void registrierDenShit() { - qmlRegisterType("lightcontrol", 1, 0, "RegisterGroupModel"); + qmlRegisterType("scheincommander", 1, 0, "RegisterGroupModel"); } } Q_COREAPP_STARTUP_FUNCTION(registrierDenShit) diff --git a/registergroupsmodel.cpp b/registergroupsmodel.cpp index 1ee6d24..b3be657 100644 --- a/registergroupsmodel.cpp +++ b/registergroupsmodel.cpp @@ -347,7 +347,7 @@ void RegisterGroupsModel::otherRegisterGroupNameChanged(int row, const QString & namespace { void registrierDenShit() { - qmlRegisterType("lightcontrol", 1, 0, "RegisterGroupsModel"); + qmlRegisterType("scheincommander", 1, 0, "RegisterGroupsModel"); } } Q_COREAPP_STARTUP_FUNCTION(registrierDenShit)