Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 055552aa authored by Carlos Licea's avatar Carlos Licea

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

This reverts commit ed3a92c8210e5c971db4cc41b1cb401c877624b0.

svn path=/trunk/koffice/; revision=1157464
parent aa3ab4a0
......@@ -84,8 +84,6 @@ KoShapePrivate::KoShapePrivate(KoShape *shape)
visible(true),
printable(true),
geometryProtected(false),
sizeProtected(false),
positionProtected(false),
keepAspect(false),
selectable(true),
detectCollision(false),
......@@ -261,9 +259,6 @@ void KoShape::shear(qreal sx, qreal sy)
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::setSize(const QSizeF &newSize)
void KoShape::setPosition(const QPointF &newPosition)
{
Q_D(KoShape);
if (d->positionProtected)
return;
QPointF currentPos = position();
if (newPosition == currentPos)
return;
......@@ -531,8 +523,6 @@ void KoShape::copySettings(const KoShape *shape)
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 @@ bool KoShape::isContentProtected() const
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);
......
......@@ -419,14 +419,14 @@ public:
* 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 @@ public:
* 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 @@ public:
* 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 @@ public:
* 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;
......
......@@ -75,8 +75,6 @@ public:
int visible : 1;
int printable : 1;
int geometryProtected : 1;
int sizeProtected : 1;
int positionProtected : 1;
int keepAspect : 1;
int selectable : 1;
int detectCollision : 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment