UI: Add user interface for filters
This commit is contained in:
parent
ff363bc77b
commit
ceba24c7e9
7 changed files with 1329 additions and 0 deletions
|
|
@ -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"));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue