Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QQuickPopupPrivate Class Reference

#include <qquickpopup_p_p.h>

+ Inheritance diagram for QQuickPopupPrivate:
+ Collaboration diagram for QQuickPopupPrivate:

Public Types

enum  TransitionState { NoTransition , EnterTransition , ExitTransition }
 
- Public Types inherited from QObjectPrivate
typedef void(* StaticMetaCallFunction) (QObject *, QMetaObject::Call, int, void **)
 
using ConnectionDataPointer = QExplicitlySharedDataPointer<ConnectionData>
 

Public Member Functions

 QQuickPopupPrivate ()
 
QQmlListProperty< QObjectcontentData ()
 \qmlproperty list<QtObject> QtQuick.Controls::Popup::contentData \qmldefault
 
QQmlListProperty< QQuickItemcontentChildren ()
 \qmlproperty list<Item> QtQuick.Controls::Popup::contentChildren
 
void init ()
 
void closeOrReject ()
 
bool tryClose (const QPointF &pos, QQuickPopup::ClosePolicy flags)
 
bool contains (const QPointF &scenePos) const
 
virtual bool blockInput (QQuickItem *item, const QPointF &point) const
 
virtual bool handlePress (QQuickItem *item, const QPointF &point, ulong timestamp)
 
virtual bool handleMove (QQuickItem *item, const QPointF &point, ulong timestamp)
 
virtual bool handleRelease (QQuickItem *item, const QPointF &point, ulong timestamp)
 
virtual void handleUngrab ()
 
bool handleMouseEvent (QQuickItem *item, QMouseEvent *event)
 
bool handleHoverEvent (QQuickItem *item, QHoverEvent *event)
 
void reposition ()
 
void createOverlay ()
 
void destroyDimmer ()
 
void toggleOverlay ()
 
void updateContentPalettes (const QPalette &parentPalette)
 
virtual void showDimmer ()
 
virtual void hideDimmer ()
 
virtual void resizeDimmer ()
 
virtual bool prepareEnterTransition ()
 
virtual bool prepareExitTransition ()
 
virtual void finalizeEnterTransition ()
 
virtual void finalizeExitTransition ()
 
virtual void opened ()
 
QMarginsF getMargins () const
 
void setTopMargin (qreal value, bool reset=false)
 
void setLeftMargin (qreal value, bool reset=false)
 
void setRightMargin (qreal value, bool reset=false)
 
void setBottomMargin (qreal value, bool reset=false)
 
QQuickPopupAnchorsgetAnchors ()
 
virtual QQuickPopupPositionergetPositioner ()
 
void setWindow (QQuickWindow *window)
 
void itemDestroyed (QQuickItem *item) override
 
QPalette defaultPalette () const override
 
- Public Member Functions inherited from QObjectPrivate
void ensureExtraData ()
 
 QObjectPrivate (int version=QObjectPrivateVersion)
 
virtual ~QObjectPrivate ()
 
void deleteChildren ()
 
void clearBindingStorage ()
 
void checkForIncompatibleLibraryVersion (int version) const
 
void setParent_helper (QObject *)
 
void moveToThread_helper ()
 
void setThreadData_helper (QThreadData *currentData, QThreadData *targetData, QBindingStatus *status)
 
QObjectList receiverList (const char *signal) const
 
void ensureConnectionData ()
 
void addConnection (int signal, Connection *c)
 
int signalIndex (const char *signalName, const QMetaObject **meta=nullptr) const
 
bool isSignalConnected (uint signalIdx, bool checkDeclarative=true) const
 
bool maybeSignalConnected (uint signalIndex) const
 
bool isDeclarativeSignalConnected (uint signalIdx) const
 
void connectNotify (const QMetaMethod &signal)
 
void disconnectNotify (const QMetaMethod &signal)
 
void reinitBindingStorageAfterThreadMove ()
 
virtual std::string flagsForDumping () const
 
virtual void writeToDebugStream (QDebug &) const
 
QtPrivate::QPropertyAdaptorSlotObjectgetPropertyAdaptorSlotObject (const QMetaProperty &property)
 
- Public Member Functions inherited from QObjectData
 QObjectData ()=default
 
virtual ~QObjectData ()=0
 
QMetaObjectdynamicMetaObject () const
 
- Public Member Functions inherited from QQuickItemChangeListener
virtual ~QQuickItemChangeListener ()
 
virtual void itemGeometryChanged (QQuickItem *, QQuickGeometryChange, const QRectF &)
 
virtual void itemSiblingOrderChanged (QQuickItem *)
 
virtual void itemVisibilityChanged (QQuickItem *)
 
virtual void itemEnabledChanged (QQuickItem *)
 
virtual void itemOpacityChanged (QQuickItem *)
 
