Qt 4.8
Public Functions | Public Variables | List of all members
QDeclarativeViewPrivate Class Reference
Inheritance diagram for QDeclarativeViewPrivate:
QGraphicsViewPrivate QDeclarativeItemChangeListener QAbstractScrollAreaPrivate QFramePrivate QWidgetPrivate QObjectPrivate QObjectData

Public Functions

void execute ()
 
void init ()
 
void initResize ()
 
void itemGeometryChanged (QDeclarativeItem *item, const QRectF &newGeometry, const QRectF &oldGeometry)
 
 QDeclarativeViewPrivate ()
 
QSize rootObjectSize () const
 
void updateSize ()
 
 ~QDeclarativeViewPrivate ()
 
- Public Functions inherited from QGraphicsViewPrivate
void _q_setViewportCursor (const QCursor &cursor)
 
void _q_unsetViewportCursor ()
 
QStyleOptionGraphicsItemallocStyleOptionsArray (int numItems)
 
void centerView (QGraphicsView::ViewportAnchor anchor)
 
void dispatchPendingUpdateRequests ()
 
QList< QGraphicsItem * > findItems (const QRegion &exposedRegion, bool *allItems, const QTransform &viewTransform) const
 

Adjustments in findItems: mapToScene(QRect) forces us to adjust the

input rectangle by (0, 0, 1, 1), because it uses QRect::bottomRight() (etc) when mapping the rectangle to a polygon (which is wrong). More...
 
void freeStyleOptionsArray (QStyleOptionGraphicsItem *array)
 
qint64 horizontalScroll () const
 Returns the horizontal scroll value (the X value of the left edge of the viewport). More...
 
QRectF mapRectFromScene (const QRectF &rect) const
 
QRectF mapRectToScene (const QRect &rect) const
 
QPointF mapToScene (const QPointF &point) const
 
QRectF mapToScene (const QRectF &rect) const
 
QRect mapToViewRect (const QGraphicsItem *item, const QRectF &rect) const
 
QRegion mapToViewRegion (const QGraphicsItem *item, const QRectF &rect) const
 
void mouseMoveEventHandler (QMouseEvent *event)
 
void populateSceneDragDropEvent (QGraphicsSceneDragDropEvent *dest, QDropEvent *source)
 
void processPendingUpdates ()
 
 QGraphicsViewPrivate ()
 
void recalculateContentSize ()
 
void replayLastMouseEvent ()
 
QRegion rubberBandRegion (const QWidget *widget, const QRect &rect) const
 
void setUpdateClip (QGraphicsItem *)
 
void storeDragDropEvent (const QGraphicsSceneDragDropEvent *event)
 
void storeMouseEvent (QMouseEvent *event)
 
void updateAll ()
 
void updateInputMethodSensitivity ()
 Enables input methods for the view if and only if the current focus item of the scene accepts input methods. More...
 
void updateLastCenterPoint ()
 
bool updateRect (const QRect &rect)
 
bool updateRectF (const QRectF &rect)
 
bool updateRegion (const QRectF &rect, const QTransform &xform)
 
void updateScroll ()
 
qint64 verticalScroll () const
 Returns the vertical scroll value (the X value of the top edge of the viewport). More...
 
- Public Functions inherited from QAbstractScrollAreaPrivate
void _q_hslide (int)
 
void _q_showOrHideScrollBars ()
 
void _q_vslide (int)
 
virtual QPoint contentsOffset () const
 
void init ()
 
void layoutChildren ()
 
 QAbstractScrollAreaPrivate ()
 
void replaceScrollBar (QScrollBar *scrollBar, Qt::Orientation orientation)
 
virtual void scrollBarPolicyChanged (Qt::Orientation, Qt::ScrollBarPolicy)
 
void setSingleFingerPanEnabled (bool on=true)
 
bool viewportEvent (QEvent *event)
 
- Public Functions inherited from QFramePrivate
void init ()
 
 QFramePrivate ()
 
void updateFrameWidth ()
 Updated the frameWidth parameter. More...
 
void updateStyledFrameWidths ()
 Updates the frame widths from the style. More...
 
- Public Functions inherited from QWidgetPrivate
void _q_showIfNotHidden ()
 
virtual void aboutToDestroy ()
 
void activateChildLayoutsRecursively ()
 
QSize adjustedSize () const
 
void adjustQuitOnCloseAttribute ()
 
