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

📄 qheader.3qt

📁 Linux下的基于X11的图形开发环境。
💻 3QT
📖 第 1 页 / 共 2 页
字号:
Use sectionAt() instead..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. We strongly advise against using it in new code..PPUse sectionPos() instead..PPReturns the position in pixels of the section that 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. We strongly advise against using it in new code..PPUse sectionSize() instead..PPReturns the size in pixels of the section that is displayed at the index \fIi\fR..SH "void QHeader::clicked ( int section )\fC [signal]\fR"If isClickEnabled() is TRUE, this signal is emitted when the user clicks section \fIsection\fR..PPSee also pressed() and released()..SH "int QHeader::count () const"Returns the number of sections in the header. See the "count" property for details..SH "int QHeader::headerWidth () const"Returns the total width of all the header columns..SH "QIconSet * QHeader::iconSet ( int section ) const"Returns the icon set for section \fIsection\fR. If the section does not exist, 0 is returned..SH "void QHeader::indexChange ( int section, int fromIndex, int toIndex )\fC [signal]\fR"This signal is emitted when the user moves section \fIsection\fR from index position \fIfromIndex\fR, to index position \fItoIndex\fR..SH "bool QHeader::isClickEnabled ( int section = -1 ) const"Returns TRUE if section \fIsection\fR is clickable; otherwise returns FALSE..PPIf \fIsection\fR is out of range (negative or larger than count() - 1): returns TRUE if all sections are clickable; otherwise returns FALSE..PPSee also setClickEnabled()..SH "bool QHeader::isMovingEnabled () const"Returns TRUE if the header sections can be moved; otherwise returns FALSE. See the "moving" property for details..SH "bool QHeader::isResizeEnabled ( int section = -1 ) const"Returns TRUE if section \fIsection\fR is resizeable; otherwise returns FALSE..PPIf \fIsection\fR is -1 then this function applies to all sections, i.e. returns TRUE if all sections are resizeable; otherwise returns FALSE..PPSee also setResizeEnabled()..SH "bool QHeader::isStretchEnabled () const"Returns TRUE if the header sections always take up the full width (or height) of the header; otherwise returns FALSE. See the "stretching" property for details..SH "bool QHeader::isStretchEnabled ( int section ) const"This is an overloaded member function, provided for convenience. It behaves essentially like the above function..PPReturns TRUE if section \fIsection\fR will resize to take up the full width (or height) of the header; otherwise returns FALSE. If at least one section has stretch enabled the sections will always take up the full width of the header..PPSee also setStretchEnabled()..SH "QString QHeader::label ( int section ) const"Returns the text for section \fIsection\fR. If the section does not exist, a QString::null is returned..SH "int QHeader::mapToActual ( int l ) const"\fBThis function is obsolete.\fR It is provided to keep old source working. 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 position at which section \fIsection\fR is displayed..PPFor more explanation see the mapTo example..SH "int QHeader::mapToLogical ( int a ) const"\fBThis function is obsolete.\fR It is provided to keep old source working. 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 number of the section that is displayed at index position \fIindex\fR..PPFor more explanation see the mapTo example..SH "void QHeader::moveCell ( int fromIdx, int toIdx )\fC [virtual]\fR"\fBThis function is obsolete.\fR It is provided to keep old source working. We strongly advise against using it in new code..PPUse moveSection() instead..PPMoves the section that is currently displayed at index \fIfromIdx\fR to index \fItoIdx\fR..SH "void QHeader::moveSection ( int section, int toIndex )"Moves section \fIsection\fR to index position \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. 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 header's left-most (or top-most) visible pixel. See the "offset" property for details..SH "Orientation QHeader::orientation () const"Returns the header's orientation. See the "orientation" property for details..SH "void QHeader::paintSection ( QPainter * p, int index, const QRect & fr )\fC [virtual protected]\fR"Paints the section at position \fIindex\fR, inside rectangle \fIfr\fR (which uses widget coordinates) using painter \fIp\fR..PPCalls paintSectionLabel()..SH "void QHeader::paintSectionLabel ( QPainter * p, int index, const QRect & fr )\fC [virtual protected]\fR"Paints the label of the section at position \fIindex\fR, inside rectangle \fIfr\fR (which uses widget coordinates) using painter \fIp\fR..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 section \fIsection\fR. If the section does not exist, nothing happens..SH "void QHeader::resizeSection ( int section, int s )"Resizes section \fIsection\fR to \fIs\fR pixels wide (or high)..SH "QRect QHeader::sRect ( int index )\fC [protected]\fR"Returns the rectangle covered by the section at index \fIindex\fR..SH "int QHeader::sectionAt ( int pos ) const"Returns the index of the section which contains the position \fIpos\fR given in pixels from the left (or top)..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. 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 that 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 "QRect QHeader::sectionRect ( int section ) const"Returns the rectangle covered by section \fIsection\fR..SH "int QHeader::sectionSize ( int section ) const"Returns the width (or height) 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. 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"If \fIenable\fR is TRUE, any clicks on section \fIsection\fR will result in clicked() signals being emitted; otherwise the section will ignore clicks..PPIf \fIsection\fR is -1 (the default) then the \fIenable\fR value is set for all existing sections and will be applied to any new sections that are added..PPSee also moving and setResizeEnabled()..SH "void QHeader::setLabel ( int section, const QString & s, int size = -1 )\fC [virtual]\fR"Sets the text of section \fIsection\fR to \fIs\fR. The section's width is set to \fIsize\fR if \fIsize\fR >= 0; otherwise it is left unchanged. Any icon set that has been set for this section remains unchanged..PPIf the section does not exist, nothing happens..PPExamples:.)l chart/setdataform.cpp and table/small-table-demo/main.cpp..SH "void QHeader::setLabel ( int section, const QIconSet & iconset, const QString & s, int size = -1 )\fC [virtual]\fR"This is an overloaded member function, provided for convenience. It behaves essentially like the above function..PPSets the icon for section \fIsection\fR to \fIiconset\fR and the text to \fIs\fR. The section's width is set to \fIsize\fR if \fIsize\fR >= 0; otherwise it is left unchanged..PPIf the section does not exist, nothing happens..SH "void QHeader::setMovingEnabled ( bool )\fC [virtual]\fR"Sets whether the header sections can be moved. See the "moving" property for details..SH "void QHeader::setOffset ( int pos )\fC [virtual slot]\fR"Sets the header's left-most (or top-most) visible pixel to \fIpos\fR. See the "offset" property for details..SH "void QHeader::setOrientation ( Orientation )\fC [virtual]\fR"Sets the header's orientation. See the "orientation" property for details..SH "void QHeader::setResizeEnabled ( bool enable, int section = -1 )\fC [virtual]\fR"If \fIenable\fR is TRUE the user may resize section \fIsection\fR; otherwise the section may not be manually resized..PPIf \fIsection\fR is negative (the default) then the \fIenable\fR value is set for all existing sections and will be applied to any new sections that are added. Example:.PP.nf.br    // Allow resizing of all current and future sections.br    header->setResizeEnabled(TRUE);.br    // Disable resizing of section 3, (the fourth section added).br    header->setResizeEnabled(FALSE, 3);.br.fi.PPIf the user resizes a section, a sizeChange() signal is emitted..PPSee also moving, setClickEnabled(), and tracking..SH "void QHeader::setSortIndicator ( int section, bool increasing = TRUE )"Because the QHeader is often used in conjunction with table and list widgets, QHeader can indicate a sort order. This is achieved by displaying an arrow at the right edge of a section..PPIf \fIincreasing\fR is TRUE (the default) the arrow will point downwards; otherwise it will point upwards..PPOnly one section can show a sort indicator at any one time. If you don't want any section to show a sort indicator pass a \fIsection\fR number of -1..SH "void QHeader::setStretchEnabled ( bool b, int section )\fC [virtual]\fR"If \fIb\fR is TRUE, section \fIsection\fR will be resized when the header is resized, so that the sections take up the full width (or height for vertical headers) of the header; otherwise section \fIsection\fR will be set to be unstretchable and will not resize when the header is resized..PPIf \fIsection\fR is -1, and if \fIb\fR is TRUE, then all sections will be resized equally when the header is resized so that they take up the full width (or height for vertical headers) of the header; otherwise all the sections will be set to be unstretchable and will not resize when the header is resized..PPSee also adjustHeaderSize()..SH "void QHeader::setStretchEnabled ( bool b )"Sets whether the header sections always take up the full width (or height) of the header to \fIb\fR. See the "stretching" property for details..SH "void QHeader::setTracking ( bool enable )\fC [virtual]\fR"Sets whether the sizeChange() signal is emitted continuously to \fIenable\fR. See the "tracking" property for details..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 a \fIsection\fR from \fIoldSize\fR to \fInewSize\fR. This signal is typically connected to a slot that repaints the table or list that contains the header..SH "bool QHeader::tracking () const"Returns TRUE if the sizeChange() signal is emitted continuously; otherwise returns FALSE. See the "tracking" property for details..SS "Property Documentation".SH "int count"This property holds the number of sections in the header..PPGet this property's value with count()..SH "bool moving"This property holds whether the header sections can be moved..PPIf this property is TRUE (the default) the user can move sections. If the user moves a section the indexChange() signal is emitted..PPSee also setClickEnabled() and setResizeEnabled()..PPSet this property's value with setMovingEnabled() and get this property's value with isMovingEnabled()..SH "int offset"This property holds the header's left-most (or top-most) visible pixel..PPSetting this property will scroll the header so that \fIoffset\fR becomes the left-most (or top-most for vertical headers) visible pixel..PPSet this property's value with setOffset() and get this property's value with offset()..SH "Orientation orientation"This property holds the header's orientation..PPThe orientation is either Vertical or Horizontal (the default)..PPCall setOrientation() before adding labels if you don't provide a size parameter otherwise the sizes will be incorrect..PPSet this property's value with setOrientation() and get this property's value with orientation()..SH "bool stretching"This property holds whether the header sections always take up the full width (or height) of the header..PPSet this property's value with setStretchEnabled() and get this property's value with isStretchEnabled()..SH "bool tracking"This property holds whether the sizeChange() signal is emitted continuously..PPIf tracking is on, the sizeChange() signal is emitted continuously while the mouse is moved (i.e. when the header is resized), otherwise it is only emitted when the mouse button is released at the end of resizing..PPTracking defaults to FALSE..PPSet this property's value with setTracking() and get this property's value with tracking()..SH "SEE ALSO".BR http://doc.trolltech.com/qheader.html.BR http://www.trolltech.com/faq/tech.html.SH COPYRIGHTCopyright 1992-2001 Trolltech AS, http://www.trolltech.com.  See thelicense file included in the distribution for a complete licensestatement..SH AUTHORGenerated automatically from the source code..SH BUGSIf you find a bug in Qt, please report it as described in.BR http://doc.trolltech.com/bughowto.html .Good bug reports help us to help you. Thank you..PThe definitive Qt documentation is provided in HTML format; it islocated at $QTDIR/doc/html and can be read using Qt Assistant or witha web browser. This man page is provided as a convenience for thoseusers who prefer man pages, although this format is not officiallysupported by Trolltech. .PIf you find errors in this manual page, please report them to.BR qt-bugs@trolltech.com .Please include the name of the manual page (qheader.3qt) and the Qtversion (3.1.1).

⌨️ 快捷键说明

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