virtual void itemChildAdded (QQuickItem *, QQuickItem *)
 
virtual void itemChildRemoved (QQuickItem *, QQuickItem *)
 
virtual void itemParentChanged (QQuickItem *, QQuickItem *)
 
virtual void itemRotationChanged (QQuickItem *)
 
virtual void itemImplicitWidthChanged (QQuickItem *)
 
virtual void itemImplicitHeightChanged (QQuickItem *)
 
virtual void itemFocusChanged (QQuickItem *, Qt::FocusReason)
 
virtual QQuickAnchorsPrivateanchorPrivate ()
 
- Public Member Functions inherited from QQuickPaletteProviderPrivateBase< QQuickPopup, QQuickPopupPrivate >
virtual ~QQuickPaletteProviderPrivateBase ()=default
 
virtual QQuickPalettepalette () const
 
virtual void setPalette (QQuickPalette *p)
 
virtual void resetPalette ()
 
virtual bool providesPalette () const
 
QPalette parentPalette (const QPalette &fallbackPalette) const override
 
void inheritPalette (const QPalette &parentPalette)
 
virtual void updateChildrenPalettes (const QPalette &parentPalette)
 
- Public Member Functions inherited from QQuickAbstractPaletteProvider
virtual ~QQuickAbstractPaletteProvider ()=default
 

Static Public Member Functions

static QQuickPopupPrivateget (QQuickPopup *popup)
 
- Static Public Member Functions inherited from QObjectPrivate
static bool removeConnection (Connection *c)
 
static QObjectPrivateget (QObject *o)
 
static const QObjectPrivateget (const QObject *o)
 
template<typename Func1 , typename Func2 >
static QMetaObject::Connection connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiverPrivate, Func2 slot, Qt::ConnectionType type=Qt::AutoConnection)
 
template<typename Func1 , typename Func2 >
static bool disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiverPrivate, Func2 slot)
 
static QMetaObject::Connection connectImpl (const QObject *sender, int signal_index, const QObject *receiver, void **slot, QtPrivate::QSlotObjectBase *slotObj, int type, const int *types, const QMetaObject *senderMetaObject)
 
static QMetaObject::Connection connect (const QObject *sender, int signal_index, QtPrivate::QSlotObjectBase *slotObj, Qt::ConnectionType type)
 
static QMetaObject::Connection connect (const QObject *sender, int signal_index, const QObject *receiver, QtPrivate::QSlotObjectBase *slotObj, Qt::ConnectionType type)
 
static bool disconnect (const QObject *sender, int signal_index, void **slot)
 
static bool disconnect (const QObject *sender, int signal_index, const QObject *receiver, void **slot)
 

Public Attributes

bool focus = false
 
bool modal = false
 
bool dim = false
 
bool hasDim = false
 
bool visible = false
 
bool complete = true
 
bool positioning = false
 
bool hasWidth = false
 
bool hasHeight = false
 
bool hasTopMargin = false
 
bool hasLeftMargin = false
 
bool hasRightMargin = false
 
bool hasBottomMargin = false
 
bool hasZ = false
 
bool allowVerticalFlip = false
 
bool allowHorizontalFlip = false
 
bool allowVerticalMove = true
 
bool allowHorizontalMove = true
 
bool allowVerticalResize = true
 
bool allowHorizontalResize = true
 
bool hadActiveFocusBeforeExitTransition = false
 
bool interactive = true
 
bool hasClosePolicy = false
 
bool outsidePressed = false
 
bool outsideParentPressed = false
 
bool inDestructor = false
 
bool relaxEdgeConstraint = false
 
int touchId = -1
 
qreal x = 0
 
qreal y = 0
 
qreal effectiveX = 0
 
qreal effectiveY = 0
 
qreal margins = -1
 
qreal topMargin = 0
 
qreal leftMargin = 0
 
qreal rightMargin = 0
 
qreal bottomMargin = 0
 
QPointF pressPoint
 
TransitionState transitionState = NoTransition
 
QQuickPopup::ClosePolicy closePolicy = DefaultClosePolicy
 
QQuickItemparentItem = nullptr
 
QQuickItemdimmer = nullptr
 
QPointer< QQuickWindowwindow
 
QQuickTransitionenter = nullptr
 
QQuickTransitionexit = nullptr
 
QQuickPopupItempopupItem = nullptr
 
QQuickPopupPositionerpositioner = nullptr
 
QList< QQuickStateActionenterActions
 
QList< QQuickStateActionexitActions
 
QQuickPopupTransitionManager transitionManager
 
QQuickPopupAnchorsanchors = nullptr
 
qreal explicitDimmerOpacity = 0
 
qreal prevOpacity = 0
 
qreal prevScale = 0
 
- Public Attributes inherited from QObjectPrivate
ExtraDataextraData
 
