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
QQuickViewPrivate Class Reference

#include <qquickview_p.h>

+ Inheritance diagram for QQuickViewPrivate:
+ Collaboration diagram for QQuickViewPrivate:

Public Types

enum  ExecuteState { Continue , Stop }
 
- Public Types inherited from QQuickWindowPrivate
enum  CustomEvents { FullUpdateRequest = QEvent::User + 1 , TriggerContextCreationFailure = QEvent::User + 2 }
 
enum  TextureFromNativeTextureFlag { NativeTextureIsExternalOES = 0x01 }
 
- Public Types inherited from QWindowPrivate
enum  PositionPolicy { WindowFrameInclusive , WindowFrameExclusive }
 
enum  SiblingPosition { PositionTop , PositionBottom }
 
enum class  FocusTarget {
  First , Last , Current , Next ,
  Prev
}
 
- Public Types inherited from QObjectPrivate
typedef void(* StaticMetaCallFunction) (QObject *, QMetaObject::Call, int, void **)
 
using ConnectionDataPointer = QExplicitlySharedDataPointer<ConnectionData>
 

Public Member Functions

 QQuickViewPrivate ()
 
 ~QQuickViewPrivate ()
 
ExecuteState executeHelper ()
 
void execute ()
 
void execute (QAnyStringView uri, QAnyStringView typeName)
 
void itemGeometryChanged (QQuickItem *item, QQuickGeometryChange change, const QRectF &) override
 
void initResize ()
 
void updateSize ()
 
bool setRootObject (QObject *)
 
void init (QQmlEngine *e=nullptr)
 
QSize rootObjectSize () const
 
- Public Member Functions inherited from QQuickWindowPrivate
 QQuickWindowPrivate ()
 
 ~QQuickWindowPrivate () override
 
void setPalette (QQuickPalette *p) override
 
void updateWindowPalette ()
 
void updateChildrenPalettes (const QPalette &parentPalette) override
 
void init (QQuickWindow *, QQuickRenderControl *control=nullptr)
 
QQmlListProperty< QObjectdata ()
 
QQuickDeliveryAgentPrivatedeliveryAgentPrivate () const
 
void clearFocusObject () override
 
void setFocusToTarget (QWindowPrivate::FocusTarget) override
 
void dirtyItem (QQuickItem *)
 
void cleanup (QSGNode *)
 
void ensureCustomRenderTarget ()
 
void setCustomCommandBuffer (QRhiCommandBuffer *cb)
 
void polishItems ()
 
void forcePolish ()
 Schedules polish events on all items in the scene.
 
void invalidateFontData (QQuickItem *item)
 
void syncSceneGraph ()
 
void renderSceneGraph ()
 
bool isRenderable () const
 
bool emitError (QQuickWindow::SceneGraphError error, const QString &msg)
 
QSGTexturecreateTextureFromNativeTexture (quint64 nativeObjectHandle, int nativeLayoutOrState, uint nativeFormat, const QSize &size, QQuickWindow::CreateTextureOptions options, TextureFromNativeTextureFlags flags={}) const
 
QSGTexturecreateTextureFromNativeTexture (quint64 nativeObjectHandle, int nativeLayoutOrState, const QSize &size, QQuickWindow::CreateTextureOptions options, TextureFromNativeTextureFlags flags={}) const
 
void updateDirtyNodes ()
 
void cleanupNodes ()
 
void cleanupNodesOnShutdown ()
 
bool updateEffectiveOpacity (QQuickItem *)
 
void updateEffectiveOpacityRoot (QQuickItem *, qreal)
 
void updateDirtyNode (QQuickItem *)
 
void fireFrameSwapped ()
 
void fireAboutToStop ()
 
void clearGrabbers (QPointerEvent *event)
 
void updateChildWindowStackingOrder (QQuickItem *item=nullptr)
 
int multiViewCount ()
 
QRhiRenderTargetactiveCustomRhiRenderTarget ()
 
