The QHeader class provides a table header. More...
#include <qheader.h>
Inherits QTableView.
This is a table heading of the type used in a list view. It gives the user the opportunity to resize and move the columns (or rows for vertical headings).
This class can be used without a table view, if you need to control table-like structures.
See also: QListView, QTableView and Microsoft Style Guide
Constructs a horizontal header.
The parent and name arguments are sent to the QWidget constructor.
Constructs a horizontal header with n sections.
The parent and name arguments are sent to the QWidget constructor.
Destroys the header.
Adds a new section, with label text s. Returns the index. If size is non-negative, the section width is set to size, otherwise a size currently sufficient for the label text is used.
Returns the actual index of the section at position c, or -1 if outside.
[virtual protected]
Reimplemented for internal reasons; the API is not affected.
Reimplemented from QTableView.
Returns the position in pixels of section i of the header. i is the actual index.
Returns the size in pixels of section i of the header. i is the actual index.
[virtual protected]
Reimplemented for internal reasons; the API is not affected.
Reimplemented from QTableView.
Returns the number of sections in the header.
Returns the text set on logical section i.
Translates from logical index l to actual index. Returns -1 if l is outside the legal range.
Translates from actual index a to logical index. Returns -1 if a is outside the legal range.
[signal]
This signal is emitted when the user has moved column from to position to.
int QHeader::offset() const Returns the leftmost (or uppermost for vertical headers) visible pixel.
Returns Horizontal
if the header is horizontal, Vertical
if
the header is vertical.
[virtual protected]
paints a section of the header.
Reimplemented from QTableView.
[virtual protected]
Handles resize events.
Reimplemented from QWidget.
[protected]
Returns the rectangle covered by actual section i.
[signal]
This signal is emitted when a part of the header is clicked. In a list view, this signal would typically be connected to a slot which sorts the specified column.
Sets the size of logical cell i to s pixels.
Warning: does not repaint or send out signals at present.
Enable clicking in column i if enable is TRUE, disable otherwise. If i is negative, clicking is enabled/disabled for all columns.
If enabled, the sectionClicked() signal is emitted when the user clicks.
See also: setMovingEnabled() and setResizeEnabled().
Sets the text on logical section i to s. If the section does not exist, nothing happens. If size is non-negative, the section width is set to size.
Enable the user to exchange columns if enable is TRUE, disable otherwise.
See also: setClickEnabled() and setResizeEnabled().
[slot]
Scrolls the header such that x becomes the leftmost (or uppermost for vertical headers) visible pixel.
Sets the header orientation. The orientation must be QHeader::Vertical or QHeader::Horizontal.
When adding labels without the size parameter, setOrientation should be called first, otherwise labels will be sized incorrectly.
See also: orientation().
Enable user resizing of column i if enable is TRUE, disable otherwise. If i is negative, resizing is enabled/disabled for all columns.
See also: setMovingEnabled() and setClickEnabled().
Sets tracking if enable is TRUE, otherwise turns off tracking. If tracking is on, the sizeChange() signal is emitted continuously while the mouse is moved, otherwise it is only emitted when the mouse button is released.
See also: tracking().
[virtual protected]
sets up the painter.
Reimplemented from QTableView.
[signal]
This signal is emitted when the user has changed the size of some of the parts of the header. This signal is typically connected to a slot that repaints the table. section is the logical section resized.
[virtual]
Returns the recommended size of the QHeader.
Reimplemented from QWidget.
Returns TRUE if tracking is on, FALSE otherwise.
See also: setTracking().
Search the documentation, FAQ, qt-interest archive and more (uses
www.troll.no):
This file is part of the Qt toolkit, copyright © 1995-98 Troll Tech, all rights reserved.
It was generated from the following files:
Copyright © 1998 Troll Tech | Trademarks | Qt version 1.42
|