QAtomicPointer< QThreadDatathreadData
 
QAtomicPointer< ConnectionDataconnections
 
union { 
 
   QObject *   currentChildBeingDeleted 
 
   QAbstractDeclarativeData *   declarativeData 
 
};  
 
QAtomicPointer< QtSharedPointer::ExternalRefCountDatasharedRefcount
 
- Public Attributes inherited from QObjectData
QObjectq_ptr
 
QObjectparent
 
QObjectList children
 
uint isWidget: 1
 
uint blockSig: 1
 
uint wasDeleted: 1
 
uint isDeletingChildren: 1
 
uint sendChildEvents: 1
 
uint receiveChildEvents: 1
 
uint isWindow: 1
 
uint deleteLaterCalled: 1
 
uint isQuickItem: 1
 
uint willBeWidget: 1
 
uint wasWidget: 1
 
uint receiveParentEvents: 1
 
uint unused: 20
 
QAtomicInt postedEvents
 
QDynamicMetaObjectDatametaObject
 
QBindingStorage bindingStorage
 

Static Public Attributes

static const QQuickPopup::ClosePolicy DefaultClosePolicy = QQuickPopup::CloseOnEscape | QQuickPopup::CloseOnPressOutside
 Base type of popup-like user interface controls.
 

Friends

class QQuickPopupTransitionManager
 

Additional Inherited Members

- Protected Member Functions inherited from QQuickPaletteProviderPrivateBase< QQuickPopup, QQuickPopupPrivate >
void setCurrentColorGroup ()
 

Detailed Description

Definition at line 55 of file qquickpopup_p_p.h.

Member Enumeration Documentation

◆ TransitionState

Enumerator
NoTransition 
EnterTransition 
ExitTransition 

Definition at line 127 of file qquickpopup_p_p.h.

Constructor & Destructor Documentation

◆ QQuickPopupPrivate()

QQuickPopupPrivate::QQuickPopupPrivate ( )

Definition at line 377 of file qquickpopup.cpp.

Member Function Documentation

◆ blockInput()

bool QQuickPopupPrivate::blockInput ( QQuickItem * item,
const QPointF & point ) const
virtual

Reimplemented in QQuickDrawerPrivate, and QQuickMenuPrivate.

Definition at line 451 of file qquickpopup.cpp.

References QQuickItem::contains(), dimmer, QQuickItem::isAncestorOf(), item, QQuickItem::mapFromScene(), modal, QQuickOverlay::overlay(), popupItem, and window.

Referenced by QQuickMenuPrivate::blockInput(), handleHoverEvent(), handleMove(), handlePress(), and handleRelease().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ closeOrReject()

void QQuickPopupPrivate::closeOrReject ( )

Definition at line 397 of file qquickpopup.cpp.

References dialog, QDialog::reject(), and touchId.

Referenced by tryClose().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ contains()

bool QQuickPopupPrivate::contains ( const QPointF & scenePos) const

Definition at line 431 of file qquickpopup.cpp.

References QQuickItem::contains(), QQuickItem::mapFromScene(), and popupItem.

Referenced by QQuickMenuPrivate::blockInput(), QQuickDrawerPrivate::grabMouse(), QQuickDrawerPrivate::handleMove(), handlePress(), handleRelease(), QQuickDrawerPrivate::offsetAt(), and tryClose().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ contentChildren()

QQmlListProperty< QQuickItem > QQuickPopupPrivate::contentChildren ( )

\qmlproperty list<Item> QtQuick.Controls::Popup::contentChildren

This property holds the list of content children.

The list contains all items that have been declared in QML as children of the popup.

Note
Unlike contentData, contentChildren does not include non-visual QML objects.
See also
Item::children, contentData

Definition at line 1983 of file qquickpopup.cpp.

References QQuickItemPrivate::children_append(), QQuickItemPrivate::children_at(), QQuickItemPrivate::children_clear(), QQuickItemPrivate::children_count(), QQuickControl::contentItem, and popupItem.

+ Here is the call graph for this function:

◆ contentData()

QQmlListProperty< QObject > QQuickPopupPrivate::contentData ( )

\qmlproperty list<QtObject> QtQuick.Controls::Popup::contentData \qmldefault

This property holds the list of content data.

The list contains all objects that have been declared in QML as children of the popup.

Note
Unlike contentChildren, contentData does include non-visual QML objects.
See also
Item::data, contentChildren

Definition at line 1958 of file qquickpopup.cpp.

References QQuickControl::contentItem, QQuickItemPrivate::data_append(), QQuickItemPrivate::data_at(), QQuickItemPrivate::data_clear(), QQuickItemPrivate::data_count(), QQuickControlPrivate::get(), and popupItem.

+ Here is the call graph for this function:

◆ createOverlay()