void clearFocusInScope (QQuickItem *scope, QQuickItem *item, Qt::FocusReason reason)
 
void runAndClearJobs (QList< QRunnable * > *jobs)
 
QOpenGLContextopenglContext ()
 
- Public Member Functions inherited from QWindowPrivate
 QWindowPrivate ()
 
 ~QWindowPrivate () override
 
void init (QWindow *parent, QScreen *targetScreen=nullptr)
 
void setCursor (const QCursor *c=nullptr)
 
bool applyCursor ()
 
QPoint globalPosition () const
 
QWindowtopLevelWindow (QWindow::AncestorMode mode=QWindow::IncludeTransients) const
 
virtual QWindoweventReceiver ()
 
virtual QPalette windowPalette () const
 
virtual void setVisible (bool visible)
 
void updateVisibility ()
 
void _q_clearAlert ()
 
void updateSiblingPosition (SiblingPosition)
 
bool windowRecreationRequired (QScreen *newScreen) const
 
void create (bool recursive)
 
void destroy ()
 
void setTopLevelScreen (QScreen *newScreen, bool recreate)
 
void connectToScreen (QScreen *topLevelScreen)
 
void disconnectFromScreen ()
 
void emitScreenChangedRecursion (QScreen *newScreen)
 
QScreenscreenForGeometry (const QRect &rect) const
 
void setTransientParent (QWindow *parent)
 
virtual void setFocusToTarget (FocusTarget, Qt::FocusReason)
 
virtual QRectF closestAcceptableGeometry (const QRectF &rect) const
 
void setMinOrMaxSize (QSize *oldSizeMember, const QSize &size, qxp::function_ref< void()> funcWidthChanged, qxp::function_ref< void()> funcHeightChanged)
 
virtual void processSafeAreaMarginsChanged ()
 
virtual bool participatesInLastWindowClosed () const
 
virtual bool treatAsVisible () const
 
bool isPopup () const
 
void setAutomaticPositionAndResizeEnabled (bool a)
 
bool updateDevicePixelRatio ()
 
- 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 QQuickPaletteProviderPrivateBase< QQuickWindow, QQuickWindowPrivate >
virtual ~QQuickPaletteProviderPrivateBase ()=default
 
virtual QQuickPalettepalette () const
 
virtual void resetPalette ()
 
virtual bool providesPalette () const
 
QPalette defaultPalette () const override
 
QPalette parentPalette (const QPalette &fallbackPalette) const override
 
void inheritPalette (const QPalette &parentPalette)
 
- Public Member Functions inherited from QQuickAbstractPaletteProvider
virtual ~QQuickAbstractPaletteProvider ()=default
 
- Public Member Functions inherited from QQuickItemChangeListener
virtual ~QQuickItemChangeListener ()
 
virtual void itemSiblingOrderChanged (QQuickItem *)
 
virtual void itemVisibilityChanged (QQuickItem *)
 
virtual void itemEnabledChanged (QQuickItem *)
 
virtual void itemOpacityChanged (QQuickItem *)
 
