Definition at line 24 of file KisPopupButton.cpp.
◆ KisPopupButtonFrame()
| KisPopupButtonFrame::KisPopupButtonFrame |
( |
QWidget * | parent, |
|
|
bool | detach ) |
|
inline |
Definition at line 29 of file KisPopupButton.cpp.
30 : QFrame(parent)
31 {
32 setObjectName("KisPopupButtonFrame");
33 setProperty("_kis_excludeFromLayoutThumbnail", true);
36
38 }
References frameLayout, and setDetached().
◆ event()
| bool KisPopupButtonFrame::event |
( |
QEvent * | e | ) |
|
|
inlineoverrideprotected |
Definition at line 77 of file KisPopupButton.cpp.
78 {
79 if (e->type() == QEvent::Close) {
80 e->ignore();
81 hide();
82 return true;
83 }
84 return QFrame::event(e);
85 }
◆ keyPressEvent()
| void KisPopupButtonFrame::keyPressEvent |
( |
QKeyEvent * | event | ) |
|
|
inlineoverrideprotected |
Definition at line 67 of file KisPopupButton.cpp.
68 {
69 if (
event->matches(QKeySequence::Cancel)) {
70 event->accept();
71 hide();
72 } else {
73 QFrame::keyPressEvent(
event);
74 }
75 }
References event().
◆ setDetached()
| void KisPopupButtonFrame::setDetached |
( |
bool | detach | ) |
|
|
inline |
Definition at line 40 of file KisPopupButton.cpp.
41 {
42#if defined Q_OS_ANDROID || defined Q_OS_MACOS
43
44
45 hide();
46#endif
47
48
49
50
51
52 destroy();
53
54 if (detach) {
55 setWindowFlags(Qt::Dialog);
56 setFrameStyle(QFrame::NoFrame);
57 }
58 else {
59 setWindowFlags(Qt::Popup);
60 setFrameStyle(QFrame::Box | QFrame::Plain);
61 }
62
63 updateGeometry();
64 }
◆ frameLayout
| QHBoxLayout* KisPopupButtonFrame::frameLayout {0} |
|
private |
The documentation for this class was generated from the following file: