Class overview   Alphabetical list   Annotated list   Header Files   Member List   Examples  

QdbtSection Class Reference


The QdbtSection widget represents a section of the header of a QdbtTabular widget. More...

#include <qdbtsection.h>

Inherits QPushButton.

List of all member functions.

Public Members

Signals

Protected Members


Detailed Description

The QdbtSection widget represents a section of the header of a QdbtTabular widget.

The header of a QdbtTabular widget is divided into a number of sections, one for each column.

Each section is a specialized QdbtSection widget. Its position and size are controlled by the QdbtTabular widget.

By inheriting this widget you can change the look and feel of the individual sections.

You can both read and change the widget that is used for the section of a column by using QdbtTabular::section() and QdbtTabular::changeSection().

Examples: Example1, Example3 and Example4.


Member Function Documentation

QdbtSection::QdbtSection(QWidget *parent, const char *name)

Constructs a section widget with no label.

Warning: The parent argument must be a QdbtTabular widget or a widget that inherits from QdbtTabular, otherwise a run time error will be generated.

QdbtSection::QdbtSection(const char *text, QWidget *parent, const char *name)

Constructs a section widget with the label text.

Warning: The parent argument must be a QdbtTabular widget or a widget that inherits from QdbtTabular, otherwise a run time error will be generated.

QdbtSection::~QdbtSection()

Destroys the section widget.

int QdbtSection::widthHint() const [virtual]

Returns the preferret width of the widget. That is not the actual width, but the width that is needed to fully show the section.

You probably want to reimplement this if you are inheriting from this widget.

See also: heightHint(), width()

int QdbtSection::heightHint() const [virtual]

Returns the preferret width of the widget. That is not the actual width, but the width that is needed to fully show the section.

You probably want to reimplement this if you are inheriting from this widget.

See also: widthHint(), height()

void QdbtSection::setAlignment(int align)

Set the alignment of the text to align. Possible values are AlignLeft, AlignRight and AlignCenter.

See also: alignment()

Examples: Example1 and Example4.

int QdbtSection::alignment() const

Returns the alignment that is currently used.

See also: setAlignment()

void QdbtSection::setResizable(bool enable)

Determines whether or not this section can be resized by the user.

If enable is FALSE the section cannot be resized.

if enable is TRUE the section can be resized.

void QdbtSection::isResizable() const

Returns TRUE if the section is currently resizable and FALSE otherwise.

void QdbtSection::clicked(QdbtSection *) [signal]

For internal use only.

Examples: Example4.

void QdbtSection::setResizable(QdbtSection *,bool) [signal]

For internal use only.

Examples: Example4.

void QdbtSection::resizeEvent(QResizeEvent *) [protected, virtual]

The resize event, currently doesn't do anything

Reimplemented from QWidget.

void QdbtSection::drawButton(QPainter *p) [protected, virtual]

This function can be reimplemented to customize the way the section is drawn.

See also: drawButtonLabel

Reimplemented from QPushButton.

void QdbtSection::drawButtonLabel(QPainter *p) [protected, virtual]

This function can be reimplemented to customize the way the label of the section is drawn. (this is the section excluding the border)

See also: drawButton

Reimplemented from QPushButton.

void QdbtSection::mousePressEvent(QMouseEvent *e) [protected, virtual]

The mouse press event.

Warning: If you plan to reimplement this function please make sure you call QdbtSection::mousePressEvent(e) within the body of the function. Otherwise the resizing of the buttons will not work anymore.

Reimplemented from QWidget.

void QdbtSection::mouseReleaseEvent(QMouseEvent *e) [protected, virtual]

The mouse release event.

Reimplemented from QWidget.

void QdbtSection::mouseMoveEvent(QMouseEvent *e) [protected, virtual]

The mouse move event.

Warning: If you plan to reimplement this function please make sure you call QdbtSection::mouseMoveEvent(e) within the body of the function. Otherwise the resizing of the buttons will not work anymore.

Reimplemented from QWidget.

void QdbtSection::keyPressEvent(QKeyEvent *e) [protected, virtual]

Reimplements the keyboard events. Left and Right cursor key events are passed on to the parent. Other events (space) are processed just as QPushButton.

Reimplemented from QWidget.


This file was generated from the following files:
Generated at 21:52, 1998/03/04 for QdbtTabular by doxygen  written by Dimitri van Heesch, © 1997-1998