diff --git a/platform/qt/CMakeLists.txt b/platform/qt/CMakeLists.txt index fd26d39..77c504e 100644 --- a/platform/qt/CMakeLists.txt +++ b/platform/qt/CMakeLists.txt @@ -6,3 +6,6 @@ set(CMAKE_AUTORCC ON) # network and gui interface for an sACN node add_subdirectory(sacn) + +# Enttec DMX-USB-Pro serial driver +add_subdirectory(dmxwidget) diff --git a/platform/qt/dmxwidget/CMakeLists.txt b/platform/qt/dmxwidget/CMakeLists.txt new file mode 100644 index 0000000..6fb2e1c --- /dev/null +++ b/platform/qt/dmxwidget/CMakeLists.txt @@ -0,0 +1,23 @@ +project(${PROJECT_NAME}-dmxwidget VERSION ${PROJECT_VERSION}) + +find_package(Qt6 REQUIRED COMPONENTS SerialPort) + +add_library(${PROJECT_NAME} SHARED) +add_library(LCP::Qt::DmxWidget ALIAS ${PROJECT_NAME}) + +target_sources(${PROJECT_NAME} + PUBLIC + dmxwidget.h + PRIVATE + dmxwidget.cpp + ) + +target_link_libraries(${PROJECT_NAME} + PUBLIC + ENTTEC::Pro + PRIVATE + Qt::SerialPort + ) + +set_target_properties(${PROJECT_NAME} PROPERTIES VERSION ${PROJECT_VERSION}) +target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/platform/qt/dmxwidget/dmxwidget.cpp b/platform/qt/dmxwidget/dmxwidget.cpp new file mode 100644 index 0000000..8123f71 --- /dev/null +++ b/platform/qt/dmxwidget/dmxwidget.cpp @@ -0,0 +1,30 @@ +/* + dmxwidget.cpp + + Copyright (c) 2023 Kevin Matz (kevin.matz@gmail.com) + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. +*/ +#include "dmxwidget.h" + +DmxWidget::DmxWidget(QObject *parent) + : QObject{parent} +{ + +} diff --git a/platform/qt/dmxwidget/dmxwidget.h b/platform/qt/dmxwidget/dmxwidget.h new file mode 100644 index 0000000..aacf37a --- /dev/null +++ b/platform/qt/dmxwidget/dmxwidget.h @@ -0,0 +1,39 @@ +/* + qwidget.h + + Copyright (c) 2023 Kevin Matz (kevin.matz@gmail.com) + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. +*/ +#pragma once + +#include +#include + +class DmxWidget + : public QObject + , public ENTTEC::Widget +{ + Q_OBJECT +public: + explicit DmxWidget(QObject *parent = nullptr); + +signals: + +};