• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

KStyles

Keramik::ProgressBarPainter

Keramik::ProgressBarPainter Class Reference

#include <pixmaploader.h>

Inheritance diagram for Keramik::ProgressBarPainter:

Inheritance graph
[legend]

List of all members.


Public Member Functions

 ProgressBarPainter (int name, bool reverse)
virtual ~ProgressBarPainter ()

Protected Member Functions

virtual int tileName (unsigned int column, unsigned int) const

Protected Attributes

bool m_reverse

Detailed Description

Definition at line 266 of file pixmaploader.h.


Constructor & Destructor Documentation

Keramik::ProgressBarPainter::ProgressBarPainter ( int  name,
bool  reverse 
) [inline]

Definition at line 269 of file pixmaploader.h.

virtual Keramik::ProgressBarPainter::~ProgressBarPainter (  )  [inline, virtual]

Definition at line 287 of file pixmaploader.h.


Member Function Documentation

virtual int Keramik::ProgressBarPainter::tileName ( unsigned int  ,
unsigned int   
) const [inline, protected, virtual]

The idea behind all this stuff is that for performance reasons, we want to use only integers to refer to widgets.

So we give each widget a base ID that's divisible by 256, and have all the various tiles be referred to as that ID + some small number.

genembed generates and assigns the base widget IDs, and maps various pixmaps suffixes into the adjustment numbers; using that info it writes out the tables mapping the IDs to pixmaps, and keramikrc.h, which provides nice symbolic constants for base IDs.

When painting, however, we essentially represent the widget as a table, providing fixed/tiled/stretched modes for each column and row. So to draw the widget knowing its base ID, we need to know how many rows and columns there, what the scaling modes are, and how to get to each of the tiles -- i.e. the tiles' offset from the base ID.

The various painter subclasses simply fill in most of that info into the members here during their construction, and implement the virtual tileName to get the offsets.

Note that the IDs and offsets are separated since we can reuse the same code in many cases by splitting the widget identify from tile identity (as there are many different widgets that have the same or similar tile layout)

Reimplemented from Keramik::TilePainter.

Definition at line 289 of file pixmaploader.h.


Member Data Documentation

bool Keramik::ProgressBarPainter::m_reverse [protected]

Definition at line 300 of file pixmaploader.h.


The documentation for this class was generated from the following file:
  • pixmaploader.h

KStyles

Skip menu "KStyles"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members

API Reference

Skip menu "API Reference"
  • KCMShell
  • KNotify
  • KStyles
  • Nepomuk Daemons
Generated for API Reference by doxygen 1.5.7
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal