mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-09-07 17:16:00 -05:00
Add support for variables in file FileSelection widget
This commit is contained in:
@@ -7,12 +7,12 @@
|
||||
#include <filesystem>
|
||||
|
||||
FileSelection::FileSelection(FileSelection::Type type, QWidget *parent)
|
||||
: QWidget(parent), _type(type)
|
||||
: QWidget(parent),
|
||||
_type(type),
|
||||
_filePath(new VariableLineEdit(this)),
|
||||
_browseButton(
|
||||
new QPushButton(obs_module_text("AdvSceneSwitcher.browse")))
|
||||
{
|
||||
_filePath = new QLineEdit();
|
||||
_browseButton =
|
||||
new QPushButton(obs_module_text("AdvSceneSwitcher.browse"));
|
||||
|
||||
QWidget::connect(_filePath, SIGNAL(editingFinished()), this,
|
||||
SLOT(PathChange()));
|
||||
QWidget::connect(_browseButton, SIGNAL(clicked()), this,
|
||||
@@ -24,6 +24,11 @@ FileSelection::FileSelection(FileSelection::Type type, QWidget *parent)
|
||||
setLayout(layout);
|
||||
}
|
||||
|
||||
void FileSelection::SetPath(const VariableResolvingString &path)
|
||||
{
|
||||
_filePath->setText(path);
|
||||
}
|
||||
|
||||
void FileSelection::SetPath(const QString &path)
|
||||
{
|
||||
_filePath->setText(path);
|
||||
|
||||
Reference in New Issue
Block a user