Skip to content

Commit

Permalink
UI,shared: Move OBSPropertiesView to its own subdirectory
Browse files Browse the repository at this point in the history
  • Loading branch information
tytan652 committed Aug 5, 2023
1 parent dc5b0af commit ebde744
Show file tree
Hide file tree
Showing 22 changed files with 164 additions and 277 deletions.
14 changes: 6 additions & 8 deletions UI/cmake/legacy.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ if(NOT TARGET OBS::qt-slider-ignorewheel)
"${CMAKE_BINARY_DIR}/shared/qt/slider-ignorewheel")
endif()

if(NOT TARGET OBS::properties-view)
add_subdirectory("${CMAKE_SOURCE_DIR}/shared/properties-view" "${CMAKE_BINARY_DIR}/shared/properties-view")
endif()

target_link_libraries(obs PRIVATE Qt::Widgets Qt::Svg Qt::Xml Qt::Network)

set_target_properties(
Expand Down Expand Up @@ -180,8 +184,6 @@ target_sources(
audio-encoders.hpp
balance-slider.hpp
clickable-label.hpp
double-slider.cpp
double-slider.hpp
horizontal-scroll-area.cpp
horizontal-scroll-area.hpp
item-widget-helpers.cpp
Expand All @@ -206,9 +208,6 @@ target_sources(
menu-button.cpp
menu-button.hpp
mute-checkbox.hpp
properties-view.cpp
properties-view.hpp
properties-view.moc.hpp
record-button.cpp
record-button.hpp
remote-text.cpp
Expand All @@ -220,8 +219,6 @@ target_sources(
slider-absoluteset-style.hpp
source-label.cpp
source-label.hpp
spinbox-ignorewheel.cpp
spinbox-ignorewheel.hpp
source-tree.cpp
source-tree.hpp
url-push-button.cpp
Expand Down Expand Up @@ -312,7 +309,8 @@ target_link_libraries(
OBS::qt-wrappers
OBS::qt-plain-text-edit
OBS::qt-vertical-scroll-area
OBS::qt-slider-ignorewheel)
OBS::qt-slider-ignorewheel
OBS::properties-view)

set_target_properties(obs PROPERTIES FOLDER "frontend")

Expand Down
13 changes: 5 additions & 8 deletions UI/cmake/ui-elements.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,12 @@ if(NOT TARGET OBS::qt-slider-ignorewheel)
"${CMAKE_BINARY_DIR}/shared/qt/slider-ignorewheel")
endif()

if(NOT TARGET OBS::properties-view)
add_subdirectory("${CMAKE_SOURCE_DIR}/shared/properties-view" "${CMAKE_BINARY_DIR}/shared/properties-view")
endif()

target_link_libraries(obs-studio PRIVATE OBS::qt-plain-text-edit OBS::qt-vertical-scroll-area
OBS::qt-slider-ignorewheel)
OBS::qt-slider-ignorewheel OBS::properties-view)

target_sources(
obs-studio
Expand All @@ -26,8 +30,6 @@ target_sources(
clickable-label.hpp
context-bar-controls.cpp
context-bar-controls.hpp
double-slider.cpp
double-slider.hpp
expand-checkbox.hpp
focus-list.cpp
focus-list.hpp
Expand All @@ -50,9 +52,6 @@ target_sources(
menu-button.cpp
menu-button.hpp
mute-checkbox.hpp
properties-view.cpp
properties-view.hpp
properties-view.moc.hpp
record-button.cpp
record-button.hpp
remote-text.cpp
Expand All @@ -66,8 +65,6 @@ target_sources(
source-label.hpp
source-tree.cpp
source-tree.hpp
spinbox-ignorewheel.cpp
spinbox-ignorewheel.hpp
undo-stack-obs.cpp
undo-stack-obs.hpp
url-push-button.cpp
Expand Down
2 changes: 1 addition & 1 deletion UI/frontend-plugins/aja-output-ui/AJAOutputUI.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#pragma once

#include <QDialog>
#include <properties-view.hpp>

#include "ui_output.h"
#include "../../UI/properties-view.hpp"

namespace aja {
class CardManager;
Expand Down
39 changes: 5 additions & 34 deletions UI/frontend-plugins/aja-output-ui/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,8 @@ find_qt(COMPONENTS Widgets COMPONENTS_LINUX Gui)
add_library(aja-output-ui MODULE)
add_library(OBS::aja-output-ui ALIAS aja-output-ui)

if(NOT TARGET OBS::qt-wrappers)
add_subdirectory("${CMAKE_SOURCE_DIR}/shared/qt/wrappers" "${CMAKE_BINARY_DIR}/shared/qt/wrappers")
endif()

if(NOT TARGET OBS::qt-plain-text-edit)
add_subdirectory("${CMAKE_SOURCE_DIR}/shared/qt/plain-text-edit" "${CMAKE_BINARY_DIR}/shared/qt/plain-text-edit")
endif()

if(NOT TARGET OBS::qt-vertical-scroll-area)
add_subdirectory("${CMAKE_SOURCE_DIR}/shared/qt/vertical-scroll-area"
"${CMAKE_BINARY_DIR}/shared/qt/vertical-scroll-area")
endif()

if(NOT TARGET OBS::qt-slider-ignorewheel)
add_subdirectory("${CMAKE_SOURCE_DIR}/shared/qt/slider-ignorewheel"
"${CMAKE_BINARY_DIR}/shared/qt/slider-ignorewheel")
if(NOT TARGET OBS::properties-view)
add_subdirectory("${CMAKE_SOURCE_DIR}/shared/properties-view" "${CMAKE_BINARY_DIR}/shared/properties-view")
endif()

target_sources(
Expand All @@ -52,27 +38,12 @@ target_sources(
"${CMAKE_SOURCE_DIR}/plugins/aja/aja-vpid-data.cpp"
"${CMAKE_SOURCE_DIR}/plugins/aja/aja-vpid-data.hpp"
"${CMAKE_SOURCE_DIR}/plugins/aja/aja-widget-io.cpp"
"${CMAKE_SOURCE_DIR}/plugins/aja/aja-widget-io.hpp"
"${CMAKE_SOURCE_DIR}/UI/double-slider.cpp"
"${CMAKE_SOURCE_DIR}/UI/double-slider.hpp"
"${CMAKE_SOURCE_DIR}/UI/properties-view.hpp"
"${CMAKE_SOURCE_DIR}/UI/properties-view.cpp"
"${CMAKE_SOURCE_DIR}/UI/properties-view.moc.hpp"
"${CMAKE_SOURCE_DIR}/UI/spinbox-ignorewheel.cpp"
"${CMAKE_SOURCE_DIR}/UI/spinbox-ignorewheel.hpp")
"${CMAKE_SOURCE_DIR}/plugins/aja/aja-widget-io.hpp")

target_sources(aja-output-ui PRIVATE forms/output.ui)

target_link_libraries(
aja-output-ui
PRIVATE OBS::libobs
OBS::frontend-api
OBS::qt-wrappers
OBS::qt-plain-text-edit
OBS::qt-vertical-scroll-area
OBS::qt-slider-ignorewheel
Qt::Widgets
AJA::LibAJANTV2)
target_link_libraries(aja-output-ui PRIVATE OBS::libobs OBS::frontend-api OBS::properties-view Qt::Widgets
AJA::LibAJANTV2)

if(OS_WINDOWS)
configure_file(cmake/windows/obs-module.rc.in aja-output-ui.rc)
Expand Down
41 changes: 6 additions & 35 deletions UI/frontend-plugins/aja-output-ui/cmake/legacy.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,8 @@ add_library(OBS::aja-output-ui ALIAS aja-output-ui)

find_qt(COMPONENTS Widgets COMPONENTS_LINUX Gui)

if(NOT TARGET OBS::qt-wrappers)
add_subdirectory("${CMAKE_SOURCE_DIR}/shared/qt/wrappers" "${CMAKE_BINARY_DIR}/shared/qt/wrappers")
endif()

if(NOT TARGET OBS::qt-plain-text-edit)
add_subdirectory("${CMAKE_SOURCE_DIR}/shared/qt/plain-text-edit" "${CMAKE_BINARY_DIR}/shared/qt/plain-text-edit")
endif()

if(NOT TARGET OBS::qt-vertical-scroll-area)
add_subdirectory("${CMAKE_SOURCE_DIR}/shared/qt/vertical-scroll-area"
"${CMAKE_BINARY_DIR}/shared/qt/vertical-scroll-area")
endif()

if(NOT TARGET OBS::qt-slider-ignorewheel)
add_subdirectory("${CMAKE_SOURCE_DIR}/shared/qt/slider-ignorewheel"
"${CMAKE_BINARY_DIR}/shared/qt/slider-ignorewheel")
if(NOT TARGET OBS::properties-view)
add_subdirectory("${CMAKE_SOURCE_DIR}/shared/properties-view" "${CMAKE_BINARY_DIR}/shared/properties-view")
endif()

set_target_properties(
Expand Down Expand Up @@ -63,25 +49,10 @@ target_sources(
${CMAKE_SOURCE_DIR}/plugins/aja/aja-vpid-data.cpp
${CMAKE_SOURCE_DIR}/plugins/aja/aja-vpid-data.hpp
${CMAKE_SOURCE_DIR}/plugins/aja/aja-widget-io.cpp
${CMAKE_SOURCE_DIR}/plugins/aja/aja-widget-io.hpp
${CMAKE_SOURCE_DIR}/UI/double-slider.cpp
${CMAKE_SOURCE_DIR}/UI/double-slider.hpp
${CMAKE_SOURCE_DIR}/UI/properties-view.hpp
${CMAKE_SOURCE_DIR}/UI/properties-view.cpp
${CMAKE_SOURCE_DIR}/UI/properties-view.moc.hpp
${CMAKE_SOURCE_DIR}/UI/spinbox-ignorewheel.cpp
${CMAKE_SOURCE_DIR}/UI/spinbox-ignorewheel.hpp)

target_link_libraries(
aja-output-ui
PRIVATE OBS::libobs
OBS::frontend-api
OBS::qt-wrappers
OBS::qt-plain-text-edit
OBS::qt-vertical-scroll-area
OBS::qt-slider-ignorewheel
Qt::Widgets
AJA::LibAJANTV2)
${CMAKE_SOURCE_DIR}/plugins/aja/aja-widget-io.hpp)

target_link_libraries(aja-output-ui PRIVATE OBS::libobs OBS::frontend-api OBS::properties-view Qt::Widgets
AJA::LibAJANTV2)

if(OS_MACOS)
find_library(IOKIT_FRAMEWORK Iokit)
Expand Down
43 changes: 5 additions & 38 deletions UI/frontend-plugins/decklink-output-ui/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,49 +12,16 @@ find_qt(COMPONENTS Widgets COMPONENTS_LINUX Gui)
add_library(decklink-output-ui MODULE)
add_library(OBS::decklink-output-ui ALIAS decklink-output-ui)

if(NOT TARGET OBS::qt-wrappers)
add_subdirectory("${CMAKE_SOURCE_DIR}/shared/qt/wrappers" "${CMAKE_BINARY_DIR}/shared/qt/wrappers")
endif()

if(NOT TARGET OBS::qt-plain-text-edit)
add_subdirectory("${CMAKE_SOURCE_DIR}/shared/qt/plain-text-edit" "${CMAKE_BINARY_DIR}/shared/qt/plain-text-edit")
endif()

if(NOT TARGET OBS::qt-vertical-scroll-area)
add_subdirectory("${CMAKE_SOURCE_DIR}/shared/qt/vertical-scroll-area"
"${CMAKE_BINARY_DIR}/shared/qt/vertical-scroll-area")
endif()

if(NOT TARGET OBS::qt-slider-ignorewheel)
add_subdirectory("${CMAKE_SOURCE_DIR}/shared/qt/slider-ignorewheel"
"${CMAKE_BINARY_DIR}/shared/qt/slider-ignorewheel")
if(NOT TARGET OBS::properties-view)
add_subdirectory("${CMAKE_SOURCE_DIR}/shared/properties-view" "${CMAKE_BINARY_DIR}/shared/properties-view")
endif()

target_sources(decklink-output-ui PRIVATE forms/output.ui)

target_sources(
decklink-output-ui
PRIVATE DecklinkOutputUI.cpp
DecklinkOutputUI.h
decklink-ui-main.cpp
decklink-ui-main.h
"${CMAKE_SOURCE_DIR}/UI/double-slider.cpp"
"${CMAKE_SOURCE_DIR}/UI/double-slider.hpp"
"${CMAKE_SOURCE_DIR}/UI/properties-view.hpp"
"${CMAKE_SOURCE_DIR}/UI/properties-view.cpp"
"${CMAKE_SOURCE_DIR}/UI/properties-view.moc.hpp"
"${CMAKE_SOURCE_DIR}/UI/spinbox-ignorewheel.cpp"
"${CMAKE_SOURCE_DIR}/UI/spinbox-ignorewheel.hpp")
target_sources(decklink-output-ui PRIVATE DecklinkOutputUI.cpp DecklinkOutputUI.h decklink-ui-main.cpp
decklink-ui-main.h)

target_link_libraries(
decklink-output-ui
PRIVATE OBS::libobs
OBS::frontend-api
OBS::qt-wrappers
OBS::qt-plain-text-edit
OBS::qt-vertical-scroll-area
OBS::qt-slider-ignorewheel
Qt::Widgets)
target_link_libraries(decklink-output-ui PRIVATE OBS::libobs OBS::frontend-api OBS::properties-view Qt::Widgets)

if(OS_WINDOWS)
configure_file(cmake/windows/obs-module.rc.in decklink-output-ui.rc)
Expand Down
2 changes: 1 addition & 1 deletion UI/frontend-plugins/decklink-output-ui/DecklinkOutputUI.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#pragma once

#include <QDialog>
#include <properties-view.hpp>

#include "ui_output.h"
#include "../../UI/properties-view.hpp"

class DecklinkOutputUI : public QDialog {
Q_OBJECT
Expand Down
45 changes: 6 additions & 39 deletions UI/frontend-plugins/decklink-output-ui/cmake/legacy.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,8 @@ add_library(OBS::decklink-output-ui ALIAS decklink-output-ui)

find_qt(COMPONENTS Widgets COMPONENTS_LINUX Gui)

if(NOT TARGET OBS::qt-wrappers)
add_subdirectory("${CMAKE_SOURCE_DIR}/shared/qt/wrappers" "${CMAKE_BINARY_DIR}/shared/qt/wrappers")
endif()

if(NOT TARGET OBS::qt-plain-text-edit)
add_subdirectory("${CMAKE_SOURCE_DIR}/shared/qt/plain-text-edit" "${CMAKE_BINARY_DIR}/shared/qt/plain-text-edit")
endif()

if(NOT TARGET OBS::qt-vertical-scroll-area)
add_subdirectory("${CMAKE_SOURCE_DIR}/shared/qt/vertical-scroll-area"
"${CMAKE_BINARY_DIR}/shared/qt/vertical-scroll-area")
endif()

if(NOT TARGET OBS::qt-slider-ignorewheel)
add_subdirectory("${CMAKE_SOURCE_DIR}/shared/qt/slider-ignorewheel"
"${CMAKE_BINARY_DIR}/shared/qt/slider-ignorewheel")
if(NOT TARGET OBS::properties-view)
add_subdirectory("${CMAKE_SOURCE_DIR}/shared/properties-view" "${CMAKE_BINARY_DIR}/shared/properties-view")
endif()

set_target_properties(
Expand All @@ -40,29 +26,10 @@ endif()

target_sources(decklink-output-ui PRIVATE forms/output.ui)

target_sources(
decklink-output-ui
PRIVATE DecklinkOutputUI.cpp
DecklinkOutputUI.h
decklink-ui-main.cpp
decklink-ui-main.h
${CMAKE_SOURCE_DIR}/UI/double-slider.cpp
${CMAKE_SOURCE_DIR}/UI/double-slider.hpp
${CMAKE_SOURCE_DIR}/UI/properties-view.hpp
${CMAKE_SOURCE_DIR}/UI/properties-view.cpp
${CMAKE_SOURCE_DIR}/UI/properties-view.moc.hpp
${CMAKE_SOURCE_DIR}/UI/spinbox-ignorewheel.cpp
${CMAKE_SOURCE_DIR}/UI/spinbox-ignorewheel.hpp)

target_link_libraries(
decklink-output-ui
PRIVATE OBS::libobs
OBS::frontend-api
OBS::qt-wrappers
OBS::qt-plain-text-edit
OBS::qt-vertical-scroll-area
OBS::qt-slider-ignorewheel
Qt::Widgets)
target_sources(decklink-output-ui PRIVATE DecklinkOutputUI.cpp DecklinkOutputUI.h decklink-ui-main.cpp
decklink-ui-main.h)

target_link_libraries(decklink-output-ui PRIVATE OBS::libobs OBS::frontend-api OBS::properties-view Qt::Widgets)

target_compile_features(decklink-output-ui PRIVATE cxx_std_17)

Expand Down
30 changes: 5 additions & 25 deletions UI/frontend-plugins/frontend-tools/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,31 +15,12 @@ if(NOT TARGET OBS::qt-plain-text-edit)
add_subdirectory("${CMAKE_SOURCE_DIR}/shared/qt/plain-text-edit" "${CMAKE_BINARY_DIR}/shared/qt/plain-text-edit")
endif()

if(NOT TARGET OBS::qt-vertical-scroll-area)
add_subdirectory("${CMAKE_SOURCE_DIR}/shared/qt/vertical-scroll-area"
"${CMAKE_BINARY_DIR}/shared/qt/vertical-scroll-area")
if(NOT TARGET OBS::properties-view)
add_subdirectory("${CMAKE_SOURCE_DIR}/shared/properties-view" "${CMAKE_BINARY_DIR}/shared/properties-view")
endif()

if(NOT TARGET OBS::qt-slider-ignorewheel)
add_subdirectory("${CMAKE_SOURCE_DIR}/shared/qt/slider-ignorewheel"
"${CMAKE_BINARY_DIR}/shared/qt/slider-ignorewheel")
endif()

target_sources(
frontend-tools
PRIVATE frontend-tools.c
auto-scene-switcher.hpp
auto-scene-switcher.cpp
output-timer.hpp
tool-helpers.hpp
output-timer.cpp
"${CMAKE_SOURCE_DIR}/UI/double-slider.cpp"
"${CMAKE_SOURCE_DIR}/UI/double-slider.hpp"
"${CMAKE_SOURCE_DIR}/UI/properties-view.cpp"
"${CMAKE_SOURCE_DIR}/UI/properties-view.hpp"
"${CMAKE_SOURCE_DIR}/UI/properties-view.moc.hpp"
"${CMAKE_SOURCE_DIR}/UI/spinbox-ignorewheel.cpp"
"${CMAKE_SOURCE_DIR}/UI/spinbox-ignorewheel.hpp")
target_sources(frontend-tools PRIVATE frontend-tools.c auto-scene-switcher.hpp auto-scene-switcher.cpp output-timer.hpp
tool-helpers.hpp output-timer.cpp)

target_sources(frontend-tools PRIVATE forms/auto-scene-switcher.ui forms/captions.ui forms/output-timer.ui
forms/scripts.ui)
Expand All @@ -50,8 +31,7 @@ target_link_libraries(
OBS::libobs
OBS::qt-wrappers
OBS::qt-plain-text-edit
OBS::qt-vertical-scroll-area
OBS::qt-slider-ignorewheel
OBS::properties-view
Qt::Widgets
$<$<PLATFORM_ID:Linux,FreeBSD>:Qt::GuiPrivate>)

Expand Down
Loading

0 comments on commit ebde744

Please sign in to comment.