Vuo 2.4.4
Loading...
Searching...
No Matches
VuoNodePopover.hh
Go to the documentation of this file.
1
10#pragma once
11
13
14class VuoNode;
15class VuoNodeClass;
16class VuoNodeSet;
17class VuoCompiler;
18class VuoRendererNode;
19
24{
25 Q_OBJECT
26public:
27 explicit VuoNodePopover(VuoNodeClass *nodeClass, VuoCompiler *compiler, QWidget *parent=0);
28 void cleanup();
30 int getTextWidth();
32 bool containsImage();
35 QString getSelectedText();
36
37 static QString generateTextStyleString(void);
38
39protected:
40 void mouseMoveEvent(QMouseEvent *event);
41 void mouseDoubleClickEvent(QMouseEvent *event);
42 void contextMenuEvent(QContextMenuEvent *event);
43
44public slots:
45 void setTextWidth(int width);
46
47private slots:
48 void updateColor(bool isDark);
49
50signals:
51 void popoverDisplayRequested(QWidget *, QString);
52
53private:
54 static const int defaultPopoverTextWidth;
55 static const int margin;
56 QString generateNodePopoverTextHeader();
57 QString generateNodePopoverText(bool isDark);
58 QString generateNodeClassDescription(string smallTextColor);
59 VuoNodeClass *nodeClass;
60 VuoNodeSet *nodeSet;
61 VuoNode *node;
62 QLabel *headerLabel;
63 QLabel *textLabel;
64 bool displayModelNode;
65 VuoRendererNode *modelNode;
66 QGraphicsView *modelNodeView;
67 QVBoxLayout *layout;
68 VuoCompiler *compiler;
69 bool popoverHasBeenShown;
70
71 void initialize();
72
73 // Style
74 void setStyle();
75
76#if VUO_PRO
77#include "pro/VuoNodePopover_Pro.hh"
78#endif
79};