QInputContextassignedInputContext () const
 
QPainterbeginSharedPainter ()
 
QWidgetchildAt_helper (const QPoint &, bool) const
 
QWidgetchildAtRecursiveHelper (const QPoint &p, bool, bool includeFrame=false) const
 
QRect clipRect () const
 
QRegion clipRegion () const
 
void clipToEffectiveMask (QRegion &region) const
 
bool close_helper (CloseMode mode)
 
void create_sys (WId window, bool initializeWindow, bool destroyOldWindow)
 
QWindowSurfacecreateDefaultWindowSurface ()
 
QWindowSurfacecreateDefaultWindowSurface_sys ()
 
void createExtra ()
 Creates the widget extra data. More...
 
void createRecursively ()
 
void createSysExtra ()
 
void createTLExtra ()
 
void createTLSysExtra ()
 
void createWinId (WId id=0)
 
void deactivateWidgetCleanup ()
 
void deleteExtra ()
 Deletes the widget extra data. More...
 
void deleteSysExtra ()
 
void deleteTLSysExtra ()
 
void drawWidget (QPaintDevice *pdev, const QRegion &rgn, const QPoint &offset, int flags, QPainter *sharedPainter=0, QWidgetBackingStore *backingStore=0)
 
QWidgeteffectiveFocusWidget ()
 
QRect effectiveRectFor (const QRect &rect) const
 
bool endSharedPainter ()
 
void enforceNativeChildren ()
 
QWExtraextraData () const
 
QRect frameStrut () const
 
void getLayoutItemMargins (int *left, int *top, int *right, int *bottom) const
 
const QRegiongetOpaqueChildren () const
 
void handleSoftwareInputPanel (Qt::MouseButton button, bool clickCausedFocus)
 
virtual bool hasHeightForWidth () const
 
void hide_helper ()
 
void hide_sys ()
 Platform-specific part of QWidget::hide(). More...
 
void hideChildren (bool spontaneous)
 
void inheritStyle ()
 
void init (QWidget *desktopWidget, Qt::WindowFlags f)
 
QInputContextinputContext () const
 
void invalidateBuffer (const QRegion &)
 Invalidates the rgn (in widget's coordinates) of the backing store, i.e. More...
 
void invalidateBuffer (const QRect &)
 This function is equivalent to calling invalidateBuffer(QRegion(rect), ...), but is more efficient as it eliminates QRegion operations/allocations and can use the rect more precisely for additional cut-offs. More...
 
void invalidateBuffer_resizeHelper (const QPoint &oldPos, const QSize &oldSize)
 Invalidates the buffer when the widget is resized. More...
 
void invalidateGraphicsEffectsRecursively ()
 
bool isAboutToShow () const
 
bool isBackgroundInherited () const
 
bool isOverlapped (const QRect &) const
 
void lower_sys ()
 
QPoint mapFromGlobal (const QPoint &pos) const
 
QPoint mapToGlobal (const QPoint &pos) const
 
QWidgetBackingStoremaybeBackingStore () const
 
QTLWExtramaybeTopData () const
 
void moveRect (const QRect &, int dx, int dy)
 
bool nativeChildrenForced () const
 
QFont naturalWidgetFont (uint inheritedMask) const
 
QPalette naturalWidgetPalette (uint inheritedMask) const
 Returns the palette that the widget w inherits from its ancestors and QApplication::palette. More...
 
void paintBackground (QPainter *, const QRegion &, int flags=DrawAsRoot) const
 
bool paintOnScreen () const
 
void paintSiblingsRecursive (QPaintDevice *pdev, const QObjectList &children, int index, const QRegion &rgn, const QPoint &offset, int flags, QPainter *sharedPainter, QWidgetBackingStore *backingStore)
 
bool pointInsideRectAndMask (const QPoint &) const
 
QRegion prepareToRender (const QRegion &region, QWidget::RenderFlags renderFlags)
 
void propagatePaletteChange ()
 Propagate this widget's palette to all children, except style sheet widgets, and windows that don't enable window propagation (palettes don't normally propagate to windows). More...
 
 QWidgetPrivate (int version=QObjectPrivateVersion)
 
void raise_sys ()
 
QPaintDeviceredirected (QPoint *offset) const
 
void registerDropSite (bool)
 
void render (QPaintDevice *target, const QPoint &targetOffset, const QRegion &sourceRegion, QWidget::RenderFlags renderFlags, bool readyToRender)
 
void render_helper (QPainter *painter, const QPoint &targetOffset, const QRegion &sourceRegion, QWidget::RenderFlags renderFlags)
 
void repaint_sys (const QRegion &rgn)
 
void reparentFocusWidgets (QWidget *oldtlw)
 
void resolveFont ()
 Determine which font is implicitly imposed on this widget by its ancestors and QApplication::font, resolve this against its own font (attributes from the implicit font are copied over). More...
 
void resolveLayoutDirection ()
 
void resolveLocale ()
 
void resolvePalette ()
 Determine which palette is inherited from this widget's ancestors and QApplication::palette, resolve this against this widget's palette (attributes from the inherited palette are copied over this widget's palette). More...
 
void restoreRedirected ()
 
void scroll_sys (int dx, int dy)
 
void scroll_sys (int dx, int dy, const QRect &r)
 
void scrollChildren (int dx, int dy)
 
void scrollRect (const QRect &, int dx, int dy)
 
void sendPendingMoveAndResizeEvents (bool recursive=false, bool disableUpdates=false)
 
void sendStartupMessage (const char *message) const
 Platform-specific part of QWidget::show(). More...
 
void setConstraints_sys ()
 
void setCursor_sys (const QCursor &cursor)
 
void setDirtyOpaqueRegion ()
 
void setEnabled_helper (bool)
 
void setFocus_sys ()
 
void setFont_helper (const QFont &font)
 
void setGeometry_sys (int, int, int, int, bool)
 
void setLayoutDirection_helper (Qt::LayoutDirection)
 
void setLayoutItemMargins (int left, int top, int right, int bottom)
 
void setLayoutItemMargins (QStyle::SubElement element, const QStyleOption *opt=0)
 
void setLocale_helper (const QLocale &l, bool forceUpdate=false)
 
void setMask_sys (const QRegion &)
 
bool setMaximumSize_helper (int &maxw, int &maxh)
 
bool setMinimumSize_helper (int &minw, int &minh)
 
void setModal_sys ()
 
void setNetWmWindowTypes ()
 
void setOpaque (bool opaque)
 
void setPalette_helper (const QPalette &)
 
void setParent_sys (QWidget *parent, Qt::WindowFlags)
 
void setRedirected (QPaintDevice *replacement, const QPoint &offset)
 
void setSharedPainter (QPainter *painter)
 
void setStyle_helper (QStyle *newStyle, bool propagate, bool metalHack=false)
 
void setUpdatesEnabled_helper (bool)
 
void setWindowFilePath_helper (const QString &filePath)
 
void setWindowIcon_helper ()
 
void setWindowIcon_sys (bool forceReset=false)
 
void setWindowIconText_helper (const QString &cap)
 
void setWindowIconText_sys (const QString &cap)
 
void setWindowOpacity_sys (qreal opacity)
 
void setWindowRole ()
 
void setWindowTitle_helper (const QString &cap)
 
void setWindowTitle_sys (const QString &cap)
 
void setWinId (WId)
 
QPaintersharedPainter () const
 
void show_helper ()
 
void show_recursive ()
 Makes the widget visible in the isVisible() meaning of the word. More...
 
void show_sys ()
 Platform-specific part of QWidget::show(). More...
 
void showChildren (bool spontaneous)
 
void stackUnder_sys (QWidget *)
 
void subtractOpaqueChildren (QRegion &rgn, const QRect &clipRect) const
 
void subtractOpaqueSiblings (QRegion &source, bool *hasDirtySiblingsAbove=0, bool alsoNonOpaque=false) const
 
void syncBackingStore ()
 
void syncBackingStore (const QRegion &region)
 
QTLWExtratopData () const
 
void unsetCursor_sys ()
 
void updateFont (const QFont &)
 Assign font to this widget, and propagate it to all children, except style sheet widgets (handled differently) and windows that don't enable window propagation. More...
 
void updateFrameStrut ()
 Computes the frame rectangle when needed. More...
 
void updateGeometry_helper (bool forceUpdate)
 
void updateIsOpaque ()
 
void updateIsTranslucent ()
 
void updateSystemBackground ()
 
void updateX11AcceptFocus ()
 
void x11UpdateIsOpaque ()
 
 ~QWidgetPrivate ()
 
- Public Functions inherited from QObjectPrivate
void _q_reregisterTimers (void *pointer)
 
void addConnection (int signal, Connection *c)
 
void cleanConnectionLists ()
 
void connectNotify (const char *signal)
 
void deleteChildren ()
 
void disconnectNotify (const char *signal)
 
bool isSender (const QObject *receiver, const char *signal) const
 
bool isSignalConnected (uint signalIdx) const
 Returns true if the signal with index signal_index from object sender is connected. More...
 
void moveToThread_helper ()
 
 QObjectPrivate (int version=QObjectPrivateVersion)
 
QObjectList receiverList (const char *signal) const
 
QObjectList senderList () const
 
void setParent_helper (QObject *)
 
void setThreadData_helper (QThreadData *currentData, QThreadData *targetData)
 
int signalIndex (const char *signalName) const
 Returns the signal index used in the internal connectionLists vector. More...
 
virtual ~QObjectPrivate ()
 
- Public Functions inherited from QObjectData
virtual ~QObjectData ()=0
 
- Public Functions inherited from QDeclarativeItemChangeListener
virtual QDeclarativeAnchorsPrivateanchorPrivate ()
 
virtual void itemDestroyed (QDeclarativeItem *)
 
virtual void itemOpacityChanged (QDeclarativeItem *)
 
virtual void itemSiblingOrderChanged (QDeclarativeItem *)
 
virtual void itemVisibilityChanged (QDeclarativeItem *)
 

Public Variables

QDeclarativeComponentcomponent
 
QDeclarativeGuard< QDeclarativeItemdeclarativeItemRoot
 
QDeclarativeEngineengine
 
QElapsedTimer frameTimer
 
QDeclarativeGuard< QGraphicsWidgetgraphicsWidgetRoot
 
QSize initialSize
 
QDeclarativeView::ResizeMode resizeMode
 
QBasicTimer resizetimer
 
QDeclarativeGuard< QGraphicsObjectroot
 
QUrl source
 
- Public Variables inherited from QGraphicsViewPrivate
quint32 accelerateScrolling: 1
 
Qt::Alignment alignment
 
QBrush backgroundBrush
 
QPixmap backgroundPixmap
 
QRegion backgroundPixmapExposed
 
QGraphicsView::CacheMode cacheMode
 
quint32 connectedToScene: 1
 
QRect dirtyBoundingRect
 
QRegion dirtyRegion
 
quint32 dirtyScroll: 1
 
QPoint dirtyScrollOffset
 
QGraphicsView::DragMode dragMode
 
QRegion exposedRegion
 
QBrush foregroundBrush
 
quint32 fullUpdatePending: 1
 
quint32 handScrolling: 1
 
int handScrollMotions
 
quint32 hasSceneRect: 1
 
bool hasStoredOriginalCursor
 
quint32 hasUpdateClip: 1
 
quint32 identityMatrix: 1
 
quint32 keepLastCenterPoint: 1
 
QPointF lastCenterPoint
 
QGraphicsSceneDragDropEventlastDragDropEvent
 
QMouseEvent lastMouseEvent
 
QPointF lastMouseMoveScenePoint
 
QPoint lastMouseMoveScreenPoint
 
qreal leftIndent
 
QTransform matrix
 
Qt::MouseButton mousePressButton
 
QPointF mousePressItemPoint
 
QPointF mousePressScenePoint
 
QPoint mousePressScreenPoint
 
QPoint mousePressViewPoint
 
quint32 mustAllocateStyleOptions: 1
 
quint32 mustResizeBackgroundPixmap: 1
 
QGraphicsView::OptimizationFlags optimizationFlags
 
QCursor originalCursor
 
quint32 padding: 18
 
QPainter::RenderHints renderHints
 
QGraphicsView::ViewportAnchor resizeAnchor
 
bool rubberBanding
 
QRect rubberBandRect
 
Qt::ItemSelectionMode rubberBandSelectionMode
 
QPointer< QGraphicsScenescene
 
quint32 sceneInteractionAllowed: 1
 
QRectF sceneRect
 
qint64 scrollX
 
qint64 scrollY
 
QVector< QStyleOptionGraphicsItemstyleOptions
 
qreal topIndent
 
QGraphicsView::ViewportAnchor transformationAnchor
 
quint32 transforming: 1
 
QRect updateClip
 
bool updateSceneSlotReimplementedChecked
 
quint32 useLastMouseEvent: 1
 
QGraphicsView::ViewportUpdateMode viewportUpdateMode
 
- Public Variables inherited from QAbstractScrollAreaPrivate
int bottom
 
QRect cornerPaintingRect
 
QWidgetcornerWidget
 
QScrollBarhbar
 
Qt::ScrollBarPolicy hbarpolicy
 
int left
 
QRect reverseCornerPaintingRect
 
int right
 
QAbstractScrollAreaScrollBarContainerscrollBarContainers [Qt::Vertical+1]
 
bool singleFingerPanEnabled
 
int top
 
QScrollBarvbar
 
Qt::ScrollBarPolicy vbarpolicy
 
QWidgetviewport
 
QScopedPointer< QObjectviewportFilter
 
int xoffset
 
int yoffset
 
- Public Variables inherited from QFramePrivate
short bottomFrameWidth
 
int frameStyle
 
short frameWidth
 
QRect frect
 
short leftFrameWidth
 
short lineWidth
 
short midLineWidth
 
short rightFrameWidth
 
short topFrameWidth
 
- Public Variables inherited from QWidgetPrivate
QString accessibleDescription
 
QString accessibleName
 
QList< QAction * > actions
 
QPalette::ColorRole bg_role: 8
 
signed char bottomLayoutItemMargin
 
short bottommargin
 
QWidgetData data
 
QRegion dirty
 
uint dirtyOpaqueChildren: 1
 
QWExtraextra
 
QPaintEngineextraPaintEngine
 
QPalette::ColorRole fg_role: 8
 
QWidgetfocus_child
 
QWidgetfocus_next
 
QWidgetfocus_prev
 
QMap< Qt::GestureType, Qt::GestureFlags > gestureContext
 
QGraphicsEffectgraphicsEffect
 
Qt::HANDLE hd
 
uint high_attributes [4]
 
QPointer< QInputContextic
 
Qt::InputMethodHints imHints
 
uint inDirtyList: 1
 
uint inheritedFontResolveMask
 
uint inheritedPaletteResolveMask
 
uint inheritsInputMethodHints: 1
 
uint inSetParent: 1
 
uint isGLWidget: 1
 
uint isMoved: 1
 
uint isOpaque: 1
 
uint isScrolled: 1
 
QLayoutlayout
 
signed char leftLayoutItemMargin
 
short leftmargin
 
QLocale locale
 
QRegionneedsFlush
 
QRegion opaqueChildren
 
Qt::HANDLE picture
 
const QMetaObjectpolished
 
QPaintDeviceredirectDev
 
QPoint redirectOffset
 
signed char rightLayoutItemMargin
 
short rightmargin
 
QSizePolicy size_policy
 
QString statusTip
 
QString toolTip
 
signed char topLayoutItemMargin
 
short topmargin
 
uint usesDoubleBufferedGLContext: 1
 
QString whatsThis
 
QWidgetItemV2widgetItem
 
QX11Info xinfo
 
- Public Variables inherited from QObjectPrivate
union {
   QObject *   currentChildBeingDeleted
 
   QAbstractDeclarativeData *   declarativeData
 
}; 
 
quint32 connectedSignals [2]
 
QObjectConnectionListVectorconnectionLists
 
SendercurrentSender
 
QList< QPointer< QObject > > eventFilters
 
ExtraDataextraData
 
QString objectName
 
Connectionsenders
 
QAtomicPointer< QtSharedPointer::ExternalRefCountData > sharedRefcount
 
QThreadDatathreadData
 
void * unused
 
- Public Variables inherited from QObjectData
uint blockSig: 1
 
QObjectList children
 
uint hasGuards: 1
 
uint inEventHandler: 1
 
uint inThreadChangeEvent: 1
 
uint isWidget: 1
 
QMetaObjectmetaObject
 
uint ownObjectName: 1
 
QObjectparent
 
uint pendTimer: 1
 
int postedEvents
 
QObjectq_ptr
 
uint receiveChildEvents: 1
 
uint sendChildEvents: 1
 
uint unused: 22
 
uint wasDeleted: 1
 

Additional Inherited Members

- Public Types inherited from QWidgetPrivate
enum  CloseMode { CloseNoEvent, CloseWithEvent, CloseWithSpontaneousEvent }
 
enum  Direction { DirectionNorth = 0x01, DirectionEast = 0x10, DirectionSouth = 0x02, DirectionWest = 0x20 }
 
enum  DrawWidgetFlags {
  DrawAsRoot = 0x01, DrawPaintOnScreen = 0x02, DrawRecursive = 0x04, DrawInvisible = 0x08,
  DontSubtractOpaqueChildren = 0x10, DontSetCompositionMode = 0x20, DontDrawOpaqueChildren = 0x40, DontDrawNativeChildren = 0x80
}
 
- Public Types inherited from QObjectPrivate
typedef void(* StaticMetaCallFunction) (QObject *, QMetaObject::Call, int, void **)
 
- Static Public Functions inherited from QGraphicsViewPrivate
static void translateTouchEvent (QGraphicsViewPrivate *d, QTouchEvent *touchEvent)
 
- Static Public Functions inherited from QWidgetPrivate
static void adjustFlags (Qt::WindowFlags &flags, QWidget *w=0)
 
static QGraphicsProxyWidgetnearestGraphicsProxyWidget (const QWidget *origin)
 Finds the nearest widget embedded in a graphics proxy widget along the chain formed by this widget and its ancestors. More...
 
static int pointToRect (const QPoint &p, const QRect &r)
 
static QRect screenGeometry (const QWidget *widget)
 
- Static Public Functions inherited from QObjectPrivate
static void clearGuards (QObject *)
 
static QObjectPrivateget (QObject *o)
 
static void resetCurrentSender (QObject *receiver, Sender *currentSender, Sender *previousSender)
 
static SendersetCurrentSender (QObject *receiver, Sender *sender)
 
static void signalSignature (const QMetaMethod &signal, QVarLengthArray< char > *result)
 
- Static Public Variables inherited from QWidgetPrivate
static QWidgetSetallWidgets = 0
 
static int instanceCounter = 0
 
static QWidgetkeyboardGrabber = 0
 
static QWidgetMappermapper = 0
 
static int maxInstances = 0
 
static QWidgetmouseGrabber = 0
 

Detailed Description

Definition at line 130 of file qdeclarativeview.cpp.

Constructors and Destructors

◆ QDeclarativeViewPrivate()

QDeclarativeViewPrivate::QDeclarativeViewPrivate ( )
inline

Definition at line 134 of file qdeclarativeview.cpp.

QDeclarativeGuard< QGraphicsWidget > graphicsWidgetRoot
QDeclarativeGuard< QDeclarativeItem > declarativeItemRoot
QDeclarativeGuard< QGraphicsObject > root
QDeclarativeView::ResizeMode resizeMode
QDeclarativeComponent * component

◆ ~QDeclarativeViewPrivate()

QDeclarativeViewPrivate::~QDeclarativeViewPrivate ( )
inline

Definition at line 137 of file qdeclarativeview.cpp.

137 { delete root; delete engine; }
QDeclarativeGuard< QGraphicsObject > root
QDeclarativeEngine * engine

Functions

◆ execute()

void QDeclarativeViewPrivate::execute ( )

Definition at line 161 of file qdeclarativeview.cpp.

162 {
164  if (root) {
165  delete root;
166  root = 0;
167  }
168  if (component) {
169  delete component;
170  component = 0;
171  }
172  if (!source.isEmpty()) {
174  if (!component->isLoading()) {
175  q->continueExecute();
176  } else {
177  QObject::connect(component, SIGNAL(statusChanged(QDeclarativeComponent::Status)), q, SLOT(continueExecute()));
178  }
179  }
180 }
Status
Emitted after component "startup" has completed.
The QDeclarativeView class provides a widget for displaying a Qt Declarative user interface...
bool isEmpty() const
Returns true if the URL has no data; otherwise returns false.
Definition: qurl.cpp:4317
#define SLOT(a)
Definition: qobjectdefs.h:226
#define Q_Q(Class)
Definition: qglobal.h:2483
#define SIGNAL(a)
Definition: qobjectdefs.h:227
The QDeclarativeComponent class encapsulates a QML component definition.
static bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
Creates a connection of the given type from the signal in the sender object to the method in the rece...
Definition: qobject.cpp:2580
bool isLoading() const
Returns true if status() == QDeclarativeComponent::Loading.
QDeclarativeGuard< QGraphicsObject > root
QDeclarativeComponent * component
QDeclarativeEngine * engine

◆ init()

void QDeclarativeViewPrivate::init ( )

Definition at line 287 of file qdeclarativeview.cpp.

288 {
290  engine = new QDeclarativeEngine();
291  q->setScene(new QDeclarativeScene(q));
292 
293  q->setOptimizationFlags(QGraphicsView::DontSavePainterState);
294  q->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
295  q->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
296  q->setFrameStyle(0);
297 
298  // These seem to give the best performance
299  q->setViewportUpdateMode(QGraphicsView::BoundingRectViewportUpdate);
300  q->scene()->setItemIndexMethod(QGraphicsScene::NoIndex);
301  q->viewport()->setFocusPolicy(Qt::NoFocus);
302  q->setFocusPolicy(Qt::StrongFocus);
303 
304  q->scene()->setStickyFocus(true); //### needed for correct focus handling
305 
306 #ifdef QDECLARATIVEVIEW_NOBACKGROUND
307  q->setAttribute(Qt::WA_OpaquePaintEvent);
308  q->setAttribute(Qt::WA_NoSystemBackground);
309  q->viewport()->setAttribute(Qt::WA_OpaquePaintEvent);
310  q->viewport()->setAttribute(Qt::WA_NoSystemBackground);
311 #endif
312 
314 }
The QDeclarativeView class provides a widget for displaying a Qt Declarative user interface...
static QDeclarativeInspectorService * instance()
#define Q_Q(Class)
Definition: qglobal.h:2483
The QDeclarativeEngine class provides an environment for instantiating QML components.
QDeclarativeEngine * engine

◆ initResize()

void QDeclarativeViewPrivate::initResize ( )

Definition at line 484 of file qdeclarativeview.cpp.

485 {
487  if (declarativeItemRoot) {
492  }
493  } else if (graphicsWidgetRoot) {
496  }
497  }
498  updateSize();
499 }
QDeclarativeGuard< QGraphicsWidget > graphicsWidgetRoot
The QDeclarativeView class provides a widget for displaying a Qt Declarative user interface...
QDeclarativeGuard< QDeclarativeItem > declarativeItemRoot
#define Q_Q(Class)
Definition: qglobal.h:2483
void addItemChangeListener(QDeclarativeItemChangeListener *listener, ChangeTypes types)
void installEventFilter(QObject *)
Installs an event filter filterObj on this object.
Definition: qobject.cpp:2070
static const QGraphicsItemPrivate * get(const QGraphicsItem *item)
QDeclarativeView::ResizeMode resizeMode

◆ itemGeometryChanged()

void QDeclarativeViewPrivate::itemGeometryChanged ( QDeclarativeItem item,
const QRectF newGeometry,
const QRectF oldGeometry 
)
virtual

Reimplemented from QDeclarativeItemChangeListener.

Definition at line 182 of file qdeclarativeview.cpp.

183 {
185  if (resizeItem == root && resizeMode == QDeclarativeView::SizeViewToRootObject) {
186  // wait for both width and height to be changed
187  resizetimer.start(0,q);
188  }
189  QDeclarativeItemChangeListener::itemGeometryChanged(resizeItem, newGeometry, oldGeometry);
190 }
The QDeclarativeView class provides a widget for displaying a Qt Declarative user interface...
#define Q_Q(Class)
Definition: qglobal.h:2483
virtual void itemGeometryChanged(QDeclarativeItem *, const QRectF &, const QRectF &)
QDeclarativeGuard< QGraphicsObject > root
QDeclarativeView::ResizeMode resizeMode
void start(int msec, QObject *obj)
Starts (or restarts) the timer with a msec milliseconds timeout.

◆ rootObjectSize()

QSize QDeclarativeViewPrivate::rootObjectSize ( ) const
inline

Definition at line 534 of file qdeclarativeview.cpp.

535 {
536  QSize rootObjectSize(0,0);
537  int widthCandidate = -1;
538  int heightCandidate = -1;
539  if (root) {
540  QSizeF size = root->boundingRect().size();
541  widthCandidate = size.width();
542  heightCandidate = size.height();
543  }
544  if (widthCandidate > 0) {
545  rootObjectSize.setWidth(widthCandidate);
546  }
547  if (heightCandidate > 0) {
548  rootObjectSize.setHeight(heightCandidate);
549  }
550  return rootObjectSize;
551 }
virtual QRectF boundingRect() const =0
This pure virtual function defines the outer bounds of the item as a rectangle; all painting must be ...
qreal width() const
Returns the width.
Definition: qsize.h:284
qreal height() const
Returns the height.
Definition: qsize.h:287
void setHeight(int h)
Sets the height to the given height.
Definition: qsize.h:135
The QSizeF class defines the size of a two-dimensional object using floating point precision...
Definition: qsize.h:202
void setWidth(int w)
Sets the width to the given width.
Definition: qsize.h:132
QDeclarativeGuard< QGraphicsObject > root
QSizeF size() const
Returns the size of the rectangle.
Definition: qrect.h:713
The QSize class defines the size of a two-dimensional object using integer point precision.
Definition: qsize.h:53

◆ updateSize()

void QDeclarativeViewPrivate::updateSize ( )

Definition at line 501 of file qdeclarativeview.cpp.

502 {
504  if (!root)
505  return;
506  if (declarativeItemRoot) {
509  if (newSize.isValid() && newSize != q->size()) {
510  q->resize(newSize);
511  }
513  if (!qFuzzyCompare(q->width(), declarativeItemRoot->width()))
514  declarativeItemRoot->setWidth(q->width());
515  if (!qFuzzyCompare(q->height(), declarativeItemRoot->height()))
516  declarativeItemRoot->setHeight(q->height());
517  }
518  } else if (graphicsWidgetRoot) {
521  if (newSize.isValid() && newSize != q->size()) {
522  q->resize(newSize);
523  }
525  QSizeF newSize = QSize(q->size().width(), q->size().height());
526  if (newSize.isValid() && newSize != graphicsWidgetRoot->size()) {
527  graphicsWidgetRoot->resize(newSize);
528  }
529  }
530  }
531  q->updateGeometry();
532 }
QDeclarativeGuard< QGraphicsWidget > graphicsWidgetRoot
The QDeclarativeView class provides a widget for displaying a Qt Declarative user interface...
QDeclarativeGuard< QDeclarativeItem > declarativeItemRoot
qreal width() const
Returns the width.
Definition: qsize.h:284
qreal height() const
Returns the height.
Definition: qsize.h:287
static Q_DECL_CONSTEXPR bool qFuzzyCompare(double p1, double p2)
Definition: qglobal.h:2030
bool isValid() const
Returns true if both the width and height is equal to or greater than 0; otherwise returns false...
Definition: qsize.h:281
The QSizeF class defines the size of a two-dimensional object using floating point precision...
Definition: qsize.h:202
#define Q_Q(Class)
Definition: qglobal.h:2483
QDeclarativeGuard< QGraphicsObject > root
bool isValid() const
Returns true if both the width and height is equal to or greater than 0; otherwise returns false...
Definition: qsize.h:123
The QSize class defines the size of a two-dimensional object using integer point precision.
Definition: qsize.h:53
QDeclarativeView::ResizeMode resizeMode
QSizeF size
the size of the widget
void resize(const QSizeF &size)

