Logo Search packages:      
Sourcecode: parley version File versions  Download package

Public Types | Public Slots | Signals | Public Member Functions | Private Member Functions | Private Attributes

Practice::ThemedBackgroundRenderer Class Reference

Collaboration diagram for Practice::ThemedBackgroundRenderer:
Collaboration graph
[legend]

List of all members.

Public Types

enum  Align {
  Corner, LeftTop, Centered, Repeated,
  RightBottom
}
enum  Edge {
  Top, Bottom, Left, Right,
  Center
}
enum  ScaleBase { NoScale, Horizontal, Vertical, Rect }

Public Slots

void addRect (const QString &name, const QRect &rect)
void clearRects ()
void renderingFinished ()
void updateBackground ()
void updateBackgroundTimeout ()

Signals

void backgroundChanged (QPixmap pixmap)

Public Member Functions

QMargins contentMargins ()
QColor fontColor (const QString &context, const QColor &fallback)
QPixmap getPixmapForId (const QString &id, QSize size=QSize())
QRectF getRectForId (const QString &id)
QPixmap getScaledBackground ()
QSizeF getSizeForId (const QString &id)
void setTheme (const QString &theme)
 ThemedBackgroundRenderer (QObject *parent, const QString &cacheFilename)

Private Member Functions

QRect alignRect (QRect itemRect, const QRect &baseRect, Edge edge, Align align, bool inside)
QImage renderBackground (bool fastScale)
void renderItem (const QString &idBase, const QString &idSuffix, const QRect &rect, QPainter *p, bool fastScale, ScaleBase scaleBase, Qt::AspectRatioMode aspectRatio, Edge edge, Align align, bool inside)
void renderRect (const QString &name, const QRect &rect, QPainter *p, bool fastScale)
QRect scaleRect (QRectF itemRect, const QRect &baseRect, ScaleBase scaleBase, Qt::AspectRatioMode aspectRatio)

Private Attributes

ImageCache m_cache
QFuture< QImage > m_future
bool m_haveCache
bool m_isFastScaledRender
QList< QPair< QString, QRect > > m_lastFullRenderRects
QList< QPair< QString, QRect > > m_lastScaledRenderRects
bool m_queuedRequest
QHash< QString, QString > m_rectMappings
QList< QPair< QString, QRect > > m_rects
KSvgRenderer m_renderer
KGameThemem_theme
QTimer m_timer
QFutureWatcher< QImage > m_watcher

Detailed Description

Definition at line 30 of file themedbackgroundrenderer.h.


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

Generated by  Doxygen 1.6.0   Back to index