Vuo
2.0.2
editor
VuoPanelDocumentation.cc
Go to the documentation of this file.
1
10
#include "
VuoPanelDocumentation.hh
"
11
16
VuoPanelDocumentation::VuoPanelDocumentation
(QWidget *parent) :
17
QWidget(parent)
18
{
19
this->
documentationEntered
=
false
;
20
}
21
25
bool
VuoPanelDocumentation::event
(QEvent * event)
26
{
27
// Keep track of whether the cursor is currently positioned over this widget.
28
if
(
event
->type() == QEvent::Enter)
29
documentationEntered
=
true
;
30
31
else
if
(
event
->type() == QEvent::Leave)
32
documentationEntered
=
false
;
33
34
// Emit signals for repaint events received while the cursor is over this widget.
35
// These events correspond to selection changes in the documentation text.
36
else
if
(
documentationEntered
&& (
event
->type() == QEvent::Paint))
37
emit
textSelectionChanged
();
38
39
// The selection may also be reset when the user clicks/navigates to a different widget.
40
// Listening for layout request events isn't a perfect way to detect this, but covers many of the common cases.
41
else
if
(
event
->type() == QEvent::LayoutRequest)
42
emit
textSelectionChanged
();
43
44
return
QWidget::event(
event
);
45
}
46
51
QString
VuoPanelDocumentation::getSelectedText
()
52
{
53
return
QString(
""
);
54
}
Generated on Thu Mar 19 2020 23:15:58 for Vuo by
1.8.17