dolphin/Source/Core/DolphinQt/RenderWidget.h

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

47 lines
1.1 KiB
C
Raw Normal View History

2015-11-27 09:33:07 +01:00
// Copyright 2015 Dolphin Emulator Project
// Licensed under GPLv2+
// Refer to the license.txt file included.
#pragma once
#include <QEvent>
#include <QWidget>
2018-04-29 13:35:43 +02:00
class QMouseEvent;
class QTimer;
2015-11-27 09:33:07 +01:00
class RenderWidget final : public QWidget
{
Q_OBJECT
public:
explicit RenderWidget(QWidget* parent = nullptr);
2015-11-27 09:33:07 +01:00
bool event(QEvent* event) override;
2018-03-21 20:53:37 +01:00
void showFullScreen();
QPaintEngine* paintEngine() const override;
2015-11-27 09:33:07 +01:00
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);
2017-06-01 08:49:21 +02:00
private:
void HandleCursorTimer();
2017-06-01 08:49:21 +02:00
void OnHideCursorChanged();
2018-04-22 10:56:15 +02:00
void OnKeepOnTopChanged(bool top);
void SetFillBackground(bool fill);
2018-04-29 13:35:43 +02:00
void OnFreeLookMouseMove(QMouseEvent* event);
2018-10-10 13:41:52 +02:00
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{};
2015-11-27 09:33:07 +01:00
};