Properties

◆ component

QDeclarativeComponent* QDeclarativeViewPrivate::component

Definition at line 151 of file qdeclarativeview.cpp.

◆ declarativeItemRoot

QDeclarativeGuard<QDeclarativeItem> QDeclarativeViewPrivate::declarativeItemRoot

Definition at line 145 of file qdeclarativeview.cpp.

◆ engine

QDeclarativeEngine* QDeclarativeViewPrivate::engine

Definition at line 150 of file qdeclarativeview.cpp.

◆ frameTimer

QElapsedTimer QDeclarativeViewPrivate::frameTimer

Definition at line 156 of file qdeclarativeview.cpp.

◆ graphicsWidgetRoot

QDeclarativeGuard<QGraphicsWidget> QDeclarativeViewPrivate::graphicsWidgetRoot

Definition at line 146 of file qdeclarativeview.cpp.

◆ initialSize

QSize QDeclarativeViewPrivate::initialSize

Definition at line 155 of file qdeclarativeview.cpp.

◆ resizeMode

QDeclarativeView::ResizeMode QDeclarativeViewPrivate::resizeMode

Definition at line 154 of file qdeclarativeview.cpp.

◆ resizetimer

QBasicTimer QDeclarativeViewPrivate::resizetimer

Definition at line 152 of file qdeclarativeview.cpp.

◆ root

QDeclarativeGuard<QGraphicsObject> QDeclarativeViewPrivate::root

Definition at line 144 of file qdeclarativeview.cpp.

◆ source

QUrl QDeclarativeViewPrivate::source

Definition at line 148 of file qdeclarativeview.cpp.


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