Commit dc1ee4aa authored by Boudewijn Rempt's avatar Boudewijn Rempt

Add a printable flag to KoShape, in accordance with, inter alia,

ODF spec 8.1.1, the "print" attribute.

svn path=/trunk/koffice/; revision=757362
parent e91386d4
......@@ -61,6 +61,7 @@ public:
zIndex( 0 ),
parent( 0 ),
visible( true ),
printable( true ),
locked( false ),
keepAspect( false ),
selectable( true ),
......@@ -107,6 +108,7 @@ public:
KoShapeContainer *parent;
bool visible;
bool printable;
bool locked;
bool keepAspect;
bool selectable;
......@@ -522,6 +524,16 @@ bool KoShape::isVisible() const {
return d->visible;
}
void KoShape::setPrintable(bool on)
{
d->printable = on;
}
bool KoShape::isPrintable() const
{
return d->printable;
}
void KoShape::setSelectable(bool selectable) {
d->selectable = selectable;
}
......
......@@ -351,19 +351,38 @@ public:
/**
* Changes the Shape to be visible or invisible.
* Being visible means being painted and printed, as well as being used for
* Being visible means being painted, as well as being used for
* things like guidelines or searches.
* @param on when true; set the shape to be visible.
*/
void setVisible(bool on);
/**
* Returns current visibility state of this shape.
* Being visible means being painted and printed, as well as being used for
* Being visible means being painted, as well as being used for
* things like guidelines or searches.
* @return current visibility state of this shape.
*/
bool isVisible() const;
/**
* Changes the shape to be printable or not. The default is true.
*
* If a Shape's print flag is true, the shape will be printed. If
* false, the shape will not be printed. If a shape is not visible (@see isVisible),
* it isPrinted will return false, too.
*/
void setPrintable(bool on);
/**
* Returns the current printable state of this shape.
*
* A shape can be visible but not printable, not printable and not visible
* or visible and printable, but not invisible and still printable.
*
* @return current printable state of this shape.
*/
bool isPrintable() const;
/**
* Makes it possible for the user to select this shape.
* This parameter defaults to true.
......
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