[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    koffice/libs/flake
From:       Carlos Licea <carlos_licea () hotmail ! com>
Date:       2010-07-31 6:45:50
Message-ID: 20100731064550.EC30EAC783 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1157464 by clicea:

Revert "Add a new property for the Shape: size and position protected."

This reverts commit ed3a92c8210e5c971db4cc41b1cb401c877624b0.

 M  +0 -34     KoShape.cpp  
 M  +6 -34     KoShape.h  
 M  +0 -2      KoShape_p.h  


--- trunk/koffice/libs/flake/KoShape.cpp #1157463:1157464
@@ -84,8 +84,6 @@
     visible(true),
     printable(true),
     geometryProtected(false),
-    sizeProtected(false),
-    positionProtected(false),
     keepAspect(false),
     selectable(true),
     detectCollision(false),
@@ -261,9 +259,6 @@
 void KoShape::setSize(const QSizeF &newSize)
 {
     Q_D(KoShape);
-    if (d->sizeProtected)
-        return;
-
     QSizeF oldSize(size());
     if (oldSize == newSize)
         return;
@@ -277,9 +272,6 @@
 void KoShape::setPosition(const QPointF &newPosition)
 {
     Q_D(KoShape);
-    if (d->positionProtected)
-        return;
-
     QPointF currentPos = position();
     if (newPosition == currentPos)
         return;
@@ -531,8 +523,6 @@
         d->printable = shape->isPrintable();
 
     d->geometryProtected = shape->isGeometryProtected();
-    d->sizeProtected = shape->isSizeProtected();
-    d->positionProtected = shape->isPositionProtected();
     d->keepAspect = shape->keepAspectRatio();
     d->localMatrix = shape->d_ptr->localMatrix;
 }
@@ -778,30 +768,6 @@
     return d->protectContent;
 }
 
-void KoShape::setPositionProtected(bool on)
-{
-    Q_D(KoShape);
-    d->positionProtected = on;
-}
-
-bool KoShape::isPositionProtected() const
-{
-    Q_D(const KoShape);
-    return d->positionProtected;
-}
-
-void KoShape::setSizeProtected(bool on)
-{
-    Q_D(KoShape);
-    d->sizeProtected = on;
-}
-
-bool KoShape::isSizeProtected() const
-{
-    Q_D(const KoShape);
-    return d->sizeProtected;
-}
-
 KoShapeContainer *KoShape::parent() const
 {
     Q_D(const KoShape);
--- trunk/koffice/libs/flake/KoShape.h #1157463:1157464
@@ -419,14 +419,14 @@
      * Makes it possible for the user to select this shape.
      * This parameter defaults to true.
      * @param selectable when true; set the shape to be selectable by the user.
-     * @see setGeometryProtected(), setContentProtected(), setVisible(), \
setPositionProtected(), setSizetProtected() +     * @see setGeometryProtected(), \
                setContentProtected(), setVisible()
      */
     void setSelectable(bool selectable);
 
     /**
      * Returns if this shape can be selected by the user.
      * @return true only when the object is selectable.
-     * @see isGeometryProtected(), isContentProtected(), isVisible(), \
isPositionPretected(), isSizeProtected() +     * @see isGeometryProtected(), \
                isContentProtected(), isVisible()
      */
     bool isSelectable() const;
 
@@ -435,7 +435,7 @@
      * The geometry being protected means the user can not change shape or position \
                of the
      * shape. This includes any matrix operation such as rotation.
      * @param on when true; set the shape to have its geometry protected.
-     * @see setContentProtected(), setSelectable(), setVisible(), \
setPositionProtected(), setSizetProtected() +     * @see setContentProtected(), \
                setSelectable(), setVisible()
      */
     void setGeometryProtected(bool on);
 
@@ -444,43 +444,15 @@
      * The geometry being protected means the user can not change shape or position \
                of the
      * shape. This includes any matrix operation such as rotation.
      * @return current geometry protection state of this shape.
-     * @see isContentProtected(), isSelectable(), isVisible(), \
isPositionPretected(), isSizeProtected() +     * @see isContentProtected(), \
                isSelectable(), isVisible()
      */
     bool isGeometryProtected() const;
 
     /**
-    * Tells the shape to have its size protected from user changes.
-    * @param on when true; set the sape to have its size protected.
-    * @see setGeometryProtected(), setSelectable(), setVisible(), \
                setPositionProtected(), setContentProtected()
-    */
-    void setSizeProtected(bool on);
-
-    /**
-    * Returns current size protection state of this shape.
-    * @return current size protection state of this shape.
-    * @see isGeometryProtected(), isSelectable(), isVisible(), \
                isPositionPretected(), isContentProtected()
-    */
-    bool isSizeProtected() const;
-
-    /**
-    * Tells the shape to have its position protected from user changes.
-    * @param on when true; set the sape to have its size protected.
-    * @see setGeometryProtected(), setSelectable(), setVisible(), \
                setSizeProtected(), setContentProtected()
-    */
-    void setPositionProtected(bool on);
-
-    /**
-    * Returns current size protection state of this shape.
-    * @return current size protection state of this shape.
-    * @see isGeometryProtected(), isSelectable(), isVisible(), isSizePretected(), \
                isContentProtected()
-    */
-    bool isPositionProtected() const;
-
-    /**
      * Marks the shape to have its content protected against editing.
      * Content protection is a hint for tools to disallow the user editing the \
                content.
      * @param protect when true set the shapes content to be protected from user \
                modification.
-     * @see setGeometryProtected(), setSelectable(), setVisible(), \
setSizeProtected(), setPositionProtected() +     * @see setGeometryProtected(), \
                setSelectable(), setVisible()
      */
     void setContentProtected(bool protect);
 
@@ -488,7 +460,7 @@
      * Returns current content protection state of this shape.
      * Content protection is a hint for tools to disallow the user editing the \
                content.
      * @return current content protection state of this shape.
-     * @see isGeometryProtected(), isSelectable(), isVisible(), \
isPositionPretected(), isSizeProtected() +     * @see isGeometryProtected(), \
                isSelectable(), isVisible()
      */
     bool isContentProtected() const;
 
--- trunk/koffice/libs/flake/KoShape_p.h #1157463:1157464
@@ -75,8 +75,6 @@
     int visible : 1;
     int printable : 1;
     int geometryProtected : 1;
-    int sizeProtected : 1;
-    int positionProtected : 1;
     int keepAspect : 1;
     int selectable : 1;
     int detectCollision : 1;


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic