mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-24 06:35:42 +00:00
34 lines
781 B
C++
34 lines
781 B
C++
#pragma once
|
|
#include "common/types.h"
|
|
#include "common/window_info.h"
|
|
#include <QtWidgets/QWidget>
|
|
#include <optional>
|
|
|
|
class QtDisplayWidget final : public QWidget
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
QtDisplayWidget(QWidget* parent);
|
|
~QtDisplayWidget();
|
|
|
|
QPaintEngine* paintEngine() const override;
|
|
|
|
int scaledWindowWidth() const;
|
|
int scaledWindowHeight() const;
|
|
qreal devicePixelRatioFromScreen() const;
|
|
|
|
std::optional<WindowInfo> getWindowInfo() const;
|
|
|
|
Q_SIGNALS:
|
|
void windowResizedEvent(int width, int height);
|
|
void windowRestoredEvent();
|
|
void windowClosedEvent();
|
|
void windowKeyEvent(int key_code, bool pressed);
|
|
void windowMouseMoveEvent(int x, int y);
|
|
void windowMouseButtonEvent(int button, bool pressed);
|
|
|
|
protected:
|
|
bool event(QEvent* event) override;
|
|
};
|