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

KStyles

Keramik::ActiveTabPainter

Keramik::ActiveTabPainter Class Reference

#include <pixmaploader.h>

Inheritance diagram for Keramik::ActiveTabPainter:

Inheritance graph
[legend]

List of all members.


Public Member Functions

 ActiveTabPainter (bool bottom)
virtual ~ActiveTabPainter ()

Protected Member Functions

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

Detailed Description

Definition at line 304 of file pixmaploader.h.


Constructor & Destructor Documentation

ActiveTabPainter::ActiveTabPainter ( bool  bottom  ) 

Definition at line 495 of file pixmaploader.cpp.

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

Definition at line 308 of file pixmaploader.h.


Member Function Documentation

int ActiveTabPainter::tileName ( unsigned int  ,
unsigned int   
) const [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::RectTilePainter.

Definition at line 512 of file pixmaploader.cpp.


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

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