File: ui-validation.hpp

package info (click to toggle)
obs-studio 30.2.3%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 47,852 kB
  • sloc: ansic: 202,137; cpp: 112,402; makefile: 868; python: 599; sh: 275; javascript: 19
file content (30 lines) | stat: -rw-r--r-- 851 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#pragma once

#include <QObject>
#include <QWidget>

#include <obs.hpp>

enum class StreamSettingsAction {
	OpenSettings,
	Cancel,
	ContinueStream,
};

class UIValidation : public QObject {
	Q_OBJECT

public:
	/* 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" */
	static bool NoSourcesConfirmation(QWidget *parent);

	/* 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);
};