⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 qheader.3qt

📁 Qt/Embedded是一个多平台的C++图形用户界面应用程序框架
💻 3QT
📖 第 1 页 / 共 2 页
字号:
.PPReturns the index at which the section is displayed, which contains \fIpos\fR in widget coordinates, or -1 if \fIpos\fR is outside the header sections..SH "int QHeader::cellPos ( int i ) const"\fBThis function is obsolete.\fR It is provided to keep old source working, and will probably be removed in a future version of Qt. We strongly advise against using it in new code..PPUse sectionPos() instead!.PPReturns the position in pixels of the section which is displayed at the index \fIi.\fR The position is measured from the start of the header..SH "int QHeader::cellSize ( int i ) const"\fBThis function is obsolete.\fR It is provided to keep old source working, and will probably be removed in a future version of Qt. We strongly advise against using it in new code..PPUse sectionSize() instead!.PPReturns the size in pixels of the section which is displayed at the index \fIi.\fR.SH "void QHeader::clicked ( int section ) \fC[signal]\fR"This signal is emitted when the user clicked onto the section \fIsection.\fR.PPSee also pressed() and released()..SH "int QHeader::count () const"Returns the number of sections in the header..SH "QIconSet * QHeader::iconSet ( int section ) const"Returns the icon set set on section \fIsection.\fR.SH "void QHeader::indexChange ( int section, int fromIndex, int toIndex ) \fC[signal]\fR"This signal is emitted if the user moved the section \fIsection,\fR which was displayed at the index \fIfromIndex\fR to the new index \fItoIndex.\fR.SH "bool QHeader::isClickEnabled ( int section = -1 ) const"Returns whether the section \fIsection\fR is clickable or not. If \fIsection\fR is out of range (negative or larger than count() - 1), TRUE is returned if all sections are clickable, else FALSE..PPSee also setClickEnabled()..SH "bool QHeader::isMovingEnabled () const"Returns TRUE if the sections of the header can be moved around be the user, otherwise FALSE..PPSee also setMovingEnabled()..SH "bool QHeader::isResizeEnabled ( int section = -1 ) const"Returns whether the section \fIsection\fR is resizeable or not. If \fIsection\fR is out of range (negative or larger than count() - 1), TRUE is returned if all sections are resizeable, else FALSE..PPSee also setResizeEnabled()..SH "QString QHeader::label ( int section ) const"Returns the text set on section \fIsection.\fR.SH "int QHeader::mapToActual ( int l ) const"\fBThis function is obsolete.\fR It is provided to keep old source working, and will probably be removed in a future version of Qt. We strongly advise against using it in new code..PPUse mapToIndex() instead!.PPTranslates from logical index \fIl\fR to actual index (index, at which the section \fIl\fR is displayed) . Returns -1 if \fIl\fR is outside the legal range..PPSee also mapToLogical()..SH "int QHeader::mapToIndex ( int section ) const"Returns the index at which the section \fIsection\fR is currently displayed..SH "int QHeader::mapToLogical ( int a ) const"\fBThis function is obsolete.\fR It is provided to keep old source working, and will probably be removed in a future version of Qt. We strongly advise against using it in new code..PPUse mapToSection() instead!.PPTranslates from actual index \fIa\fR (index at which the section is displayed) to logical index of the section. Returns -1 if \fIa\fR is outside the legal range..PPSee also mapToActual()..SH "int QHeader::mapToSection ( int index ) const"Returns the section which is displayed at the index \fIindex.\fR.SH "void QHeader::mouseMoveEvent ( QMouseEvent * e ) \fC[virtual protected]\fR"Reimplemented for internal reasons; the API is not affected..PPReimplemented from QWidget..SH "void QHeader::mousePressEvent ( QMouseEvent * e ) \fC[virtual protected]\fR"Reimplemented for internal reasons; the API is not affected..PPReimplemented from QWidget..SH "void QHeader::mouseReleaseEvent ( QMouseEvent * e ) \fC[virtual protected]\fR"Reimplemented for internal reasons; the API is not affected..PPReimplemented from QWidget..SH "void QHeader::moveCell ( int fromIdx, int toIdx ) \fC[virtual]\fR"\fBThis function is obsolete.\fR It is provided to keep old source working, and will probably be removed in a future version of Qt. We strongly advise against using it in new code..PPUse moveSection() instead!.PPMoves the section which is currently displayed at the index \fIfromIndex\fR to the index \fItoIdx.\fR.SH "void QHeader::moveSection ( int section, int toIndex )"Moves the section \fIsection\fR to be displayed at the index \fItoIndex.\fR.SH "void QHeader::moved ( int fromIndex, int toIndex ) \fC[signal]\fR"\fBThis function is obsolete.\fR It is provided to keep old source working, and will probably be removed in a future version of Qt. We strongly advise against using it in new code..PPUse indexChange() instead!.PPThis signal is emitted when the user has moved the section which is displayed at the index \fIfromIndex\fR to the index \fItoIndex.\fR.SH "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"Reimplemented for internal reasons; the API is not affected..PPReimplemented from QWidget..SH "void QHeader::paintSection ( QPainter * p, int index, QRect fr ) \fC[protected]\fR"Paints actual section \fIindex\fR of the header, inside rectangle \fIfr\fR in widget coordinates..PPCalls paintSectionLabel()..SH "void QHeader::paintSectionLabel ( QPainter * p, int index, const QRect & fr ) \fC[protected]\fR"Paints the label of actual section \fIindex\fR of the header, inside rectangle \fIfr\fR in widget coordinates..PPCalled by paintSection()..SH "void QHeader::pressed ( int section ) \fC[signal]\fR"This signal is emitted when the user presses section \fIsection\fR down..PPSee also released()..SH "void QHeader::released ( int section ) \fC[signal]\fR"This signal is emitted when section \fIsection\fR is released..PPSee also pressed()..SH "void QHeader::removeLabel ( int section )"Removes the section \fIsection.\fR.SH "void QHeader::resizeSection ( int section, int s )"Resizes the section \fIsection\fR to \fIs\fR pixels..SH "QRect QHeader::sRect ( int index ) \fC[protected]\fR"Returns the rectangle covered by index \fIindex.\fR.SH "int QHeader::sectionAt ( int pos ) const"Returns the \fIsection\fR which contains the position \fIpos\fR given in pixels..PPSee also offset()..SH "void QHeader::sectionClicked ( int index ) \fC[signal]\fR"\fBThis function is obsolete.\fR It is provided to keep old source working, and will probably be removed in a future version of Qt. We strongly advise against using it in new code..PPUse clicked() instead!.PPThis signal is emitted when a part of the header is clicked. \fIindex\fR is the index at which the section is displayed..PPIn a list view, this signal would typically be connected to a slot which sorts the specified column (or row)..SH "int QHeader::sectionPos ( int section ) const"Returns the position (in pixels) at which the \fIsection\fR starts..PPSee also offset()..SH "int QHeader::sectionSize ( int section ) const"Returns the size of the \fIsection\fR in pixels..SH "void QHeader::setCellSize ( int section, int s ) \fC[virtual]\fR"\fBThis function is obsolete.\fR It is provided to keep old source working, and will probably be removed in a future version of Qt. We strongly advise against using it in new code..PPUse resizeSection() instead!.PPSets the size of the section \fIsection\fR to \fIs\fR pixels..PP\fBWarning:\fR does not repaint or send out signals..SH "void QHeader::setClickEnabled ( bool enable, int section = -1 ) \fC[virtual]\fR"Enable clicking in section \fIsection\fR if \fIenable\fR is TRUE, disable otherwise. If \fIsection\fR is negative (as it is by default), clicking is enabled/disabled for all current and new sections..PPIf enabled, the clicked() signal is emitted when the user clicks..PPSee also setMovingEnabled() and setResizeEnabled()..SH "void QHeader::setLabel ( int section, const QIconSet & iconset, const QString & s, int size = -1 ) \fC[virtual]\fR"Sets the icon on the section \fIsection\fR to \fIiconset\fR and the text 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::setLabel ( int section, const QString & s, int size = -1 ) \fC[virtual]\fR"Sets the text on section \fIsection\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 sections if \fIenable\fR is TRUE, disable otherwise..PPIf you enable moving here, the indexChange() signal is emitted if the user moves a section..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 section = -1 ) \fC[virtual]\fR"Enable user resizing of the section \fIsection\fR if \fIenable\fR is TRUE, disable otherwise. If \fIsection\fR is negative (as it is by default), resizing is enabled/disabled for all current and new sections..PPIf the user resizes a section (because this feature enabled it), a sizeChange() signal is emitted..PPSee also setMovingEnabled() and setClickEnabled()..SH "void QHeader::setSortIndicator ( int section, bool increasing = TRUE )"As often the QHeader is used together with a list widget, QHeader can indicate a sort order. This is done using an arrow at the right edge of a section which points up or down. \fIsection\fR specifies in which section this arrow should be drawn, and \fIincreasing,\fR if the arrow should point to the bottom (TRUE) or the the top (FALSE). If \fIsection\fR is -1, no arrow is drawn..PPSee also QListView::setShowSortIndicator()..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::setUpdatesEnabled ( bool enable ) \fC[virtual slot]\fR"reimp..PPReimplemented from QWidget..SH "void QHeader::showEvent ( QShowEvent * e ) \fC[virtual protected]\fR"Reimplemented for internal reasons; the API is not affected..PPReimplemented from QWidget..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 a \fIsection\fR of the header from \fIoldSize\fR to \fInewSize.\fR This signal is typically connected to a slot that repaints the table..SH "QSize QHeader::sizeHint () const \fC[virtual]\fR"Reimplemented for internal reasons; the API is not affected..PPReimplemented from QWidget..SH "QSizePolicy QHeader::sizePolicy () const \fC[virtual]\fR"Reimplemented for internal reasons; the API is not affected..PPReimplemented from QWidget..SH "bool QHeader::tracking () const"Returns TRUE if tracking is on, FALSE otherwise..PPSee also  setTracking()..SH "SEE ALSO".BR http://doc.trolltech.com/qheader.html.SH COPYRIGHTCopyright 1992-2000 Trolltech AS, http://www.trolltech.com/.  See thelicense file included in the distribution for a complete licensestatement..SH AUTHORGenerated automatically from the source code.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -