Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

OThemeBase Class Reference

#include </home/clem/local/src/opie/noncore/styles/theme/othemebase.h>

Inheritance diagram for OThemeBase:

Inheritance graph
[legend]
Collaboration diagram for OThemeBase:

Collaboration graph
[legend]
List of all members.

Public Types

enum  ScaleHint { FullScale, HorizontalScale, VerticalScale, TileScale }
enum  ArrowStyle { MotifArrow, LargeArrow, SmallArrow }
enum  ShadeStyle { Motif, Windows, Next, KDE }
enum  SButton { SBBottomLeft, SBBottomRight, SBOpposite }
enum  Gradient {
  GrNone, GrHorizontal, GrVertical, GrDiagonal,
  GrPyramid, GrRectangle, GrElliptic, GrReverseBevel
}
enum  WidgetType {
  PushButton = 0, ComboBox, HScrollBarSlider, VScrollBarSlider,
  Bevel, ToolButton, ScrollButton, HScrollDeco,
  VScrollDeco, ComboDeco, MenuItem, InactiveTab,
  ArrowUp, ArrowDown, ArrowLeft, ArrowRight,
  PushButtonDown, ComboBoxDown, HScrollBarSliderDown, VScrollBarSliderDown,
  BevelDown, ToolButtonDown, ScrollButtonDown, HScrollDecoDown,
  VScrollDecoDown, ComboDecoDown, MenuItemDown, ActiveTab,
  SunkenArrowUp, SunkenArrowDown, SunkenArrowLeft, SunkenArrowRight,
  HScrollGroove, VScrollGroove, Slider, SliderGroove,
  IndicatorOn, IndicatorOff, ExIndicatorOn, ExIndicatorOff,
  HBarHandle, VBarHandle, ToolBar, Splitter,
  CheckMark, MenuBar, DisArrowUp, DisArrowDown,
  DisArrowLeft, DisArrowRight, ProgressBar, ProgressBg,
  MenuBarItem, Background
}

Public Member Functions

 OThemeBase (const QString &configFile)
 ~OThemeBase ()
ScaleHint scaleHint (WidgetType widget) const
Gradient gradientHint (WidgetType widget) const
const QColorGroup * colorGroup (const QColorGroup &defaultGroup, WidgetType widget) const
QBrush pixmapBrush (const QColorGroup &group, QColorGroup::ColorRole role, int w, int h, WidgetType widget)
bool isPixmap (WidgetType widget) const
bool isColor (WidgetType widget) const
bool is3DFocus () const
int focusOffset () const
int borderWidth (WidgetType widget) const
int pixBorderWidth (WidgetType widget) const
OThemePixmapborderPixmap (WidgetType widget)
int highlightWidth (WidgetType widget) const
int decoWidth (WidgetType widget) const
int getSBExtent () const
SButton scrollBarLayout () const
ArrowStyle arrowType () const
ShadeStyle shade () const
int frameWidth () const
int splitWidth () const
int bevelContrast (WidgetType widget) const
int buttonXShift () const
int buttonYShift () const
int sliderButtonLength () const
bool roundButton () const
bool roundComboBox () const
bool roundSlider () const
bool activeTabLine () const
bool inactiveTabLine () const
OThemePixmapuncached (WidgetType widget) const
virtual OThemePixmapscalePixmap (int w, int h, WidgetType widget)

Static Public Member Functions

static void applyConfigFile (const QString &file)

Protected Member Functions

QImage * image (WidgetType widget) const
QColor * gradientHigh (WidgetType widget) const
QColor * gradientLow (WidgetType widget) const
void readConfig (Qt::GUIStyle colorStyle=Qt::WindowsStyle)
void readWidgetConfig (int i, Config *config, QString *pixnames, QString *brdnames, bool *loadArray)
void copyWidgetConfig (int sourceID, int destID, QString *pixnames, QString *brdnames)
QColorGroup * makeColorGroup (QColor &fg, QColor &bg, Qt::GUIStyle style=Qt::WindowsStyle)
OThemePixmapscale (int w, int h, WidgetType widget)
OThemePixmapscaleBorder (int w, int h, WidgetType type)
OThemePixmapgradient (int w, int h, WidgetType widget)
OThemePixmapblend (WidgetType widget)
void generateBorderPix (int i)
void applyResourceGroup (Config *config, int i, QString *copyfrom, QString *pixnames, QString *brdnames)
void applyMiscResourceGroup (Config *config)
void readResourceGroup (int i, QString *copyfrom, QString *pixnames, QString *brdnames, bool *loadArray)
void readMiscResourceGroup ()
OThemePixmaploadPixmap (QString &name)
QImage * loadImage (QString &name)

Protected Attributes

QColor fgcolor
QColor bgcolor
QColor selfgcolor
QColor selbgcolor
QColor winfgcolor
QColor winbgcolor

Private Attributes

SButton sbPlacement
ArrowStyle arrowStyle
ShadeStyle shading
int defaultFrame
int btnXShift
int btnYShift
int sliderLen
int splitterWidth
int focus3DOffset
int sbExtent
bool smallGroove
bool roundedButton
bool roundedCombo
bool roundedSlider
bool aTabLine
bool iTabLine
bool focus3D
OThemeCachecache
int cacheSize
QString configFileName
QString configFilePath
OThemePixmappixmaps [WIDGETS]
QImage * images [WIDGETS]
unsigned char borders [WIDGETS]
unsigned char highlights [WIDGETS]
ScaleHint scaleHints [WIDGETS]
QColorGroup * colors [WIDGETS]
QColor * grLowColors [WIDGETS]
QColor * grHighColors [WIDGETS]
Gradient gradients [WIDGETS]
float blends [WIDGETS]
unsigned char bContrasts [WIDGETS]
bool duplicate [WIDGETS]
int pbWidth [WIDGETS]
OThemePixmappbPixmaps [WIDGETS]
bool pbDuplicate [WIDGETS]
OThemeBasePrivate * d

Detailed Description

This is a base class for KDE themed styles. It implements a cache, configuration file parsing, pixmap scaling, gradients, and a lot of inline methods for accessing user specified parameters.

Note that this class *does not* actually implement any themes. It just provides the groundwork for doing so. The only reason to use this class directly is if you plan to reimplement all of the widgets. Otherwise, refer to OThemeStyle for a fully themed style you can derive from.

Author:
Daniel M. Duley <mosfet@kde.org>

Definition at line 195 of file othemebase.h.


Member Enumeration Documentation

enum OThemeBase::ArrowStyle
 

The default arrow types.

Enumeration values:
MotifArrow 
LargeArrow 
SmallArrow 

Definition at line 212 of file othemebase.h.

enum OThemeBase::Gradient
 

The gradient types. Horizontal is left to right, Vertical is top to bottom, and diagonal is upper-left to bottom-right.

Enumeration values:
GrNone 
GrHorizontal 
GrVertical 
GrDiagonal 
GrPyramid 
GrRectangle 
GrElliptic 
GrReverseBevel 

Definition at line 227 of file othemebase.h.

enum OThemeBase::SButton
 

The default scrollbar button layout. BottomLeft is like what Next uses, BottomRight is like Platinum, and Opposite it like Windows and Motif.

Enumeration values:
SBBottomLeft 
SBBottomRight 
SBOpposite 

Definition at line 222 of file othemebase.h.

enum OThemeBase::ScaleHint
 

Describes if a pixmap should be scaled fully, horizontally, vertically, or not at all and tiled.

Enumeration values:
FullScale 
HorizontalScale 
VerticalScale 
TileScale 

Definition at line 208 of file othemebase.h.

enum OThemeBase::ShadeStyle
 

The default frame shading styles.

Enumeration values:
Motif 
Windows 
Next 
KDE 

Definition at line 216 of file othemebase.h.

enum OThemeBase::WidgetType
 

This provides a list of widget types that OThemeBase recognizes.

Enumeration values:
PushButton 
ComboBox 
HScrollBarSlider 
VScrollBarSlider 
Bevel 
ToolButton 
ScrollButton 
HScrollDeco 
VScrollDeco 
ComboDeco 
MenuItem 
InactiveTab 
ArrowUp 
ArrowDown 
ArrowLeft 
ArrowRight 
PushButtonDown 
ComboBoxDown 
HScrollBarSliderDown 
VScrollBarSliderDown 
BevelDown 
ToolButtonDown 
ScrollButtonDown 
HScrollDecoDown 
VScrollDecoDown 
ComboDecoDown 
MenuItemDown 
ActiveTab 
SunkenArrowUp 
SunkenArrowDown 
SunkenArrowLeft 
SunkenArrowRight 
HScrollGroove 
VScrollGroove 
Slider 
SliderGroove 
IndicatorOn 
IndicatorOff 
ExIndicatorOn 
ExIndicatorOff 
HBarHandle 
VBarHandle 
ToolBar 
Splitter 
CheckMark 
MenuBar 
DisArrowUp 
DisArrowDown 
DisArrowLeft 
DisArrowRight 
ProgressBar 
ProgressBg 
MenuBarItem 
Background 

Definition at line 244 of file othemebase.h.


Constructor & Destructor Documentation

OThemeBase::OThemeBase const QString configFile  ) 
 

Constructs a new OThemeBase object.

Definition at line 306 of file othemebase.cpp.

References cache, cacheSize, configFileName, configFilePath, QPEApplication::qpeDir(), readConfig(), and Qt::WindowsStyle.

OThemeBase::~OThemeBase  ) 
 

Definition at line 347 of file othemebase.cpp.

References cache, colors, duplicate, grHighColors, grLowColors, i, images, pbDuplicate, pbPixmaps, pixmaps, and WIDGETS.


Member Function Documentation

bool OThemeBase::activeTabLine  )  const [inline]
 

True if a line should be drawn on the bottom of active tabs.

Definition at line 724 of file othemebase.h.

References aTabLine.

Referenced by OThemeStyle::drawTab().

void OThemeBase::applyConfigFile const QString file  )  [static]
 

This method reads a configuration file and applies it to the user's kstylerc file. It does not signal applications to reload via the KDEChangeGeneral atom, if you want to do this you must do so yourself. See kcmdisplay's general.cpp for an example.

Parameters:
file The configuration file to apply.

Definition at line 316 of file othemebase.cpp.

References Config::File, Config::hasKey(), Config::readEntry(), Config::write(), and Config::writeEntry().

void OThemeBase::applyMiscResourceGroup Config config  )  [protected]
 

Definition at line 796 of file othemebase.cpp.

References arrowStyle, QString::ascii(), bgcolor, cacheSize, defaultFrame, fgcolor, QString::isEmpty(), KDE, LargeArrow, Motif, MotifArrow, Next, odebug, oendl, Config::readEntry(), Config::readNumEntry(), SBBottomLeft, SBBottomRight, sbExtent, SBOpposite, sbPlacement, selbgcolor, selfgcolor, shading, SmallArrow, strToColor(), winbgcolor, Windows, and winfgcolor.

Referenced by readConfig().

void OThemeBase::applyResourceGroup Config config,
int  i,
QString copyfrom,
QString pixnames,
QString brdnames
[protected]
 

Definition at line 850 of file othemebase.cpp.

References ActiveTab, QString::ascii(), aTabLine, bContrasts, blends, borders, btnXShift, btnYShift, colors, ComboBox, ComboBoxDown, duplicate, focus3D, focus3DOffset, FullScale, gradients, GrDiagonal, GrElliptic, grHighColors, GrHorizontal, grLowColors, GrNone, GrPyramid, GrRectangle, GrReverseBevel, GrVertical, Config::hasKey(), highlights, HorizontalScale, images, InactiveTab, QString::isEmpty(), iTabLine, makeColorGroup(), NULL, odebug, oendl, pbDuplicate, pbPixmaps, pbWidth, pixmaps, PushButton, PushButtonDown, qApp, Config::readBoolEntry(), Config::readEntry(), Config::readNumEntry(), roundedButton, roundedCombo, roundedSlider, scaleHints, SliderGroove, Splitter, splitterWidth, strToColor(), TileScale, VerticalScale, widgetEntries, and Qt::WindowsStyle.

Referenced by readConfig().

OThemeBase::ArrowStyle OThemeBase::arrowType  )  const [inline]
 

The arrow type.

Definition at line 671 of file othemebase.h.

References arrowStyle.

Referenced by OThemeStyle::drawArrow().

int OThemeBase::bevelContrast WidgetType  widget  )  const [inline]
 

The contrast for some bevel effects such as reverse gradient.

Definition at line 595 of file othemebase.h.

References bContrasts.

Referenced by gradient().

OThemePixmap * OThemeBase::blend WidgetType  widget  )  [protected]
 

Definition at line 599 of file othemebase.cpp.

References OGfxEffect::blend(), blends, OGfxEffect::DiagonalGradient, OGfxEffect::EllipticGradient, g, gradients, GrElliptic, GrHorizontal, grLowColors, GrPyramid, GrRectangle, GrVertical, OGfxEffect::HorizontalGradient, pixmaps, OGfxEffect::PyramidGradient, OGfxEffect::RectangleGradient, and OGfxEffect::VerticalGradient.

Referenced by readConfig(), and scale().

OThemePixmap * OThemeBase::borderPixmap WidgetType  widget  )  [inline]
 

Returns the border pixmap if enabled for the specified widget. This will contain the originial pixmap, plus the edges separated in OThemePixmap::border() if valid. If invalid it will return NULL.

Definition at line 739 of file othemebase.h.

References pbPixmaps.

Referenced by OThemeStyle::drawBaseButton(), and scaleBorder().

int OThemeBase::borderWidth WidgetType  widget  )  const [inline]
 

The border width of the specified widget.

Definition at line 631 of file othemebase.h.

References borders, and pbWidth.

Referenced by OThemeStyle::drawBaseButton(), OThemeStyle::drawPopupMenuItem(), OThemeStyle::drawScrollBarGroove(), and OThemeStyle::drawTab().

int OThemeBase::buttonXShift  )  const [inline]
 

The button text X shift.

Definition at line 686 of file othemebase.h.

References btnXShift.

Referenced by OThemeStyle::drawPushButtonLabel(), and OThemeStyle::getButtonShift().

int OThemeBase::buttonYShift  )  const [inline]
 

The button text Y shift.

Definition at line 696 of file othemebase.h.

References btnYShift.

Referenced by OThemeStyle::drawPushButtonLabel(), and OThemeStyle::getButtonShift().

const QColorGroup * OThemeBase::colorGroup const QColorGroup &  defaultGroup,
WidgetType  widget
const [inline]
 

The color group specified for a given widget. If a color group is set in the theme configuration that is used, otherwise defaultColor is returned.

Parameters:
defaultColor The colorGroup to set if one is available.
widget The widget whose color group to retrieve.

Definition at line 625 of file othemebase.h.

References colors.

Referenced by OThemeStyle::drawArrow(), OThemeStyle::drawBevelButton(), OThemeStyle::drawCheckMark(), OThemeStyle::drawComboButton(), OThemeStyle::drawExclusiveIndicator(), OThemeStyle::drawIndicator(), OThemeStyle::drawMenuBarItem(), OThemeStyle::drawPopupMenuItem(), OThemeStyle::drawProgressBar(), OThemeStyle::drawPushButton(), OThemeStyle::drawPushButtonLabel(), OThemeStyle::drawScrollBarControls(), OThemeStyle::drawScrollBarGroove(), OThemeStyle::drawSlider(), OThemeStyle::drawSliderGroove(), OThemeStyle::drawSplitter(), OThemeStyle::drawTab(), OThemeStyle::drawToolButton(), and OThemeStyle::polish().

void OThemeBase::copyWidgetConfig int  sourceID,
int  destID,
QString pixnames,
QString brdnames
[protected]
 

Definition at line 185 of file othemebase.cpp.

References ActiveTab, aTabLine, bContrasts, blends, borders, colors, duplicate, gradients, grHighColors, grLowColors, highlights, images, InactiveTab, iTabLine, loadImage(), loadPixmap(), NULL, pbDuplicate, pbPixmaps, pbWidth, pixmaps, scaleHints, and TileScale.

Referenced by readResourceGroup().

int OThemeBase::decoWidth WidgetType  widget  )  const [inline]
 

The border plus highlight width of the widget.

Definition at line 646 of file othemebase.h.

References borders, highlights, and pbWidth.

Referenced by OThemeStyle::buttonRect(), OThemeStyle::drawBaseButton(), OThemeStyle::drawComboButton(), OThemeStyle::drawPopupMenuItem(), OThemeStyle::drawPushButtonLabel(), OThemeStyle::drawScrollBarControls(), gradient(), OThemeStyle::popupMenuItemHeight(), and OThemeStyle::scrollBarMetrics().

int OThemeBase::focusOffset  )  const [inline]
 

If the user specified a 3D focus rectangle, they may also specify an offset from the default rectangle to use when drawing it. This returns the specified offset.

Definition at line 590 of file othemebase.h.

References focus3DOffset.

Referenced by OThemeStyle::drawFocusRect().

int OThemeBase::frameWidth  )  const [inline]
 

The frame width.

Definition at line 681 of file othemebase.h.

References defaultFrame.

Referenced by OThemeStyle::defaultFrameWidth().

void OThemeBase::generateBorderPix int  i  )  [protected]
 

Definition at line 87 of file othemebase.cpp.

References bitBlt(), OThemePixmap::Bottom, OThemePixmap::BottomLeft, OThemePixmap::BottomRight, Qt::CopyROP, height, OThemePixmap::Left, odebug, oendl, pbPixmaps, pbWidth, OThemePixmap::Right, OThemePixmap::setBorder(), OThemePixmap::Top, OThemePixmap::TopLeft, OThemePixmap::TopRight, and width.

Referenced by readResourceGroup().

int OThemeBase::getSBExtent  )  const [inline]
 

The extent (width for vertical, height for horizontal) requested for the scrollbars.

Definition at line 734 of file othemebase.h.

References sbExtent.

Referenced by OThemeStyle::OThemeStyle().

OThemePixmap * OThemeBase::gradient int  w,
int  h,
WidgetType  widget
[protected]
 

Definition at line 627 of file othemebase.cpp.

References bevelContrast(), bitBlt(), cache, Qt::CopyROP, decoWidth(), OGfxEffect::DiagonalGradient, OGfxEffect::EllipticGradient, OThemeCache::FullScale, g, OGfxEffect::gradient(), gradients, GrElliptic, grHighColors, GrHorizontal, grLowColors, GrPyramid, GrRectangle, GrReverseBevel, GrVertical, height, OGfxEffect::HorizontalGradient, OThemeCache::horizontalPixmap(), OThemeCache::HorizontalScale, OThemeCache::insert(), OThemeCache::pixmap(), pixmaps, OGfxEffect::PyramidGradient, OGfxEffect::RectangleGradient, s, OGfxEffect::VerticalGradient, OThemeCache::verticalPixmap(), OThemeCache::VerticalScale, and width.

Referenced by scalePixmap().

QColor * OThemeBase::gradientHigh WidgetType  widget  )  const [inline, protected]
 

Returns the gradient high color if one is specified, NULL otherwise.

Definition at line 651 of file othemebase.h.

References grHighColors.

OThemeBase::Gradient OThemeBase::gradientHint WidgetType  widget  )  const [inline]
 

The gradient type specified by the KConfig file.

Parameters:
widget A Widgets enum value.
Returns:
A Gradient enum value.

Definition at line 605 of file othemebase.h.

References gradients, GrNone, and WIDGETS.

Referenced by OThemeStyle::drawBaseButton().

QColor * OThemeBase::gradientLow WidgetType  widget  )  const [inline, protected]
 

Returns the gradient low color if one is specified, NULL otherwise.

Definition at line 656 of file othemebase.h.

References grLowColors.

int OThemeBase::highlightWidth WidgetType  widget  )  const [inline]
 

The highlight width of the specified widget.

Definition at line 641 of file othemebase.h.

References highlights, and pbWidth.

Referenced by OThemeStyle::drawBaseButton(), OThemeStyle::drawPopupMenuItem(), OThemeStyle::drawScrollBarGroove(), and OThemeStyle::drawTab().

