2019-11-19 16:57:49 -08:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <QObject>
|
|
|
|
#include <QWidget>
|
|
|
|
|
2019-11-26 14:55:46 -08:00
|
|
|
#include <obs.hpp>
|
|
|
|
|
|
|
|
enum class StreamSettingsAction {
|
|
|
|
OpenSettings,
|
|
|
|
Cancel,
|
|
|
|
ContinueStream,
|
|
|
|
};
|
|
|
|
|
2019-11-19 16:57:49 -08:00
|
|
|
class UIValidation : public QObject {
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2019-11-26 14:55:46 -08:00
|
|
|
/* Confirm video about to record or stream has sources. Shows alert
|
|
|
|
* box notifying there are no video sources Returns true if user clicks
|
|
|
|
* "Yes" Returns false if user clicks "No" */
|
2019-11-19 16:57:49 -08:00
|
|
|
static bool NoSourcesConfirmation(QWidget *parent);
|
2019-11-26 14:55:46 -08:00
|
|
|
|
|
|
|
/* Check streaming requirements, shows warning with options to open
|
|
|
|
* settings, cancel stream, or attempt connection anyways. If setup
|
|
|
|
* basics is missing in stream, explain missing fields and offer to
|
|
|
|
* open settings, cancel, or continue. Returns Continue if all
|
|
|
|
* settings are valid. */
|
|
|
|
static StreamSettingsAction
|
|
|
|
StreamSettingsConfirmation(QWidget *parent, OBSService service);
|
2019-11-19 16:57:49 -08:00
|
|
|
};
|