void QQuickPopupPrivate::createOverlay ( )

Definition at line 916 of file qquickpopup.cpp.

References component(), createDimmer(), dimmer, explicitDimmerOpacity, QQuickOverlay::modal, modal, QQuickOverlay::modeless, QQuickItem::opacity, QQuickOverlay::overlay(), resizeDimmer(), QQuickItem::setOpacity(), showDimmer(), and window.

Referenced by prepareEnterTransition(), and toggleOverlay().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ defaultPalette()

QPalette QQuickPopupPrivate::defaultPalette ( ) const
overridevirtual

The default palette for this component.

Reimplemented from QQuickPaletteProviderPrivateBase< QQuickPopup, QQuickPopupPrivate >.

Reimplemented in QQuickToolTipPrivate.

Definition at line 869 of file qquickpopup.cpp.

References QQuickTheme::palette(), and QQuickTheme::System.

+ Here is the call graph for this function:

◆ destroyDimmer()

void QQuickPopupPrivate::destroyDimmer ( )

Definition at line 948 of file qquickpopup.cpp.

References QObject::deleteLater(), dimmer, QQuickItem::parentItem(), qCDebug, QQuickItem::setParentItem(), and QObject::setProperty().

Referenced by finalizeExitTransition(), and toggleOverlay().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ finalizeEnterTransition()

void QQuickPopupPrivate::finalizeEnterTransition ( )
virtual

Definition at line 653 of file qquickpopup.cpp.

References emit, getPositioner(), NoTransition, opened(), and transitionState.

Referenced by QQuickPopupTransitionManager::finished().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ finalizeExitTransition()

void QQuickPopupPrivate::finalizeExitTransition ( )
virtual

Definition at line 662 of file qquickpopup.cpp.

References QQuickWindow::contentItem, destroyDimmer(), emit, ExitTransition, QQuickOverlayPrivate::get(), get(), getPositioner(), hadActiveFocusBeforeExitTransition, NoTransition, Qt::OtherFocusReason, QQuickOverlay::overlay(), Qt::PopupFocusReason, popupItem, prevOpacity, prevScale, QQuickItem::setOpacity(), QQuickItem::setParentItem(), QQuickItem::setScale(), QQuickItem::setVisible(), transitionState, visible, and window.

Referenced by QQuickPopupTransitionManager::finished().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get()

◆ getAnchors()

QQuickPopupAnchors * QQuickPopupPrivate::getAnchors ( )
\since QtQuick.Controls 2.5 (Qt 5.12)
\qmlproperty Item QtQuick.Controls::Popup::anchors.centerIn

Anchors provide a way to position an item by specifying its
relationship with other items.

A common use case is to center a popup within its parent. One way to do
this is with the \l[QtQuick]{Item::}{x} and \l[QtQuick]{Item::}{y} properties. Anchors offer
a more convenient approach:

\qml
Pane {

...

    Popup {
        anchors.centerIn: parent
    }
}
\endqml

It is also possible to center the popup in the window by using \l Overlay:

\snippet qtquickcontrols-popup.qml centerIn

This makes it easy to center a popup in the window from any component.

\note Popups can only be centered within their immediate parent or
the window overlay; trying to center in other items will produce a warning.

\sa {Popup Positioning}, {Item::}{anchors}, {Using Qt Quick Controls types
    in property declarations}

Definition at line 810 of file qquickpopup.cpp.

References anchors.

◆ getMargins()

QMarginsF QQuickPopupPrivate::getMargins ( ) const

Definition at line 719 of file qquickpopup.cpp.

◆ getPositioner()

QQuickPopupPositioner * QQuickPopupPrivate::getPositioner ( )
virtual

Reimplemented in QQuickDrawerPrivate, and QQuickMenuPrivate.

Definition at line 818 of file qquickpopup.cpp.

References positioner.

Referenced by finalizeEnterTransition(), finalizeExitTransition(), prepareEnterTransition(), and reposition().

+ Here is the caller graph for this function:

◆ handleHoverEvent()

bool QQuickPopupPrivate::handleHoverEvent ( QQuickItem * item,
QHoverEvent * event )

Definition at line 521 of file qquickpopup.cpp.

References blockInput(), QEvent::HoverEnter, QEvent::HoverLeave, QEvent::HoverMove, and item.

+ Here is the call graph for this function:

◆ handleMouseEvent()

bool QQuickPopupPrivate::handleMouseEvent ( QQuickItem * item,
QMouseEvent * event )

Definition at line 507 of file qquickpopup.cpp.

References handleMove(), handlePress(), handleRelease(), item, QEvent::MouseButtonPress, QEvent::MouseButtonRelease, and QEvent::MouseMove.

Referenced by QQuickDrawerPrivate::grabMouse(), and QQuickDrawerPrivate::startDrag().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ handleMove()

