class pControl : public QWidget

Control panel object

Inheritance:

pControl


Public Fields

bool hasTitlebar
PixButton* iconifyb
bool isLocked
PixButton* loadejectb
QCheckBox* lockb
PixButton* powerb
QCheckBox* titleb

Public Methods

void changeFont( QFont& f )
void changePalette( QPalette& p )
void lockThis(bool)
[signal]
inline void moveAll( int x, int y )
inline void moveAll( QPoint pos )
void moving(QPoint)
[signal]
pControl( QWidget *parent, float scale=1.0, bool useEject=true )
void pressed(QPoint)
[signal]
inline void setLockedColor( QColor& c )
inline void setUnlockedColor( QColor& c )
void titlebarOn(bool)
[signal]
inline QPoint xEndPt(void)
inline QPoint yEndPt(void)
~pControl( void )

Documentation

This is a QWidget containing buttons that control program operations. There are the obvious buttons: " power" to exit the program, and "iconify" to iconify it. There are some not-so-obvious ones, too.

There is a button for ejecting a CD or loading things. It can have either an "eject" icon on it, or a folder. That way, the button can truly do double-duty and not confuse the end-user.

There is a "lock" check button, and a lock-light. When the lock button is checked, the lock-light changes color to indicate that the program is now "locked". [What it means for the program to be "locked" really depends on implementation external to this widget, but it should disable the power button and the load/eject button at the very least.]

There is also a check button for toggling the presence of the main window's title bar, permitting the user to change the look and feel of the main window on-the-fly.

  
  ----------------------------------------------------------
  ----------------------------------------------------------
  

bool hasTitlebar

bool isLocked
State flags. isLocked is set when lockb is checked. hasTitlebar is set when titleb is checked.

PixButton* iconifyb

PixButton* loadejectb

PixButton* powerb
The PixButtons that control iconification of the entire program, loading/ejecting a CD or audio playlist, and the power button, repsectively.

QCheckBox* lockb
The lock button. Changes the state of the lock light and the value of the isLocked flag accordingly, emitting the lockThis signal with the current state. It should be used to deactivate powerb and loadejectb.

QCheckBox* titleb
Changes the value of the hasTitlebar flag and emits the titlebarOn signal with the current state. It should be used to remove or reinstate any title bar and menu on the main program window. That way, the program can have a sleek, thin border to it and look less like a computer program and more like an audio device.

pControl( QWidget *parent, float scale=1.0, bool useEject=true )
Class Constructor
Parameters:
parent - The parent of this object
scale - Determines the size of the \Re{PixButton}s in this object. It's a multiplicative factor, so scale=2 means double the default size, and so on.
useEject - When true, tells pControl that it should use an "eject" icon on the load/eject button. When false, pControl will use a folder icon.

~pControl( void )
Class Destructor

inline void moveAll( int x, int y )
Moves the object, performing some internal bookkeeping at the same time.

inline void moveAll( QPoint pos )
Overloaded version.

inline QPoint xEndPt(void)
Returns:
The point in the x-direction where this widget ends.

inline QPoint yEndPt(void)
Returns:
The point in the y-direction where this widget ends.

inline void setLockedColor( QColor& c )
Changes the color used by the lock-light to indicate a "locked" state.

inline void setUnlockedColor( QColor& c )
Changes the color used by the lock-light to indicate an "unlocked" state.

void changePalette( QPalette& p )
Changes the palette of this object to p.

void changeFont( QFont& f )
Changes the font used on the button labels.

void lockThis(bool)
Signal

Emitted when the lockb is checked.

void titlebarOn(bool)
Signal

Emitted when the titleb is checked.

void pressed(QPoint)
Signal

Emitted when a mouse press-event occurs anywhere else on the panel outside of one of the widgets. Contains the current mouse position, in global screen coordinates.

void moving(QPoint)
Signal

Emitted when a mouse move-event occurs anywhere else on the panel outside of one of the widgets. Contains the current mouse position, in global screen coordinates.


This class has no child classes.
See Also:
PixButton, PixData

alphabetic index hierarchy of classes


Copyright 1997 by John Weiss [John.Weiss@colorado.edu] "generated by doc++"?! More like mangled ...

generated by doc++