The QdbtSection widget represents a section of the header of a QdbtTabular widget. More...
#include <qdbtsection.h>
Inherits QPushButton.
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.
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.
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.
Destroys the section widget.
[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()
[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()
Set the alignment of the text to align.
Possible values are AlignLeft
, AlignRight
and AlignCenter
.
See also: alignment()
Examples: Example1 and Example4.
Returns the alignment that is currently used.
See also: setAlignment()
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.
Returns TRUE
if the section is currently
resizable and FALSE
otherwise.
[signal]
For internal use only.
Examples: Example4.
[signal]
For internal use only.
Examples: Example4.
[protected, virtual]
The resize event, currently doesn't do anything
Reimplemented from QWidget.
[protected, virtual]
This function can be reimplemented to customize the way the section is drawn.
See also: drawButtonLabel
Reimplemented from QPushButton.
[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.
[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.
[protected, virtual]
The mouse release event.
Reimplemented from QWidget.
[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.
[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.