mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-10-20 21:14:58 -04:00
UI: Add user interface for filters
This commit is contained in:
1 parent
ff363bc77b
commit
ceba24c7e9
7 files changed
+1329
No files matched your search
@@ -677,6 +677,9 @@ OBSBasic::~OBSBasic()
|
||||
if (properties)
|
||||
delete properties;
|
||||
|
||||
if (filters)
|
||||
delete filters;
|
||||
|
||||
if (transformWindow)
|
||||
delete transformWindow;
|
||||
|
||||
@@ -794,6 +797,16 @@ void OBSBasic::CreatePropertiesWindow(obs_source_t *source)
|
||||
properties->setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
}
|
||||
|
||||
void OBSBasic::CreateFiltersWindow(obs_source_t *source)
|
||||
{
|
||||
if (filters)
|
||||
filters->close();
|
||||
|
||||
filters = new OBSBasicFilters(this, source);
|
||||
filters->Init();
|
||||
filters->setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
}
|
||||
|
||||
/* Qt callbacks for invokeMethod */
|
||||
|
||||
void OBSBasic::AddScene(OBSSource source)
|
||||
@@ -1957,6 +1970,8 @@ void OBSBasic::on_sources_customContextMenuRequested(const QPoint &pos)
|
||||
action->setEnabled(obs_source_get_output_flags(source) &
|
||||
OBS_SOURCE_INTERACTION);
|
||||
|
||||
popup.addAction(QTStr("Filters"), this,
|
||||
SLOT(OpenFilters()));
|
||||
popup.addAction(QTStr("Properties"), this,
|
||||
SLOT(on_actionSourceProperties_triggered()));
|
||||
}
|
||||
@@ -2305,6 +2320,14 @@ void OBSBasic::SceneItemNameEdited(QWidget *editor,
|
||||
UNUSED_PARAMETER(endHint);
|
||||
}
|
||||
|
||||
void OBSBasic::OpenFilters()
|
||||
{
|
||||
OBSSceneItem item = GetCurrentSceneItem();
|
||||
OBSSource source = obs_sceneitem_get_source(item);
|
||||
|
||||
CreateFiltersWindow(source);
|
||||
}
|
||||
|
||||
void OBSBasic::StreamingStart()
|
||||
{
|
||||
ui->streamButton->setText(QTStr("Basic.Main.StopStreaming"));
|
||||
|
||||
Reference in new issue
Block a user