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