QImage * OThemeBase::image WidgetType  widget  )  const [inline, protected]
 

Returns a QImage for the given widget if the widget is scaled, NULL otherwise. QImages of the original pixmap are stored for scaled widgets in order to facilitate fast and accurate smooth-scaling. This also saves us a conversion from a pixmap to an image then back again.

Definition at line 661 of file othemebase.h.

References images.

Referenced by loadImage().

bool OThemeBase::inactiveTabLine  )  const [inline]
 

True if a line should be drawn on the bottom of inactive tabs.

Definition at line 729 of file othemebase.h.

References iTabLine.

Referenced by OThemeStyle::drawTab().

bool OThemeBase::is3DFocus  )  const [inline]
 

True if the user specified a 3D focus rectangle

Definition at line 585 of file othemebase.h.

References focus3D.

Referenced by OThemeStyle::drawFocusRect().

bool OThemeBase::isColor WidgetType  widget  )  const [inline]
 

True if the widget has a color group specified.

Definition at line 580 of file othemebase.h.

References colors, and NULL.

Referenced by OThemeStyle::polish().

bool OThemeBase::isPixmap WidgetType  widget  )  const [inline]
 

True if the widget has a pixmap or gradient specified.

Definition at line 575 of file othemebase.h.

References gradients, GrNone, NULL, and pixmaps.

Referenced by OThemeStyle::drawArrow(), OThemeStyle::drawBaseButton(), OThemeStyle::drawCheckMark(), OThemeStyle::drawComboButton(), OThemeStyle::drawExclusiveIndicator(), OThemeStyle::drawExclusiveIndicatorMask(), OThemeStyle::drawIndicator(), OThemeStyle::drawIndicatorMask(), OThemeStyle::drawPopupMenuItem(), OThemeStyle::drawProgressBar(), OThemeStyle::drawScrollBarControls(), OThemeStyle::drawScrollBarGroove(), OThemeStyle::drawSlider(), OThemeStyle::drawSliderMask(), OThemeStyle::drawTab(), OThemeStyle::exclusiveIndicatorSize(), OThemeStyle::indicatorSize(), OThemeStyle::polish(), OThemeStyle::popupMenuItemHeight(), and sliderButtonLength().

QImage * OThemeBase::loadImage QString name  )  [protected]
 

Attempts to load a image from the default OThemeBase locations.

Definition at line 369 of file othemebase.cpp.

References configFilePath, image(), NULL, odebug, and oendl.

Referenced by copyWidgetConfig(), and readResourceGroup().

OThemePixmap * OThemeBase::loadPixmap QString name  )  [protected]
 

Attempts to load a pixmap from the default OThemeBase locations.

Definition at line 381 of file othemebase.cpp.

References configFilePath, NULL, odebug, and oendl.

Referenced by copyWidgetConfig(), and readResourceGroup().

QColorGroup * OThemeBase::makeColorGroup QColor &  fg,
QColor &  bg,
Qt::GUIStyle  style = Qt::WindowsStyle
[protected]
 

Makes a full color group based on the given foreground and background colors. This is the same code used by KDE (kapp.cpp) in previous versions.

Definition at line 762 of file othemebase.cpp.

References Motif, qApp, and shading.

Referenced by applyResourceGroup().

int OThemeBase::pixBorderWidth WidgetType  widget  )  const [inline]
 

Pixmap border width of the specified widget.

Definition at line 636 of file othemebase.h.

References pbWidth.

QBrush OThemeBase::pixmapBrush const QColorGroup &  group,
QColorGroup::ColorRole  role,
int  w,
int  h,
WidgetType  widget
[inline]
 

Definition at line 615 of file othemebase.h.

References images, pixmaps, and scalePixmap().

void OThemeBase::readConfig Qt::GUIStyle  colorStyle = Qt::WindowsStyle  )  [protected]
 

Reads in all the configuration file entries supported.

Parameters:
colorStyle The style for the color groups. In KDE, colors were calculated a little differently for Motif vs Windows styles. This is obsolete.

Definition at line 245 of file othemebase.cpp.

References applyMiscResourceGroup(), applyResourceGroup(), aTabLine, blend(), blends, btnXShift, btnYShift, CheckMark, ComboDeco, ComboDecoDown, configFileName, configFilePath, ExIndicatorOff, ExIndicatorOn, Config::File, focus3D, focus3DOffset, HScrollDeco, HScrollDecoDown, i, IndicatorOff, IndicatorOn, INHERIT_ITEMS, QString::isEmpty(), iTabLine, NULL, pixmaps, PREBLEND_ITEMS, readMiscResourceGroup(), readResourceGroup(), roundedButton, roundedCombo, roundedSlider, Slider, splitterWidth, VScrollDeco, VScrollDecoDown, widgetEntries, and WIDGETS.

Referenced by OThemeBase().

void OThemeBase::readMiscResourceGroup  )  [protected]
 

Definition at line 847 of file othemebase.cpp.

Referenced by readConfig().

void OThemeBase::readResourceGroup int  i,
QString copyfrom,
QString pixnames,
QString brdnames,
bool *  loadArray
[protected]
 

Definition at line 985 of file othemebase.cpp.

References ArrowUp, blends, copyWidgetConfig(), DisArrowRight, DisArrowUp, duplicate, generateBorderPix(), images, QString::isEmpty(), loadImage(), loadPixmap(), NULL, odebug, oendl, pbDuplicate, pbPixmaps, pixmaps, scaleHints, TileScale, widgetEntries, and WIDGETS.

Referenced by readConfig().

void OThemeBase::readWidgetConfig int  i,
Config config,
QString pixnames,
QString brdnames,
bool *  loadArray
[protected]
 

bool OThemeBase::roundButton  )  const [inline]
 

True if rounded buttons are requested.

Definition at line 709 of file othemebase.h.

References roundedButton.

Referenced by OThemeStyle::drawButton(), OThemeStyle::drawButtonMask(), and OThemeStyle::drawPushButton().

bool OThemeBase::roundComboBox  )  const [inline]
 

True if rounded comboboxes are requested.

Definition at line 714 of file othemebase.h.

References roundedCombo.

Referenced by OThemeStyle::drawComboButton(), and OThemeStyle::drawComboButtonMask().

bool OThemeBase::roundSlider  )  const [inline]
 

True if rounded slider grooves are requested.

Definition at line 719 of file othemebase.h.

References roundedSlider.

Referenced by OThemeStyle::drawSliderGroove().

OThemePixmap * OThemeBase::scale int  w,
int  h,
WidgetType  widget
[protected]
 

Definition at line 393 of file othemebase.cpp.

References blend(), blends, cache, OThemeCache::FullScale, FullScale, height, OThemeCache::horizontalPixmap(), OThemeCache::HorizontalScale, HorizontalScale, images, OThemeCache::insert(), odebug, oendl, p, OThemeCache::pixmap(), pixmaps, scaleHints, TileScale, OThemeCache::verticalPixmap(), OThemeCache::VerticalScale, VerticalScale, and width.

Referenced by scalePixmap().

OThemePixmap * OThemeBase::scaleBorder int  w,
int  h,
WidgetType  type
[protected]
 

Definition at line 488 of file othemebase.cpp.

References bitBlt(), borderPixmap(), OThemePixmap::Bottom, OThemePixmap::BottomLeft, OThemePixmap::BottomRight, cache, Qt::CopyROP, OThemeCache::FullScale, OThemeCache::insert(), OThemePixmap::Left, NULL, odebug, oendl, p, pbPixmaps, pbWidth, OThemeCache::pixmap(), OThemePixmap::Right, OThemePixmap::Top, OThemePixmap::TopLeft, and OThemePixmap::TopRight.

Referenced by OThemeStyle::drawBaseButton().

OThemeBase::ScaleHint OThemeBase::scaleHint WidgetType  widget  )  const [inline]
 

The scaling type specified by the Config file.

Parameters:
widget A Widgets enum value.
Returns:
A ScaleHint enum value.

Definition at line 600 of file othemebase.h.

References scaleHints, TileScale, and WIDGETS.

OThemePixmap * OThemeBase::scalePixmap int  w,
int  h,
WidgetType  widget
[virtual]
 

Returns the pixmap for the given widget at the specified width and height. This will return NULL if no pixmap or gradient is specified. It may also return a different sized pixmap if the scaling is set to Tiled. When using this method, you should call it using the needed width and height then use QPainter::drawTiledPixmap to paint it. Doing this, if the pixmap is scaled it will be the proper size, otherwise it will be tiled.

Parameters:
w Requested width.
h Requested height.
widget Widget type.
Returns:
The pixmap or NULL if one is not specified.

Definition at line 753 of file othemebase.cpp.

References blends, gradient(), gradients, and scale().

Referenced by OThemeStyle::drawBaseButton(), OThemeStyle::drawPopupMenuItem(), OThemeStyle::drawScrollBarGroove(), OThemeStyle::drawTab(), and pixmapBrush().

OThemeBase::SButton OThemeBase::scrollBarLayout  )  const [inline]
 

The scrollbar button layout.

Definition at line 666 of file othemebase.h.

References sbPlacement.

Referenced by OThemeStyle::drawScrollBarControls(), OThemeStyle::scrollBarMetrics(), and OThemeStyle::scrollBarPointOver().

OThemeBase::ShadeStyle OThemeBase::shade  )  const [inline]
 

The shading type.

Definition at line 676 of file othemebase.h.

References shading.

Referenced by OThemeStyle::drawBaseButton(), OThemeStyle::drawPopupMenuItem(), and OThemeStyle::drawScrollBarGroove().

int OThemeBase::sliderButtonLength  )  const [inline]
 

Returns either the slider length of the slider pixmap if available, otherwise the length specified in the config file.

Definition at line 701 of file othemebase.h.

References isPixmap(), Slider, sliderLen, uncached(), and width.

Referenced by OThemeStyle::sliderLength().

int OThemeBase::splitWidth  )  const [inline]
 

The splitter width.

Definition at line 691 of file othemebase.h.

References splitterWidth.

Referenced by OThemeStyle::splitterWidth().

OThemePixmap * OThemeBase::uncached WidgetType  widget  )  const [inline]
 

Returns the current uncached pixmap for the given widget. This will usually be either the last scaled or gradient pixmap if those have been specified in the config file, the original pixmap if not, or NULL if no pixmap has been specified.

Definition at line 610 of file othemebase.h.

References pixmaps.

Referenced by OThemeStyle::drawArrow(), OThemeStyle::drawCheckMark(), OThemeStyle::drawComboButton(), OThemeStyle::drawExclusiveIndicator(), OThemeStyle::drawExclusiveIndicatorMask(), OThemeStyle::drawIndicator(), OThemeStyle::drawIndicatorMask(), OThemeStyle::drawProgressBar(), OThemeStyle::drawScrollBarControls(), OThemeStyle::drawSlider(), OThemeStyle::exclusiveIndicatorSize(), OThemeStyle::indicatorSize(), OThemeStyle::polish(), OThemeStyle::popupMenuItemHeight(), and sliderButtonLength().


Member Data Documentation

ArrowStyle OThemeBase::arrowStyle [private]
 

Definition at line 482 of file othemebase.h.

Referenced by applyMiscResourceGroup(), and arrowType().

bool OThemeBase::aTabLine [private]
 

Definition at line 492 of file othemebase.h.

Referenced by activeTabLine(), applyResourceGroup(), copyWidgetConfig(), and readConfig().

unsigned char OThemeBase::bContrasts[WIDGETS] [private]
 

Bevel contrasts

Definition at line 551 of file othemebase.h.

Referenced by applyResourceGroup(), bevelContrast(), and copyWidgetConfig().

QColor OThemeBase::bgcolor [protected]
 

Definition at line 500 of file othemebase.h.

Referenced by applyMiscResourceGroup(), and OThemeStyle::polish().

float OThemeBase::blends[WIDGETS] [private]
 

Blend intensity factors

Definition at line 547 of file othemebase.h.

Referenced by applyResourceGroup(), blend(), copyWidgetConfig(), readConfig(), readResourceGroup(), scale(), and scalePixmap().

unsigned char OThemeBase::borders[WIDGETS] [private]
 

The border widths

Definition at line 519 of file othemebase.h.

Referenced by applyResourceGroup(), borderWidth(), copyWidgetConfig(), and decoWidth().

int OThemeBase::btnXShift [private]
 

Definition at line 485 of file othemebase.h.

Referenced by applyResourceGroup(), buttonXShift(), and readConfig().

int OThemeBase::btnYShift [private]
 

Definition at line 485 of file othemebase.h.

Referenced by applyResourceGroup(), buttonYShift(), and readConfig().

OThemeCache* OThemeBase::cache [private]
 

Definition at line 494 of file othemebase.h.

Referenced by gradient(), OThemeBase(), scale(), scaleBorder(), and ~OThemeBase().

int OThemeBase::cacheSize [private]
 

Definition at line 495 of file othemebase.h.

Referenced by applyMiscResourceGroup(), and OThemeBase().

QColorGroup* OThemeBase::colors[WIDGETS] [private]
 

All the color groups.

Definition at line 531 of file othemebase.h.

Referenced by applyResourceGroup(), colorGroup(), copyWidgetConfig(), isColor(), and ~OThemeBase().

QString OThemeBase::configFileName [private]
 

Definition at line 496 of file othemebase.h.

Referenced by OThemeBase(), and readConfig().

QString OThemeBase::configFilePath [private]
 

Definition at line 497 of file othemebase.h.

Referenced by loadImage(), loadPixmap(), OThemeBase(), and readConfig().

OThemeBasePrivate* OThemeBase::d [private]
 

Reimplemented in OThemeStyle.

Definition at line 570 of file othemebase.h.

int OThemeBase::defaultFrame [private]
 

Definition at line 484 of file othemebase.h.

Referenced by applyMiscResourceGroup(), and frameWidth().

bool OThemeBase::duplicate[WIDGETS] [private]
 

Duplicate pixmap entries (used during destruction).

Definition at line 555 of file othemebase.h.

Referenced by applyResourceGroup(), copyWidgetConfig(), readResourceGroup(), and ~OThemeBase().

QColor OThemeBase::fgcolor [protected]
 

Definition at line 500 of file othemebase.h.

Referenced by applyMiscResourceGroup(), and OThemeStyle::polish().

bool OThemeBase::focus3D [private]
 

Definition at line 493 of file othemebase.h.

Referenced by applyResourceGroup(), is3DFocus(), and readConfig().

int OThemeBase::focus3DOffset [private]
 

Definition at line 488 of file othemebase.h.

Referenced by applyResourceGroup(), focusOffset(), and readConfig().

Gradient OThemeBase::gradients[WIDGETS] [private]
 

Gradient types.

Definition at line 543 of file othemebase.h.

Referenced by applyResourceGroup(), blend(), copyWidgetConfig(), gradient(), gradientHint(), isPixmap(), and scalePixmap().

QColor* OThemeBase::grHighColors[WIDGETS] [private]
 

Gradient high colors.

Definition at line 539 of file othemebase.h.

Referenced by applyResourceGroup(), copyWidgetConfig(), gradient(), gradientHigh(), and ~OThemeBase().

QColor* OThemeBase::grLowColors[WIDGETS] [private]
 

Gradient low colors (or blend background).

Definition at line 535 of file othemebase.h.

Referenced by applyResourceGroup(), blend(), copyWidgetConfig(), gradient(), gradientLow(), and ~OThemeBase().

unsigned char OThemeBase::highlights[WIDGETS] [private]
 

The highlight widths

Definition at line 523 of file othemebase.h.

Referenced by applyResourceGroup(), copyWidgetConfig(), decoWidth(), and highlightWidth().

QImage* OThemeBase::images[WIDGETS] [private]
 

The theme images. These are for scaled images and are kept in order to maintain fast smoothscaling.

Definition at line 515 of file othemebase.h.

Referenced by applyResourceGroup(), copyWidgetConfig(), image(), pixmapBrush(), readResourceGroup(), scale(), and ~OThemeBase().

bool OThemeBase::iTabLine [private]
 

Definition at line 492 of file othemebase.h.

Referenced by applyResourceGroup(), copyWidgetConfig(), inactiveTabLine(), and readConfig().

bool OThemeBase::pbDuplicate[WIDGETS] [private]
 

Duplicate border pixmapped border entries

Definition at line 567 of file othemebase.h.

Referenced by applyResourceGroup(), copyWidgetConfig(), readResourceGroup(), and ~OThemeBase().

OThemePixmap* OThemeBase::pbPixmaps[WIDGETS] [private]
 

Pixmapped borders

Definition at line 563 of file othemebase.h.

Referenced by applyResourceGroup(), borderPixmap(), copyWidgetConfig(), generateBorderPix(), readResourceGroup(), scaleBorder(), and ~OThemeBase().

int OThemeBase::pbWidth[WIDGETS] [private]
 

Pixmapped border widths

Definition at line 559 of file othemebase.h.

Referenced by applyResourceGroup(), borderWidth(), copyWidgetConfig(), decoWidth(), generateBorderPix(), highlightWidth(), pixBorderWidth(), and scaleBorder().

OThemePixmap* OThemeBase::pixmaps[WIDGETS] [private]
 

The theme pixmaps. Many of these may be NULL if no pixmap is specified. There may also be duplicate pixmap pointers if more than one widget uses the same tiled pixmap. If a pixmap is tiled, it is kept here and this acts as a cache. Otherwise this will hold whatever the last scaled pixmap was.

Definition at line 510 of file othemebase.h.

Referenced by applyResourceGroup(), blend(), copyWidgetConfig(), gradient(), isPixmap(), pixmapBrush(), readConfig(), readResourceGroup(), scale(), uncached(), and ~OThemeBase().

bool OThemeBase::roundedButton [private]
 

Definition at line 491 of file othemebase.h.

Referenced by applyResourceGroup(), readConfig(), and roundButton().

bool OThemeBase::roundedCombo [private]
 

Definition at line 491 of file othemebase.h.

Referenced by applyResourceGroup(), readConfig(), and roundComboBox().

bool OThemeBase::roundedSlider [private]
 

Definition at line 491 of file othemebase.h.

Referenced by applyResourceGroup(), readConfig(), and roundSlider().

int OThemeBase::sbExtent [private]
 

Definition at line 489 of file othemebase.h.

Referenced by applyMiscResourceGroup(), and getSBExtent().

SButton OThemeBase::sbPlacement [private]
 

Definition at line 481 of file othemebase.h.

Referenced by applyMiscResourceGroup(), and scrollBarLayout().

ScaleHint OThemeBase::scaleHints[WIDGETS] [private]
 

The scale hints for pixmaps and gradients.

Definition at line 527 of file othemebase.h.

Referenced by applyResourceGroup(), copyWidgetConfig(), readResourceGroup(), scale(), and scaleHint().

QColor OThemeBase::selbgcolor [protected]
 

Definition at line 500 of file othemebase.h.

Referenced by applyMiscResourceGroup(), and OThemeStyle::polish().

QColor OThemeBase::selfgcolor [protected]
 

Definition at line 500 of file othemebase.h.

Referenced by applyMiscResourceGroup(), and OThemeStyle::polish().

ShadeStyle OThemeBase::shading [private]
 

Definition at line 483 of file othemebase.h.

Referenced by applyMiscResourceGroup(), makeColorGroup(), and shade().

int OThemeBase::sliderLen [private]
 

Definition at line 486 of file othemebase.h.

Referenced by sliderButtonLength().

bool OThemeBase::smallGroove [private]
 

Definition at line 490 of file othemebase.h.

int OThemeBase::splitterWidth [private]
 

Definition at line 487 of file othemebase.h.

Referenced by applyResourceGroup(), readConfig(), and splitWidth().

QColor OThemeBase::winbgcolor [protected]
 

Definition at line 500 of file othemebase.h.

Referenced by applyMiscResourceGroup(), and OThemeStyle::polish().

QColor OThemeBase::winfgcolor [protected]
 

Definition at line 500 of file othemebase.h.

Referenced by applyMiscResourceGroup(), and OThemeStyle::polish().


The documentation for this class was generated from the following files:
Generated on Sat Nov 5 17:43:39 2005 for OPIE by  doxygen 1.4.2