mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
Move DolphinQt2 to DolphinQt
This commit is contained in:
43
Source/Core/DolphinQt/RenderWidget.h
Normal file
43
Source/Core/DolphinQt/RenderWidget.h
Normal file
@ -0,0 +1,43 @@
|
||||
// Copyright 2015 Dolphin Emulator Project
|
||||
// Licensed under GPLv2+
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <array>
|
||||
|
||||
#include <QEvent>
|
||||
#include <QWidget>
|
||||
|
||||
class QMouseEvent;
|
||||
class QTimer;
|
||||
|
||||
class RenderWidget final : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit RenderWidget(QWidget* parent = nullptr);
|
||||
|
||||
bool event(QEvent* event) override;
|
||||
void showFullScreen();
|
||||
|
||||
signals:
|
||||
void EscapePressed();
|
||||
void Closed();
|
||||
void HandleChanged(void* handle);
|
||||
void StateChanged(bool fullscreen);
|
||||
void SizeChanged(int new_width, int new_height);
|
||||
void FocusChanged(bool focus);
|
||||
|
||||
private:
|
||||
void HandleCursorTimer();
|
||||
void OnHideCursorChanged();
|
||||
void OnKeepOnTopChanged(bool top);
|
||||
void SetFillBackground(bool fill);
|
||||
void OnFreeLookMouseMove(QMouseEvent* event);
|
||||
|
||||
static constexpr int MOUSE_HIDE_DELAY = 3000;
|
||||
QTimer* m_mouse_timer;
|
||||
std::array<float, 2> m_last_mouse{};
|
||||
};
|
Reference in New Issue
Block a user