Scribus
Open source desktop publishing at your fingertips
ScLayers Class Reference
Inheritance diagram for ScLayers:
Collaboration diagram for ScLayers:

Public Member Functions

int getMaxID (void)
 Get layer max identifier. More...
 
const ScLayerbottomLayer (void) const
 Get bottom layer. More...
 
const ScLayertopLayer (void) const
 Get top layer. More...
 
void levelToLayer (ScLayer &layer, int level) const
 Get layer at a specific level, replace old Level2Layer in util.cpp. More...
 
ScLayerbottom (void)
 Get bottom layer. More...
 
ScLayertop (void)
 Get top layer. More...
 
ScLayerbyLevel (const int level)
 Get layer at a specific level. More...
 
ScLayerbyID (const int nr)
 Get layer with a specific number. More...
 
ScLayerabove (int nr)
 Get layer above the layer with the specified ID. More...
 
ScLayerbelow (int nr)
 Get layer below the layer with the specified ID. More...
 
const ScLayerlayerByLevel (int level) const
 Get layer at a specific level. More...
 
const ScLayerlayerByID (int nr) const
 Get layer with a specific number. More...
 
const ScLayerlayerByName (const QString &name) const
 Get layer with a specific name. More...
 
const ScLayerlayerAbove (int level) const
 Get layer above a specific level. More...
 
const ScLayerlayerAbove (const ScLayer &layer) const
 Get layer above a specific layer. More...
 
const ScLayerlayerBelow (int level) const
 Get layer below a specific level. More...
 
const ScLayerlayerBelow (const ScLayer &layer) const
 Get layer below a specific layer. More...
 
int addLayer (const QString &layerName)
 Add a layer to the layer list. More...
 
int addLayer (const ScLayer &layer)
 Add a layer to the layer list. More...
 
ScLayernewLayer (const QString &layerName)
 Add a layer to the layer list. More...
 
bool removeLayerByID (int id)
 Remove a layer from the layer list. More...
 
bool removeLayerByLevel (int level)
 Remove a layer from the layer list. More...
 
bool raiseLayer (int nr)
 Raise the layer with the specified ID. More...
 
bool lowerLayer (int nr)
 Lower the layer with the specified ID. More...
 
void sort (void)
 sort layers by level order
 
bool layerPrintable (const int layerID) const
 Is the layer printable. More...
 
bool setLayerPrintable (const int layerID, const bool isPrintable)
 Set the layer printable via the layer ID. More...
 
bool layerVisible (const int layerID) const
 Is the layer visible. More...
 
bool setLayerVisible (const int layerID, const bool isViewable)
 Set the layer visible via the layer ID. More...
 
bool layerLocked (const int layerID) const
 Is the layer locked. More...
 
bool setLayerLocked (const int layerID, const bool isViewable)
 Set the layer locked via the layer ID. More...
 
bool layerFlow (const int layerID) const
 does text flow around objects on this layer More...
 
bool setLayerFlow (const int layerID, const bool flow)
 Set the layer flow via the layer ID. More...
 
bool layerOutline (const int layerID) const
 is this layer in outline mode More...
 
bool setLayerOutline (const int layerID, const bool outline)
 Set the layer outline mode via the layer ID. More...
 
double layerTransparency (const int layerID) const
 returns the layer transparency More...
 
bool setLayerTransparency (const int layerID, double trans)
 Set the layer transparency via the layer ID. More...
 
int layerBlendMode (const int layerID) const
 returns the layer BlendMode More...
 
bool setLayerBlendMode (const int layerID, int blend)
 Set the layer layerBlendMode via the layer ID. More...
 
QColor layerMarker (const int layerID) const
 returns the layer marker color More...
 
bool setLayerMarker (const int layerID, QColor color)
 Set the layer marker color. More...
 
bool layerSelectable (const int layerID) const
 are objects on the layer selectable More...
 
bool setLayerSelectable (const int layerID, const bool isSelectable)
 Set objects on the layer selectable via the layer ID. More...
 

Member Function Documentation

ScLayer * ScLayers::above ( int  nr)

Get layer above the layer with the specified ID.

Parameters
nrnumber of the layer level
Returns
layer above the specific layer or top layer if no layer above specified level was found
int ScLayers::addLayer ( const QString &  layerName)

Add a layer to the layer list.

Parameters
layerNamethe layer name (may be empty)
Returns
the new layer id on success, -1 on failure
int ScLayers::addLayer ( const ScLayer layer)

Add a layer to the layer list.

Parameters
layerthe layer object
Returns
the new layer id on success, -1 on failure
ScLayer * ScLayers::below ( int  nr)

Get layer below the layer with the specified ID.

Parameters
nrthe layer level
Returns
layer below the specific layer or bottom layer if no layer below specified level was found
ScLayer * ScLayers::bottom ( void  )

Get bottom layer.

Returns
bottom layer or NULL if list is empty
const ScLayer * ScLayers::bottomLayer ( void  ) const

Get bottom layer.

Returns
bottom layer or NULL if list is empty
ScLayer * ScLayers::byID ( const int  nr)

Get layer with a specific number.

Parameters
nrthe layer number
Returns
layer with the specified number or NULL if not found
ScLayer * ScLayers::byLevel ( const int  level)

Get layer at a specific level.

Parameters
levelthe layer level
Returns
layer with the specified level or NULL if not found
int ScLayers::getMaxID ( void  )

Get layer max identifier.

Returns
Layer max identifier or -1 is list is empty
const ScLayer * ScLayers::layerAbove ( int  level) const

Get layer above a specific level.

Parameters
levelthe layer level
Returns
layer above the specific layer or top layer if no layer above specified level was found
const ScLayer * ScLayers::layerAbove ( const ScLayer layer) const

Get layer above a specific layer.

Parameters
layerthe layer
Returns
layer above the specific layer or top layer if no layer above specified level was found
const ScLayer * ScLayers::layerBelow ( int  level) const

Get layer below a specific level.

Parameters
levelthe layer level
Returns
layer below the specific layer or bottom layer if no layer below specified level was found
const ScLayer * ScLayers::layerBelow ( const ScLayer layer) const

Get layer below a specific layer.

Parameters
layerthe layer
Returns
layer below the specific layer or bottom layer if no layer below specified level was found
int ScLayers::layerBlendMode ( const int  layerID) const

returns the layer BlendMode

Parameters
layerIDID of the layer
Returns
layerBlendMode
const ScLayer * ScLayers::layerByID ( int  nr) const

Get layer with a specific number.

Parameters
nrthe layer number
Returns
layer with the specified number or NULL if not found
const ScLayer * ScLayers::layerByLevel ( int  level) const

Get layer at a specific level.

Parameters
levelthe layer level
Returns
layer with the specified level or NULL if not found
const ScLayer * ScLayers::layerByName ( const QString &  name) const

Get layer with a specific name.

Parameters
namethe layer name
Returns
layer with the specified name or NULL if not found
bool ScLayers::layerFlow ( const int  layerID) const

does text flow around objects on this layer

Parameters
layerIDID of the layer
Returns
flow or not
bool ScLayers::layerLocked ( const int  layerID) const

Is the layer locked.

Parameters
layerIDID of the layer
Returns
Locked or not
QColor ScLayers::layerMarker ( const int  layerID) const

returns the layer marker color

Parameters
layerIDID of the layer
Returns
marker color
bool ScLayers::layerOutline ( const int  layerID) const

is this layer in outline mode

Parameters
layerIDID of the layer
Returns
outline or not
bool ScLayers::layerPrintable ( const int  layerID) const

Is the layer printable.

Parameters
layerIDID of the layer
Returns
Printable or not
bool ScLayers::layerSelectable ( const int  layerID) const

are objects on the layer selectable

Parameters
layerIDID of the layer
Returns
Items selectable or not
double ScLayers::layerTransparency ( const int  layerID) const

returns the layer transparency

Parameters
layerIDID of the layer
Returns
transparency value 0.0 - 1.0
bool ScLayers::layerVisible ( const int  layerID) const

Is the layer visible.

Parameters
layerIDID of the layer
Returns
Visible or not
void ScLayers::levelToLayer ( ScLayer layer,
int  level 
) const

Get layer at a specific level, replace old Level2Layer in util.cpp.

Parameters
layera reference to the ScLayer
levelthe layer level
Returns
the desired layer or NULL if not found
bool ScLayers::lowerLayer ( int  nr)

Lower the layer with the specified ID.

Returns
success or failure
ScLayer * ScLayers::newLayer ( const QString &  layerName)

Add a layer to the layer list.

Parameters
layerNamethe layer name (may be empty)
Returns
the new layer on success, NULL on failure
bool ScLayers::raiseLayer ( int  nr)

Raise the layer with the specified ID.

Returns
success or failure
bool ScLayers::removeLayerByID ( int  id)

Remove a layer from the layer list.

Parameters
thelayer number to remove
bool ScLayers::removeLayerByLevel ( int  level)

Remove a layer from the layer list.

Parameters
thelayer level to remove
bool ScLayers::setLayerBlendMode ( const int  layerID,
int  blend 
)

Set the layer layerBlendMode via the layer ID.

Parameters
layerIDID of the layer
translayerBlendMode
Returns
Success or failure
bool ScLayers::setLayerFlow ( const int  layerID,
const bool  flow 
)

Set the layer flow via the layer ID.

Parameters
layerIDID of the layer
flowtrue = Text flows around objects on this layer
Returns
Success or failure
bool ScLayers::setLayerLocked ( const int  layerID,
const bool  isViewable 
)

Set the layer locked via the layer ID.

Parameters
layerIDID of the layer
isViewabletrue = layer is locked
Returns
bool Success or failure
bool ScLayers::setLayerMarker ( const int  layerID,
QColor  color 
)

Set the layer marker color.

Parameters
layerIDID of the layer
colorcolor of the marker
Returns
Success or failure
bool ScLayers::setLayerOutline ( const int  layerID,
const bool  outline 
)

Set the layer outline mode via the layer ID.

Parameters
layerIDID of the layer
outlinetrue = layer is displayed in outlines only
Returns
Success or failure
bool ScLayers::setLayerPrintable ( const int  layerID,
const bool  isPrintable 
)

Set the layer printable via the layer ID.

Parameters
layerIDID of the layer
isPrintablebool true = layer is prantable
Returns
Success or failure
bool ScLayers::setLayerSelectable ( const int  layerID,
const bool  isSelectable 
)

Set objects on the layer selectable via the layer ID.

Parameters
layerIDID of the layer
isSelectabletrue = layer objects are selectable
Returns
bool Success or failure
bool ScLayers::setLayerTransparency ( const int  layerID,
double  trans 
)

Set the layer transparency via the layer ID.

Parameters
layerIDID of the layer
transtransparency value 0.0 - 1.0
Returns
Success or failure
bool ScLayers::setLayerVisible ( const int  layerID,
const bool  isViewable 
)

Set the layer visible via the layer ID.

Parameters
layerIDID of the layer
isViewabletrue = layer is visible
Returns
Success or failure
ScLayer * ScLayers::top ( void  )

Get top layer.

Returns
top layer or NULL if list is empty
const ScLayer * ScLayers::topLayer ( void  ) const

Get top layer.

Returns
top layer or NULL if list is empty

The documentation for this class was generated from the following files: