src/declarative/graphicsitems/qdeclarativegraphicswidget.cpp
changeset 37 758a864f9613
parent 30 5dc02b23752f
equal deleted inserted replaced
36:ef0373b55136 37:758a864f9613
    66     Q_D(QDeclarativeGraphicsWidget);
    66     Q_D(QDeclarativeGraphicsWidget);
    67     delete d->_anchorLines; d->_anchorLines = 0;
    67     delete d->_anchorLines; d->_anchorLines = 0;
    68     delete d->_anchors; d->_anchors = 0;
    68     delete d->_anchors; d->_anchors = 0;
    69 }
    69 }
    70 
    70 
    71 /*! \internal */
       
    72 QDeclarativeAnchors *QDeclarativeGraphicsWidget::anchors()
    71 QDeclarativeAnchors *QDeclarativeGraphicsWidget::anchors()
    73 {
    72 {
    74     Q_D(QDeclarativeGraphicsWidget);
    73     Q_D(QDeclarativeGraphicsWidget);
    75     if (!d->_anchors)
    74     if (!d->_anchors)
    76         d->_anchors = new QDeclarativeAnchors(static_cast<QGraphicsObject *>(parent()));
    75         d->_anchors = new QDeclarativeAnchors(static_cast<QGraphicsObject *>(parent()));
    83     if (!_anchorLines)
    82     if (!_anchorLines)
    84         _anchorLines = new QDeclarativeItemPrivate::AnchorLines(static_cast<QGraphicsObject *>(q->parent()));
    83         _anchorLines = new QDeclarativeItemPrivate::AnchorLines(static_cast<QGraphicsObject *>(q->parent()));
    85     return _anchorLines;
    84     return _anchorLines;
    86 }
    85 }
    87 
    86 
    88 /*!
       
    89     \internal
       
    90 */
       
    91 QDeclarativeAnchorLine QDeclarativeGraphicsWidget::left() const
    87 QDeclarativeAnchorLine QDeclarativeGraphicsWidget::left() const
    92 {
    88 {
    93     Q_D(const QDeclarativeGraphicsWidget);
    89     Q_D(const QDeclarativeGraphicsWidget);
    94     return d->anchorLines()->left;
    90     return d->anchorLines()->left;
    95 }
    91 }
    96 
    92 
    97 /*!
       
    98     \internal
       
    99 */
       
   100 QDeclarativeAnchorLine QDeclarativeGraphicsWidget::right() const
    93 QDeclarativeAnchorLine QDeclarativeGraphicsWidget::right() const
   101 {
    94 {
   102     Q_D(const QDeclarativeGraphicsWidget);
    95     Q_D(const QDeclarativeGraphicsWidget);
   103     return d->anchorLines()->right;
    96     return d->anchorLines()->right;
   104 }
    97 }
   105 
    98 
   106 /*!
       
   107     \internal
       
   108 */
       
   109 QDeclarativeAnchorLine QDeclarativeGraphicsWidget::horizontalCenter() const
    99 QDeclarativeAnchorLine QDeclarativeGraphicsWidget::horizontalCenter() const
   110 {
   100 {
   111     Q_D(const QDeclarativeGraphicsWidget);
   101     Q_D(const QDeclarativeGraphicsWidget);
   112     return d->anchorLines()->hCenter;
   102     return d->anchorLines()->hCenter;
   113 }
   103 }
   114 
   104 
   115 /*!
       
   116     \internal
       
   117 */
       
   118 QDeclarativeAnchorLine QDeclarativeGraphicsWidget::top() const
   105 QDeclarativeAnchorLine QDeclarativeGraphicsWidget::top() const
   119 {
   106 {
   120     Q_D(const QDeclarativeGraphicsWidget);
   107     Q_D(const QDeclarativeGraphicsWidget);
   121     return d->anchorLines()->top;
   108     return d->anchorLines()->top;
   122 }
   109 }
   123 
   110 
   124 /*!
       
   125     \internal
       
   126 */
       
   127 QDeclarativeAnchorLine QDeclarativeGraphicsWidget::bottom() const
   111 QDeclarativeAnchorLine QDeclarativeGraphicsWidget::bottom() const
   128 {
   112 {
   129     Q_D(const QDeclarativeGraphicsWidget);
   113     Q_D(const QDeclarativeGraphicsWidget);
   130     return d->anchorLines()->bottom;
   114     return d->anchorLines()->bottom;
   131 }
   115 }
   132 
   116 
   133 /*!
       
   134     \internal
       
   135 */
       
   136 QDeclarativeAnchorLine QDeclarativeGraphicsWidget::verticalCenter() const
   117 QDeclarativeAnchorLine QDeclarativeGraphicsWidget::verticalCenter() const
   137 {
   118 {
   138     Q_D(const QDeclarativeGraphicsWidget);
   119     Q_D(const QDeclarativeGraphicsWidget);
   139     return d->anchorLines()->vCenter;
   120     return d->anchorLines()->vCenter;
   140 }
   121 }