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

📄 qstyle.3qt

📁 Trolltech公司发布的基于C++图形开发环境
💻 3QT
📖 第 1 页 / 共 3 页
字号:
.SH "void QStyle::drawScrollBarControls ( QPainter *, const QScrollBar *, int sliderStart, uint controls, uint activeControl ) \fC[virtual]\fR"Draws the given scrollbar. Used internally by QScrollbar..PPThe controls are either ADD_LINE, SUB_LINE, ADD_PAGE, SUB_PAGE, FIRST, LAST, SLIDER or NONE.PPControls is a combination of these, activeControl is the control currently pressed down..PPReimplemented in QSGIStyle, QPlatinumStyle, QMotifStyle, QWindowsStyle, QInterlaceStyle and QMotifPlusStyle..SH "void QStyle::drawSeparator ( QPainter * p, int x1, int y1, int x2, int y2, const QColorGroup & g, bool sunken = TRUE, int lineWidth = 1, int midLineWidth = 0 ) \fC[virtual]\fR"Draws a line to separate parts of the visual interface..PPReimplemented in QSGIStyle..SH "void QStyle::drawSlider ( QPainter * p, int x, int y, int w, int h, const QColorGroup & g, Orientation, bool tickAbove, bool tickBelow ) \fC[virtual]\fR"Draws a slider..SH "void QStyle::drawSliderGroove ( QPainter * p, int x, int y, int w, int h, const QColorGroup & g, QCOORD c, Orientation ) \fC[virtual]\fR"Draws a slider groove..SH "void QStyle::drawSliderGrooveMask ( QPainter * p, int x, int y, int w, int h, QCOORD c, Orientation ) \fC[virtual]\fR"Draws the mask of a slider groove..SH "void QStyle::drawSliderMask ( QPainter * p, int x, int y, int w, int h, Orientation, bool, bool ) \fC[virtual]\fR"Draws the mask of a slider..SH "void QStyle::drawSplitter ( QPainter * p, int x, int y, int w, int h, const QColorGroup & g, Orientation orient ) \fC[virtual]\fR"Draws a splitter handle in the rectangle described by \fIx, y, w, h\fR using painter \fIp\fR and color group \fIg.\fR The orientation is \fIorient.\fR.PPSee also splitterWidth()..SH "void QStyle::drawToolBarHandle ( QPainter * p, const QRect & r, Qt::Orientation orientation, bool highlight, const QColorGroup & cg, bool drawBorder = FALSE )"Draws the handle for the toolbar using the painter \fIp\fR with the toolbar coordinates \fIr. orientation\fR gives the orientation of the toolbar, and the handle is drawn \fIhighlighted\fR if \fIhighlight\fR is TRUE, else not. \fIcg\fR is the QColorGroup of the toolbar and if \fIdrawBorder\fR is TRUE a border around the handle may be drawn..PPWARNING: Because of binary compatibility this method is NOT virtual, so reimplementing it in Qt 2.x doesn't make sense. In the next major release this method will become virtual!..SH "void QStyle::drawToolButton ( QPainter * p, int x, int y, int w, int h, const QColorGroup & g, bool sunken = FALSE, const QBrush * fill = 0 ) \fC[virtual]\fR"Draws a press-sensitive shape in the style of a toolbar button.PPThe default implementation calls drawBevelButton().PPSee also drawBevelButton()..SH "void QStyle::drawToolButton ( QToolButton *, QPainter * )"This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts..PPDraws a toolbutton. This function will normally call drawToolButton() with arguments according to the current state of the toolbutton..PPSee also QToolButton::drawButton()..SH "QSize QStyle::exclusiveIndicatorSize () const \fC[virtual]\fR"Returns the size of the mark used to indicate exclusive choice..PPReimplemented in QMotifStyle, QMotifPlusStyle, QInterlaceStyle, QPlatinumStyle, QSGIStyle and QWindowsStyle..SH "QBrush QStyle::extendedBrush ( ExtendedColor extendedcolor ) const"Returns the extended brush..PPNot available prior to Qt 2.3.8..SH "int QStyle::extraPopupMenuItemWidth ( bool checkable, int maxpmw, QMenuItem * mi, const QFontMetrics & fm ) \fC[virtual]\fR"Returns the extra width of a menu item \fImi,\fR that means all extra pixels besides the space the menu item text requires. \fIcheckable\fR defines, whether the menu has a check column. \fImaxpmw\fR is the maximum width of all iconsets within a check column and \fIfm\fR defines the font metrics used to draw the label. This is particularly useful to calculate a suitable size for a submenu indicator or the column separation, including the tab column used to indicate item accelerators..PPReimplemented in QPlatinumStyle, QWindowsStyle and QMotifStyle..SH "void QStyle::getButtonShift ( int & x, int & y ) \fC[virtual]\fR"Some GUI styles shift the contents of a button when the button is down. The default implementation returns 0 for both x and y..PPReimplemented in QMotifPlusStyle, QCommonStyle, QWindowsStyle and QPlatinumStyle..SH "GUIStyle QStyle::guiStyle () const"Returns an indicator to the additional "feel" component of a style. Current supported values are Qt::WindowsStyle and Qt::MotifStyle..SH "QSize QStyle::indicatorSize () const \fC[virtual]\fR"Returns the size of the mark used to indicate choice..PPReimplemented in QSGIStyle, QInterlaceStyle, QWindowsStyle, QMotifPlusStyle, QMotifStyle and QPlatinumStyle..SH "QRect QStyle::itemRect ( QPainter * p, int x, int y, int w, int h, int flags, bool enabled, const QPixmap * pixmap, const QString & text, int len=-1 ) \fC[virtual]\fR"Returns the appropriate area within a rectangle in which to draw text or a pixmap..SH "int QStyle::maximumSliderDragDistance () const \fC[virtual]\fR"Some feels require the scrollbar or other sliders to jump back to the original position when the mouse pointer is too far away while dragging..PPThis behavior can be customized with this function. The default is -1 (no jump back) while Windows requires 20 (weird jump back)..PPReimplemented in QPlatinumStyle, QWindowsStyle and QCommonStyle..SH "int QStyle::menuButtonIndicatorWidth ( int h )"Returns the width of the menu button indicator for a given button height \fIh.\fR.SH "int QStyle::pixelMetric ( PixelMetric pixelmetric ) const"Returns the pixelmetric..PPNot available prior to Qt 2.3.8..SH "void QStyle::polish ( QApplication * ) \fC[virtual]\fR"Late initialization of the QApplication object..PPSee also unPolish(QApplication*)..SH "void QStyle::polish ( QPalette & ) \fC[virtual]\fR"The style may have certain requirements for color palettes. In this function it has the chance to change the palette according to these requirements..PPSee also QPalette and QApplication::setPalette()..SH "void QStyle::polish ( QWidget * ) \fC[virtual]\fR"Initializes the appearance of a widget..PPThis function is called for every widget, after it has been fully created just \fIbefore\fR it is shown the very first time..PPReasonable actions in this function might be to set the of the widget and the background pixmap, for example. Unreasonable use would be setting the geometry!.PPThe QWidget::inherits() function may provide enough information to allow class-specific customizations. But be careful not to hard-code things too much, as new QStyle sub-classes will be expected to work reasonably with all current \fIand future\fR widgets..PPSee also unPolish(QWidget*)..PPReimplemented in QSGIStyle, QInterlaceStyle, QMotifStyle and QMotifPlusStyle..SH "void QStyle::polishPopupMenu ( QPopupMenu * p ) \fC[virtual]\fR"Polishes the popup menu \fIp\fR according to the GUI style. This is usually means setting the mouse tracking ( QPopupMenu::setMouseTracking() ) and whether the menu is checkable by default ( QPopupMenu::setCheckable() )..PPReimplemented in QMotifPlusStyle, QPlatinumStyle, QWindowsStyle and QMotifStyle..SH "int QStyle::popupMenuItemHeight ( bool checkable, QMenuItem * mi, const QFontMetrics & fm ) \fC[virtual]\fR"Returns the height of the menu item \fImi. checkable\fR defines, whether the menu has a check column, \fIfm\fR defines the font metrics used to draw the label..PPReimplemented in QMotifStyle, QWindowsStyle, QPlatinumStyle and QSGIStyle..SH "int QStyle::popupSubmenuIndicatorWidth ( const QFontMetrics & fm ) \fC[virtual]\fR"Returns the width of the arrow indicating popup submenus. \fIfm\fR defines the font metrics used to draw the popup menu..PPReimplemented in QCommonStyle..SH "QRect QStyle::pushButtonContentsRect ( QPushButton * btn )"Auxiliary function to return the contents rectangle of a push button \fIbtn.\fR The contents rectangle is the space available for the button label..PPThe result depends on the look (buttonRect() ), whether the button needs space for a default indicator (buttonDefaultIndicatorWidth()) and whether it is pushed down and needs to be shifted (getButtonShift())..SH "QSize QStyle::scrollBarExtent ()"Returns a QSize containing the width of a vertical scrollbar and the height of a horizontal scrollbar in this style..PPIn this version of the Qt library, subclasses must call setScrollBarExtent() to change the extent of scrollbars. In a future version of Qt, this function will become virtual..SH "void QStyle::scrollBarMetrics ( const QScrollBar *, int &, int &, int &, int & ) \fC[virtual]\fR"Returns the metrics of the passed scrollbar: sliderMin, sliderMax, sliderLength and buttonDim..PPReimplemented in QMotifPlusStyle, QMotifStyle, QInterlaceStyle, QPlatinumStyle, QSGIStyle and QWindowsStyle..SH "QStyle::ScrollControl QStyle::scrollBarPointOver( const QScrollBar * sb, int sliderStart, const QPoint & p )"Returns the scrollbar control under the passed point..SH "void QStyle::setButtonDefaultIndicatorWidth ( int w ) \fC[protected]\fR"Sets the width of the default-button indicator frame..PPIn a future version of the Qt library, this function will be removed and subclasses will be able to reimplement buttonDefaultIndicatorWidth()..SH "void QStyle::setButtonMargin ( int m ) \fC[protected]\fR"Sets the button margin..PPIn a future version of the Qt library, this function may be removed and subclasses will be able to reimplement buttonMargin()..SH "void QStyle::setExtendedBrush ( ExtendedColor extendedcolor, const QBrush & value )"Globally sets a extendedcolor to value..PPNot available prior to Qt 2.3.8..SH "void QStyle::setPixelMetric ( PixelMetric pixelmetric, int value ) \fC[protected]\fR"Globally sets a pixelmetric to value..PPNot available prior to Qt 2.3.8..SH "void QStyle::setScrollBarExtent ( int width, int height=-1 ) \fC[protected]\fR"Sets the width of a vertical scrollbar in this style to \fIwidth\fR and the height of a horizontal scrollbar to \fIheight.\fR If \fIheight\fR is negative, \fIwidth\fR will be used for both extents. By default both extents are 16 pixels..PPIn a future version of the Qt library, this function will be removed and subclasses will be able to reimplement scrollBarExtent()..SH "void QStyle::setSliderThickness ( int t ) \fC[protected]\fR"Sets the slider thickness..PPIn a future version of the Qt library, this function may be removed and subclasses will be able to reimplement sliderThickness()..SH "int QStyle::sliderLength () const \fC[virtual]\fR"The length of a slider..PPReimplemented in QMotifStyle, QPlatinumStyle and QWindowsStyle..SH "int QStyle::sliderThickness () const"Returns the thickness of a slider in this style. The thickness is dimension perpendicular to the slider motion (e.g. the height for a horizontal slider)..SH "int QStyle::splitterWidth () const \fC[virtual]\fR"Returns the width of a splitter handle..PPSee also drawSplitter()..PPReimplemented in QInterlaceStyle, QMotifStyle, QSGIStyle and QWindowsStyle..SH "int QStyle::toolBarHandleExtend () 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..SH "int QStyle::toolBarHandleExtent () const"Returns the extent (height or width depending on the orientation) which a toolbar handle has..PPWARNING: Because of binary compatibility this method is NOT virtual, so reimplementing it in Qt 2.x doesn't make sense. In the next major release this method will become virtual!..SH "QRect QStyle::toolButtonRect ( int x, int y, int w, int h )"Returns the rectangle available for contents in a tool button. Usually this is the entire rectangle minus the border, but it may also be smaller when you think about rounded buttons..PPThe default implementation returns bevelButtonRect().PPSee also drawToolButton()..SH "void QStyle::unPolish ( QApplication * ) \fC[virtual]\fR"Redo the application polish.PPSee also polish(QApplication*)..SH "void QStyle::unPolish ( QWidget * ) \fC[virtual]\fR"Undoes the initialization of a widget's appearance..PPThis function is the counterpart to polish. Is is called for every polished widget when the style is dynamically changed. The former style has to un-polish its settings before the new style can polish them again..PPSee also polish(QWidget*)..PPReimplemented in QMotifPlusStyle, QSGIStyle and QInterlaceStyle..SH "SEE ALSO".BR http://doc.trolltech.com/qstyle.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 make our job much simpler. Thank you..PIn case of content or formattting problems with this manual page, pleasereport them to.BR qt-bugs@trolltech.com .Please include the name of the manual page (qstyle.3qt) and the Qtversion (2.3.10).

⌨️ 快捷键说明

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