mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-09-07 09:05:57 -05:00
add draft of remote file support
This commit is contained in:
@@ -289,6 +289,9 @@ void SceneSwitcher::loadUI()
|
||||
item->setData(Qt::UserRole, text);
|
||||
}
|
||||
|
||||
ui->fileType->addItem("local");
|
||||
ui->fileType->addItem("remote");
|
||||
|
||||
for (auto &s : switcher->fileSwitches) {
|
||||
std::string sceneName = GetWeakSourceName(s.scene);
|
||||
std::string transitionName = GetWeakSourceName(s.transition);
|
||||
|
||||
@@ -2,8 +2,13 @@
|
||||
#include <QTextStream>
|
||||
#include <QDateTime>
|
||||
#include <obs.hpp>
|
||||
#include <curl/curl.h>
|
||||
|
||||
#include "headers/advanced-scene-switcher.hpp"
|
||||
|
||||
#define LOCAL_FILE_IDX 0
|
||||
#define REMOTE_FILE_IDX 1
|
||||
|
||||
void SceneSwitcher::on_browseButton_clicked()
|
||||
{
|
||||
QString path = QFileDialog::getOpenFileName(
|
||||
@@ -176,6 +181,15 @@ void SceneSwitcher::on_browseButton_3_clicked()
|
||||
ui->filePathLineEdit->setText(path);
|
||||
}
|
||||
|
||||
void SceneSwitcher::on_fileType_currentIndexChanged(int idx) {
|
||||
if (idx == -1)
|
||||
return;
|
||||
if (idx == LOCAL_FILE_IDX)
|
||||
ui->browseButton_3->setDisabled(false);
|
||||
if (idx == REMOTE_FILE_IDX)
|
||||
ui->browseButton_3->setDisabled(true);
|
||||
}
|
||||
|
||||
void SceneSwitcher::on_fileAdd_clicked()
|
||||
{
|
||||
QString sceneName = ui->fileScenes->currentText();
|
||||
|
||||
@@ -104,6 +104,7 @@ public slots:
|
||||
|
||||
void on_browseButton_clicked();
|
||||
void on_readFileCheckBox_stateChanged(int state);
|
||||
void on_fileType_currentIndexChanged(int idx);
|
||||
void on_readPathLineEdit_textChanged(const QString &text);
|
||||
void on_writePathLineEdit_textChanged(const QString &text);
|
||||
void on_browseButton_2_clicked();
|
||||
|
||||
@@ -169,6 +169,7 @@ struct FileSwitch {
|
||||
OBSWeakSource transition;
|
||||
std::string file;
|
||||
std::string text;
|
||||
bool local = true;
|
||||
bool useRegex = false;
|
||||
bool useTime = false;
|
||||
QDateTime lastMod;
|
||||
|
||||
Reference in New Issue
Block a user