SceneSwitcher/lib/utils/status-control.hpp
WarmUpTill 7d0332dd0e Restructure library and plugins
The "core" macro conditions and actions have been extracted out to the
"base" plugin.

The library now mostly contains functionality which is required across
all plugins and (e.g. definitions for macro segments).

The goal is to reduce the complexity and cross-dependencies and group
the source files in a better way.

This should relsove the "library limit of 65535 objects exceeded" build
issue occuring in some Windows build environments.
2024-01-27 14:10:34 +01:00

50 lines
893 B
C++

#pragma once
#include "obs-dock.hpp"
#include <QPushButton>
#include <QLabel>
#include <QTimer>
#include <QLayout>
#include <obs-data.h>
namespace advss {
class StatusControl : public QWidget {
Q_OBJECT
public:
StatusControl(QWidget *parent = 0, bool noLayout = false);
QPushButton *Button() { return _button; }
QHBoxLayout *ButtonLayout() { return _buttonLayout; }
QLabel *StatusLabel() { return _status; }
QLabel *StatusPrefixLabel() { return _statusPrefix; }
private slots:
void ButtonClicked();
void UpdateStatus();
private:
void SetStopped();
void SetStarted();
QPushButton *_button;
QHBoxLayout *_buttonLayout;
QLabel *_status;
QLabel *_statusPrefix;
QTimer _timer;
QMetaObject::Connection _pulse;
bool _setToStopped = true;
};
class StatusDock : public OBSDock {
Q_OBJECT
public:
StatusDock(QWidget *parent = 0);
};
void SetupDock();
} // namespace advss