Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

QToggleButton Class Reference

Togglebutton with two different strings or pixmaps. More...

#include <QToggleButton.h>

Inheritance diagram for QToggleButton::

QPushButton QButton QWidget QObject QPaintDevice Qt List of all members.

Public Methods

 QToggleButton (QWidget *parent=0, const char *name=0)
 QToggleButton (const char *text1, const char *text2, QWidget *parent=0, const char *name=0)
 ~QToggleButton ()
void setText (const QString &)
void setPixmap (const QPixmap &)
void setText (const QString &up_text, const QString &down_text="")
void setPixmap (const QPixmap &up_pixmap, const QPixmap &down_pixmap)

Private Slots

void togglePixmap (bool on)

Private Attributes

QString toggled_btext
QPixmaptoggled_bpixmap

Detailed Description

Togglebutton with two different strings or pixmaps.

This class implements a togglebutton with two different strings or pixmaps which will be exchanged when the button is toggled.


Constructor & Destructor Documentation

QToggleButton::QToggleButton QWidget *   parent = 0,
const char *   name = 0
 

Default constructor.

QToggleButton::QToggleButton const char *   text1,
const char *   text2,
QWidget *   parent = 0,
const char *   name = 0
 

The same as above but you can also pass the textes with it.

QToggleButton::~QToggleButton  
 

Default destructor.


Member Function Documentation

void QToggleButton::setPixmap const QPixmap &   up_pixmap,
const QPixmap &   down_pixmap
 

Sets the pixmap which is shown when pressed or raised.

void QToggleButton::setPixmap const QPixmap &   [inline]
 

void QToggleButton::setText const QString &   up_text,
const QString &   down_text = ""
 

Sets the text which is shown when pressed or raised.

void QToggleButton::setText const QString &   [inline]
 

void QToggleButton::togglePixmap bool   fOn [private, slot]
 


Member Data Documentation

QPixmap* QToggleButton::toggled_bpixmap [private]
 

QString QToggleButton::toggled_btext [private]
 


The documentation for this class was generated from the following files:
Generated at Thu Oct 4 17:17:33 2001 for QGLViewer by doxygen1.2.10 written by Dimitri van Heesch, © 1997-2001