From 0c1abac82f526a67a7bf1e41b2971a3b4a0b2814 Mon Sep 17 00:00:00 2001 From: Peter M. Groen Date: Thu, 24 Feb 2022 23:54:27 +0100 Subject: [PATCH] Added Control Class --- .gitignore | 2 ++ src/controlcentre/CMakeLists.txt | 6 +++--- src/controlcentre/controlcentre.cpp | 28 ++++++++++++++++++++++++++++ src/controlcentre/controlcentre.h | 36 ++++++++++++++++++++++++++++++++++++ src/controlcentre/main.cpp | 30 ++++++++++++++++++++++++++++++ 5 files changed, 99 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 0a4ac40..7091aa0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ /.gitmodules /cmake/ /versioning/ +/build/ +/CMakeLists.txt.user diff --git a/src/controlcentre/CMakeLists.txt b/src/controlcentre/CMakeLists.txt index 855294b..ebb4542 100644 --- a/src/controlcentre/CMakeLists.txt +++ b/src/controlcentre/CMakeLists.txt @@ -26,10 +26,10 @@ find_package( Qt5Widgets REQUIRED ) include(compiler) -include_directories( +include_directories( SYSTEM ${Qt5Core_INCLUDE_DIRS} ${Qt5Gui_INCLUDE_DIRS} - ${Qt5Widget_INCLUDE_DIRS} + ${Qt5Widgets_INCLUDE_DIRS} ) set(SRC_LIST @@ -49,7 +49,7 @@ add_executable( ${PROJECT_NAME} target_link_libraries( ${PROJECT_NAME} ${Qt5Core_LIBRARIES} ${Qt5Gui_LIBRARIES} - ${Qt5Widget_LIBRARIES} + ${Qt5Widgets_LIBRARIES} mqtt-cpp ) diff --git a/src/controlcentre/controlcentre.cpp b/src/controlcentre/controlcentre.cpp index e69de29..d37de17 100644 --- a/src/controlcentre/controlcentre.cpp +++ b/src/controlcentre/controlcentre.cpp @@ -0,0 +1,28 @@ +/* **************************************************************************** + * Copyright 2019 Open Systems Development BV * + * * + * 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 "controlcentre.h" + +ControlCentre::ControlCentre( QObject *parent ) + : QObject( parent ) +{ + +} diff --git a/src/controlcentre/controlcentre.h b/src/controlcentre/controlcentre.h index e69de29..08ed88b 100644 --- a/src/controlcentre/controlcentre.h +++ b/src/controlcentre/controlcentre.h @@ -0,0 +1,36 @@ +/* **************************************************************************** + * Copyright 2022 Open Systems Development BV * + * * + * 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 + +class ControlCentre : public QObject +{ + Q_OBJECT + +public: + ControlCentre( QObject *parent = nullptr ); + + virtual ~ControlCentre() {} + + +}; diff --git a/src/controlcentre/main.cpp b/src/controlcentre/main.cpp index e69de29..7c0b654 100644 --- a/src/controlcentre/main.cpp +++ b/src/controlcentre/main.cpp @@ -0,0 +1,30 @@ +/* **************************************************************************** + * Copyright 2019 Open Systems Development BV * + * * + * 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 + +int main( int argc, char* argv[] ) +{ + QApplication oApp( argc, argv ); + + return oApp.exec(); +} -- libgit2 0.21.4