Definition at line 36 of file KisPopupButton.cpp.
◆ KisPopupButtonFrame()
| KisPopupButtonFrame::KisPopupButtonFrame |
( |
QWidget * | parent, |
|
|
bool | detach, |
|
|
bool | popupIsMenu ) |
|
inline |
Definition at line 41 of file KisPopupButton.cpp.
42 : QFrame(parent, Qt::Window)
43 {
44 setObjectName("KisPopupButtonFrame");
45 setProperty("_kis_excludeFromLayoutThumbnail", true);
48
50 }
References frameLayout, and setDetached().
◆ event()
| bool KisPopupButtonFrame::event |
( |
QEvent * | e | ) |
|
|
inlineoverrideprotected |
Definition at line 94 of file KisPopupButton.cpp.
95 {
96 if (e->type() == QEvent::Close) {
97 e->ignore();
98 hide();
99 return true;
100 }
101 return QFrame::event(e);
102 }
◆ keyPressEvent()
| void KisPopupButtonFrame::keyPressEvent |
( |
QKeyEvent * | event | ) |
|
|
inlineoverrideprotected |
Definition at line 84 of file KisPopupButton.cpp.
85 {
86 if (
event->matches(QKeySequence::Cancel)) {
87 event->accept();
88 hide();
89 } else {
90 QFrame::keyPressEvent(
event);
91 }
92 }
References event().
◆ setDetached()
| void KisPopupButtonFrame::setDetached |
( |
bool | detach, |
|
|
bool | popupIsMenu ) |
|
inline |
Definition at line 52 of file KisPopupButton.cpp.
53 {
54#if defined Q_OS_ANDROID || defined Q_OS_MACOS
55
56
57 hide();
58#endif
59
60
61
62
63
64 destroy();
65
66 if (detach) {
67 setWindowFlags(Qt::Dialog);
68 setFrameStyle(QFrame::NoFrame);
69 }
70 else {
71 setWindowFlags(Qt::Popup);
72
73 if (popupIsMenu) {
74 setFrameStyle(QFrame::NoFrame);
75 } else {
76 setFrameStyle(QFrame::Box | QFrame::Plain);
77 }
78 }
79
80 updateGeometry();
81 }
◆ frameLayout
| QHBoxLayout* KisPopupButtonFrame::frameLayout {0} |
|
private |
The documentation for this class was generated from the following file: