qheader.3qt
来自「tmark1.11:用于生成QT/EMBEDDED应用工程的Markfile文件」· 3QT 代码 · 共 252 行
3QT
252 行
.TH QHeader 3qt "6 July 1999" "Troll Tech AS" \" -*- nroff -*-.\" Copyright 1992-1999 Troll Tech AS. All rights reserved. See the.\" license file included in the distribution for a complete license.\" statement..\".ad l.nh.SH NAMEQHeader \- Table header.SH SYNOPSIS.br.PP\fC#include <qheader.h>\fR.PPInherits QWidget..PP.SS "Public Members".in +1c.ti -1c.BI "\fBQHeader\fR ( QWidget * " "parent" "=0, const char * " "name" "=0 )".br.ti -1c.BI "\fBQHeader\fR ( int, QWidget * " "parent" "=0, const char * " "name" "=0 )".br.ti -1c.BI "\fB~QHeader\fR ()".br.ti -1c.BI "int \fBaddLabel\fR ( const QString &, int " "size" " = -1 )".br.ti -1c.BI "int \fBaddLabel\fR ( const QIconSet &, const QString &, int " "size" " = -1 )".br.ti -1c.BI "virtual void \fBsetLabel\fR ( int, const QString &, int " "size" " = -1 )".br.ti -1c.BI "virtual void \fBsetLabel\fR ( int, const QIconSet &, const QString &, int " "size" " = -1 )".br.ti -1c.BI "QString \fBlabel\fR ( int ) const".br.ti -1c.BI "QIconSet* \fBiconSet\fR ( int ) const".br.ti -1c.BI "virtual void \fBsetOrientation\fR ( Orientation )".br.ti -1c.BI "Orientation \fBorientation\fR () const".br.ti -1c.BI "virtual void \fBsetTracking\fR ( bool enable )".br.ti -1c.BI "bool \fBtracking\fR () const".br.ti -1c.BI "virtual void \fBsetClickEnabled\fR ( bool, int " "logIdx" " = -1 )".br.ti -1c.BI "virtual void \fBsetResizeEnabled\fR ( bool, int " "logIdx" " = -1 )".br.ti -1c.BI "virtual void \fBsetMovingEnabled\fR ( bool )".br.ti -1c.BI "virtual void \fBsetCellSize\fR ( int " "i" ", int s )".br.ti -1c.BI "int \fBcellSize\fR ( int i ) const".br.ti -1c.BI "int \fBcellPos\fR ( int i ) const".br.ti -1c.BI "int \fBcellAt\fR ( int i ) const".br.ti -1c.BI "int \fBcount\fR () const".br.ti -1c.BI "int \fBoffset\fR () const".br.ti -1c.BI "virtual QSize \fBsizeHint\fR () const".br.ti -1c.BI "virtual QSizePolicy \fBsizePolicy\fR () const".br.ti -1c.BI "int \fBmapToLogical\fR ( int ) const".br.ti -1c.BI "int \fBmapToActual\fR ( int ) const".br.ti -1c.BI "virtual void \fBmoveCell\fR ( int " "fromIdx" ", int toIdx )".br.in -1c.SS "Public Slots".in +1c.ti -1c.BI "virtual void \fBsetOffset\fR ( int )".br.in -1c.SS "Signals".in +1c.ti -1c.BI "void \fBsectionClicked\fR ( int )".br.ti -1c.BI "void \fBsizeChange\fR ( int " "section" ", int " "oldSize" ", int newSize )".br.ti -1c.BI "void \fBmoved\fR ( int " "from" ", int to )".br.in -1c.SS "Protected Members".in +1c.ti -1c.BI "virtual void \fBpaintEvent\fR ( QPaintEvent * )".br.ti -1c.BI "QRect \fBsRect\fR ( int i )".br.ti -1c.BI "void \fBpaintSection\fR ( QPainter *, int, QRect )".br.ti -1c.BI "virtual void \fBmousePressEvent\fR ( QMouseEvent * )".br.ti -1c.BI "virtual void \fBmouseReleaseEvent\fR ( QMouseEvent * )".br.ti -1c.BI "virtual void \fBmouseMoveEvent\fR ( QMouseEvent * )".br.in -1c.SH DESCRIPTIONThe QHeader class provides a table header..PPThis 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)..PPThis class can be used without a table view, if you need to control table-like structures..PP<img src=qheader-m.png> <img src=qheader-w.png>.PPSee also: QListView, QTableView and Microsoft Style Guide.SH MEMBER FUNCTION DOCUMENTATION.SH "QHeader::QHeader ( QWidget * parent=0, const char * name=0 )"Constructs a horizontal header..PPThe \fIparent\fR and \fIname\fR arguments are sent to the QWidget constructor..SH "QHeader::QHeader ( int n, QWidget * parent=0, const char * name=0 )"Constructs a horizontal header with \fIn\fR sections..PPThe \fIparent\fR and \fIname\fR arguments are sent to the QWidget constructor..SH "QHeader::~QHeader ()"Destroys the header..SH "int QHeader::addLabel ( const QIconSet & iconset, const QString & s, int size = -1 )"Adds a new section, with icon set \fIiconset\fR and label text \fIs.\fR Returns the index. If \fIsize\fR is non-negative, the section width is set to \fIsize,\fR otherwise a size currently sufficient for the label is used..SH "int QHeader::addLabel ( const QString & s, int size = -1 )"Adds a new section, with label text \fIs.\fR Returns the index. If \fIsize\fR is non-negative, the section width is set to \fIsize,\fR otherwise a size currently sufficient for the label text is used..SH "int QHeader::cellAt ( int c ) const"Returns the actual index of the section at widget position \fIc,\fR or -1 if outside..SH "int QHeader::cellPos ( int i ) const"Returns the position in pixels of section \fIi\fR of the header. The position is measured from the start of the first header. \fIi\fR is the actual index..SH "int QHeader::cellSize ( int i ) const"Returns the size in pixels of section \fIi\fR of the header. \fIi\fR is the actual index..SH "int QHeader::count () const"Returns the number of sections in the header..SH "QIconSet * QHeader::iconSet ( int i ) const"Returns the icon set set on logical section \fIi.\fR.SH "QString QHeader::label ( int i ) const"Returns the text set on logical section \fIi.\fR.SH "int QHeader::mapToActual ( int l ) const"Translates from logical index \fIl\fR to actual index. Returns -1 if \fIl\fR is outside the legal range..SH "int QHeader::mapToLogical ( int a ) const"Translates from actual index \fIa\fR to logical index. Returns -1 if \fIa\fR is outside the legal range..SH "void QHeader::moved ( int from, int to ) \fC[signal]\fR"This signal is emitted when the user has moved column \fIfrom\fR to position \fIto.\fR.SH "int QHeader::offset () const"int QHeader::offset() const Returns the leftmost (or uppermost for vertical headers) visible pixel..SH "Orientation QHeader::orientation () const"Returns \fCHorizontal\fR if the header is horizontal, \fCVertical\fR if the header is vertical..SH "void QHeader::paintEvent ( QPaintEvent * e ) \fC[virtual protected]\fR"Paints the header..PPReimplemented from QWidget..SH "void QHeader::paintSection ( QPainter * p, int id, QRect fr ) \fC[protected]\fR"Paints section \fIid\fR of the header, inside rectangle \fIfr\fR in widget coordinates..SH "QRect QHeader::sRect ( int i ) \fC[protected]\fR"Returns the rectangle covered by actual section \fIi.\fR.SH "void QHeader::sectionClicked ( int logical ) \fC[signal]\fR"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..SH "void QHeader::setCellSize ( int i, int s ) \fC[virtual]\fR"Sets the size of logical cell \fIi\fR to \fIs\fR pixels..PP\fBWarning:\fR does not repaint or send out signals at present..SH "void QHeader::setClickEnabled ( bool enable, int i = -1 ) \fC[virtual]\fR"Enable clicking in logical column \fIi\fR if \fIenable\fR is TRUE, disable otherwise. If \fIi\fR is negative (as it is by default), clicking is enabled/disabled for all columns..PPIf enabled, the sectionClicked() signal is emitted when the user clicks..PPSee also: setMovingEnabled() and setResizeEnabled()..SH "void QHeader::setLabel ( int i, const QString & s, int size = -1 ) \fC[virtual]\fR"Sets the text on logical section \fIi\fR to \fIs.\fR If the section does not exist, nothing happens. If \fIsize\fR is non-negative, the section width is set to \fIsize.\fR.PPAny icon set that has been defined for this section remains unchanged..SH "void QHeader::setMovingEnabled ( bool enable ) \fC[virtual]\fR"Enable the user to exchange columns if \fIenable\fR is TRUE, disable otherwise..PPSee also: setClickEnabled() and setResizeEnabled()..SH "void QHeader::setOffset ( int x ) \fC[virtual slot]\fR"Scrolls the header such that \fIx\fR becomes the leftmost (or uppermost for vertical headers) visible pixel..SH "void QHeader::setOrientation ( Orientation orientation ) \fC[virtual]\fR"Sets the header orientation. The \fIorientation\fR must be QHeader::Vertical or QHeader::Horizontal..PPWhen adding labels without the size parameter, setOrientation should be called first, otherwise labels will be sized incorrectly..PPSee also: orientation()..SH "void QHeader::setResizeEnabled ( bool enable, int i = -1 ) \fC[virtual]\fR"Enable user resizing of logical column \fIi\fR if \fIenable\fR is TRUE, disable otherwise. If \fIi\fR is negative (as it is by default), resizing is enabled/disabled for all columns..PPSee also: setMovingEnabled() and setClickEnabled()..SH "void QHeader::setTracking ( bool enable ) \fC[virtual]\fR"Sets tracking if \fIenable\fR 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..PPSee also: tracking()..SH "void QHeader::sizeChange ( int section, int oldSize, int newSize ) \fC[signal]\fR"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. \fIsection\fR is the logical section resized..SH "QSize QHeader::sizeHint () const \fC[virtual]\fR"Returns the recommended size of the QHeader..PPReimplemented from QWidget..SH "QSizePolicy QHeader::sizePolicy () const \fC[virtual]\fR"A horizontal header may stretch horizontally, but is fixed vertically..PPReimplemented from QWidget..SH "bool QHeader::tracking () const"Returns TRUE if tracking is on, FALSE otherwise..PPSee also: setTracking()..SH "SEE ALSO".BR http://www.troll.no/qt/qheader.html.SH COPYRIGHTCopyright 1992-1999 Troll Tech AS. See the license file included inthe distribution for a complete license statement..SH AUTHORGenerated automatically from the source code.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?