forked from jahnf/Projecteur
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpreferencesdlg.h
More file actions
43 lines (32 loc) · 1.07 KB
/
preferencesdlg.h
File metadata and controls
43 lines (32 loc) · 1.07 KB
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
// This file is part of Projecteur - https://github.com/jahnf/projecteur - See LICENSE.md and README.md
#pragma once
#include <QDialog>
class QComboBox;
class QGroupBox;
class Settings;
class Spotlight;
class PreferencesDialog : public QDialog
{
Q_OBJECT
Q_PROPERTY(bool dialogActive READ dialogActive NOTIFY dialogActiveChanged)
public:
explicit PreferencesDialog(Settings* settings, Spotlight* spotlight, QWidget* parent = nullptr);
virtual ~PreferencesDialog() override = default;
bool dialogActive() const { return m_active; }
public slots:
void updateAvailableScreens(QList<QScreen*> screens);
signals:
void dialogActiveChanged(bool active);
void testButtonClicked();
protected:
virtual bool event(QEvent* event) override;
private:
void setDialogActive(bool active);
QGroupBox* createSpotGroupBox(Settings* settings);
QGroupBox* createDotGroupBox(Settings* settings);
QGroupBox* createScreenGroupBox(Settings* settings);
QWidget* createConnectedStateWidget(Spotlight* spotlight);
private:
bool m_active = false;
QComboBox* m_screenCb = nullptr;
};