virtual void itemDestroyed (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 ()
 

Static Public Member Functions

static QQuickViewPrivateget (QQuickView *view)
 
static const QQuickViewPrivateget (const QQuickView *view)
 
- Static Public Member Functions inherited from QQuickWindowPrivate
static QQuickWindowPrivateget (QQuickWindow *c)
 
static const QQuickWindowPrivateget (const QQuickWindow *c)
 
static bool dragOverThreshold (qreal d, Qt::Axis axis, const QEventPoint *tp, int startDragThreshold=-1)
 
static bool dragOverThreshold (qreal d, Qt::Axis axis, QMouseEvent *event, int startDragThreshold=-1)
 
static void data_append (QQmlListProperty< QObject > *, QObject *)
 \qmlproperty list<QtObject> Window::data \qmldefault
 
static qsizetype data_count (QQmlListProperty< QObject > *)
 
static QObjectdata_at (QQmlListProperty< QObject > *, qsizetype)
 
static void data_clear (QQmlListProperty< QObject > *)
 
static void data_replace (QQmlListProperty< QObject > *, qsizetype, QObject *)
 
static void data_removeLast (QQmlListProperty< QObject > *)
 
static void rhiCreationFailureMessage (const QString &backendName, QString *translatedMessage, QString *untranslatedMessage)
 
static void emitBeforeRenderPassRecording (void *ud)
 
static void emitAfterRenderPassRecording (void *ud)
 
- Static Public Member Functions inherited from QWindowPrivate
static QWindowPrivateget (QWindow *window)
 
static Qt::WindowState effectiveState (Qt::WindowStates)
 
- 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

QPointer< QQuickItemroot
 
QUrl source
 
QPointer< QQmlEngineengine
 
QQmlComponentcomponent
 
QBasicTimer resizetimer
 
QQuickView::ResizeMode resizeMode
 
QSize initialSize
 
QElapsedTimer frameTimer
 
QVariantMap initialProperties
 
- Public Attributes inherited from QQuickWindowPrivate
QQuickRootItemcontentItem
 
QSet< QQuickItem * > parentlessItems
 
QQuickDeliveryAgentdeliveryAgent = nullptr
 
QQuickItem::UpdatePaintNodeData updatePaintNodeData
 
QQuickItemdirtyItemList
 
QList< QSGNode * > cleanupNodeList
 
QVector< QQuickItem * > itemsToPolish
 
qreal lastReportedItemDevicePixelRatio
 
QMetaObject::Connection physicalDpiChangedConnection
 
QSGRenderContextcontext
 
QSGRendererrenderer
 
QByteArray visualizationMode
 
QSGRenderLoopwindowManager
 
QQuickRenderControlrenderControl
 
QScopedPointer< QQuickAnimatorControlleranimationController
 
QColor clearColor
 
uint persistentGraphics: 1
 
uint persistentSceneGraph: 1
 
uint inDestructor: 1
 
QQuickRenderTarget customRenderTarget
 
struct QQuickWindowPrivate::Redirect redirect
 
QQuickGraphicsDevice customDeviceObjects
 
QQuickGraphicsConfiguration graphicsConfig
 
QQuickWindowIncubationControllerincubationController
 
QMutex renderJobMutex
 
QList< QRunnable * > beforeSynchronizingJobs
 
QList< QRunnable * > afterSynchronizingJobs
 
QList< QRunnable * > beforeRenderingJobs
 
QList< QRunnable * > afterRenderingJobs
 
QList< QRunnable * > afterSwapJobs
 
QQuickWindow::GraphicsStateInfo rhiStateInfo
 
QRhirhi = nullptr
 
QRhiSwapChainswapchain = nullptr
 
QRhiRenderBufferdepthStencilForSwapchain = nullptr
 
QRhiRenderPassDescriptorrpDescForSwapchain = nullptr
 
uint hasActiveSwapchain: 1
 
uint hasRenderableSwapchain: 1
 
uint swapchainJustBecameRenderable: 1
 
uint updatesEnabled: 1
 
bool pendingFontUpdate = false
 
bool windowEventDispatch = false
 
QPointer< QQuickPalettewindowPaletteRef
 
- Public Attributes inherited from QWindowPrivate
QWindow::SurfaceType surfaceType = QWindow::RasterSurface
 
Qt::WindowFlags windowFlags = Qt::Window
 
QWindowparentWindow = nullptr
 
QPlatformWindowplatformWindow = nullptr
 
bool visible = false
 
bool visibilityOnDestroy = false
 
bool exposed = false
 
bool inClose = false
 
QSurfaceFormat requestedFormat
 
QString windowTitle
 
QString windowFilePath
 
QIcon windowIcon
 
QRect geometry
 
qreal devicePixelRatio = 1.0
 
Qt::WindowStates windowState = Qt::WindowNoState
 
QWindow::Visibility visibility = QWindow::Hidden
 
bool resizeEventPending = true
 
bool receivedExpose = false
 
PositionPolicy positionPolicy = WindowFrameExclusive
 
bool positionAutomatic = true
 
bool resizeAutomatic = true
 
Qt::ScreenOrientation contentOrientation = Qt::PrimaryOrientation
 
qreal opacity = 1
 
QRegion mask
 
QSize minimumSize = {0, 0}
 
QSize maximumSize = {QWINDOWSIZE_MAX, QWINDOWSIZE_MAX}
 
QSize baseSize
 
QSize sizeIncrement
 
Qt::WindowModality modality = Qt::NonModal
 
bool blockedByModalWindow = false
 
bool updateRequestPending = false
 
bool transientParentPropertySet = false
 
QPointer< QWindowtransientParent
 
QPointer< QScreentopLevelScreen
 
QCursor cursor = {Qt::ArrowCursor}
 
bool hasCursor = false
 
QElapsedTimer lastComposeTime
 
- 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
 

Additional Inherited Members

- Static Public Attributes inherited from QQuickWindowPrivate
static bool defaultAlphaBuffer = false
 
static QQuickWindow::TextRenderType textRenderType = QQuickWindow::QtTextRendering
 
- Protected Member Functions inherited from QQuickPaletteProviderPrivateBase< QQuickWindow, QQuickWindowPrivate >
void setCurrentColorGroup ()
 

Detailed Description

Definition at line 38 of file qquickview_p.h.

Member Enumeration Documentation

◆ ExecuteState

Enumerator
Continue 
Stop 

Definition at line 49 of file qquickview_p.h.

Constructor & Destructor Documentation

◆ QQuickViewPrivate()

QQuickViewPrivate::QQuickViewPrivate ( )

Definition at line 42 of file qquickview.cpp.

◆ ~QQuickViewPrivate()

QQuickViewPrivate::~QQuickViewPrivate ( )

Definition at line 47 of file qquickview.cpp.

Member Function Documentation

◆ execute() [1/2]

void QQuickViewPrivate::execute ( )

Definition at line 67 of file qquickview.cpp.

References component, QObject::connect(), QPointer< T >::data(), engine, executeHelper(), QQmlComponent::isLoading(), SIGNAL, SLOT, statusChanged(), and Stop.

+ Here is the call graph for this function:

◆ execute() [2/2]

void QQuickViewPrivate::execute ( QAnyStringView uri,
QAnyStringView typeName )

Definition at line 83 of file qquickview.cpp.

References component, QObject::connect(), QPointer< T >::data(), engine, executeHelper(), QQmlComponent::isLoading(), SIGNAL, SLOT, statusChanged(), Stop, and typeName.

+ Here is the call graph for this function:

◆ executeHelper()

QQuickViewPrivate::ExecuteState QQuickViewPrivate::executeHelper ( )

Definition at line 51 of file qquickview.cpp.

References component, Continue, engine, qWarning, root, and Stop.

Referenced by execute(), and execute().

+ Here is the caller graph for this function:

◆ get() [1/2]

static const QQuickViewPrivate * QQuickViewPrivate::get ( const QQuickView * view)
inlinestatic

Definition at line 44 of file qquickview_p.h.

References view.

◆ get() [2/2]

static QQuickViewPrivate * QQuickViewPrivate::get ( QQuickView * view)
inlinestatic

Definition at line 43 of file qquickview_p.h.

References view.

Referenced by QQuickDesignerSupport::setRootItem().

+ Here is the caller graph for this function:

◆ init()

QT_BEGIN_NAMESPACE void QQuickViewPrivate::init ( QQmlEngine * e = nullptr)

Definition at line 20 of file qquickview.cpp.

References QQuickWindowPrivate::contentItem, QPointer< T >::data(), engine, QV4::QObjectWrapper::ensureWrapper(), QJSEngine::handle(), QQmlEngine::incubationController(), QPointer< T >::isNull(), QQmlEngine::rootContext(), QQmlEngine::setContextForObject(), and QQmlEngine::setIncubationController().

+ Here is the call graph for this function:

◆ initResize()

void QQuickViewPrivate::initResize ( )

Definition at line 436 of file qquickview.cpp.

References QQuickItemPrivate::Geometry, QQuickItemPrivate::get(), resizeMode, root, QQuickView::SizeViewToRootObject, and updateSize().

Referenced by setRootObject().

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

◆ itemGeometryChanged()

void QQuickViewPrivate::itemGeometryChanged ( QQuickItem * item,
QQuickGeometryChange change,
const QRectF & oldGeometry )
overridevirtual

Reimplemented from QQuickItemChangeListener.

Definition at line 99 of file qquickview.cpp.

References QQuickItemChangeListener::itemGeometryChanged(), resizeMode, resizetimer, root, QQuickView::SizeViewToRootObject, and QBasicTimer::start().

+ Here is the call graph for this function:

◆ rootObjectSize()

QSize QQuickViewPrivate::rootObjectSize ( ) const

Definition at line 471 of file qquickview.cpp.

References QQuickItem::height, root, rootObjectSize(), QSize::setHeight(), QSize::setWidth(), and QQuickItem::width.

Referenced by rootObjectSize(), and setRootObject().

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

◆ setRootObject()

bool QQuickViewPrivate::setRootObject ( QObject * obj)

Sets obj as root object and returns true if that operation succeeds. Otherwise returns false. If false is returned, the root object is nullptr afterwards. You can explicitly set the root object to nullptr, and the return value will be true.

Definition at line 546 of file qquickview.cpp.

References Qt::endl(), initialSize, initResize(), QQuickItem::ItemIsViewport, QQml_setParent_noEvent(), qWarning, resizeMode, root, rootObjectSize(), QQuickItem::setFlag(), and QQuickView::SizeViewToRootObject.

+ Here is the call graph for this function:

◆ updateSize()

void QQuickViewPrivate::updateSize ( )

Definition at line 447 of file qquickview.cpp.

References QQuickItem::height, QSize::isValid(), qFuzzyCompare(), resizeMode, root, QQuickItem::setHeight(), QQuickItem::setSize(), QQuickItem::setWidth(), QQuickView::SizeRootObjectToView, QQuickView::SizeViewToRootObject, and QQuickItem::width.

Referenced by initResize().

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

Member Data Documentation

◆ component

QQmlComponent* QQuickViewPrivate::component

Definition at line 67 of file qquickview_p.h.

Referenced by execute(), execute(), and executeHelper().

◆ engine

QPointer<QQmlEngine> QQuickViewPrivate::engine

Definition at line 66 of file qquickview_p.h.

Referenced by execute(), execute(), executeHelper(), and init().

◆ frameTimer

QElapsedTimer QQuickViewPrivate::frameTimer

Definition at line 72 of file qquickview_p.h.

◆ initialProperties

QVariantMap QQuickViewPrivate::initialProperties

Definition at line 74 of file qquickview_p.h.

◆ initialSize

QSize QQuickViewPrivate::initialSize

Definition at line 71 of file qquickview_p.h.

Referenced by setRootObject().

◆ resizeMode

QQuickView::ResizeMode QQuickViewPrivate::resizeMode

Definition at line 70 of file qquickview_p.h.

Referenced by initResize(), itemGeometryChanged(), setRootObject(), and updateSize().

◆ resizetimer

QBasicTimer QQuickViewPrivate::resizetimer

Definition at line 68 of file qquickview_p.h.

Referenced by itemGeometryChanged().

◆ root

QPointer<QQuickItem> QQuickViewPrivate::root

◆ source

QUrl QQuickViewPrivate::source

Definition at line 64 of file qquickview_p.h.


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