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

📄 qstyle.3qt

📁 Trolltech公司发布的基于C++图形开发环境
💻 3QT
📖 第 1 页 / 共 3 页
字号:
.BI "void \fBdrawMenuBarItem\fR ( QPainter * " "p" ", int " "x" ", int " "y" ", int " "w" ", int " "h" ", QMenuItem * " "mi" ", QColorGroup & " "g" ", bool " "enabled" ", bool active ) ".br.ti -1c.BI "QSize \fBscrollBarExtent\fR () ".br.ti -1c.BI "int \fBbuttonDefaultIndicatorWidth\fR () const".br.ti -1c.BI "int \fBbuttonMargin\fR () const".br.ti -1c.BI "int \fBtoolBarHandleExtent\fR () const".br.ti -1c.BI "int toolBarHandleExtend () const \fI(obsolete)\fR".br.ti -1c.BI "int \fBsliderThickness\fR () const".br.ti -1c.BI "void \fBdrawToolBarHandle\fR ( QPainter * " "p" ", const QRect & " "r" ", Qt::Orientation " "orientation" ", bool " "highlight" ", const QColorGroup & " "cg" ", bool " "drawBorder" " = FALSE ) ".br.ti -1c.BI "enum \fBPixelMetric\fR { ComboBoxFocusMargin, ComboBoxTextHMargin, ComboBoxTextVMargin, ComboBoxTextVMarginExtra, LineEditTextHMargin, LineEditTextVMargin, SpinBoxButtonScale, SpinBoxHMargin, SpinBoxVMargin, SpinBoxHExtraScale, IdealHeightLimit, IdealHeight, CheckBoxGap, TabHMargin, LastPixelMetric }".br.ti -1c.BI "int \fBpixelMetric\fR ( PixelMetric ) const".br.ti -1c.BI "enum \fBExtendedColor\fR { AlternateBase, LastExtendedColor }".br.ti -1c.BI "QBrush \fBextendedBrush\fR ( ExtendedColor ) const".br.ti -1c.BI "void \fBsetExtendedBrush\fR ( ExtendedColor, const QBrush & ) ".br.in -1c.SS "Protected Members".in +1c.ti -1c.BI "void \fBsetScrollBarExtent\fR ( int " "w" ", int " "h" "=-1 ) ".br.ti -1c.BI "void \fBsetButtonDefaultIndicatorWidth\fR ( int w ) ".br.ti -1c.BI "void \fBsetButtonMargin\fR ( int w ) ".br.ti -1c.BI "void \fBsetSliderThickness\fR ( int t ) ".br.ti -1c.BI "void \fBsetPixelMetric\fR ( PixelMetric, int ) ".br.in -1c.SH DESCRIPTIONEncapsulates common Look and Feel of a GUI..PPWhile it is not possible to fully enumerate the look of graphic elements and the feel of widgets in a GUI, a large number of elements are common to many widgets. The QStyle class allows the look of these elements to be modified across all widgets that use the QStyle methods. It also provides two feel options - Motif and Windows..PPIn previous versions of Qt, the look and feel option for widgets was specified by a single value - the GUIStyle. Starting with Qt 2.0, this notion has been expanded to allow the look to be specified by virtual drawing functions..PPDerived classes may reimplement some or all of the drawing functions to modify the look of all widgets which utilize those functions..PPExamples:.(lthemes/main.cpp.)l.SS "Member Type Documentation".SH "QStyle::ScrollControl"This enum type defines :.TP\fCAddLine\fR - control to scroll one line down, usually an arrow button.TP\fCSubLine\fR - control to scroll one line up, usually an arrow button.TP\fCAddPage\fR - control to scroll one page down.TP\fCSubPage\fR - control to scroll one page up.TP\fCFirst\fR - control to scroll to top of the range.TP\fCLast\fR - control to scroll to bottom of the range.TP\fCSlider\fR - the slider control.TP\fCNoScroll\fR - null value, indicates none of the visible controls.SH MEMBER FUNCTION DOCUMENTATION.SH "QStyle::~QStyle () \fC[virtual]\fR"Destructs the style..SH "QRect QStyle::bevelButtonRect ( int x, int y, int w, int h )"Returns the rectangle available for contents in a bevel button. Usually this is the entire rectangle minus the border, but it may also be smaller when you think about rounded buttons..PPSee also drawBevelButton()..SH "int QStyle::buttonDefaultIndicatorWidth () const"Returns the width of the default-button indicator frame..PPIn this version of the Qt library, subclasses must call setButtonDefaultIndicatorWidth() to change the frame width. In a future version of Qt, this function will become virtual..SH "int QStyle::buttonMargin () const"Returns the amount of whitespace between pushbutton labels and the frame in this style..SH "QRect QStyle::buttonRect ( int x, int y, int w, int h ) \fC[virtual]\fR"Returns the rectangle available for contents in a push button. Usually this is the entire rectangle minus the border, but it may also be smaller when you think about rounded buttons..PPSee also drawButton()..PPReimplemented in QPlatinumStyle..SH "QRect QStyle::comboButtonFocusRect ( int x, int y, int w, int h ) \fC[virtual]\fR"Returns the rectangle used to draw the the focus rectangle in a combo box..PPReimplemented in QPlatinumStyle, QWindowsStyle, QSGIStyle, QCommonStyle, QMotifStyle and QMotifPlusStyle..SH "QRect QStyle::comboButtonRect ( int x, int y, int w, int h ) \fC[virtual]\fR"Returns the rectangle available for contents in a combo box button. Usually this is the entire rectangle without the nifty menu indicator, but it may also be smaller when you think about rounded buttons..PPReimplemented in QInterlaceStyle, QWindowsStyle, QSGIStyle, QMotifPlusStyle, QPlatinumStyle, QMotifStyle and QCommonStyle..SH "int QStyle::defaultFrameWidth () const \fC[virtual]\fR"The default frame width, usually 2..PPReimplemented in QCommonStyle, QCDEStyle, QMotifPlusStyle and QSGIStyle..SH "void QStyle::drawArrow ( QPainter * p, Qt::ArrowType type, bool down, int x, int y, int w, int h, const QColorGroup & g, bool enabled, const QBrush * fill = 0 ) \fC[virtual]\fR"Draws an arrow to indicate direction. Used for example in scrollbars and spin-boxes..SH "void QStyle::drawBevelButton ( QPainter *, int, int, int, int, const QColorGroup &, bool = FALSE, const QBrush * = 0 ) \fC[virtual]\fR"Draws a press-sensitive shape in the style of a bevel button..PPSee also bevelButtonRect()..PPReimplemented in QWindowsStyle, QMotifPlusStyle, QMotifStyle, QInterlaceStyle, QSGIStyle and QPlatinumStyle..SH "void QStyle::drawButton ( QPainter *, int, int, int, int, const QColorGroup &, bool = FALSE, const QBrush * = 0 ) \fC[virtual]\fR"Draws a press-sensitive shape in the style of a full featured push button.PPSee also buttonRect()..PPReimplemented in QSGIStyle, QPlatinumStyle, QMotifStyle, QWindowsStyle, QMotifPlusStyle and QInterlaceStyle..SH "void QStyle::drawButtonMask ( QPainter * p, int x, int y, int w, int h ) \fC[virtual]\fR"Draw the mask of a pushbutton. Useful if a rounded pushbuttons needs to be transparent because the style uses a fancy background pixmap..PPSee also drawButtonMask()..SH "void QStyle::drawCheckMark ( QPainter * p, int x, int y, int w, int h, const QColorGroup & g, bool act, bool dis ) \fC[virtual]\fR"Draws a checkmark suitable for checkboxes and checkable menu items..PPReimplemented in QPlatinumStyle, QMotifStyle, QSGIStyle and QWindowsStyle..SH "void QStyle::drawComboButton ( QPainter * p, int x, int y, int w, int h, const QColorGroup & g, bool sunken = FALSE, bool editable = FALSE, bool enabled = TRUE, const QBrush * fill = 0 ) \fC[virtual]\fR"Draws a press-sensitive shape in the style of a combo box or menu button..PPReimplemented in QMotifStyle, QInterlaceStyle, QMotifPlusStyle, QWindowsStyle, QCommonStyle, QPlatinumStyle and QSGIStyle..SH "void QStyle::drawComboButtonMask ( QPainter * p, int x, int y, int w, int h ) \fC[virtual]\fR"Draw the mask of a combo box button. Useful if a rounded buttons needs to be transparent because the style uses a fancy background pixmap..PPReimplemented in QCommonStyle..SH "void QStyle::drawExclusiveIndicator ( QPainter *, int x, int y, int w, int h, const QColorGroup &, bool on, bool down = FALSE, bool enabled = TRUE ) \fC[virtual]\fR"Draws a mark indicating the state of an exclusive choice..PPReimplemented in QWindowsStyle, QSGIStyle, QPlatinumStyle, QInterlaceStyle, QCDEStyle, QMotifPlusStyle and QMotifStyle..SH "void QStyle::drawExclusiveIndicatorMask ( QPainter * p, int x, int y, int w, int h, bool ) \fC[virtual]\fR"Draws the mask of a mark indicating the state of an exclusive choice..PPReimplemented in QInterlaceStyle, QWindowsStyle, QSGIStyle and QMotifStyle..SH "void QStyle::drawFocusRect ( QPainter * p, const QRect & r, const QColorGroup & g, const QColor * = 0, bool atBorder = FALSE ) \fC[virtual]\fR"Draws a mark indicating keyboard focus is on \fIr. atBorder\fR indicates whether the focus rectangle is at the border of an item (for example an item in a listbox). Certain styles (Motif style as the most prominent example) might have to shrink the rectangle a bit in that case to ensure that the focus rectangle is visible at all..PPReimplemented in QWindowsStyle, QMotifStyle and QInterlaceStyle..SH "void QStyle::drawIndicator ( QPainter *, int, int, int, int, const QColorGroup &, int state, bool = FALSE, bool = TRUE ) \fC[virtual]\fR"Draws a mark indicating the state of a choice..PPReimplemented in QCDEStyle, QWindowsStyle, QSGIStyle, QPlatinumStyle, QMotifPlusStyle, QMotifStyle and QInterlaceStyle..SH "void QStyle::drawIndicatorMask ( QPainter * p, int x, int y, int w, int h, int ) \fC[virtual]\fR"Draws the mask of a mark indicating the state of a choice..PPReimplemented in QPlatinumStyle, QInterlaceStyle and QSGIStyle..SH "void QStyle::drawItem ( QPainter * p, int x, int y, int w, int h, int flags, const QColorGroup & g, bool enabled, const QPixmap * pixmap, const QString & text, int len=-1, const QColor * penColor = 0 ) \fC[virtual]\fR"Draw text or a pixmap in an area..SH "void QStyle::drawPanel ( QPainter * p, int x, int y, int w, int h, const QColorGroup & g, bool sunken=FALSE, int lineWidth = 1, const QBrush * fill = 0 ) \fC[virtual]\fR"Draws a panel to separate parts of the visual interface..PPReimplemented in QSGIStyle, QInterlaceStyle, QMotifPlusStyle and QWindowsStyle..SH "void QStyle::drawPopupMenuItem ( QPainter * p, bool checkable, int maxpmw, int tab, QMenuItem * mi, const QPalette & pal, bool act, bool enabled, int x, int y, int w, int h ) \fC[virtual]\fR"Draws the menu item \fImi\fR using the painter \fIp.\fR The painter is preset to the right font. \fImaxpmw\fR is the maximum width of all iconsets within a check column. \fItab\fR specifies the minimum number of pixels necessary to draw all labels of the menu without their accelerators (which are separated by a tab character in the label text). \fIpal\fR is the palette, \fIact\fR and \fIenabled\fR define whether the item is active (i.e. highlighted) or enabled, respectively. Finally, \fIx, y, w\fR and \fIh\fR determine the geometry of the entire item..PPNote that \fImi\fR can be 0 in the case of multicolumn popup menus. In that case, drawPopupMenuItem() simply draws the appropriate item background..PPReimplemented in QSGIStyle, QWindowsStyle, QPlatinumStyle, QMotifStyle and QMotifPlusStyle..SH "void QStyle::drawPopupPanel ( QPainter * p, int x, int y, int w, int h, const QColorGroup & cg, int lineWidth = 2, const QBrush * fill = 0 ) \fC[virtual]\fR"Draws a panel suitable as frame for popup windows..PPReimplemented in QPlatinumStyle, QSGIStyle and QWindowsStyle..SH "void QStyle::drawPushButton ( QPushButton *, QPainter * ) \fC[virtual]\fR"Draws a pushbutton. This function will normally call drawButton() with arguments according to the current state of the pushbutton..PPSee also drawPushButtonLabel() and QPushButton::drawButton()..PPReimplemented in QInterlaceStyle, QMotifStyle, QPlatinumStyle, QMotifPlusStyle, QSGIStyle and QWindowsStyle..SH "void QStyle::drawPushButtonLabel ( QPushButton *, QPainter * ) \fC[virtual]\fR"Draws the label of a pushbutton. This function will normally call drawItem() with arguments according to the current state of the pushbutton..PPIn reimplementations of this function, you will find pushButtonContentsRect() useful..PPSee also drawPushButton() and QPushButton::drawButtonLabel()..PPReimplemented in QInterlaceStyle, QPlatinumStyle and QCommonStyle..SH "void QStyle::drawRect ( QPainter * p, int x, int y, int w, int h, const QColor & c, int lineWidth = 1, const QBrush * fill = 0 ) \fC[virtual]\fR"Draws a simple rectangle to separate parts of the visual interface..SH "void QStyle::drawRectStrong ( QPainter * p, int x, int y, int w, int h, const QColorGroup & g, bool sunken=FALSE, int lineWidth = 1, int midLineWidth = 0, const QBrush * fill = 0 ) \fC[virtual]\fR"Draws an emphasized rectangle to strongly separate parts of the visual interface.

⌨️ 快捷键说明

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