bool QQuickPopupPrivate::handleMove ( QQuickItem * item,
const QPointF & point,
ulong timestamp )
virtual

Reimplemented in QQuickDrawerPrivate.

Definition at line 476 of file qquickpopup.cpp.

References blockInput(), item, and Q_UNUSED.

Referenced by handleMouseEvent(), and QQuickDrawerPrivate::handleMove().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ handlePress()

bool QQuickPopupPrivate::handlePress ( QQuickItem * item,
const QPointF & point,
ulong timestamp )
virtual

Reimplemented in QQuickDrawerPrivate.

Definition at line 466 of file qquickpopup.cpp.

References blockInput(), QQuickItem::contains(), contains(), item, QQuickItem::mapFromScene(), outsideParentPressed, outsidePressed, parentItem, pressPoint, Q_UNUSED, and tryClose().

Referenced by handleMouseEvent(), and QQuickDrawerPrivate::handlePress().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ handleRelease()

bool QQuickPopupPrivate::handleRelease ( QQuickItem * item,
const QPointF & point,
ulong timestamp )
virtual

Reimplemented in QQuickDrawerPrivate.

Definition at line 482 of file qquickpopup.cpp.

References blockInput(), contains(), item, outsideParentPressed, outsidePressed, popupItem, pressPoint, Q_UNUSED, touchId, and tryClose().

Referenced by handleMouseEvent(), and QQuickDrawerPrivate::handleRelease().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ handleUngrab()

void QQuickPopupPrivate::handleUngrab ( )
virtual

Reimplemented in QQuickDrawerPrivate.

Definition at line 494 of file qquickpopup.cpp.

References QQuickOverlayPrivate::get(), QQuickOverlay::overlay(), pressPoint, touchId, and window.

Referenced by QQuickDrawerPrivate::handleUngrab().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ hideDimmer()

void QQuickPopupPrivate::hideDimmer ( )
virtual

Reimplemented in QQuickDrawerPrivate.

Definition at line 985 of file qquickpopup.cpp.

References dim, dimmer, QStringLiteral, and QQmlProperty::write().

Referenced by prepareExitTransition().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ init()

void QQuickPopupPrivate::init ( )

Definition at line 382 of file qquickpopup.cpp.

References QQuickControl::backgroundChanged(), QQuickPopup::backgroundChanged(), QObject::connect(), QQuickControl::contentItemChanged(), QQuickPopup::contentItemChanged(), QQuickControl::paddingChanged(), QQuickPopup::paddingChanged(), QObjectData::parent, popupItem, and QQuickItem::setVisible().

+ Here is the call graph for this function:

◆ itemDestroyed()

void QQuickPopupPrivate::itemDestroyed ( QQuickItem * item)
overridevirtual

Reimplemented from QQuickItemChangeListener.

Definition at line 857 of file qquickpopup.cpp.

References item, and parentItem.

Referenced by QQuickMenuPrivate::itemDestroyed().

+ Here is the caller graph for this function:

◆ opened()

void QQuickPopupPrivate::opened ( )
virtual

Reimplemented in QQuickToolTipPrivate.

Definition at line 713 of file qquickpopup.cpp.

References emit.

Referenced by finalizeEnterTransition(), and QQuickToolTipPrivate::opened().

+ Here is the caller graph for this function:

◆ prepareEnterTransition()

bool QQuickPopupPrivate::prepareEnterTransition ( )
virtual

Reimplemented in QQuickDrawerPrivate, and QQuickMenuPrivate.

Definition at line 569 of file qquickpopup.cpp.

References QQuickWindow::activeFocusItem, createOverlay(), dim, emit, EnterTransition, focus, QQuickOverlayPrivate::get(), getPositioner(), hasZ, QQuickTransitionManager::isRunning(), nullptr, QQuickOverlay::overlay(), QObject::parent(), parentItem, Qt::PopupFocusReason, popupItem, qMax(), qmlWarning(), QQuickItem::setFocus(), QQuickItem::setParentItem(), QQuickItem::setVisible(), QQuickItem::setZ(), showDimmer(), QQuickItem::stackAfter(), transitionManager, transitionState, visible, window, and QQuickItem::z.

Referenced by QQuickDrawerPrivate::prepareEnterTransition(), QQuickMenuPrivate::prepareEnterTransition(), and QQuickPopupTransitionManager::transitionEnter().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ prepareExitTransition()

bool QQuickPopupPrivate::prepareExitTransition ( )
virtual

Reimplemented in QQuickDrawerPrivate, and QQuickMenuPrivate.

Definition at line 622 of file qquickpopup.cpp.

