-
Notifications
You must be signed in to change notification settings - Fork 21
/
projector.hpp
53 lines (38 loc) · 1.17 KB
/
projector.hpp
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#pragma once
#include <obs.hpp>
#include "qt-display.hpp"
#include "vertical-canvas.hpp"
bool IsAlwaysOnTop(QWidget *window);
void SetAlwaysOnTop(QWidget *window, bool enable);
class OBSProjector : public OBSQTDisplay {
Q_OBJECT
private:
CanvasDock *canvas = nullptr;
static void OBSRender(void *data, uint32_t cx, uint32_t cy);
void mousePressEvent(QMouseEvent *event) override;
void closeEvent(QCloseEvent *event) override;
bool isAlwaysOnTop;
bool isAlwaysOnTopOverridden = false;
int savedMonitor = -1;
bool ready = false;
void UpdateProjectorTitle(QString name = "");
QRect prevGeometry;
void SetMonitor(int monitor);
QScreen *screen = nullptr;
private slots:
void EscapeTriggered();
void OpenFullScreenProjector();
void ResizeToContent();
void OpenWindowedProjector();
void AlwaysOnTopToggled(bool alwaysOnTop);
void ScreenRemoved(QScreen *screen_);
public:
OBSProjector(CanvasDock *canvas_, int monitor);
~OBSProjector();
int GetMonitor();
void RenameProjector(QString oldName, QString newName);
void SetHideCursor();
bool IsAlwaysOnTop() const;
bool IsAlwaysOnTopOverridden() const;
void SetIsAlwaysOnTop(bool isAlwaysOnTop, bool isOverridden);
};