|
Krita Source Code Documentation
|
#include <KisPopupButton.h>
Inheritance diagram for KisPopupButton:Classes | |
| struct | Private |
Public Slots | |
| void | hidePopupWidget () |
| void | setPopupWidgetDetached (bool detach) |
| void | setPopupWidgetVisible (bool visible) |
| void | showPopupWidget () |
Public Member Functions | |
| void | adjustPosition () |
| adjustPosition adjusts the position of the popup widget based on the position of this button and the size of the widget | |
| bool | isPopupWidgetVisible () |
| KisPopupButton (QWidget *parent) | |
| void | setArrowVisible (bool v) |
| void | setPopupWidget (QWidget *widget) |
| void | setPopupWidgetWidth (int w) |
| ~KisPopupButton () override | |
Protected Member Functions | |
| void | paintEvent (QPaintEvent *event) override |
| void | paintPopupArrow () |
Private Attributes | |
| Private *const | m_d |
This class is a convenience class for a button that when clicked displays a popup widget.
Definition at line 18 of file KisPopupButton.h.
| KisPopupButton::KisPopupButton | ( | QWidget * | parent | ) |
Definition at line 100 of file KisPopupButton.cpp.
References connect(), and showPopupWidget().
|
override |
Definition at line 108 of file KisPopupButton.cpp.
References KisPopupButton::Private::frame, and m_d.
| void KisPopupButton::adjustPosition | ( | ) |
adjustPosition adjusts the position of the popup widget based on the position of this button and the size of the widget
Definition at line 206 of file KisPopupButton.cpp.
References KisPopupButton::Private::frame, KisPopupButton::Private::isDetachedGeometrySet, KisPopupButton::Private::isPopupDetached, kisEnsureInRect(), m_d, and KisPopupButton::Private::popupWidget.
|
slot |
Definition at line 158 of file KisPopupButton.cpp.
References setPopupWidgetVisible().
| bool KisPopupButton::isPopupWidgetVisible | ( | ) |
Definition at line 180 of file KisPopupButton.cpp.
References KisPopupButton::Private::frame, m_d, and KisPopupButton::Private::popupWidget.
|
overrideprotected |
Definition at line 185 of file KisPopupButton.cpp.
References KisPopupButton::Private::arrowVisible, m_d, and paintPopupArrow().
|
protected |
Definition at line 193 of file KisPopupButton.cpp.
| void KisPopupButton::setArrowVisible | ( | bool | v | ) |
This function allows to show or hide the arrow.
| v | set to true to draw the arrow, else set to false |
Definition at line 251 of file KisPopupButton.cpp.
References KisPopupButton::Private::arrowVisible, m_d, and v.
| void KisPopupButton::setPopupWidget | ( | QWidget * | widget | ) |
Set the popup widget, the KisPopupButton becomes the owner and parent of the widget.
Definition at line 131 of file KisPopupButton.cpp.
References KisPopupButton::Private::frame, KisPopupButton::Private::isPopupDetached, m_d, and KisPopupButton::Private::popupWidget.
|
slot |
Set whether the popup is detached as a dialog.
| v | set to true to cause the popup to be detached |
Definition at line 114 of file KisPopupButton.cpp.
References adjustPosition(), KisPopupButton::Private::frame, KisPopupButton::Private::isDetachedGeometrySet, KisPopupButton::Private::isPopupDetached, isPopupWidgetVisible(), m_d, and setPopupWidgetVisible().
|
slot |
Definition at line 163 of file KisPopupButton.cpp.
References adjustPosition(), KisPopupButton::Private::frame, m_d, and KisPopupButton::Private::popupWidget.
| void KisPopupButton::setPopupWidgetWidth | ( | int | w | ) |
Set the width of the popup widget.
Definition at line 144 of file KisPopupButton.cpp.
References KisPopupButton::Private::frame, and m_d.
|
slot |
Definition at line 149 of file KisPopupButton.cpp.
References KisPopupButton::Private::frame, hidePopupWidget(), m_d, KisPopupButton::Private::popupWidget, and setPopupWidgetVisible().
|
private |
Definition at line 75 of file KisPopupButton.h.