C# Класс Plasma.FrameSvg

Наследование: Plasma.Svg, IDisposable
Показать файл Открыть проект

Private Properties

Свойство Тип Описание

Открытые методы

Метод Описание
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

Защищенные методы

Метод Описание
CreateProxy ( ) : void
FrameSvg ( Type dummy ) : System

Описание методов

AlphaMask() публичный Метод

public AlphaMask ( ) : QPixmap
Результат Qyoto.QPixmap

CacheAllRenderedFrames() публичный Метод

public CacheAllRenderedFrames ( ) : bool
Результат bool

ClearCache() публичный Метод

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
Результат void

ContentsRect() публичный Метод

public ContentsRect ( ) : Qyoto.QRectF
Результат Qyoto.QRectF

CreateProxy() защищенный Метод

protected CreateProxy ( ) : void
Результат void

Dispose() публичный Метод

public Dispose ( ) : void
Результат void

FramePixmap() публичный Метод

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
Результат QPixmap

FrameSize() публичный Метод

public FrameSize ( ) : QSizeF
Результат QSizeF

FrameSvg() публичный Метод

public FrameSvg ( ) : System
Результат System

FrameSvg() публичный Метод

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
Результат System

FrameSvg() защищенный Метод

protected FrameSvg ( Type dummy ) : System
dummy Type
Результат System

GetMargins() публичный Метод

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
Результат void

HasElementPrefix() публичный Метод

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
Результат bool

HasElementPrefix() публичный Метод

public HasElementPrefix ( string prefix ) : bool
prefix string
Результат bool

MarginSize() публичный Метод

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
Результат double

Mask() публичный Метод

Returns a mask that tightly contains the fully opaque areas of the svg
public Mask ( ) : QRegion
Результат QRegion

PaintFrame() публичный Метод

public PaintFrame ( QPainter painter ) : void
painter QPainter
Результат void

PaintFrame() публичный Метод

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
Результат void

PaintFrame() публичный Метод

public PaintFrame ( QPainter painter, QRectF target ) : void
painter QPainter
target QRectF
Результат void

PaintFrame() публичный Метод

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
Результат void

Prefix() публичный Метод

Returns the prefix for SVG elements of the FrameSvg
public Prefix ( ) : string
Результат string

ResizeFrame() публичный Метод

Resize the frame maintaining the same border size @arg size the new size of the frame
public ResizeFrame ( QSizeF size ) : void
size QSizeF
Результат void

SetCacheAllRenderedFrames() публичный Метод

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
Результат void

SetElementPrefix() публичный Метод

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
Результат void

SetElementPrefix() публичный Метод

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
Результат void

SetImagePath() публичный Метод

Loads a new Svg @arg imagePath the new file
public SetImagePath ( string path ) : void
path string
Результат void