References emit, ExitTransition, focus, QQuickItemPrivate::get(), hadActiveFocusBeforeExitTransition, QQuickItem::hasActiveFocus(), hideDimmer(), QQuickTransitionManager::isRunning(), QQuickItem::opacity, Qt::PopupFocusReason, popupItem, prevOpacity, prevScale, Q_ASSERT, QQuickItem::scale, QQuickItem::setFocus(), transitionManager, and transitionState.

Referenced by QQuickDrawerPrivate::prepareExitTransition(), QQuickMenuPrivate::prepareExitTransition(), and QQuickPopupTransitionManager::transitionExit().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ reposition()

void QQuickPopupPrivate::reposition ( )

Definition at line 864 of file qquickpopup.cpp.

References getPositioner().

Referenced by QQuickDrawerPrivate::grabMouse().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resizeDimmer()

void QQuickPopupPrivate::resizeDimmer ( )
virtual

Reimplemented in QQuickDrawerPrivate.

Definition at line 992 of file qquickpopup.cpp.

References dimmer, QQuickItem::height, QQuickOverlay::overlay(), QQuickItem::setSize(), QQuickItem::width, and window.

Referenced by createOverlay().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setBottomMargin()

void QQuickPopupPrivate::setBottomMargin ( qreal value,
bool reset = false )

Definition at line 764 of file qquickpopup.cpp.

References bottomMargin, emit, hasBottomMargin, leftMargin, margins, qFuzzyCompare(), rightMargin, and topMargin.

+ Here is the call graph for this function:

◆ setLeftMargin()

void QQuickPopupPrivate::setLeftMargin ( qreal value,
bool reset = false )

Definition at line 738 of file qquickpopup.cpp.

References bottomMargin, emit, hasLeftMargin, leftMargin, margins, qFuzzyCompare(), rightMargin, and topMargin.

+ Here is the call graph for this function:

◆ setRightMargin()

void QQuickPopupPrivate::setRightMargin ( qreal value,
bool reset = false )

Definition at line 751 of file qquickpopup.cpp.

References bottomMargin, emit, hasRightMargin, leftMargin, margins, qFuzzyCompare(), rightMargin, and topMargin.

+ Here is the call graph for this function:

◆ setTopMargin()

void QQuickPopupPrivate::setTopMargin ( qreal value,
bool reset = false )

Definition at line 725 of file qquickpopup.cpp.

References bottomMargin, emit, hasTopMargin, leftMargin, margins, qFuzzyCompare(), rightMargin, and topMargin.

+ Here is the call graph for this function:

◆ setWindow()

void QQuickPopupPrivate::setWindow ( QQuickWindow * window)

Definition at line 826 of file qquickpopup.cpp.

References complete, emit, QQuickControlPrivate::get(), QQuickOverlayPrivate::get(), QQuickOverlay::overlay(), popupItem, QQuickPopupTransitionManager::transitionEnter(), transitionManager, visible, and window.

+ Here is the call graph for this function:

◆ showDimmer()

void QQuickPopupPrivate::showDimmer ( )
virtual

Reimplemented in QQuickDrawerPrivate.

Definition at line 978 of file qquickpopup.cpp.

References dim, dimmer, explicitDimmerOpacity, QStringLiteral, and QQmlProperty::write().

Referenced by createOverlay(), and prepareEnterTransition().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ toggleOverlay()

void QQuickPopupPrivate::toggleOverlay ( )

Definition at line 962 of file qquickpopup.cpp.

References createOverlay(), destroyDimmer(), and dim.

+ Here is the call graph for this function:

◆ tryClose()

bool QQuickPopupPrivate::tryClose ( const QPointF & pos,
QQuickPopup::ClosePolicy flags )

Definition at line 409 of file qquickpopup.cpp.

References closeOrReject(), closePolicy, QQuickItem::contains(), contains(), dimmer, interactive, QQuickItem::mapFromScene(), outsideParentPressed, outsidePressed, parentItem, and pos.

Referenced by handlePress(), and handleRelease().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateContentPalettes()

void QQuickPopupPrivate::updateContentPalettes ( const QPalette & parentPalette)

Definition at line 969 of file qquickpopup.cpp.

References QQuickItemPrivate::get(), QQuickPaletteProviderPrivateBase< QQuickPopup, QQuickPopupPrivate >::inheritPalette(), QQuickPaletteProviderPrivateBase< QQuickPopup, QQuickPopupPrivate >::parentPalette(), and popupItem.

+ Here is the call graph for this function:

Friends And Related Symbol Documentation

◆ QQuickPopupTransitionManager

friend class QQuickPopupTransitionManager
friend

Definition at line 188 of file qquickpopup_p_p.h.

Member Data Documentation

◆ allowHorizontalFlip

bool QQuickPopupPrivate::allowHorizontalFlip = false

Definition at line 148 of file qquickpopup_p_p.h.

Referenced by QQuickMenuPrivate::prepareEnterTransition().

