app binary renamed to scheincommander

This commit is contained in:
2023-02-21 20:28:53 +01:00
parent 77d269013d
commit 0fc128b369
22 changed files with 38 additions and 27 deletions

View File

@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.16) 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_AUTOMOC ON)
#set(CMAKE_CXX_STANDARD 23) #set(CMAKE_CXX_STANDARD 23)
@ -10,7 +10,7 @@ add_compile_options(-std=c++2b)
find_package(Qt6 6.2 REQUIRED COMPONENTS SerialPort Quick) find_package(Qt6 6.2 REQUIRED COMPONENTS SerialPort Quick)
qt_add_executable(applightcontrol qt_add_executable(appscheincommander
main.cpp main.cpp
devicetypesmodel.h devicetypesmodel.cpp devicetypesmodel.h devicetypesmodel.cpp
dmxcontroller.h dmxcontroller.cpp dmxcontroller.h dmxcontroller.cpp
@ -24,8 +24,8 @@ qt_add_executable(applightcontrol
projectloader.h projectloader.cpp projectloader.h projectloader.cpp
) )
qt_add_qml_module(applightcontrol qt_add_qml_module(appscheincommander
URI lightcontrol URI scheincommander
VERSION 1.0 VERSION 1.0
RESOURCES RESOURCES
icons/movinghead.png icons/movinghead.png
@ -55,7 +55,9 @@ qt_add_qml_module(applightcontrol
AnimatedStackView.qml 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_GUI_IDENTIFIER my.example.com
MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION} MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION}
MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR} MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
@ -63,12 +65,12 @@ set_target_properties(applightcontrol PROPERTIES
WIN32_EXECUTABLE TRUE WIN32_EXECUTABLE TRUE
) )
target_link_libraries(applightcontrol target_link_libraries(appscheincommander
PRIVATE PRIVATE
Qt6::SerialPort Qt6::SerialPort
Qt6::Quick Qt6::Quick
) )
install(TARGETS applightcontrol install(TARGETS appscheincommander
BUNDLE DESTINATION . BUNDLE DESTINATION .
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})

View File

@ -1,6 +1,6 @@
import QtQuick import QtQuick
import lightcontrol import scheincommander
ListModel { ListModel {
ListElement { text: qsTr('Dummy'); value: DeviceTypeRegisterType.Dummy } ListElement { text: qsTr('Dummy'); value: DeviceTypeRegisterType.Dummy }

View File

@ -3,7 +3,7 @@ import QtQuick.Controls
import QtQuick.Controls.Material import QtQuick.Controls.Material
import QtQuick.Layouts import QtQuick.Layouts
import lightcontrol import scheincommander
ColumnLayout { ColumnLayout {
Label { Label {

View File

@ -3,7 +3,7 @@ import QtQuick.Controls
import QtQuick.Controls.Material import QtQuick.Controls.Material
import QtQuick.Layouts import QtQuick.Layouts
import lightcontrol import scheincommander
ColumnLayout { ColumnLayout {
Label { Label {

View File

@ -2,7 +2,7 @@ import QtQuick
import QtQuick.Controls.Material import QtQuick.Controls.Material
import QtQuick.Layouts import QtQuick.Layouts
import lightcontrol import scheincommander
Item { Item {
id: homePage id: homePage

View File

@ -2,6 +2,6 @@ import QtQuick
import Qt.labs.folderlistmodel 2.4 import Qt.labs.folderlistmodel 2.4
FolderListModel { FolderListModel {
folder: "qrc:/lightcontrol/icons/" folder: "qrc:/scheincommander/icons/"
showDirs: false showDirs: false
} }

View File

@ -2,7 +2,7 @@ import QtQuick
import QtQuick.Controls.Material import QtQuick.Controls.Material
import QtQuick.Layouts import QtQuick.Layouts
import lightcontrol import scheincommander
Flickable { Flickable {
id: lampRegistersPanel id: lampRegistersPanel

View File

@ -14,7 +14,7 @@ ApplicationWindow {
FontLoader { FontLoader {
id: materialIcons id: materialIcons
source: "qrc:/lightcontrol/ui-icons/MaterialIcons-Regular.ttf" source: "qrc:/scheincommander/ui-icons/MaterialIcons-Regular.ttf"
} }
ColumnLayout { ColumnLayout {

View File

@ -2,7 +2,7 @@ import QtQuick
import QtQuick.Controls.Material import QtQuick.Controls.Material
import QtQuick.Layouts import QtQuick.Layouts
import lightcontrol import scheincommander
Pane { Pane {
property variant light property variant light

View File

@ -8,5 +8,5 @@ mkdir build
cd build cd build
cmake .. cmake ..
make -j4096 make -j4096
./applightcontrol ./appscheincommander
``` ```

View File

@ -3,7 +3,7 @@ import QtQuick.Controls
import QtQuick.Controls.Material import QtQuick.Controls.Material
import QtQuick.Layouts import QtQuick.Layouts
import lightcontrol import scheincommander
ColumnLayout { ColumnLayout {
property bool needsRegler: true property bool needsRegler: true

View File

@ -2,7 +2,7 @@ import QtQuick
import QtQuick.Controls.Material import QtQuick.Controls.Material
import QtQuick.Layouts import QtQuick.Layouts
import lightcontrol 1.0 import scheincommander 1.0
Pane { Pane {
property alias deviceTypeId: model.deviceTypeId property alias deviceTypeId: model.deviceTypeId

View File

@ -142,7 +142,7 @@ void DeviceRegisterValueHelper::sliderStatesChanged()
namespace { namespace {
void registrierDenShit() void registrierDenShit()
{ {
qmlRegisterType<DeviceRegisterValueHelper>("lightcontrol", 1, 0, "DeviceRegisterValueHelper"); qmlRegisterType<DeviceRegisterValueHelper>("scheincommander", 1, 0, "DeviceRegisterValueHelper");
} }
} }
Q_COREAPP_STARTUP_FUNCTION(registrierDenShit) Q_COREAPP_STARTUP_FUNCTION(registrierDenShit)

View File

@ -464,7 +464,7 @@ void DevicesModel::otherDevicePositionChanged(int row, const QVector3D &position
namespace { namespace {
void registrierDenShit() void registrierDenShit()
{ {
qmlRegisterType<DevicesModel>("lightcontrol", 1, 0, "DevicesModel"); qmlRegisterType<DevicesModel>("scheincommander", 1, 0, "DevicesModel");
} }
} }
Q_COREAPP_STARTUP_FUNCTION(registrierDenShit) Q_COREAPP_STARTUP_FUNCTION(registrierDenShit)

View File

@ -450,7 +450,7 @@ void DeviceTypeRegistersModel::otherDeviceTypeRegisterTypeChanged(const DeviceTy
namespace { namespace {
void registrierDenShit() void registrierDenShit()
{ {
qmlRegisterType<DeviceTypeRegistersModel>("lightcontrol", 1, 0, "DeviceTypeRegistersModel"); qmlRegisterType<DeviceTypeRegistersModel>("scheincommander", 1, 0, "DeviceTypeRegistersModel");
} }
} }
Q_COREAPP_STARTUP_FUNCTION(registrierDenShit) Q_COREAPP_STARTUP_FUNCTION(registrierDenShit)

View File

@ -383,7 +383,7 @@ void DeviceTypesModel::otherDeviceTypeIconNameChanged(int row, const QString &na
namespace { namespace {
void registrierDenShit() void registrierDenShit()
{ {
qmlRegisterType<DeviceTypesModel>("lightcontrol", 1, 0, "DeviceTypesModel"); qmlRegisterType<DeviceTypesModel>("scheincommander", 1, 0, "DeviceTypesModel");
} }
} }
Q_COREAPP_STARTUP_FUNCTION(registrierDenShit) Q_COREAPP_STARTUP_FUNCTION(registrierDenShit)

View File

@ -130,7 +130,8 @@ DmxController::DmxController(QObject *parent) :
{ {
} }
bool DmxController::loadProject(QString name) { bool DmxController::loadProject(QString name)
{
QFile readJsonFile(name); QFile readJsonFile(name);
if (!readJsonFile.exists()) if (!readJsonFile.exists())
{ {

View File

@ -18,6 +18,7 @@ public:
bool loadProject(QString name); bool loadProject(QString name);
bool saveProject(QString name); bool saveProject(QString name);
bool start(); bool start();
Q_INVOKABLE void setRegisterGroupSlider(int registerGroupId, quint8 value); Q_INVOKABLE void setRegisterGroupSlider(int registerGroupId, quint8 value);

View File

@ -6,7 +6,7 @@
namespace { namespace {
void registrierDenShit() 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) Q_COREAPP_STARTUP_FUNCTION(registrierDenShit)

View File

@ -5,6 +5,8 @@
#include <QDebug> #include <QDebug>
#include "dmxcontroller.h" #include "dmxcontroller.h"
#define STR(x) #x
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
qSetMessagePattern(QStringLiteral("%{time dd.MM.yyyy HH:mm:ss.zzz} " 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")); 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}; QGuiApplication app{argc, argv};
QCommandLineParser parser; QCommandLineParser parser;
@ -49,7 +56,7 @@ int main(int argc, char *argv[])
engine.rootContext()->setContextProperty("__controller", &controller); engine.rootContext()->setContextProperty("__controller", &controller);
engine.rootContext()->setContextProperty("__windowed", windowed); 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, QObject::connect(&engine, &QQmlApplicationEngine::objectCreated,
&app, [url](QObject *obj, const QUrl &objUrl) { &app, [url](QObject *obj, const QUrl &objUrl) {
if (!obj && url == objUrl) if (!obj && url == objUrl)

View File

@ -212,7 +212,7 @@ void RegisterGroupModel::setPattern(int n, int k, DeviceTypeRegisterType registe
namespace { namespace {
void registrierDenShit() void registrierDenShit()
{ {
qmlRegisterType<RegisterGroupModel>("lightcontrol", 1, 0, "RegisterGroupModel"); qmlRegisterType<RegisterGroupModel>("scheincommander", 1, 0, "RegisterGroupModel");
} }
} }
Q_COREAPP_STARTUP_FUNCTION(registrierDenShit) Q_COREAPP_STARTUP_FUNCTION(registrierDenShit)

View File

@ -347,7 +347,7 @@ void RegisterGroupsModel::otherRegisterGroupNameChanged(int row, const QString &
namespace { namespace {
void registrierDenShit() void registrierDenShit()
{ {
qmlRegisterType<RegisterGroupsModel>("lightcontrol", 1, 0, "RegisterGroupsModel"); qmlRegisterType<RegisterGroupsModel>("scheincommander", 1, 0, "RegisterGroupsModel");
} }
} }
Q_COREAPP_STARTUP_FUNCTION(registrierDenShit) Q_COREAPP_STARTUP_FUNCTION(registrierDenShit)