-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathVuoEditorGraphicsView.hh
More file actions
49 lines (38 loc) · 1.21 KB
/
Copy pathVuoEditorGraphicsView.hh
File metadata and controls
49 lines (38 loc) · 1.21 KB
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
/**
* @file
* VuoEditorGraphicsView interface.
*
* @copyright Copyright © 2012–2026 Kosada Incorporated.
* This code may be modified and distributed under the terms of the GNU Lesser General Public License (LGPL) version 2 or later.
* For more information, see https://vuo.org/license.
*/
#pragma once
#include "VuoHeap.h"
/**
* Subclass of @c QGraphicsView, as a workaround to catch the keyboard shortcut to display the node library.
* https://b33p.net/kosada/node/5676
*/
class VuoEditorGraphicsView : public QGraphicsView
{
Q_OBJECT;
public:
VuoEditorGraphicsView(QWidget *parent);
bool pinchZoomInProgress();
signals:
void viewResized(); ///< Emitted when the view has been re-sized.
private slots:
void updateColor(bool isDark);
private:
bool event(QEvent * event) VuoWarnUnusedResult;
void paintEvent(QPaintEvent *event);
int framesRenderedSinceProfileLogged;
double renderDurationSinceProfileLogged;
double lastProfileLoggedTime;
bool viewportEvent(QEvent *event) VuoWarnUnusedResult;
double ignorePinchesSmallerThanX;
double ignorePinchesStartedLessThanXSecondsAfterDrag;
double ignorePinchesStartedMoreThanXSecondsAfterTouch;
qreal accumulatedScale;
bool gestureDetected;
qreal offset;
};