◆ allowHorizontalMove

bool QQuickPopupPrivate::allowHorizontalMove = true

Definition at line 150 of file qquickpopup_p_p.h.

Referenced by QQuickDrawerPrivate::setEdge().

◆ allowHorizontalResize

bool QQuickPopupPrivate::allowHorizontalResize = true

Definition at line 152 of file qquickpopup_p_p.h.

Referenced by QQuickDrawerPrivate::setEdge().

◆ allowVerticalFlip

bool QQuickPopupPrivate::allowVerticalFlip = false

Definition at line 147 of file qquickpopup_p_p.h.

◆ allowVerticalMove

bool QQuickPopupPrivate::allowVerticalMove = true

Definition at line 149 of file qquickpopup_p_p.h.

Referenced by QQuickDrawerPrivate::setEdge().

◆ allowVerticalResize

bool QQuickPopupPrivate::allowVerticalResize = true

Definition at line 151 of file qquickpopup_p_p.h.

Referenced by QQuickDrawerPrivate::setEdge().

◆ anchors

QQuickPopupAnchors* QQuickPopupPrivate::anchors = nullptr

Definition at line 183 of file qquickpopup_p_p.h.

Referenced by getAnchors().

◆ bottomMargin

qreal QQuickPopupPrivate::bottomMargin = 0

Definition at line 169 of file qquickpopup_p_p.h.

Referenced by setBottomMargin(), setLeftMargin(), setRightMargin(), and setTopMargin().

◆ closePolicy

QQuickPopup::ClosePolicy QQuickPopupPrivate::closePolicy = DefaultClosePolicy

Definition at line 172 of file qquickpopup_p_p.h.

Referenced by QQuickMenuPrivate::prepareEnterTransition(), and tryClose().

◆ complete

bool QQuickPopupPrivate::complete = true

◆ DefaultClosePolicy

QT_BEGIN_NAMESPACE const QQuickPopup::ClosePolicy QQuickPopupPrivate::DefaultClosePolicy = QQuickPopup::CloseOnEscape | QQuickPopup::CloseOnPressOutside
static

Base type of popup-like user interface controls.

\qmltype Popup
\inherits QtObject

! \instantiates QQuickPopup \inqmlmodule QtQuick.Controls

Since
5.7

Popup is the base type of popup-like user interface controls. It can be used with \l Window or \l ApplicationWindow.

\qml import QtQuick.Window 2.2 import QtQuick.Controls 2.12

ApplicationWindow { id: window width: 400 height: 400 visible: true

Button { text: "Open" onClicked: popup.open() }

Popup { id: popup x: 100 y: 100 width: 200 height: 300 modal: true focus: true closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutsideParent } } \endqml

In order to ensure that a popup is displayed above other items in the scene, it is recommended to use ApplicationWindow. ApplicationWindow also provides background dimming effects.

Popup does not provide a layout of its own, but requires you to position its contents, for instance by creating a \l RowLayout or a \l ColumnLayout.

Items declared as children of a Popup are automatically parented to the Popups's \l contentItem. Items created dynamically need to be explicitly parented to the contentItem.

Definition at line 131 of file qquickpopup_p_p.h.

◆ dim

bool QQuickPopupPrivate::dim = false

Definition at line 135 of file qquickpopup_p_p.h.

Referenced by hideDimmer(), prepareEnterTransition(), showDimmer(), and toggleOverlay().

◆ dimmer

◆ effectiveX

qreal QQuickPopupPrivate::effectiveX = 0

Definition at line 163 of file qquickpopup_p_p.h.

◆ effectiveY

qreal QQuickPopupPrivate::effectiveY = 0

Definition at line 164 of file qquickpopup_p_p.h.

◆ enter

◆ enterActions

◆ exit

◆ exitActions

QList<QQuickStateAction> QQuickPopupPrivate::exitActions

◆ explicitDimmerOpacity

qreal QQuickPopupPrivate::explicitDimmerOpacity = 0

Definition at line 184 of file qquickpopup_p_p.h.

Referenced by createOverlay(), and showDimmer().

◆ focus

bool QQuickPopupPrivate::focus = false

Definition at line 133 of file qquickpopup_p_p.h.

Referenced by prepareEnterTransition(), and prepareExitTransition().

◆ hadActiveFocusBeforeExitTransition

bool QQuickPopupPrivate::hadActiveFocusBeforeExitTransition = false

Definition at line 153 of file qquickpopup_p_p.h.

Referenced by finalizeExitTransition(), and prepareExitTransition().

◆ hasBottomMargin

bool QQuickPopupPrivate::hasBottomMargin = false

Definition at line 145 of file qquickpopup_p_p.h.

Referenced by setBottomMargin().

◆ hasClosePolicy

bool QQuickPopupPrivate::hasClosePolicy = false

Definition at line 155 of file qquickpopup_p_p.h.

Referenced by QQuickMenuPrivate::prepareEnterTransition().

◆ hasDim

bool QQuickPopupPrivate::hasDim = false

Definition at line 136 of file qquickpopup_p_p.h.

◆ hasHeight

bool QQuickPopupPrivate::hasHeight = false

Definition at line 141 of file qquickpopup_p_p.h.

◆ hasLeftMargin

bool QQuickPopupPrivate::hasLeftMargin = false

Definition at line 143 of file qquickpopup_p_p.h.

Referenced by setLeftMargin().

◆ hasRightMargin

bool QQuickPopupPrivate::hasRightMargin = false

Definition at line 144 of file qquickpopup_p_p.h.

Referenced by setRightMargin().

◆ hasTopMargin

bool QQuickPopupPrivate::hasTopMargin = false

Definition at line 142 of file qquickpopup_p_p.h.

Referenced by setTopMargin().

◆ hasWidth

bool QQuickPopupPrivate::hasWidth = false

Definition at line 140 of file qquickpopup_p_p.h.

◆ hasZ

bool QQuickPopupPrivate::hasZ = false

Definition at line 146 of file qquickpopup_p_p.h.

Referenced by prepareEnterTransition().

◆ inDestructor

bool QQuickPopupPrivate::inDestructor = false

Definition at line 158 of file qquickpopup_p_p.h.

◆ interactive

bool QQuickPopupPrivate::interactive = true

◆ leftMargin

qreal QQuickPopupPrivate::leftMargin = 0

Definition at line 167 of file qquickpopup_p_p.h.

Referenced by setBottomMargin(), setLeftMargin(), setRightMargin(), and setTopMargin().

◆ margins

qreal QQuickPopupPrivate::margins = -1

Definition at line 165 of file qquickpopup_p_p.h.

Referenced by setBottomMargin(), setLeftMargin(), setRightMargin(), and setTopMargin().

◆ modal

bool QQuickPopupPrivate::modal = false

Definition at line 134 of file qquickpopup_p_p.h.

Referenced by blockInput(), QQuickDrawerPrivate::blockInput(), and createOverlay().

◆ outsideParentPressed

bool QQuickPopupPrivate::outsideParentPressed = false

Definition at line 157 of file qquickpopup_p_p.h.

Referenced by handlePress(), handleRelease(), and tryClose().

◆ outsidePressed

bool QQuickPopupPrivate::outsidePressed = false

Definition at line 156 of file qquickpopup_p_p.h.

Referenced by handlePress(), handleRelease(), and tryClose().

◆ parentItem

QQuickItem* QQuickPopupPrivate::parentItem = nullptr

◆ popupItem

◆ positioner

QQuickPopupPositioner* QQuickPopupPrivate::positioner = nullptr

◆ positioning

bool QQuickPopupPrivate::positioning = false

Definition at line 139 of file qquickpopup_p_p.h.

◆ pressPoint

◆ prevOpacity

qreal QQuickPopupPrivate::prevOpacity = 0

Definition at line 185 of file qquickpopup_p_p.h.

Referenced by finalizeExitTransition(), and prepareExitTransition().

◆ prevScale

qreal QQuickPopupPrivate::prevScale = 0

Definition at line 186 of file qquickpopup_p_p.h.

Referenced by finalizeExitTransition(), and prepareExitTransition().

◆ relaxEdgeConstraint

bool QQuickPopupPrivate::relaxEdgeConstraint = false

Definition at line 159 of file qquickpopup_p_p.h.

◆ rightMargin

qreal QQuickPopupPrivate::rightMargin = 0

Definition at line 168 of file qquickpopup_p_p.h.

Referenced by setBottomMargin(), setLeftMargin(), setRightMargin(), and setTopMargin().

◆ topMargin

qreal QQuickPopupPrivate::topMargin = 0

Definition at line 166 of file qquickpopup_p_p.h.

Referenced by setBottomMargin(), setLeftMargin(), setRightMargin(), and setTopMargin().

◆ touchId

int QQuickPopupPrivate::touchId = -1

◆ transitionManager

QQuickPopupTransitionManager QQuickPopupPrivate::transitionManager

◆ transitionState

◆ visible

bool QQuickPopupPrivate::visible = false

Definition at line 137 of file qquickpopup_p_p.h.

Referenced by finalizeExitTransition(), prepareEnterTransition(), and setWindow().

◆ window

◆ x

qreal QQuickPopupPrivate::x = 0

Definition at line 161 of file qquickpopup_p_p.h.

◆ y

qreal QQuickPopupPrivate::y = 0

Definition at line 162 of file qquickpopup_p_p.h.


The documentation for this class was generated from the following files: