Main Page | Class List | File List | Class Members | File Members | Related Pages

Config Class Reference

#include <config.h>

List of all members.

Public Slots

void save ()
void cancel ()
void topValueChanged (int)
void leftValueChanged (int)
void rightValueChanged (int)
void bottomValueChanged (int)
void gripWidthChanged (int)
void titleActiveClicked ()
void leftActiveClicked ()
void rightActiveClicked ()
void bottomActiveClicked ()
void gripActiveClicked ()
void textActiveClicked ()
void titleInactiveClicked ()
void leftInactiveClicked ()
void rightInactiveClicked ()
void botttomInactiveClicked ()
void gripInactiveClicked ()
void textInactiveClicked ()

Public Member Functions

 Config (QWidget *parent=0, const char *name=0, WFlags fl=0)
 ~Config ()

Private Member Functions

bool readConfigData ()
void setDefaultData ()
QPalette makePalette (QColor)
void drawWindows ()

Private Attributes

bool haveConfigData
QColor titleActBase
QColor titleInactBase
QColor leftActBase
QColor leftInactBase
QColor rightActBase
QColor rightInactBase
QColor bottomActBase
QColor bottomInactBase
QColor gripActBase
QColor gripInactBase
QColor textActColor
QColor textInactColor
QPalette titleActPalette
QPalette titleInactPalette
QPalette leftActPalette
QPalette leftInactPalette
QPalette rightActPalette
QPalette rightInactPalette
QPalette bottomActPalette
QPalette bottomInactPalette
QPalette gripActPalette
QPalette gripInactPalette
int titleHeight
int leftWidth
int rightWidth
int bottomHeight
int gripWidth


Detailed Description

This is where the look of the decoration is defined. The utility tries to read an existing configuration file - which is an XML file in fact. If no such file can be found ( or read ) it is assumed that this is a first time run of the configurator. For this case some funny defaults are supplied, in the expectation, that the user will be able to change them.
Todo:
later this will be the place to select a default theme and tweak it, if necessary.


Constructor & Destructor Documentation

Config::Config QWidget *  parent = 0,
const char *  name = 0,
WFlags  fl = 0
 

The c'tor - as always - sets up some ( reasonable ) defaults.

Here is the call graph for this function:

Config::~Config  ) 
 


Member Function Documentation

void Config::bottomActiveClicked  )  [slot]
 

void Config::bottomValueChanged int   )  [slot]
 

void Config::botttomInactiveClicked  )  [slot]
 

void Config::cancel  )  [slot]
 

void Config::drawWindows  )  [private]
 

Draws the example windows with the new set geometry.

void Config::gripActiveClicked  )  [slot]
 

void Config::gripInactiveClicked  )  [slot]
 

void Config::gripWidthChanged int   )  [slot]
 

void Config::leftActiveClicked  )  [slot]
 

void Config::leftInactiveClicked  )  [slot]
 

void Config::leftValueChanged int   )  [slot]
 

QPalette Config::makePalette QColor  c  )  [private]
 

We make our own Palette here. This is useful, because Qt will decide if it is active or not and set the colorgroup accordingly. In some cases this may not be what we want, consequently we build palettes with the same QColorGroup for active and inactive ( and disabled, for good measure ) state. This way it is up to ourselfes to decide how a window decoration should look like according to it's state as we see it.
This Funktion takes QColor c as it's sole argument, which is treated as the background color. From this a QColorGroup is created, which will be applied to the resulting QPalette.

bool Config::readConfigData  )  [private]
 

Here the user defined default configuration data are read.

See also:
setDefaultData()

void Config::rightActiveClicked  )  [slot]
 

void Config::rightInactiveClicked  )  [slot]
 

void Config::rightValueChanged int   )  [slot]
 

void Config::save  )  [slot]
 

void Config::setDefaultData  )  [private]
 

This gives us a set of ( usable ) default data. They are meant to be tweaked by the user later, if this is the first time this program is used. The data will be overwritten if a config file exists and can be read.
Only the base colors for every used palette are set here, the really used palettes are derived from them. This saves us some work with the config file: It is significantly smaller.

See also:
readConfigData()

void Config::textActiveClicked  )  [slot]
 

void Config::textInactiveClicked  )  [slot]
 

void Config::titleActiveClicked  )  [slot]
 

void Config::titleInactiveClicked  )  [slot]
 

void Config::topValueChanged int   )  [slot]
 


Member Data Documentation

QColor Config::bottomActBase [private]
 

QPalette Config::bottomActPalette [private]
 

int Config::bottomHeight [private]
 

QColor Config::bottomInactBase [private]
 

QPalette Config::bottomInactPalette [private]
 

QColor Config::gripActBase [private]
 

QPalette Config::gripActPalette [private]
 

QColor Config::gripInactBase [private]
 

QPalette Config::gripInactPalette [private]
 

int Config::gripWidth [private]
 

bool Config::haveConfigData [private]
 

QColor Config::leftActBase [private]
 

QPalette Config::leftActPalette [private]
 

QColor Config::leftInactBase [private]
 

QPalette Config::leftInactPalette [private]
 

int Config::leftWidth [private]
 

QColor Config::rightActBase [private]
 

QPalette Config::rightActPalette [private]
 

QColor Config::rightInactBase [private]
 

QPalette Config::rightInactPalette [private]
 

int Config::rightWidth [private]
 

QColor Config::textActColor [private]
 

QColor Config::textInactColor [private]
 

QColor Config::titleActBase [private]
 

QPalette Config::titleActPalette [private]
 

int Config::titleHeight [private]
 

QColor Config::titleInactBase [private]
 

QPalette Config::titleInactPalette [private]
 


The documentation for this class was generated from the following files:
Go back to rwm - the window manager's - Home page.
created 6 Jun 2005 for rwmconfig 0.2 by Rolf C. Rönnau using doxygen 1.4.2