#include <Libs/Widgets/ctkBasePopupWidget.h>
|
QScopedPointer< ctkBasePopupWidgetPrivate > | d_ptr |
|
ctkBasePopupWidget is a popup that opens under, above or on the side of another widget (baseWidget() or its parent widget by default). The children (widgets and layout) of the popup define of the content of the popup. Different effects can be applied during the opening or closing of the popup. See ctkPopupWidget for an automatic control of its opening and closing.
- See also
- baseWidget(), animationEffect, ctkPopupWidget
Definition at line 42 of file ctkBasePopupWidget.h.
◆ Superclass
◆ AnimationEffect
◆ VerticalDirection
◆ ctkBasePopupWidget() [1/2]
ctkBasePopupWidget::ctkBasePopupWidget |
( |
QWidget * |
parent = 0 | ) |
|
|
explicit |
Although a popup widget is a top-level widget, if a parent is passed the popup widget will be deleted when that parent is destroyed (as with any other QObject). ctkBasePopupWidget is a top-level widget (Qt::ToolTip), so even if a parent is passed, the popup will display outside the possible parent layout.
- See also
- baseWidget().
◆ ~ctkBasePopupWidget()
virtual ctkBasePopupWidget::~ctkBasePopupWidget |
( |
| ) |
|
|
virtual |
◆ ctkBasePopupWidget() [2/2]
ctkBasePopupWidget::ctkBasePopupWidget |
( |
ctkBasePopupWidgetPrivate * |
pimpl, |
|
|
QWidget * |
parent = 0 |
|
) |
| |
|
explicitprotected |
◆ alignment()
Qt::Alignment ctkBasePopupWidget::alignment |
( |
| ) |
const |
Return the alignment property value.
- See also
- alignment
◆ animationEffect()
◆ baseWidget()
QWidget* ctkBasePopupWidget::baseWidget |
( |
| ) |
const |
Widget the popup is attached to. It opens right under baseWidget and if the ctkBasePopupWidget sizepolicy contains the growFlag/shrinkFlag, it tries to resize itself to fit the same width of baseWidget. By default, baseWidget is the parent widget.
- See also
- setBaseWidget()
◆ easingCurve()
QEasingCurve::Type ctkBasePopupWidget::easingCurve |
( |
| ) |
const |
Return the easingCurve property value.
- See also
- easingCurve
◆ effectAlpha()
double ctkBasePopupWidget::effectAlpha |
( |
| ) |
const |
|
protected |
◆ effectDuration()
int ctkBasePopupWidget::effectDuration |
( |
| ) |
const |
◆ effectGeometry()
QRect ctkBasePopupWidget::effectGeometry |
( |
| ) |
const |
|
protected |
◆ event()
virtual bool ctkBasePopupWidget::event |
( |
QEvent * |
event | ) |
|
|
protectedvirtual |
◆ hidePopup
virtual void ctkBasePopupWidget::hidePopup |
( |
| ) |
|
|
virtualslot |
Hide the popup if open or opening. It takes around 300ms for the fading effect to hide the popup.
Reimplemented in ctkPopupWidget.
◆ horizontalDirection()
Qt::LayoutDirection ctkBasePopupWidget::horizontalDirection |
( |
| ) |
const |
◆ onBaseWidgetDestroyed
void ctkBasePopupWidget::onBaseWidgetDestroyed |
( |
| ) |
|
|
protectedslot |
◆ onEffectFinished
virtual void ctkBasePopupWidget::onEffectFinished |
( |
| ) |
|
|
protectedvirtualslot |
◆ orientation()
Qt::Orientations ctkBasePopupWidget::orientation |
( |
| ) |
const |
Return the orientation property value.
- See also
- orientation
◆ paintEvent()
virtual void ctkBasePopupWidget::paintEvent |
( |
QPaintEvent * |
| ) |
|
|
protectedvirtual |
◆ popupOpened
void ctkBasePopupWidget::popupOpened |
( |
bool |
open | ) |
|
|
signal |
Fired when the popup finished its animation: opening (true) or closing (false).
- See also
- showPopup(), hidePopup()
◆ setAlignment()
void ctkBasePopupWidget::setAlignment |
( |
Qt::Alignment |
alignment | ) |
|
Set the alignment property value.
- See also
- alignment
◆ setAnimationEffect()
◆ setBaseWidget()
virtual void ctkBasePopupWidget::setBaseWidget |
( |
QWidget * |
baseWidget | ) |
|
|
protectedvirtual |
◆ setEasingCurve()
void ctkBasePopupWidget::setEasingCurve |
( |
QEasingCurve::Type |
easingCurve | ) |
|
Set the easingCurve property value.
- See also
- easingCurve
◆ setEffectAlpha
void ctkBasePopupWidget::setEffectAlpha |
( |
double |
alpha | ) |
|
|
protectedslot |
◆ setEffectDuration()
void ctkBasePopupWidget::setEffectDuration |
( |
int |
duration | ) |
|
◆ setEffectGeometry
void ctkBasePopupWidget::setEffectGeometry |
( |
QRect |
geometry | ) |
|
|
protectedslot |
◆ setHorizontalDirection()
void ctkBasePopupWidget::setHorizontalDirection |
( |
Qt::LayoutDirection |
direction | ) |
|
◆ setOrientation()
void ctkBasePopupWidget::setOrientation |
( |
Qt::Orientations |
orientation | ) |
|
Set the orientation property value.
- See also
- orientation
◆ setVerticalDirection()
◆ showPopup [1/2]
virtual void ctkBasePopupWidget::showPopup |
( |
| ) |
|
|
virtualslot |
Open the popup if closed or closing. It takes around 300ms for the fading effect to open the popup.
◆ showPopup [2/2]
void ctkBasePopupWidget::showPopup |
( |
bool |
show | ) |
|
|
inlineslot |
Show/hide the popup. It can be conveniently linked to a QPushButton signal.
Definition at line 213 of file ctkBasePopupWidget.h.
◆ verticalDirection()
◆ d_ptr
QScopedPointer<ctkBasePopupWidgetPrivate> ctkBasePopupWidget::d_ptr |
|
protected |
◆ alignment
Qt::Alignment ctkBasePopupWidget::alignment |
|
readwrite |
Where is the popup in relation to the BaseWidget To vertically justify, use Qt::AlignTop | Qt::AlignBottom. Qt::AlignJustify | Qt::AlignBottom by default
Definition at line 213 of file ctkBasePopupWidget.h.
◆ animationEffect
◆ easingCurve
QEasingCurve::Type ctkBasePopupWidget::easingCurve |
|
readwrite |
◆ effectAlpha
double ctkBasePopupWidget::effectAlpha |
|
readwrite |
◆ effectDuration
int ctkBasePopupWidget::effectDuration |
|
readwrite |
The property controls the animationEffect duration in ms. If the popup state (open or close) is being changed during the animation, the active animation is stopped and a new animation is being created from the current state (geometry, transparency...) to the new final state. Default to 333ms
- See also
- effectDuration(), setEffectDuration(), animationEffect, easingCurve
Definition at line 213 of file ctkBasePopupWidget.h.
◆ effectGeometry
QRect ctkBasePopupWidget::effectGeometry |
|
readwrite |
◆ horizontalDirection
Qt::LayoutDirection ctkBasePopupWidget::horizontalDirection |
|
readwrite |
Control where the popup opens horizontally. LeftToRight by default
Definition at line 213 of file ctkBasePopupWidget.h.
◆ orientation
Qt::Orientations ctkBasePopupWidget::orientation |
|
readwrite |
Direction of the scrolling effect, can be Qt::Vertical, Qt::Horizontal or both Qt::Vertical|Qt::Horizontal. Vertical by default
Definition at line 213 of file ctkBasePopupWidget.h.
◆ verticalDirection
Control where the popup opens vertically. TopToBottom by default
Definition at line 213 of file ctkBasePopupWidget.h.
The documentation for this class was generated from the following file: