From 34ed5b2216fdba1f58bfa5d798cfbbd06d257948 Mon Sep 17 00:00:00 2001 From: Maik Jurischka Date: Fri, 19 Dec 2025 13:04:26 +0100 Subject: [PATCH] re-organize folder structure --- .gitignore | 1 + CMakeLists.txt | 36 +++++++++++-------- SOCKET_API.md => docs/SOCKET_API.md | 0 aboutwidget.h => include/aboutwidget.h | 0 .../cameracontrolwidget.h | 0 .../gstreamerpipelinewidget.h | 0 mainwindow.h => include/mainwindow.h | 0 socketclient.h => include/socketclient.h | 0 .../videoviewerwidget.h | 0 build.sh => scripts/build.sh | 0 run.sh => scripts/run.sh | 0 .../test_connection.sh | 0 aboutwidget.cpp => src/aboutwidget.cpp | 0 .../cameracontrolwidget.cpp | 0 .../gstreamerpipelinewidget.cpp | 0 main.cpp => src/main.cpp | 0 mainwindow.cpp => src/mainwindow.cpp | 0 socketclient.cpp => src/socketclient.cpp | 0 .../videoviewerwidget.cpp | 0 mainwindow.ui => ui/mainwindow.ui | 0 20 files changed, 22 insertions(+), 15 deletions(-) rename SOCKET_API.md => docs/SOCKET_API.md (100%) rename aboutwidget.h => include/aboutwidget.h (100%) rename cameracontrolwidget.h => include/cameracontrolwidget.h (100%) rename gstreamerpipelinewidget.h => include/gstreamerpipelinewidget.h (100%) rename mainwindow.h => include/mainwindow.h (100%) rename socketclient.h => include/socketclient.h (100%) rename videoviewerwidget.h => include/videoviewerwidget.h (100%) rename build.sh => scripts/build.sh (100%) rename run.sh => scripts/run.sh (100%) rename test_connection.sh => scripts/test_connection.sh (100%) rename aboutwidget.cpp => src/aboutwidget.cpp (100%) rename cameracontrolwidget.cpp => src/cameracontrolwidget.cpp (100%) rename gstreamerpipelinewidget.cpp => src/gstreamerpipelinewidget.cpp (100%) rename main.cpp => src/main.cpp (100%) rename mainwindow.cpp => src/mainwindow.cpp (100%) rename socketclient.cpp => src/socketclient.cpp (100%) rename videoviewerwidget.cpp => src/videoviewerwidget.cpp (100%) rename mainwindow.ui => ui/mainwindow.ui (100%) diff --git a/.gitignore b/.gitignore index 6742ac6..af9632c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ # CMake build files build/ build-*/ +cmake-build-*/ CMakeFiles/ CMakeCache.txt cmake_install.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index 031bd3e..80809b4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,25 +7,31 @@ pkg_check_modules(GSTREAMER REQUIRED gstreamer-1.0 gstreamer-video-1.0 gstreamer qt_standard_project_setup() +set(CMAKE_AUTOUIC_SEARCH_PATHS ${CMAKE_CURRENT_SOURCE_DIR}/ui) + qt_add_executable(gstreamerViewer WIN32 MACOSX_BUNDLE - main.cpp - mainwindow.cpp - mainwindow.h - mainwindow.ui - socketclient.cpp - socketclient.h - gstreamerpipelinewidget.cpp - gstreamerpipelinewidget.h - cameracontrolwidget.cpp - cameracontrolwidget.h - videoviewerwidget.cpp - videoviewerwidget.h - aboutwidget.cpp - aboutwidget.h + src/main.cpp + src/mainwindow.cpp + include/mainwindow.h + ui/mainwindow.ui + src/socketclient.cpp + include/socketclient.h + src/gstreamerpipelinewidget.cpp + include/gstreamerpipelinewidget.h + src/cameracontrolwidget.cpp + include/cameracontrolwidget.h + src/videoviewerwidget.cpp + include/videoviewerwidget.h + src/aboutwidget.cpp + include/aboutwidget.h ) -target_include_directories(gstreamerViewer PRIVATE ${GSTREAMER_INCLUDE_DIRS}) +target_include_directories(gstreamerViewer + PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/include + ${GSTREAMER_INCLUDE_DIRS} +) target_link_libraries(gstreamerViewer PRIVATE Qt::Core diff --git a/SOCKET_API.md b/docs/SOCKET_API.md similarity index 100% rename from SOCKET_API.md rename to docs/SOCKET_API.md diff --git a/aboutwidget.h b/include/aboutwidget.h similarity index 100% rename from aboutwidget.h rename to include/aboutwidget.h diff --git a/cameracontrolwidget.h b/include/cameracontrolwidget.h similarity index 100% rename from cameracontrolwidget.h rename to include/cameracontrolwidget.h diff --git a/gstreamerpipelinewidget.h b/include/gstreamerpipelinewidget.h similarity index 100% rename from gstreamerpipelinewidget.h rename to include/gstreamerpipelinewidget.h diff --git a/mainwindow.h b/include/mainwindow.h similarity index 100% rename from mainwindow.h rename to include/mainwindow.h diff --git a/socketclient.h b/include/socketclient.h similarity index 100% rename from socketclient.h rename to include/socketclient.h diff --git a/videoviewerwidget.h b/include/videoviewerwidget.h similarity index 100% rename from videoviewerwidget.h rename to include/videoviewerwidget.h diff --git a/build.sh b/scripts/build.sh similarity index 100% rename from build.sh rename to scripts/build.sh diff --git a/run.sh b/scripts/run.sh similarity index 100% rename from run.sh rename to scripts/run.sh diff --git a/test_connection.sh b/scripts/test_connection.sh similarity index 100% rename from test_connection.sh rename to scripts/test_connection.sh diff --git a/aboutwidget.cpp b/src/aboutwidget.cpp similarity index 100% rename from aboutwidget.cpp rename to src/aboutwidget.cpp diff --git a/cameracontrolwidget.cpp b/src/cameracontrolwidget.cpp similarity index 100% rename from cameracontrolwidget.cpp rename to src/cameracontrolwidget.cpp diff --git a/gstreamerpipelinewidget.cpp b/src/gstreamerpipelinewidget.cpp similarity index 100% rename from gstreamerpipelinewidget.cpp rename to src/gstreamerpipelinewidget.cpp diff --git a/main.cpp b/src/main.cpp similarity index 100% rename from main.cpp rename to src/main.cpp diff --git a/mainwindow.cpp b/src/mainwindow.cpp similarity index 100% rename from mainwindow.cpp rename to src/mainwindow.cpp diff --git a/socketclient.cpp b/src/socketclient.cpp similarity index 100% rename from socketclient.cpp rename to src/socketclient.cpp diff --git a/videoviewerwidget.cpp b/src/videoviewerwidget.cpp similarity index 100% rename from videoviewerwidget.cpp rename to src/videoviewerwidget.cpp diff --git a/mainwindow.ui b/ui/mainwindow.ui similarity index 100% rename from mainwindow.ui rename to ui/mainwindow.ui