Move GetSettingsWindow() to ui-helpers

This commit is contained in:
WarmUpTill 2024-08-22 20:08:54 +02:00 committed by WarmUpTill
parent a523081d77
commit 863c84026e
6 changed files with 8 additions and 9 deletions

View File

@ -762,11 +762,6 @@ void OpenSettingsWindow()
}
}
QWidget *GetSettingsWindow()
{
return SettingsWindowIsOpened() ? AdvSceneSwitcher::window : nullptr;
}
void AdvSceneSwitcher::HighligthMacroSettingsButton(bool enable)
{
static QObject *highlight = nullptr;

View File

@ -411,7 +411,6 @@ public slots:
};
void OpenSettingsWindow();
QWidget *GetSettingsWindow();
void HighligthMacroSettingsButton(bool enable);
} // namespace advss

View File

@ -2,6 +2,7 @@
#include "advanced-scene-switcher.hpp"
#include "layout-helpers.hpp"
#include "macro.hpp"
#include "ui-helpers.hpp"
#include <QDialogButtonBox>
#include <QStandardItemModel>

View File

@ -1,6 +1,8 @@
#include "ui-helpers.hpp"
#include "advanced-scene-switcher.hpp"
#include "non-modal-dialog.hpp"
#include "obs-module-helper.hpp"
#include "plugin-state-helpers.hpp"
#include <obs-frontend-api.h>
#include <QGraphicsColorizeEffect>
@ -102,7 +104,10 @@ int FindIdxInRagne(QComboBox *list, int start, int stop,
return foundIdx;
}
QWidget *GetSettingsWindow();
QWidget *GetSettingsWindow()
{
return SettingsWindowIsOpened() ? AdvSceneSwitcher::window : nullptr;
}
bool DisplayMessage(const QString &msg, bool question, bool modal)
{

View File

@ -30,6 +30,7 @@ EXPORT void DisplayTrayMessage(const QString &title, const QString &msg,
const QIcon &icon = QIcon());
EXPORT std::string GetThemeTypeName();
EXPORT QWidget *GetSettingsWindow();
void QeueUITask(void (*task)(void *param), void *param);

View File

@ -298,8 +298,6 @@ VariableSelectionDialog::VariableSelectionDialog(QWidget *parent)
setLayout(layout);
}
QWidget *GetSettingsWindow();
bool VariableSelectionDialog::AskForVariable(std::string &varName)
{
VariableSelectionDialog dialog(GetSettingsWindow());