dolphin/Source/Core/DolphinQt/RenderWidget.h
Stenzek cdb0aa850d Qt/RenderWidget: Remove fill background functionality
We no longer need this since the video backend handles clearing the
window, and it fixes MoltenVK with Qt 5.14.
2020-03-11 23:13:45 +10:00

46 lines
1.0 KiB
C++

// Copyright 2015 Dolphin Emulator Project
// Licensed under GPLv2+
// Refer to the license.txt file included.
#pragma once
#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();
QPaintEngine* paintEngine() const override;
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 OnFreeLookMouseMove(QMouseEvent* event);
void PassEventToImGui(const QEvent* event);
void SetImGuiKeyMap();
void dragEnterEvent(QDragEnterEvent* event) override;
void dropEvent(QDropEvent* event) override;
static constexpr int MOUSE_HIDE_DELAY = 3000;
QTimer* m_mouse_timer;
QPoint m_last_mouse{};
};