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

HistoryFrame Class Reference

#include <historyframe.h>

Collaboration diagram for HistoryFrame:

Collaboration graph
[legend]
List of all members.

Public Slots

void useColor ()
void delColor ()

Signals

void historySelected (const rColor &)
void deleteColor (HistoryFrame *)

Public Member Functions

 HistoryFrame (QWidget *parent=0, const char *name=0, WFlags f=0)
void setColor (const rColor &)
const rColorgetColor ()

Protected Member Functions

void mouseReleaseEvent (QMouseEvent *)
void resizeEvent (QResizeEvent *)

Private Attributes

rColor curColor
QSize pmSize
QPixmap txt
QPixmap fg
QPixmap bg
QPopupMenu * popper

Detailed Description

Instances of this class hold user defined rColors. They are displayed using the current settings for hue, saturation, value, and alpha. For the latter to be visible, the color is painted on a white background containing the greek letters "αΑα". The frames may be left clicked in order to emit the signal historySelected( curColor ). The same can be done with the right button down and selecting the "use color" item of the popup menu. The "delete color" entry of the same menu emits the signal deleteColor( this ).


Constructor & Destructor Documentation

HistoryFrame::HistoryFrame QWidget *  parent = 0,
const char *  name = 0,
WFlags  f = 0
 

The c'tor creates the frame and sets the current color to opaque white. The popup menu is initialized and connected here too.

Here is the call graph for this function:


Member Function Documentation

void HistoryFrame::delColor  )  [inline, slot]
 

void HistoryFrame::deleteColor HistoryFrame  )  [signal]
 

const rColor& HistoryFrame::getColor  )  [inline]
 

void HistoryFrame::historySelected const rColor  )  [signal]
 

void HistoryFrame::mouseReleaseEvent QMouseEvent *  e  )  [protected]
 

Reimplemented from QFrame. We assume here that a mouse button must have been clicked: Why else could we get a release event? Anyway, if it was the left button coming up we emit the signal historySelected(). This will work on every instance, allowing the selection of opaque white.

The right button however is ignored if the current color is opaque white. If it isn't, we will pop up the popper and let it take over from here.

void HistoryFrame::resizeEvent QResizeEvent *   )  [protected]
 

The resizeEvent is reimplemented from QFrame. This is necessary to adapt the sizes of our pixmaps to the new geometry. To conclude this, we do a setColor() to enforce a repaint of the frame contents.

Here is the call graph for this function:

void HistoryFrame::setColor const rColor c  ) 
 

Sets the current color to c. The background pixmap is freshly painted and applied to the widget.

Here is the call graph for this function:

void HistoryFrame::useColor  )  [inline, slot]
 


Member Data Documentation

QPixmap HistoryFrame::bg [private]
 

rColor HistoryFrame::curColor [private]
 

QPixmap HistoryFrame::fg [private]
 

QSize HistoryFrame::pmSize [private]
 

QPopupMenu* HistoryFrame::popper [private]
 

QPixmap HistoryFrame::txt [private]
 


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