mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-09-02 06:36:06 -05:00
Use the same widget for main settings window and status dock
This commit is contained in:
@@ -28,7 +28,6 @@ class AdvSceneSwitcher : public QDialog {
|
||||
public:
|
||||
std::unique_ptr<Ui_AdvSceneSwitcher> ui;
|
||||
bool loading = true;
|
||||
bool currentStatusActive = false;
|
||||
|
||||
AdvSceneSwitcher(QWidget *parent);
|
||||
~AdvSceneSwitcher();
|
||||
@@ -36,9 +35,6 @@ public:
|
||||
void reject() override;
|
||||
void closeEvent(QCloseEvent *event) override;
|
||||
|
||||
void SetStarted();
|
||||
void SetStopped();
|
||||
|
||||
void SetShowFrames();
|
||||
void SetHideFrames();
|
||||
void clearFrames(QListWidget *list);
|
||||
@@ -109,7 +105,6 @@ public slots:
|
||||
void on_autoStartEvent_currentIndexChanged(int index);
|
||||
void on_noMatchSwitchScene_currentTextChanged(const QString &text);
|
||||
void on_checkInterval_valueChanged(int value);
|
||||
void on_toggleStartButton_clicked();
|
||||
void on_tabMoved(int from, int to);
|
||||
void on_tabWidget_currentChanged(int index);
|
||||
|
||||
@@ -272,7 +267,6 @@ public slots:
|
||||
void on_threadPriority_currentTextChanged(const QString &text);
|
||||
|
||||
void updateScreenRegionCursorPos();
|
||||
void updateStatus();
|
||||
|
||||
void on_close_clicked();
|
||||
|
||||
|
||||
@@ -5,11 +5,14 @@
|
||||
#include <QTimer>
|
||||
#include <obs-data.h>
|
||||
|
||||
class StatusDock : public QDockWidget {
|
||||
class StatusControl : public QWidget {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
StatusDock(QWidget *parent = 0);
|
||||
StatusControl(QWidget *parent = 0, bool noLayout = false);
|
||||
QPushButton *Button() { return _button; }
|
||||
QLabel *StatusLabel() { return _status; }
|
||||
QLabel *StatusPrefixLabel() { return _statusPrefix; }
|
||||
|
||||
private slots:
|
||||
void ButtonClicked();
|
||||
@@ -21,7 +24,18 @@ private:
|
||||
|
||||
QPushButton *_button;
|
||||
QLabel *_status;
|
||||
QLabel *_statusPrefix;
|
||||
QTimer _timer;
|
||||
QMetaObject::Connection _pulse;
|
||||
|
||||
bool _setToStopped = true;
|
||||
};
|
||||
|
||||
class StatusDock : public QDockWidget {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
StatusDock(QWidget *parent = 0);
|
||||
};
|
||||
|
||||
extern StatusDock *dock;
|
||||
Reference in New Issue
Block a user