mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-07-12 00:08:21 -04:00
frontend: Move idian widgets to shared/qt
This commit is contained in:
committed by
Ryan Foster
parent
de9fcd6b42
commit
9e0c3219ff
@@ -81,22 +81,4 @@ target_sources(
|
||||
components/VolumeSlider.hpp
|
||||
components/WindowCaptureToolbar.cpp
|
||||
components/WindowCaptureToolbar.hpp
|
||||
components/idian/OBSActionRow.cpp
|
||||
components/idian/OBSActionRow.hpp
|
||||
components/idian/OBSCheckBox.cpp
|
||||
components/idian/OBSCheckBox.hpp
|
||||
components/idian/OBSComboBox.cpp
|
||||
components/idian/OBSComboBox.hpp
|
||||
components/idian/OBSDoubleSpinBox.cpp
|
||||
components/idian/OBSDoubleSpinBox.hpp
|
||||
components/idian/OBSGroupBox.cpp
|
||||
components/idian/OBSGroupBox.hpp
|
||||
components/idian/OBSIdianWidget.hpp
|
||||
components/idian/OBSPropertiesList.cpp
|
||||
components/idian/OBSPropertiesList.hpp
|
||||
components/idian/OBSSpinBox.cpp
|
||||
components/idian/OBSSpinBox.hpp
|
||||
components/idian/OBSToggleSwitch.cpp
|
||||
components/idian/OBSToggleSwitch.hpp
|
||||
components/idian/obs-widgets.hpp
|
||||
)
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
if(NOT TARGET OBS::idian)
|
||||
add_subdirectory("${CMAKE_SOURCE_DIR}/shared/qt/idian" "${CMAKE_BINARY_DIR}/shared/qt/idian")
|
||||
endif()
|
||||
|
||||
target_link_libraries(obs-studio PRIVATE OBS::idian)
|
||||
|
||||
if(NOT TARGET OBS::properties-view)
|
||||
add_subdirectory("${CMAKE_SOURCE_DIR}/shared/properties-view" "${CMAKE_BINARY_DIR}/shared/properties-view")
|
||||
endif()
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
#include "OBSIdianPlayground.hpp"
|
||||
|
||||
#include "components/idian/obs-widgets.hpp"
|
||||
#include <Idian/obs-widgets.hpp>
|
||||
|
||||
#include <QTimer>
|
||||
|
||||
|
||||
@@ -17,8 +17,6 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "components/idian/obs-widgets.hpp"
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
#include <memory>
|
||||
|
||||
35
shared/qt/idian/CMakeLists.txt
Normal file
35
shared/qt/idian/CMakeLists.txt
Normal file
@@ -0,0 +1,35 @@
|
||||
cmake_minimum_required(VERSION 3.28...3.30)
|
||||
|
||||
find_package(Qt6 REQUIRED Core Widgets Svg)
|
||||
|
||||
add_library(idian STATIC)
|
||||
add_library(OBS::idian ALIAS idian)
|
||||
|
||||
target_sources(
|
||||
idian
|
||||
PRIVATE
|
||||
OBSActionRow.cpp
|
||||
OBSActionRow.hpp
|
||||
OBSCheckBox.cpp
|
||||
OBSCheckBox.hpp
|
||||
OBSComboBox.cpp
|
||||
OBSComboBox.hpp
|
||||
OBSDoubleSpinBox.cpp
|
||||
OBSDoubleSpinBox.hpp
|
||||
OBSIdianWidget.hpp
|
||||
OBSGroupBox.cpp
|
||||
OBSGroupBox.hpp
|
||||
OBSPropertiesList.cpp
|
||||
OBSPropertiesList.hpp
|
||||
OBSSpinBox.cpp
|
||||
OBSSpinBox.hpp
|
||||
OBSToggleSwitch.cpp
|
||||
OBSToggleSwitch.hpp
|
||||
)
|
||||
target_sources(idian PUBLIC include/Idian/obs-widgets.hpp)
|
||||
|
||||
set_target_properties(idian PROPERTIES AUTOMOC ON FOLDER "frontend")
|
||||
|
||||
target_include_directories(idian PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include")
|
||||
|
||||
target_link_libraries(idian PUBLIC Qt::Core Qt::Widgets Qt::Svg)
|
||||
@@ -20,7 +20,6 @@
|
||||
#include <QSizePolicy>
|
||||
|
||||
#include "OBSActionRow.hpp"
|
||||
#include <util/base.h>
|
||||
#include <QSvgRenderer>
|
||||
|
||||
OBSActionRowWidget::OBSActionRowWidget(QWidget *parent) : OBSActionRow(parent)
|
||||
@@ -240,10 +239,8 @@ OBSActionRowExpandButton::OBSActionRowExpandButton(QWidget *parent) : QAbstractB
|
||||
setCheckable(true);
|
||||
}
|
||||
|
||||
void OBSActionRowExpandButton::paintEvent(QPaintEvent *event)
|
||||
void OBSActionRowExpandButton::paintEvent(QPaintEvent *)
|
||||
{
|
||||
UNUSED_PARAMETER(event);
|
||||
|
||||
QStyleOptionButton opt;
|
||||
opt.initFrom(this);
|
||||
QPainter p(this);
|
||||
@@ -18,9 +18,6 @@
|
||||
#include "OBSActionRow.hpp"
|
||||
#include "OBSComboBox.hpp"
|
||||
#include <QTimer>
|
||||
#include <util/base.h>
|
||||
|
||||
#define UNUSED_PARAMETER(param) (void)param
|
||||
|
||||
OBSComboBox::OBSComboBox(QWidget *parent) : QComboBox(parent), OBSIdianUtils(this) {}
|
||||
|
||||
@@ -51,7 +48,6 @@ void OBSComboBox::hidePopup()
|
||||
|
||||
void OBSComboBox::mousePressEvent(QMouseEvent *event)
|
||||
{
|
||||
blog(LOG_INFO, "OBSComboBox::mousePressEvent");
|
||||
QComboBox::mousePressEvent(event);
|
||||
}
|
||||
|
||||
@@ -16,9 +16,6 @@
|
||||
******************************************************************************/
|
||||
|
||||
#include "OBSToggleSwitch.hpp"
|
||||
#include <util/base.h>
|
||||
|
||||
#define UNUSED_PARAMETER(param) (void)param
|
||||
|
||||
static QColor blendColors(const QColor &color1, const QColor &color2, float ratio)
|
||||
{
|
||||
@@ -100,10 +97,8 @@ void OBSToggleSwitch::changeEvent(QEvent *event)
|
||||
}
|
||||
}
|
||||
|
||||
void OBSToggleSwitch::paintEvent(QPaintEvent *e)
|
||||
void OBSToggleSwitch::paintEvent(QPaintEvent *)
|
||||
{
|
||||
UNUSED_PARAMETER(e);
|
||||
|
||||
QStyleOptionButton opt;
|
||||
opt.initFrom(this);
|
||||
QPainter p(this);
|
||||
@@ -21,14 +21,14 @@
|
||||
//
|
||||
// (OBS Idian, get it?)
|
||||
|
||||
#include "OBSActionRow.hpp"
|
||||
#include "OBSCheckBox.hpp"
|
||||
#include "OBSComboBox.hpp"
|
||||
#include "OBSDoubleSpinBox.hpp"
|
||||
#include "OBSGroupBox.hpp"
|
||||
#include "OBSPropertiesList.hpp"
|
||||
#include "OBSSpinBox.hpp"
|
||||
#include "OBSToggleSwitch.hpp"
|
||||
#include "../../OBSActionRow.hpp"
|
||||
#include "../../OBSCheckBox.hpp"
|
||||
#include "../../OBSComboBox.hpp"
|
||||
#include "../../OBSDoubleSpinBox.hpp"
|
||||
#include "../../OBSGroupBox.hpp"
|
||||
#include "../../OBSPropertiesList.hpp"
|
||||
#include "../../OBSSpinBox.hpp"
|
||||
#include "../../OBSToggleSwitch.hpp"
|
||||
|
||||
/// Note: This file serves as an all-in-one include for custom OBS widgets.
|
||||
/// It is not intended to define any widgets by itself.
|
||||
Reference in New Issue
Block a user