blob: db9833b5c2a9e706ee3a9aa7af6aadb67dba8099 (
plain) (
blame)
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
54
|
// Text : Copyright 2022 yuzu Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
#pragma once
#include <memory>
#include <QDialog>
class QTimer;
class QCamera;
class QCameraImageCapture;
namespace InputCommon {
class InputSubsystem;
} // namespace InputCommon
namespace Ui {
class ConfigureCamera;
}
class ConfigureCamera : public QDialog {
Q_OBJECT
public:
explicit ConfigureCamera(QWidget* parent, InputCommon::InputSubsystem* input_subsystem_);
~ConfigureCamera() override;
void ApplyConfiguration();
private:
void changeEvent(QEvent* event) override;
void RetranslateUI();
/// Load configuration settings.
void LoadConfiguration();
/// Restore all buttons to their default values.
void RestoreDefaults();
void DisplayCapturedFrame(int requestId, const QImage& img);
/// Loads and signals the current selected camera to display a frame
void PreviewCamera();
InputCommon::InputSubsystem* input_subsystem;
bool is_virtual_camera;
int pending_snapshots;
std::unique_ptr<QCamera> camera;
std::unique_ptr<QCameraImageCapture> camera_capture;
std::unique_ptr<QTimer> camera_timer;
std::vector<std::string> input_devices;
std::unique_ptr<Ui::ConfigureCamera> ui;
};
|