src/declarative/graphicsitems/qdeclarativepath.cpp
changeset 33 3e2da88830cd
parent 30 5dc02b23752f
child 37 758a864f9613
equal deleted inserted replaced
30:5dc02b23752f 33:3e2da88830cd
   531 
   531 
   532 
   532 
   533 /*!
   533 /*!
   534     \qmlproperty string PathAttribute::name
   534     \qmlproperty string PathAttribute::name
   535     the name of the attribute to change.
   535     the name of the attribute to change.
       
   536 
       
   537     This attribute will be available to the delegate as PathView.<name>
       
   538 
       
   539     Note that using an existing Item property name such as "opacity" as an
       
   540     attribute is allowed.  This is because path attributes add a new
       
   541     \l{qdeclarativeintroduction.html#attached-properties} {Attached Property}
       
   542     which in no way clashes with existing properties.
   536 */
   543 */
   537 
   544 
   538 /*!
   545 /*!
   539     the name of the attribute to change.
   546     the name of the attribute to change.
   540 */
   547 */
   626     \o \image declarative-pathquad.png
   633     \o \image declarative-pathquad.png
   627     \o
   634     \o
   628     \qml
   635     \qml
   629     Path {
   636     Path {
   630         startX: 0; startY: 0
   637         startX: 0; startY: 0
   631         PathQuad x: 200; y: 0; controlX: 100; controlY: 150 }
   638         PathQuad { x: 200; y: 0; controlX: 100; controlY: 150 }
   632     }
   639     }
   633     \endqml
   640     \endqml
   634     \endtable
   641     \endtable
   635 
   642 
   636     \sa Path, PathCubic, PathLine
   643     \sa Path, PathCubic, PathLine
   711     \o
   718     \o
   712     \qml
   719     \qml
   713     Path {
   720     Path {
   714         startX: 20; startY: 0
   721         startX: 20; startY: 0
   715         PathCubic {
   722         PathCubic {
   716             x: 180; y: 0; control1X: -10; control1Y: 90
   723             x: 180; y: 0
   717                           control2X: 210; control2Y: 90
   724             control1X: -10; control1Y: 90
       
   725             control2X: 210; control2Y: 90
   718         }
   726         }
   719     }
   727     }
   720     \endqml
   728     \endqml
   721     \endtable
   729     \endtable
   722 
   730 
   865     return _value;
   873     return _value;
   866 }
   874 }
   867 
   875 
   868 void QDeclarativePathPercent::setValue(qreal value)
   876 void QDeclarativePathPercent::setValue(qreal value)
   869 {
   877 {
   870     _value = value;
   878     if (_value != value) {
       
   879         _value = value;
       
   880         emit changed();
       
   881     }
   871 }
   882 }
   872 QT_END_NAMESPACE
   883 QT_END_NAMESPACE