C# Class Plasma.FrameSvg

Inheritance: Plasma.Svg, IDisposable
Afficher le fichier Open project: 0xd34df00d/Qross

Private Properties

Свойство Type Description

Méthodes publiques

Méthode Description
AlphaMask ( ) : QPixmap
CacheAllRenderedFrames ( ) : bool
ClearCache ( ) : void Deletes the internal cache freeing memory: use this if you want to switch the rendered element and you don't plan to switch back to the previous one for a long time and you used setUseCache(true)
ContentsRect ( ) : Qyoto.QRectF
Dispose ( ) : void
FramePixmap ( ) : QPixmap Returns a pixmap of the SVG represented by this object. @arg elelementId the ID string of the element to render, or an empty string for the whole SVG (the default)
FrameSize ( ) : QSizeF
FrameSvg ( ) : System
FrameSvg ( QObject parent ) : System Constructs a new FrameSvg that paints the proper named subelements as borders. It may also be used as a regular Plasma.Svg object for direct access to elements in the Svg. @arg parent options QObject to parent this to @related Plasma.Theme
GetMargins ( double &left, double &top, double &right, double &bottom ) : void Convenience method that extracts the size of the four margins in the four output parameters @arg left left margin size @arg top top margin size @arg right right margin size @arg bottom bottom margin size
HasElementPrefix ( Plasma location ) : bool This is an overloaded method provided for convenience equivalent to hasElementPrefix("north"), hasElementPrefix("south") hasElementPrefix("west") and hasElementPrefix("east")
HasElementPrefix ( string prefix ) : bool
MarginSize ( Plasma edge ) : double Returns the margin size given the margin edge we want @arg edge the margin edge we want, top, bottom, left or right
Mask ( ) : QRegion Returns a mask that tightly contains the fully opaque areas of the svg
PaintFrame ( QPainter painter ) : void
PaintFrame ( QPainter painter, QPointF pos ) : void Paints the loaded SVG with the elements that represents the border This is an overloaded member provided for convenience @arg painter the QPainter to use @arg pos where to paint the svg
PaintFrame ( QPainter painter, QRectF target ) : void
PaintFrame ( QPainter painter, QRectF target, QRectF source ) : void Paints the loaded SVG with the elements that represents the border @arg painter the QPainter to use @arg target the target rectangle on the paint device @arg source the portion rectangle of the source image
Prefix ( ) : string Returns the prefix for SVG elements of the FrameSvg
ResizeFrame ( QSizeF size ) : void Resize the frame maintaining the same border size @arg size the new size of the frame
SetCacheAllRenderedFrames ( bool cache ) : void Sets whether saving all the rendered prefixes in a cache or not @arg cache if use the cache or not
SetElementPrefix ( Plasma location ) : void Sets the prefix (@see setElementPrefix) to 'north', 'south', 'west' and 'east' when the location is TopEdge, BottomEdge, LeftEdge and RightEdge, respectively. Clears the prefix in other cases. @arg location location
SetElementPrefix ( string prefix ) : void Sets the prefix for the SVG elements to be used for painting. For example, if prefix is 'active', then instead of using the 'top' element of the SVG file to paint the top border, 'active-top' element will be used. The same goes for other SVG elements. If the elements with prefixes are not present, the default ones are used. (for the sake of speed, the test is present only for the 'center' element) Setting the prefix manually resets the location to Floating. If the @arg prefix prefix for the SVG element names
SetImagePath ( string path ) : void Loads a new Svg @arg imagePath the new file

Méthodes protégées

Méthode Description
CreateProxy ( ) : void
FrameSvg ( Type dummy ) : System

Method Details

AlphaMask() public méthode

public AlphaMask ( ) : QPixmap
Résultat Qyoto.QPixmap

CacheAllRenderedFrames() public méthode

public CacheAllRenderedFrames ( ) : bool
Résultat bool

ClearCache() public méthode

Deletes the internal cache freeing memory: use this if you want to switch the rendered element and you don't plan to switch back to the previous one for a long time and you used setUseCache(true)
public ClearCache ( ) : void
Résultat void

ContentsRect() public méthode

public ContentsRect ( ) : Qyoto.QRectF
Résultat Qyoto.QRectF

CreateProxy() protected méthode

protected CreateProxy ( ) : void
Résultat void

Dispose() public méthode

public Dispose ( ) : void
Résultat void

FramePixmap() public méthode

Returns a pixmap of the SVG represented by this object. @arg elelementId the ID string of the element to render, or an empty string for the whole SVG (the default)
public FramePixmap ( ) : QPixmap
Résultat QPixmap

FrameSize() public méthode

public FrameSize ( ) : QSizeF
Résultat QSizeF

FrameSvg() public méthode

public FrameSvg ( ) : System
Résultat System

FrameSvg() public méthode

Constructs a new FrameSvg that paints the proper named subelements as borders. It may also be used as a regular Plasma.Svg object for direct access to elements in the Svg. @arg parent options QObject to parent this to @related Plasma.Theme
public FrameSvg ( QObject parent ) : System
parent QObject
Résultat System

FrameSvg() protected méthode

protected FrameSvg ( Type dummy ) : System
dummy Type
Résultat System

GetMargins() public méthode

Convenience method that extracts the size of the four margins in the four output parameters @arg left left margin size @arg top top margin size @arg right right margin size @arg bottom bottom margin size
public GetMargins ( double &left, double &top, double &right, double &bottom ) : void
left double
top double
right double
bottom double
Résultat void

HasElementPrefix() public méthode

This is an overloaded method provided for convenience equivalent to hasElementPrefix("north"), hasElementPrefix("south") hasElementPrefix("west") and hasElementPrefix("east")
public HasElementPrefix ( Plasma location ) : bool
location Plasma
Résultat bool

HasElementPrefix() public méthode

public HasElementPrefix ( string prefix ) : bool
prefix string
Résultat bool

MarginSize() public méthode

Returns the margin size given the margin edge we want @arg edge the margin edge we want, top, bottom, left or right
public MarginSize ( Plasma edge ) : double
edge Plasma
Résultat double

Mask() public méthode

Returns a mask that tightly contains the fully opaque areas of the svg
public Mask ( ) : QRegion
Résultat QRegion

PaintFrame() public méthode

public PaintFrame ( QPainter painter ) : void
painter QPainter
Résultat void

PaintFrame() public méthode

Paints the loaded SVG with the elements that represents the border This is an overloaded member provided for convenience @arg painter the QPainter to use @arg pos where to paint the svg
public PaintFrame ( QPainter painter, QPointF pos ) : void
painter QPainter
pos QPointF
Résultat void

PaintFrame() public méthode

public PaintFrame ( QPainter painter, QRectF target ) : void
painter QPainter
target QRectF
Résultat void

PaintFrame() public méthode

Paints the loaded SVG with the elements that represents the border @arg painter the QPainter to use @arg target the target rectangle on the paint device @arg source the portion rectangle of the source image
public PaintFrame ( QPainter painter, QRectF target, QRectF source ) : void
painter QPainter
target QRectF
source QRectF
Résultat void

Prefix() public méthode

Returns the prefix for SVG elements of the FrameSvg
public Prefix ( ) : string
Résultat string

ResizeFrame() public méthode

Resize the frame maintaining the same border size @arg size the new size of the frame
public ResizeFrame ( QSizeF size ) : void
size QSizeF
Résultat void

SetCacheAllRenderedFrames() public méthode

Sets whether saving all the rendered prefixes in a cache or not @arg cache if use the cache or not
public SetCacheAllRenderedFrames ( bool cache ) : void
cache bool
Résultat void

SetElementPrefix() public méthode

Sets the prefix (@see setElementPrefix) to 'north', 'south', 'west' and 'east' when the location is TopEdge, BottomEdge, LeftEdge and RightEdge, respectively. Clears the prefix in other cases. @arg location location
public SetElementPrefix ( Plasma location ) : void
location Plasma
Résultat void

SetElementPrefix() public méthode

Sets the prefix for the SVG elements to be used for painting. For example, if prefix is 'active', then instead of using the 'top' element of the SVG file to paint the top border, 'active-top' element will be used. The same goes for other SVG elements. If the elements with prefixes are not present, the default ones are used. (for the sake of speed, the test is present only for the 'center' element) Setting the prefix manually resets the location to Floating. If the @arg prefix prefix for the SVG element names
public SetElementPrefix ( string prefix ) : void
prefix string
Résultat void

SetImagePath() public méthode

Loads a new Svg @arg imagePath the new file
public SetImagePath ( string path ) : void
path string
Résultat void