1QStyle(3qt)                                                        QStyle(3qt)
2
3
4

NAME

6       QStyle - The look and feel of a GUI
7

SYNOPSIS

9       #include <qstyle.h>
10
11       Inherits QObject.
12
13       Inherited by QCommonStyle.
14
15   Public Members
16       QStyle ()
17       virtual ~QStyle ()
18       virtual void polish ( QWidget * )
19       virtual void unPolish ( QWidget * )
20       virtual void polish ( QApplication * )
21       virtual void unPolish ( QApplication * )
22       virtual void polish ( QPalette & )
23       virtual void polishPopupMenu ( QPopupMenu * ) = 0
24       virtual QRect itemRect ( QPainter * p, const QRect & r, int flags, bool
25           enabled, const QPixmap * pixmap, const QString & text, int len = -1
26           ) const
27       virtual void drawItem ( QPainter * p, const QRect & r, int flags, const
28           QColorGroup & g, bool enabled, const QPixmap * pixmap, const
29           QString & text, int len = -1, const QColor * penColor = 0 ) const
30       enum PrimitiveElement { PE_ButtonCommand, PE_ButtonDefault,
31           PE_ButtonBevel, PE_ButtonTool, PE_ButtonDropDown, PE_FocusRect,
32           PE_ArrowUp, PE_ArrowDown, PE_ArrowRight, PE_ArrowLeft,
33           PE_SpinWidgetUp, PE_SpinWidgetDown, PE_SpinWidgetPlus,
34           PE_SpinWidgetMinus, PE_Indicator, PE_IndicatorMask,
35           PE_ExclusiveIndicator, PE_ExclusiveIndicatorMask,
36           PE_DockWindowHandle, PE_DockWindowSeparator,
37           PE_DockWindowResizeHandle, PE_Splitter, PE_Panel, PE_PanelPopup,
38           PE_PanelMenuBar, PE_PanelDockWindow, PE_TabBarBase,
39           PE_HeaderSection, PE_HeaderArrow, PE_StatusBarSection,
40           PE_GroupBoxFrame, PE_Separator, PE_SizeGrip, PE_CheckMark,
41           PE_ScrollBarAddLine, PE_ScrollBarSubLine, PE_ScrollBarAddPage,
42           PE_ScrollBarSubPage, PE_ScrollBarSlider, PE_ScrollBarFirst,
43           PE_ScrollBarLast, PE_ProgressBarChunk, PE_PanelLineEdit,
44           PE_PanelTabWidget, PE_WindowFrame, PE_CheckListController,
45           PE_CheckListIndicator, PE_CheckListExclusiveIndicator,
46           PE_PanelGroupBox, PE_RubberBand, PE_CustomBase = 0xf000000 }
47       enum StyleFlags { Style_Default = 0x00000000, Style_Enabled =
48           0x00000001, Style_Raised = 0x00000002, Style_Sunken = 0x00000004,
49           Style_Off = 0x00000008, Style_NoChange = 0x00000010, Style_On =
50           0x00000020, Style_Down = 0x00000040, Style_Horizontal = 0x00000080,
51           Style_HasFocus = 0x00000100, Style_Top = 0x00000200, Style_Bottom =
52           0x00000400, Style_FocusAtBorder = 0x00000800, Style_AutoRaise =
53           0x00001000, Style_MouseOver = 0x00002000, Style_Up = 0x00004000,
54           Style_Selected = 0x00008000, Style_Active = 0x00010000,
55           Style_ButtonDefault = 0x00020000 }
56       virtual void drawPrimitive ( PrimitiveElement pe, QPainter * p, const
57           QRect & r, const QColorGroup & cg, SFlags flags = Style_Default,
58           const QStyleOption & opt = QStyleOption::Default ) const = 0
59       enum ControlElement { CE_PushButton, CE_PushButtonLabel, CE_CheckBox,
60           CE_CheckBoxLabel, CE_RadioButton, CE_RadioButtonLabel,
61           CE_TabBarTab, CE_TabBarLabel, CE_ProgressBarGroove,
62           CE_ProgressBarContents, CE_ProgressBarLabel, CE_PopupMenuItem,
63           CE_MenuBarItem, CE_ToolButtonLabel, CE_MenuBarEmptyArea,
64           CE_PopupMenuScroller, CE_DockWindowEmptyArea,
65           CE_PopupMenuVerticalExtra, CE_PopupMenuHorizontalExtra,
66           CE_ToolBoxTab, CE_HeaderLabel, CE_CustomBase = 0xf0000000 }
67       virtual void drawControl ( ControlElement element, QPainter * p, const
68           QWidget * widget, const QRect & r, const QColorGroup & cg, SFlags
69           how = Style_Default, const QStyleOption & opt =
70           QStyleOption::Default ) const = 0
71       virtual void drawControlMask ( ControlElement element, QPainter * p,
72           const QWidget * widget, const QRect & r, const QStyleOption & opt =
73           QStyleOption::Default ) const = 0
74       enum SubRect { SR_PushButtonContents, SR_PushButtonFocusRect,
75           SR_CheckBoxIndicator, SR_CheckBoxContents, SR_CheckBoxFocusRect,
76           SR_RadioButtonIndicator, SR_RadioButtonContents,
77           SR_RadioButtonFocusRect, SR_ComboBoxFocusRect, SR_SliderFocusRect,
78           SR_DockWindowHandleRect, SR_ProgressBarGroove,
79           SR_ProgressBarContents, SR_ProgressBarLabel, SR_ToolButtonContents,
80           SR_DialogButtonAccept, SR_DialogButtonReject, SR_DialogButtonApply,
81           SR_DialogButtonHelp, SR_DialogButtonAll, SR_DialogButtonAbort,
82           SR_DialogButtonIgnore, SR_DialogButtonRetry, SR_DialogButtonCustom,
83           SR_ToolBoxTabContents, SR_CustomBase = 0xf0000000 }
84       virtual QRect subRect ( SubRect subrect, const QWidget * widget ) const
85           = 0
86       enum ComplexControl { CC_SpinWidget, CC_ComboBox, CC_ScrollBar,
87           CC_Slider, CC_ToolButton, CC_TitleBar, CC_ListView, CC_CustomBase =
88           0xf0000000 }
89       enum SubControl { SC_None = 0x00000000, SC_ScrollBarAddLine =
90           0x00000001, SC_ScrollBarSubLine = 0x00000002, SC_ScrollBarAddPage =
91           0x00000004, SC_ScrollBarSubPage = 0x00000008, SC_ScrollBarFirst =
92           0x00000010, SC_ScrollBarLast = 0x00000020, SC_ScrollBarSlider =
93           0x00000040, SC_ScrollBarGroove = 0x00000080, SC_SpinWidgetUp =
94           0x00000001, SC_SpinWidgetDown = 0x00000002, SC_SpinWidgetFrame =
95           0x00000004, SC_SpinWidgetEditField = 0x00000008,
96           SC_SpinWidgetButtonField = 0x00000010, SC_ComboBoxFrame =
97           0x00000001, SC_ComboBoxEditField = 0x00000002, SC_ComboBoxArrow =
98           0x00000004, SC_ComboBoxListBoxPopup = 0x00000008, SC_SliderGroove =
99           0x00000001, SC_SliderHandle = 0x00000002, SC_SliderTickmarks =
100           0x00000004, SC_ToolButton = 0x00000001, SC_ToolButtonMenu =
101           0x00000002, SC_TitleBarLabel = 0x00000001, SC_TitleBarSysMenu =
102           0x00000002, SC_TitleBarMinButton = 0x00000004, SC_TitleBarMaxButton
103           = 0x00000008, SC_TitleBarCloseButton = 0x00000010,
104           SC_TitleBarNormalButton = 0x00000020, SC_TitleBarShadeButton =
105           0x00000040, SC_TitleBarUnshadeButton = 0x00000080, SC_ListView =
106           0x00000001, SC_ListViewBranch = 0x00000002, SC_ListViewExpand =
107           0x00000004, SC_All = 0xffffffff }
108       virtual void drawComplexControl ( ComplexControl control, QPainter * p,
109           const QWidget * widget, const QRect & r, const QColorGroup & cg,
110           SFlags how = Style_Default, SCFlags sub = SC_All, SCFlags subActive
111           = SC_None, const QStyleOption & opt = QStyleOption::Default ) const
112           = 0
113       virtual void drawComplexControlMask ( ComplexControl control, QPainter
114           * p, const QWidget * widget, const QRect & r, const QStyleOption &
115           opt = QStyleOption::Default ) const = 0
116       virtual QRect querySubControlMetrics ( ComplexControl control, const
117           QWidget * widget, SubControl subcontrol, const QStyleOption & opt =
118           QStyleOption::Default ) const = 0
119       virtual SubControl querySubControl ( ComplexControl control, const
120           QWidget * widget, const QPoint & pos, const QStyleOption & opt =
121           QStyleOption::Default ) const = 0
122       enum PixelMetric { PM_ButtonMargin, PM_ButtonDefaultIndicator,
123           PM_MenuButtonIndicator, PM_ButtonShiftHorizontal,
124           PM_ButtonShiftVertical, PM_DefaultFrameWidth, PM_SpinBoxFrameWidth,
125           PM_MaximumDragDistance, PM_ScrollBarExtent, PM_ScrollBarSliderMin,
126           PM_SliderThickness, PM_SliderControlThickness, PM_SliderLength,
127           PM_SliderTickmarkOffset, PM_SliderSpaceAvailable,
128           PM_DockWindowSeparatorExtent, PM_DockWindowHandleExtent,
129           PM_DockWindowFrameWidth, PM_MenuBarFrameWidth, PM_TabBarTabOverlap,
130           PM_TabBarTabHSpace, PM_TabBarTabVSpace, PM_TabBarBaseHeight,
131           PM_TabBarBaseOverlap, PM_ProgressBarChunkWidth, PM_SplitterWidth,
132           PM_TitleBarHeight, PM_IndicatorWidth, PM_IndicatorHeight,
133           PM_ExclusiveIndicatorWidth, PM_ExclusiveIndicatorHeight,
134           PM_PopupMenuScrollerHeight, PM_CheckListButtonSize,
135           PM_CheckListControllerSize, PM_PopupMenuFrameHorizontalExtra,
136           PM_PopupMenuFrameVerticalExtra, PM_DialogButtonsSeparator,
137           PM_DialogButtonsButtonWidth, PM_DialogButtonsButtonHeight,
138           PM_MDIFrameWidth, PM_MDIMinimizedWidth, PM_HeaderMargin,
139           PM_HeaderMarkSize, PM_HeaderGripMargin,
140           PM_TabBarTabShiftHorizontal, PM_TabBarTabShiftVertical,
141           PM_TabBarScrollButtonWidth, PM_MenuBarItemSpacing,
142           PM_ToolBarItemSpacing, PM_CustomBase = 0xf0000000 }
143       virtual int pixelMetric ( PixelMetric metric, const QWidget * widget =
144           0 ) const = 0
145       enum ContentsType { CT_PushButton, CT_CheckBox, CT_RadioButton,
146           CT_ToolButton, CT_ComboBox, CT_Splitter, CT_DockWindow,
147           CT_ProgressBar, CT_PopupMenuItem, CT_TabBarTab, CT_Slider,
148           CT_Header, CT_LineEdit, CT_MenuBar, CT_SpinBox, CT_SizeGrip,
149           CT_TabWidget, CT_DialogButtons, CT_CustomBase = 0xf0000000 }
150       virtual QSize sizeFromContents ( ContentsType contents, const QWidget *
151           widget, const QSize & contentsSize, const QStyleOption & opt =
152           QStyleOption::Default ) const = 0
153       enum StyleHint { SH_EtchDisabledText, SH_GUIStyle,
154           SH_ScrollBar_BackgroundMode,
155           SH_ScrollBar_MiddleClickAbsolutePosition,
156           SH_ScrollBar_ScrollWhenPointerLeavesControl,
157           SH_TabBar_SelectMouseType, SH_TabBar_Alignment,
158           SH_Header_ArrowAlignment, SH_Slider_SnapToValue,
159           SH_Slider_SloppyKeyEvents, SH_ProgressDialog_CenterCancelButton,
160           SH_ProgressDialog_TextLabelAlignment,
161           SH_PrintDialog_RightAlignButtons, SH_MainWindow_SpaceBelowMenuBar,
162           SH_FontDialog_SelectAssociatedText,
163           SH_PopupMenu_AllowActiveAndDisabled,
164           SH_PopupMenu_SpaceActivatesItem, SH_PopupMenu_SubMenuPopupDelay,
165           SH_ScrollView_FrameOnlyAroundContents, SH_MenuBar_AltKeyNavigation,
166           SH_ComboBox_ListMouseTracking, SH_PopupMenu_MouseTracking,
167           SH_MenuBar_MouseTracking, SH_ItemView_ChangeHighlightOnFocus,
168           SH_Widget_ShareActivation, SH_Workspace_FillSpaceOnMaximize,
169           SH_ComboBox_Popup, SH_TitleBar_NoBorder,
170           SH_ScrollBar_StopMouseOverSlider, SH_BlinkCursorWhenTextSelected,
171           SH_RichText_FullWidthSelection, SH_PopupMenu_Scrollable,
172           SH_GroupBox_TextLabelVerticalAlignment, SH_GroupBox_TextLabelColor,
173           SH_PopupMenu_SloppySubMenus, SH_Table_GridLineColor,
174           SH_LineEdit_PasswordCharacter, SH_DialogButtons_DefaultButton,
175           SH_ToolBox_SelectedPageTitleBold, SH_TabBar_PreferNoArrows,
176           SH_ScrollBar_LeftClickAbsolutePosition,
177           SH_ListViewExpand_SelectMouseType, SH_UnderlineAccelerator,
178           SH_ToolButton_Uses3D, SH_CustomBase = 0xf0000000 }
179       virtual int styleHint ( StyleHint stylehint, const QWidget * widget =
180           0, const QStyleOption & opt = QStyleOption::Default,
181           QStyleHintReturn * returnData = 0 ) const = 0
182       enum StylePixmap { SP_TitleBarMinButton, SP_TitleBarMaxButton,
183           SP_TitleBarCloseButton, SP_TitleBarNormalButton,
184           SP_TitleBarShadeButton, SP_TitleBarUnshadeButton,
185           SP_DockWindowCloseButton, SP_MessageBoxInformation,
186           SP_MessageBoxWarning, SP_MessageBoxCritical, SP_MessageBoxQuestion,
187           SP_CustomBase = 0xf0000000 }
188       virtual QPixmap stylePixmap ( StylePixmap stylepixmap, const QWidget *
189           widget = 0, const QStyleOption & opt = QStyleOption::Default )
190           const = 0
191       int defaultFrameWidth () const  (obsolete)
192       void tabbarMetrics ( const QWidget * t, int & hf, int & vf, int & ov )
193           const  (obsolete)
194       QSize scrollBarExtent () const  (obsolete)
195
196   Static Public Members
197       QRect visualRect ( const QRect & logical, const QWidget * w )
198       QRect visualRect ( const QRect & logical, const QRect & bounding )
199

DESCRIPTION

201       The QStyle class specifies the look and feel of a GUI.
202
203       A large number of GUI elements are common to many widgets. The QStyle
204       class allows the look of these elements to be modified across all
205       widgets that use the QStyle functions. It also provides two feel
206       options: Motif and Windows.
207
208       Although it is not possible to fully enumerate the look of graphical
209       elements and the feel of widgets in a GUI, QStyle provides a
210       considerable amount of control and customisability.
211
212       In Qt 1.x the look and feel option for widgets was specified by a
213       single value: the GUIStyle. Starting with Qt 2.0, this notion was
214       expanded to allow the look to be specified by virtual drawing
215       functions.
216
217       Derived classes may reimplement some or all of the drawing functions to
218       modify the look of all widgets that use those functions.
219
220       Languages written from right to left (such as Arabic and Hebrew)
221       usually also mirror the whole layout of widgets. If you design a style,
222       you should take special care when drawing asymmetric elements to make
223       sure that they also look correct in a mirrored layout. You can start
224       your application with -reverse to check the mirrored layout. Also
225       notice, that for a reversed layout, the light usually comes from top
226       right instead of top left.
227
228       The actual reverse layout is performed automatically when possible.
229       However, for the sake of flexibility, the translation cannot be
230       performed everywhere. The documentation for each function in the QStyle
231       API states whether the function expects/returns logical or screen
232       coordinates. Using logical coordinates (in ComplexControls, for
233       example) provides great flexibility in controlling the look of a
234       widget. Use visualRect() when necessary to translate logical
235       coordinates into screen coordinates for drawing.
236
237       In Qt versions prior to 3.0, if you wanted a low level route into
238       changing the appearance of a widget, you would reimplement polish().
239       With the new 3.0 style engine the recommended approach is to
240       reimplement the draw functions, for example drawItem(),
241       drawPrimitive(), drawControl(), drawControlMask(), drawComplexControl()
242       and drawComplexControlMask(). Each of these functions is called with a
243       range of parameters that provide information that you can use to
244       determine how to draw them, e.g. style flags, rectangle, color group,
245       etc.
246
247       For information on changing elements of an existing style or creating
248       your own style see the Style overview.
249
250       Styles can also be created as plugins.
251
252       See also Widget Appearance and Style.
253
254   Member Type Documentation

QStyle::ComplexControl

256       This enum represents a ComplexControl. ComplexControls have different
257       behaviour depending upon where the user clicks on them or which keys
258       are pressed.
259
260       QStyle::CC_SpinWidget
261
262       QStyle::CC_ComboBox
263
264       QStyle::CC_ScrollBar
265
266       QStyle::CC_Slider
267
268       QStyle::CC_ToolButton
269
270       QStyle::CC_TitleBar
271
272       QStyle::CC_ListView
273
274       QStyle::CC_CustomBase - base value for custom ControlElements. All
275       values above this are reserved for custom use. Therefore, custom values
276       must be greater than this value.
277
278       See also SubControl and drawComplexControl().
279

QStyle::ContentsType

281       This enum represents a ContentsType. It is used to calculate sizes for
282       the contents of various widgets.
283
284       QStyle::CT_PushButton
285
286       QStyle::CT_CheckBox
287
288       QStyle::CT_RadioButton
289
290       QStyle::CT_ToolButton
291
292       QStyle::CT_ComboBox
293
294       QStyle::CT_Splitter
295
296       QStyle::CT_DockWindow
297
298       QStyle::CT_ProgressBar
299
300       QStyle::CT_PopupMenuItem
301
302       QStyle::CT_TabBarTab
303
304       QStyle::CT_Slider
305
306       QStyle::CT_Header
307
308       QStyle::CT_LineEdit
309
310       QStyle::CT_MenuBar
311
312       QStyle::CT_SpinBox
313
314       QStyle::CT_SizeGrip
315
316       QStyle::CT_TabWidget
317
318       QStyle::CT_DialogButtons
319
320       QStyle::CT_CustomBase - base value for custom ControlElements. All
321       values above this are reserved for custom use. Custom values must be
322       greater than this value.
323
324       See also sizeFromContents().
325

QStyle::ControlElement

327       This enum represents a ControlElement. A ControlElement is part of a
328       widget that performs some action or displays information to the user.
329
330       QStyle::CE_PushButton - the bevel and default indicator of a
331       QPushButton.
332
333       QStyle::CE_PushButtonLabel - the label (iconset with text or pixmap) of
334       a QPushButton.
335
336       QStyle::CE_CheckBox - the indicator of a QCheckBox.
337
338       QStyle::CE_CheckBoxLabel - the label (text or pixmap) of a QCheckBox.
339
340       QStyle::CE_RadioButton - the indicator of a QRadioButton.
341
342       QStyle::CE_RadioButtonLabel - the label (text or pixmap) of a
343       QRadioButton.
344
345       QStyle::CE_TabBarTab - the tab within a QTabBar (a QTab).
346
347       QStyle::CE_TabBarLabel - the label within a QTab.
348
349       QStyle::CE_ProgressBarGroove - the groove where the progress indicator
350       is drawn in a QProgressBar.
351
352       QStyle::CE_ProgressBarContents - the progress indicator of a
353       QProgressBar.
354
355       QStyle::CE_ProgressBarLabel - the text label of a QProgressBar.
356
357       QStyle::CE_PopupMenuItem - a menu item in a QPopupMenu.
358
359       QStyle::CE_PopupMenuScroller - scrolling areas in a popumenu when the
360       style supports scrolling.
361
362       QStyle::CE_PopupMenuHorizontalExtra - extra frame area set aside with
363       PM_PopupMenuFrameHorizontalExtra
364
365       QStyle::CE_PopupMenuVerticalExtra - extra frame area set aside with
366       PM_PopupMenuFrameVerticalExtra
367
368       QStyle::CE_MenuBarItem - a menu item in a QMenuBar.
369
370       QStyle::CE_ToolButtonLabel - a tool button's label.
371
372       QStyle::CE_MenuBarEmptyArea - the empty area of a QMenuBar.
373
374       QStyle::CE_DockWindowEmptyArea - the empty area of a QDockWindow.
375
376       QStyle::CE_ToolBoxTab - the toolbox's tab area
377
378       QStyle::CE_HeaderLabel - the header's label
379
380       QStyle::CE_CustomBase - base value for custom ControlElements. All
381       values above this are reserved for custom use. Therefore, custom values
382       must be greater than this value.
383
384       See also drawControl().
385

QStyle::PixelMetric

387       This enum represents a PixelMetric. A PixelMetric is a style dependent
388       size represented as a single pixel value.
389
390       QStyle::PM_ButtonMargin - amount of whitespace between pushbutton
391       labels and the frame.
392
393       QStyle::PM_ButtonDefaultIndicator - width of the default-button
394       indicator frame.
395
396       QStyle::PM_MenuButtonIndicator - width of the menu button indicator
397       proportional to the widget height.
398
399       QStyle::PM_ButtonShiftHorizontal - horizontal contents shift of a
400       button when the button is down.
401
402       QStyle::PM_ButtonShiftVertical - vertical contents shift of a button
403       when the button is down.
404
405       QStyle::PM_DefaultFrameWidth - default frame width, usually 2.
406
407       QStyle::PM_SpinBoxFrameWidth - frame width of a spin box.
408
409       QStyle::PM_MDIFrameWidth - frame width of an MDI window.
410
411       QStyle::PM_MDIMinimizedWidth - width of a minimized MSI window.
412
413       QStyle::PM_MaximumDragDistance - Some feels require the scrollbar or
414       other sliders to jump back to the original position when the mouse
415       pointer is too far away while dragging. A value of -1 disables this
416       behavior.
417
418       QStyle::PM_ScrollBarExtent - width of a vertical scrollbar and the
419       height of a horizontal scrollbar.
420
421       QStyle::PM_ScrollBarSliderMin - the minimum height of a vertical
422       scrollbar's slider and the minimum width of a horiztonal scrollbar
423       slider.
424
425       QStyle::PM_SliderThickness - total slider thickness.
426
427       QStyle::PM_SliderControlThickness - thickness of the slider handle.
428
429       QStyle::PM_SliderLength - length of the slider.
430
431       QStyle::PM_SliderTickmarkOffset - the offset between the tickmarks and
432       the slider.
433
434       QStyle::PM_SliderSpaceAvailable - the available space for the slider to
435       move.
436
437       QStyle::PM_DockWindowSeparatorExtent - width of a separator in a
438       horiztonal dock window and the height of a separator in a vertical dock
439       window.
440
441       QStyle::PM_DockWindowHandleExtent - width of the handle in a horizontal
442       dock window and the height of the handle in a vertical dock window.
443
444       QStyle::PM_DockWindowFrameWidth - frame width of a dock window.
445
446       QStyle::PM_MenuBarFrameWidth - frame width of a menubar.
447
448       QStyle::PM_MenuBarItemSpacing - spacing between menubar items.
449
450       QStyle::PM_ToolBarItemSpacing - spacing between toolbar items.
451
452       QStyle::PM_TabBarTabOverlap - number of pixels the tabs should overlap.
453
454       QStyle::PM_TabBarTabHSpace - extra space added to the tab width.
455
456       QStyle::PM_TabBarTabVSpace - extra space added to the tab height.
457
458       QStyle::PM_TabBarBaseHeight - height of the area between the tab bar
459       and the tab pages.
460
461       QStyle::PM_TabBarBaseOverlap - number of pixels the tab bar overlaps
462       the tab bar base.
463
464       QStyle::PM_TabBarScrollButtonWidth
465
466       QStyle::PM_TabBarTabShiftHorizontal - horizontal pixel shift when a tab
467       is selected.
468
469       QStyle::PM_TabBarTabShiftVertical - vertical pixel shift when a tab is
470       selected.
471
472       QStyle::PM_ProgressBarChunkWidth - width of a chunk in a progress bar
473       indicator.
474
475       QStyle::PM_SplitterWidth - width of a splitter.
476
477       QStyle::PM_TitleBarHeight - height of the title bar.
478
479       QStyle::PM_PopupMenuFrameHorizontalExtra - additional border, e.g. for
480       panels
481
482       QStyle::PM_PopupMenuFrameVerticalExtra - additional border, e.g. for
483       panels
484
485       QStyle::PM_IndicatorWidth - width of a check box indicator.
486
487       QStyle::PM_IndicatorHeight - height of a checkbox indicator.
488
489       QStyle::PM_ExclusiveIndicatorWidth - width of a radio button indicator.
490
491       QStyle::PM_ExclusiveIndicatorHeight - height of a radio button
492       indicator.
493
494       QStyle::PM_PopupMenuScrollerHeight - height of the scroller area in a
495       popupmenu.
496
497       QStyle::PM_PopupMenuScrollerHeight - height of the scroller area in a
498       popupmenu.
499
500       QStyle::PM_CheckListButtonSize - area (width/height) of the
501       checkbox/radiobutton in a QCheckListItem
502
503       QStyle::PM_CheckListControllerSize - area (width/height) of the
504       controller in a QCheckListItem
505
506       QStyle::PM_DialogButtonsSeparator - distance between buttons in a
507       dialog buttons widget.
508
509       QStyle::PM_DialogButtonsButtonWidth - minimum width of a button in a
510       dialog buttons widget.
511
512       QStyle::PM_DialogButtonsButtonHeight - minimum height of a button in a
513       dialog buttons widget.
514
515       QStyle::PM_HeaderMarkSize
516
517       QStyle::PM_HeaderGripMargin
518
519       QStyle::PM_HeaderMargin
520
521       QStyle::PM_CustomBase - base value for custom ControlElements. All
522       values above this are reserved for custom use. Therefore, custom values
523       must be greater than this value.
524
525       See also pixelMetric().
526

QStyle::PrimitiveElement

528       This enum represents the PrimitiveElements of a style. A
529       PrimitiveElement is a common GUI element, such as a checkbox indicator
530       or pushbutton bevel.
531
532       QStyle::PE_ButtonCommand - button used to initiate an action, for
533       example, a QPushButton.
534
535       QStyle::PE_ButtonDefault - this button is the default button, e.g. in a
536       dialog.
537
538       QStyle::PE_ButtonBevel - generic button bevel.
539
540       QStyle::PE_ButtonTool - tool button, for example, a QToolButton.
541
542       QStyle::PE_ButtonDropDown - drop down button, for example, a tool
543       button that displays a popup menu, for example, QPopupMenu.
544
545       QStyle::PE_FocusRect - generic focus indicator.
546
547       QStyle::PE_ArrowUp - up arrow.
548
549       QStyle::PE_ArrowDown - down arrow.
550
551       QStyle::PE_ArrowRight - right arrow.
552
553       QStyle::PE_ArrowLeft - left arrow.
554
555       QStyle::PE_SpinWidgetUp - up symbol for a spin widget, for example a
556       QSpinBox.
557
558       QStyle::PE_SpinWidgetDown - down symbol for a spin widget.
559
560       QStyle::PE_SpinWidgetPlus - increase symbol for a spin widget.
561
562       QStyle::PE_SpinWidgetMinus - decrease symbol for a spin widget.
563
564       QStyle::PE_Indicator - on/off indicator, for example, a QCheckBox.
565
566       QStyle::PE_IndicatorMask - bitmap mask for an indicator.
567
568       QStyle::PE_ExclusiveIndicator - exclusive on/off indicator, for
569       example, a QRadioButton.
570
571       QStyle::PE_ExclusiveIndicatorMask - bitmap mask for an exclusive
572       indicator.
573
574       QStyle::PE_DockWindowHandle - tear off handle for dock windows and
575       toolbars, for example QDockWindows and QToolBars.
576
577       QStyle::PE_DockWindowSeparator - item separator for dock window and
578       toolbar contents.
579
580       QStyle::PE_DockWindowResizeHandle - resize handle for dock windows.
581
582       QStyle::PE_Splitter - splitter handle; see also QSplitter.
583
584       QStyle::PE_Panel - generic panel frame; see also QFrame.
585
586       QStyle::PE_PanelPopup - panel frame for popup windows/menus; see also
587       QPopupMenu.
588
589       QStyle::PE_PanelMenuBar - panel frame for menu bars.
590
591       QStyle::PE_PanelDockWindow - panel frame for dock windows and toolbars.
592
593       QStyle::PE_PanelTabWidget - panel frame for tab widgets.
594
595       QStyle::PE_PanelLineEdit - panel frame for line edits.
596
597       QStyle::PE_PanelGroupBox - panel frame for group boxes.
598
599       QStyle::PE_TabBarBase - area below tabs in a tab widget, for example,
600       QTab.
601
602       QStyle::PE_HeaderSection - section of a list or table header; see also
603       QHeader.
604
605       QStyle::PE_HeaderArrow - arrow used to indicate sorting on a list or
606       table header
607
608       QStyle::PE_StatusBarSection - section of a status bar; see also
609       QStatusBar.
610
611       QStyle::PE_GroupBoxFrame - frame around a group box; see also
612       QGroupBox.
613
614       QStyle::PE_WindowFrame - frame around a MDI window or a docking window
615
616       QStyle::PE_Separator - generic separator.
617
618       QStyle::PE_SizeGrip - window resize handle; see also QSizeGrip.
619
620       QStyle::PE_CheckMark - generic check mark; see also QCheckBox.
621
622       QStyle::PE_ScrollBarAddLine - scrollbar line increase indicator (i.e.
623       scroll down); see also QScrollBar.
624
625       QStyle::PE_ScrollBarSubLine - scrollbar line decrease indicator (i.e.
626       scroll up).
627
628       QStyle::PE_ScrollBarAddPage - scolllbar page increase indicator (i.e.
629       page down).
630
631       QStyle::PE_ScrollBarSubPage - scrollbar page decrease indicator (i.e.
632       page up).
633
634       QStyle::PE_ScrollBarSlider - scrollbar slider
635
636       QStyle::PE_ScrollBarFirst - scrollbar first line indicator (i.e. home).
637
638       QStyle::PE_ScrollBarLast - scrollbar last line indicator (i.e. end).
639
640       QStyle::PE_ProgressBarChunk - section of a progress bar indicator; see
641       also QProgressBar.
642
643       QStyle::PE_CheckListController - controller part of a listview item
644
645       QStyle::PE_CheckListIndicator - checkbox part of a listview item
646
647       QStyle::PE_CheckListExclusiveIndicator - radiobutton part of a listview
648       item
649
650       QStyle::PE_RubberBand - rubber band used in such things as iconview
651
652       QStyle::PE_CustomBase - base value for custom PrimitiveElements. All
653       values above this are reserved for custom use. Custom values must be
654       greater than this value.
655
656       See also drawPrimitive().
657

QStyle::StyleFlags

659       This enum represents flags for drawing PrimitiveElements. Not all
660       primitives use all of these flags. Note that these flags may mean
661       different things to different primitives. For an explanation of the
662       relationship between primitives and their flags, as well as the
663       different meanings of the flags, see the Style overview.
664
665       QStyle::Style_Default
666
667       QStyle::Style_Enabled
668
669       QStyle::Style_Raised
670
671       QStyle::Style_Sunken
672
673       QStyle::Style_Off
674
675       QStyle::Style_NoChange
676
677       QStyle::Style_On
678
679       QStyle::Style_Down
680
681       QStyle::Style_Horizontal
682
683       QStyle::Style_HasFocus
684
685       QStyle::Style_Top
686
687       QStyle::Style_Bottom
688
689       QStyle::Style_FocusAtBorder
690
691       QStyle::Style_AutoRaise
692
693       QStyle::Style_MouseOver
694
695       QStyle::Style_Up
696
697       QStyle::Style_Selected
698
699       QStyle::Style_HasFocus
700
701       QStyle::Style_Active
702
703       QStyle::Style_ButtonDefault
704
705       See also drawPrimitive().
706

QStyle::StyleHint

708       This enum represents a StyleHint. A StyleHint is a general look and/or
709       feel hint.
710
711       QStyle::SH_EtchDisabledText - disabled text is "etched" like Windows.
712
713       QStyle::SH_GUIStyle - the GUI style to use.
714
715       QStyle::SH_ScrollBar_BackgroundMode - the background mode for a
716       QScrollBar. Possible values are any of those in the BackgroundMode
717       enum.
718
719       QStyle::SH_ScrollBar_MiddleClickAbsolutePosition - a boolean value. If
720       TRUE, middle clicking on a scrollbar causes the slider to jump to that
721       position. If FALSE, the middle clicking is ignored.
722
723       QStyle::SH_ScrollBar_LeftClickAbsolutePosition - a boolean value. If
724       TRUE, left clicking on a scrollbar causes the slider to jump to that
725       position. If FALSE, the left clicking will behave as appropriate for
726       each control.
727
728       QStyle::SH_ScrollBar_ScrollWhenPointerLeavesControl - a boolean value.
729       If TRUE, when clicking a scrollbar SubControl, holding the mouse button
730       down and moving the pointer outside the SubControl, the scrollbar
731       continues to scroll. If FALSE, the scollbar stops scrolling when the
732       pointer leaves the SubControl.
733
734       QStyle::SH_TabBar_Alignment - the alignment for tabs in a QTabWidget.
735       Possible values are Qt::AlignLeft, Qt::AlignCenter and Qt::AlignRight.
736
737       QStyle::SH_Header_ArrowAlignment - the placement of the sorting
738       indicator may appear in list or table headers. Possible values are
739       Qt::Left or Qt::Right.
740
741       QStyle::SH_Slider_SnapToValue - sliders snap to values while moving,
742       like Windows
743
744       QStyle::SH_Slider_SloppyKeyEvents - key presses handled in a sloppy
745       manner, i.e. left on a vertical slider subtracts a line.
746
747       QStyle::SH_ProgressDialog_CenterCancelButton - center button on
748       progress dialogs, like Motif, otherwise right aligned.
749
750       QStyle::SH_ProgressDialog_TextLabelAlignment - Qt::AlignmentFlags --
751       text label alignment in progress dialogs; Center on windows,
752       Auto|VCenter otherwise.
753
754       QStyle::SH_PrintDialog_RightAlignButtons - right align buttons in the
755       print dialog, like Windows.
756
757       QStyle::SH_MainWindow_SpaceBelowMenuBar - 1 or 2 pixel space between
758       the menubar and the dockarea, like Windows.
759
760       QStyle::SH_FontDialog_SelectAssociatedText - select the text in the
761       line edit, or when selecting an item from the listbox, or when the line
762       edit receives focus, like Windows.
763
764       QStyle::SH_PopupMenu_AllowActiveAndDisabled - allows disabled menu
765       items to be active.
766
767       QStyle::SH_PopupMenu_SpaceActivatesItem - pressing Space activates the
768       item, like Motif.
769
770       QStyle::SH_PopupMenu_SubMenuPopupDelay - the number of milliseconds to
771       wait before opening a submenu; 256 on windows, 96 on Motif.
772
773       QStyle::SH_PopupMenu_Scrollable - whether popupmenu's must support
774       scrolling.
775
776       QStyle::SH_PopupMenu_SloppySubMenus - whether popupmenu's must support
777       sloppy submenu; as implemented on Mac OS.
778
779       QStyle::SH_ScrollView_FrameOnlyAroundContents - whether scrollviews
780       draw their frame only around contents (like Motif), or around contents,
781       scrollbars and corner widgets (like Windows).
782
783       QStyle::SH_MenuBar_AltKeyNavigation - menubars items are navigable by
784       pressing Alt, followed by using the arrow keys to select the desired
785       item.
786
787       QStyle::SH_ComboBox_ListMouseTracking - mouse tracking in combobox
788       dropdown lists.
789
790       QStyle::SH_PopupMenu_MouseTracking - mouse tracking in popup menus.
791
792       QStyle::SH_MenuBar_MouseTracking - mouse tracking in menubars.
793
794       QStyle::SH_ItemView_ChangeHighlightOnFocus - gray out selected items
795       when losing focus.
796
797       QStyle::SH_Widget_ShareActivation - turn on sharing activation with
798       floating modeless dialogs.
799
800       QStyle::SH_TabBar_SelectMouseType - which type of mouse event should
801       cause a tab to be selected.
802
803       QStyle::SH_ListViewExpand_SelectMouseType - which type of mouse event
804       should cause a listview expansion to be selected.
805
806       QStyle::SH_TabBar_PreferNoArrows - whether a tabbar should suggest a
807       size to prevent scoll arrows.
808
809       QStyle::SH_ComboBox_Popup - allows popups as a combobox dropdown menu.
810
811       QStyle::SH_Workspace_FillSpaceOnMaximize - the workspace should
812       maximize the client area.
813
814       QStyle::SH_TitleBar_NoBorder - the titlebar has no border
815
816       QStyle::SH_ScrollBar_StopMouseOverSlider - stops autorepeat when slider
817       reaches mouse
818
819       QStyle::SH_BlinkCursorWhenTextSelected - whether cursor should blink
820       when text is selected
821
822       QStyle::SH_RichText_FullWidthSelection - whether richtext selections
823       should extend the full width of the document.
824
825       QStyle::SH_GroupBox_TextLabelVerticalAlignment - how to vertically
826       align a groupbox's text label.
827
828       QStyle::SH_GroupBox_TextLabelColor - how to paint a groupbox's text
829       label.
830
831       QStyle::SH_DialogButtons_DefaultButton - which buttons gets the default
832       status in a dialog's button widget.
833
834       QStyle::SH_CustomBase - base value for custom ControlElements. All
835       values above this are reserved for custom use. Therefore, custom values
836       must be greater than this value.
837
838       QStyle::SH_ToolButton_Uses3D - indicates whether QToolButtons should
839       use a 3D frame when the mouse is over them
840
841       QStyle::SH_ToolBox_SelectedPageTitleBold - Boldness of the selected
842       page title in a QToolBox.
843
844       QStyle::SH_LineEdit_PasswordCharacter - The QChar Unicode character to
845       be used for passwords.
846
847       QStyle::SH_Table_GridLineColor
848
849       QStyle::SH_UnderlineAccelerator - whether accelerators are underlined
850
851       See also styleHint().
852

QStyle::StylePixmap

854       This enum represents a StylePixmap. A StylePixmap is a pixmap that can
855       follow some existing GUI style or guideline.
856
857       QStyle::SP_TitleBarMinButton - minimize button on titlebars. For
858       example, in a QWorkspace.
859
860       QStyle::SP_TitleBarMaxButton - maximize button on titlebars.
861
862       QStyle::SP_TitleBarCloseButton - close button on titlebars.
863
864       QStyle::SP_TitleBarNormalButton - normal (restore) button on titlebars.
865
866       QStyle::SP_TitleBarShadeButton - shade button on titlebars.
867
868       QStyle::SP_TitleBarUnshadeButton - unshade button on titlebars.
869
870       QStyle::SP_MessageBoxInformation - the 'information' icon.
871
872       QStyle::SP_MessageBoxWarning - the 'warning' icon.
873
874       QStyle::SP_MessageBoxCritical - the 'critical' icon.
875
876       QStyle::SP_MessageBoxQuestion - the 'question' icon.
877
878       QStyle::SP_DockWindowCloseButton - close button on dock windows; see
879       also QDockWindow.
880
881       QStyle::SP_CustomBase - base value for custom ControlElements. All
882       values above this are reserved for custom use. Therefore, custom values
883       must be greater than this value.
884
885       See also stylePixmap().
886

QStyle::SubControl

888       This enum represents a SubControl within a ComplexControl.
889
890       QStyle::SC_None - special value that matches no other SubControl.
891
892       QStyle::SC_ScrollBarAddLine - scrollbar add line (i.e. down/right
893       arrow); see also QScrollbar.
894
895       QStyle::SC_ScrollBarSubLine - scrollbar sub line (i.e. up/left arrow).
896
897       QStyle::SC_ScrollBarAddPage - scrollbar add page (i.e. page down).
898
899       QStyle::SC_ScrollBarSubPage - scrollbar sub page (i.e. page up).
900
901       QStyle::SC_ScrollBarFirst - scrollbar first line (i.e. home).
902
903       QStyle::SC_ScrollBarLast - scrollbar last line (i.e. end).
904
905       QStyle::SC_ScrollBarSlider - scrollbar slider handle.
906
907       QStyle::SC_ScrollBarGroove - special subcontrol which contains the area
908       in which the slider handle may move.
909
910       QStyle::SC_SpinWidgetUp - spinwidget up/increase; see also QSpinBox.
911
912       QStyle::SC_SpinWidgetDown - spinwidget down/decrease.
913
914       QStyle::SC_SpinWidgetFrame - spinwidget frame.
915
916       QStyle::SC_SpinWidgetEditField - spinwidget edit field.
917
918       QStyle::SC_SpinWidgetButtonField - spinwidget button field.
919
920       QStyle::SC_ComboBoxEditField - combobox edit field; see also QComboBox.
921
922       QStyle::SC_ComboBoxArrow - combobox arrow
923
924       QStyle::SC_ComboBoxFrame - combobox frame
925
926       QStyle::SC_ComboBoxListBoxPopup - combobox list box
927
928       QStyle::SC_SliderGroove - special subcontrol which contains the area in
929       which the slider handle may move.
930
931       QStyle::SC_SliderHandle - slider handle.
932
933       QStyle::SC_SliderTickmarks - slider tickmarks.
934
935       QStyle::SC_ToolButton - tool button; see also QToolbutton.
936
937       QStyle::SC_ToolButtonMenu - subcontrol for opening a popup menu in a
938       tool button; see also QPopupMenu.
939
940       QStyle::SC_TitleBarSysMenu - system menu button (i.e. restore, close,
941       etc.).
942
943       QStyle::SC_TitleBarMinButton - minimize button.
944
945       QStyle::SC_TitleBarMaxButton - maximize button.
946
947       QStyle::SC_TitleBarCloseButton - close button.
948
949       QStyle::SC_TitleBarLabel - window title label.
950
951       QStyle::SC_TitleBarNormalButton - normal (restore) button.
952
953       QStyle::SC_TitleBarShadeButton - shade button.
954
955       QStyle::SC_TitleBarUnshadeButton - unshade button.
956
957       QStyle::SC_ListView - the list view area.
958
959       QStyle::SC_ListViewBranch - (internal)
960
961       QStyle::SC_ListViewExpand - expand item (i.e. show/hide child items).
962
963       QStyle::SC_All - special value that matches all SubControls.
964
965       See also ComplexControl.
966

QStyle::SubRect

968       This enum represents a sub-area of a widget. Style implementations
969       would use these areas to draw the different parts of a widget.
970
971       QStyle::SR_PushButtonContents - area containing the label (iconset with
972       text or pixmap).
973
974       QStyle::SR_PushButtonFocusRect - area for the focus rect (usually
975       larger than the contents rect).
976
977       QStyle::SR_CheckBoxIndicator - area for the state indicator (e.g. check
978       mark).
979
980       QStyle::SR_CheckBoxContents - area for the label (text or pixmap).
981
982       QStyle::SR_CheckBoxFocusRect - area for the focus indicator.
983
984       QStyle::SR_RadioButtonIndicator - area for the state indicator.
985
986       QStyle::SR_RadioButtonContents - area for the label.
987
988       QStyle::SR_RadioButtonFocusRect - area for the focus indicator.
989
990       QStyle::SR_ComboBoxFocusRect - area for the focus indicator.
991
992       QStyle::SR_SliderFocusRect - area for the focus indicator.
993
994       QStyle::SR_DockWindowHandleRect - area for the tear-off handle.
995
996       QStyle::SR_ProgressBarGroove - area for the groove.
997
998       QStyle::SR_ProgressBarContents - area for the progress indicator.
999
1000       QStyle::SR_ProgressBarLabel - area for the text label.
1001
1002       QStyle::SR_ToolButtonContents - area for the tool button's label.
1003
1004       QStyle::SR_DialogButtonAccept - area for a dialog's accept button.
1005
1006       QStyle::SR_DialogButtonReject - area for a dialog's reject button.
1007
1008       QStyle::SR_DialogButtonApply - area for a dialog's apply button.
1009
1010       QStyle::SR_DialogButtonHelp - area for a dialog's help button.
1011
1012       QStyle::SR_DialogButtonAll - area for a dialog's all button.
1013
1014       QStyle::SR_DialogButtonRetry - area for a dialog's retry button.
1015
1016       QStyle::SR_DialogButtonAbort - area for a dialog's abort button.
1017
1018       QStyle::SR_DialogButtonIgnore - area for a dialog's ignore button.
1019
1020       QStyle::SR_DialogButtonCustom - area for a dialog's custom widget area
1021       (in button row).
1022
1023       QStyle::SR_ToolBoxTabContents - area for a toolbox tab's icon and label
1024
1025       QStyle::SR_CustomBase - base value for custom ControlElements. All
1026       values above this are reserved for custom use. Therefore, custom values
1027       must be greater than this value.
1028
1029       See also subRect().
1030

MEMBER FUNCTION DOCUMENTATION

QStyle::QStyle ()

1033       Constructs a QStyle.
1034

QStyle::~QStyle () [virtual]

1036       Destroys the style and frees all allocated resources.
1037

int QStyle::defaultFrameWidth () const

1039       This function is obsolete. It is provided to keep old source working.
1040       We strongly advise against using it in new code.
1041

void QStyle::drawComplexControl ( ComplexControl control, QPainter * p, const

1043       QWidget * widget, const QRect & r, const QColorGroup & cg, SFlags how =
1044       Style_Default, SCFlags sub = SC_All, SCFlags subActive = SC_None, const
1045       QStyleOption & opt = QStyleOption::Default ) const [pure virtual]
1046       Draws the ComplexControl control using the painter p in the area r.
1047       Colors are used from the color group cg. The sub argument specifies
1048       which SubControls to draw. Multiple SubControls can be OR'ed together.
1049       The subActive argument specifies which SubControl is active.
1050
1051       The rect r should be in logical coordinates. Reimplementations of this
1052       function should use visualRect() to change the logical coordinates into
1053       screen coordinates when using drawPrimitive() and drawControl().
1054
1055       The how argument is used to control how the ComplexControl is drawn.
1056       Multiple flags can OR'ed together. See the table below for an
1057       explanation of which flags are used with the various ComplexControls.
1058
1059       The widget argument is a pointer to a QWidget or one of its subclasses.
1060       The widget can be cast to the appropriate type based on the value of
1061       control. The opt argument can be used to pass extra information
1062       required when drawing the ComplexControl. Note that opt may be the
1063       default value even for ComplexControls that can make use of the extra
1064       options. See the table below for the appropriate widget and opt usage:
1065
1066       <center>.nf
1067
1068       </center>
1069
1070       See also ComplexControl and SubControl.
1071

void QStyle::drawComplexControlMask ( ComplexControl control, QPainter * p,

1073       const QWidget * widget, const QRect & r, const QStyleOption & opt =
1074       QStyleOption::Default ) const [pure virtual]
1075       Draw a bitmask for the ComplexControl control using the painter p in
1076       the area r. See drawComplexControl() for an explanation of the use of
1077       the widget and opt arguments.
1078
1079       The rect r should be in logical coordinates. Reimplementations of this
1080       function should use visualRect() to change the logical corrdinates into
1081       screen coordinates when using drawPrimitive() and drawControl().
1082
1083       See also drawComplexControl() and ComplexControl.
1084

void QStyle::drawControl ( ControlElement element, QPainter * p, const QWidget

1086       * widget, const QRect & r, const QColorGroup & cg, SFlags how =
1087       Style_Default, const QStyleOption & opt = QStyleOption::Default ) const
1088       [pure virtual]
1089       Draws the ControlElement element using the painter p in the area r.
1090       Colors are used from the color group cg.
1091
1092       The rect r should be in screen coordinates.
1093
1094       The how argument is used to control how the ControlElement is drawn.
1095       Multiple flags can be OR'ed together. See the table below for an
1096       explanation of which flags are used with the various ControlElements.
1097
1098       The widget argument is a pointer to a QWidget or one of its subclasses.
1099       The widget can be cast to the appropriate type based on the value of
1100       element. The opt argument can be used to pass extra information
1101       required when drawing the ControlElement. Note that opt may be the
1102       default value even for ControlElements that can make use of the extra
1103       options. See the table below for the appropriate widget and opt usage:
1104
1105       <center>.nf
1106
1107       </center>
1108
1109       See also ControlElement and StyleFlags.
1110

void QStyle::drawControlMask ( ControlElement element, QPainter * p, const

1112       QWidget * widget, const QRect & r, const QStyleOption & opt =
1113       QStyleOption::Default ) const [pure virtual]
1114       Draw a bitmask for the ControlElement element using the painter p in
1115       the area r. See drawControl() for an explanation of the use of the
1116       widget and opt arguments.
1117
1118       The rect r should be in screen coordinates.
1119
1120       See also drawControl() and ControlElement.
1121

void QStyle::drawItem ( QPainter * p, const QRect & r, int flags, const

1123       QColorGroup & g, bool enabled, const QPixmap * pixmap, const QString &
1124       text, int len = -1, const QColor * penColor = 0 ) const [virtual]
1125       Draws the text or pixmap in rectangle r using painter p and color group
1126       g. The pen color is specified with penColor. The enabled bool indicates
1127       whether or not the item is enabled; when reimplementing this bool
1128       should influence how the item is drawn. If len is -1 (the default) all
1129       the text is drawn; otherwise only the first len characters of text are
1130       drawn. The text is aligned and wrapped according to the alignment flags
1131       (see Qt::AlignmentFlags).
1132
1133       By default, if both the text and the pixmap are not null, the pixmap is
1134       drawn and the text is ignored.
1135

void QStyle::drawPrimitive ( PrimitiveElement pe, QPainter * p, const QRect &

1137       r, const QColorGroup & cg, SFlags flags = Style_Default, const
1138       QStyleOption & opt = QStyleOption::Default ) const [pure virtual]
1139       Draws the style PrimitiveElement pe using the painter p in the area r.
1140       Colors are used from the color group cg.
1141
1142       The rect r should be in screen coordinates.
1143
1144       The flags argument is used to control how the PrimitiveElement is
1145       drawn. Multiple flags can be OR'ed together.
1146
1147       For example, a pressed button would be drawn with the flags
1148       Style_Enabled and Style_Down.
1149
1150       The opt argument can be used to control how various PrimitiveElements
1151       are drawn. Note that opt may be the default value even for
1152       PrimitiveElements that make use of extra options. When opt is non-
1153       default, it is used as follows:
1154
1155       <center>.nf
1156
1157       </center>
1158
1159       For all other PrimitiveElements, opt is unused.
1160
1161       See also StyleFlags.
1162
1163       Example: themes/wood.cpp.
1164

QRect QStyle::itemRect ( QPainter * p, const QRect & r, int flags, bool

1166       enabled, const QPixmap * pixmap, const QString & text, int len = -1 )
1167       const [virtual]
1168       Returns the appropriate area (see below) within rectangle r in which to
1169       draw the text or pixmap using painter p. If len is -1 (the default) all
1170       the text is drawn; otherwise only the first len characters of text are
1171       drawn. The text is aligned in accordance with the alignment flags (see
1172       Qt::AlignmentFlags). The enabled bool indicates whether or not the item
1173       is enabled.
1174
1175       If r is larger than the area needed to render the text the rectangle
1176       that is returned will be offset within r in accordance with the
1177       alignment flags. For example if flags is AlignCenter the returned
1178       rectangle will be centered within r. If r is smaller than the area
1179       needed the rectangle that is returned will be larger than r (the
1180       smallest rectangle large enough to render the text or pixmap).
1181
1182       By default, if both the text and the pixmap are not null, the pixmap is
1183       drawn and the text is ignored.
1184

int QStyle::pixelMetric ( PixelMetric metric, const QWidget * widget = 0 )

1186       const [pure virtual]
1187       Returns the pixel metric for metric. The widget argument is a pointer
1188       to a QWidget or one of its subclasses. The widget can be cast to the
1189       appropriate type based on the value of metric. Note that widget may be
1190       zero even for PixelMetrics that can make use of widget. See the table
1191       below for the appropriate widget casts:
1192
1193       <center>.nf
1194
1195       </center>
1196

void QStyle::polish ( QWidget * ) [virtual]

1198       Initializes the appearance of a widget.
1199
1200       This function is called for every widget at some point after it has
1201       been fully created but just before it is shown the very first time.
1202
1203       Reasonable actions in this function might be to call
1204       QWidget::setBackgroundMode() for the widget. An example of highly
1205       unreasonable use would be setting the geometry! Reimplementing this
1206       function gives you a back-door through which you can change the
1207       appearance of a widget. With Qt 3.0's style engine you will rarely need
1208       to write your own polish(); instead reimplement drawItem(),
1209       drawPrimitive(), etc.
1210
1211       The QWidget::inherits() function may provide enough information to
1212       allow class-specific customizations. But be careful not to hard-code
1213       things too much because new QStyle subclasses are expected to work
1214       reasonably with all current and future widgets.
1215
1216       See also unPolish().
1217

void QStyle::polish ( QApplication * ) [virtual]

1219       This is an overloaded member function, provided for convenience. It
1220       behaves essentially like the above function.
1221
1222       Late initialization of the QApplication object.
1223
1224       See also unPolish().
1225

void QStyle::polish ( QPalette & ) [virtual]

1227       This is an overloaded member function, provided for convenience. It
1228       behaves essentially like the above function.
1229
1230       The style may have certain requirements for color palettes. In this
1231       function it has the chance to change the palette according to these
1232       requirements.
1233
1234       See also QPalette and QApplication::setPalette().
1235

void QStyle::polishPopupMenu ( QPopupMenu * ) [pure virtual]

1237       Polishes the popup menu according to the GUI style. This usually means
1238       setting the mouse tracking (QPopupMenu::setMouseTracking()) and whether
1239       the menu is checkable by default (QPopupMenu::setCheckable()).
1240

SubControl QStyle::querySubControl ( ComplexControl control, const QWidget *

1242       widget, const QPoint & pos, const QStyleOption & opt =
1243       QStyleOption::Default ) const [pure virtual]
1244       Returns the SubControl for widget at the point pos. The widget argument
1245       is a pointer to a QWidget or one of its subclasses. The widget can be
1246       cast to the appropriate type based on the value of control. The opt
1247       argument can be used to pass extra information required when drawing
1248       the ComplexControl. Note that opt may be the default value even for
1249       ComplexControls that can make use of the extra options. See
1250       drawComplexControl() for an explanation of the widget and opt
1251       arguments.
1252
1253       Note that pos is passed in screen coordinates. When using
1254       querySubControlMetrics() to check for hits and misses, use visualRect()
1255       to change the logical coordinates into screen coordinates.
1256
1257       See also drawComplexControl(), ComplexControl, SubControl, and
1258       querySubControlMetrics().
1259

QRect QStyle::querySubControlMetrics ( ComplexControl control, const QWidget *

1261       widget, SubControl subcontrol, const QStyleOption & opt =
1262       QStyleOption::Default ) const [pure virtual]
1263       Returns the rect for the SubControl subcontrol for widget in logical
1264       coordinates.
1265
1266       The widget argument is a pointer to a QWidget or one of its subclasses.
1267       The widget can be cast to the appropriate type based on the value of
1268       control. The opt argument can be used to pass extra information
1269       required when drawing the ComplexControl. Note that opt may be the
1270       default value even for ComplexControls that can make use of the extra
1271       options. See drawComplexControl() for an explanation of the widget and
1272       opt arguments.
1273
1274       See also drawComplexControl(), ComplexControl, and SubControl.
1275

QSize QStyle::scrollBarExtent () const

1277       This function is obsolete. It is provided to keep old source working.
1278       We strongly advise against using it in new code.
1279

QSize QStyle::sizeFromContents ( ContentsType contents, const QWidget *

1281       widget, const QSize & contentsSize, const QStyleOption & opt =
1282       QStyleOption::Default ) const [pure virtual]
1283       Returns the size of widget based on the contents size contentsSize.
1284
1285       The widget argument is a pointer to a QWidget or one of its subclasses.
1286       The widget can be cast to the appropriate type based on the value of
1287       contents. The opt argument can be used to pass extra information
1288       required when calculating the size. Note that opt may be the default
1289       value even for ContentsTypes that can make use of the extra options.
1290       See the table below for the appropriate widget and opt usage:
1291
1292       <center>.nf
1293
1294       </center>
1295

int QStyle::styleHint ( StyleHint stylehint, const QWidget * widget = 0, const

1297       QStyleOption & opt = QStyleOption::Default, QStyleHintReturn *
1298       returnData = 0 ) const [pure virtual]
1299       Returns the style hint stylehint for widget. Currently, widget, opt,
1300       and returnData are unused; they're included to allow for future
1301       enhancements.
1302
1303       For an explanation of the return value see StyleHint.
1304

QPixmap QStyle::stylePixmap ( StylePixmap stylepixmap, const QWidget * widget

1306       = 0, const QStyleOption & opt = QStyleOption::Default ) const [pure
1307       virtual]
1308       Returns a pixmap for stylepixmap.
1309
1310       The opt argument can be used to pass extra information required when
1311       drawing the ControlElement. Note that opt may be the default value even
1312       for StylePixmaps that can make use of the extra options. Currently, the
1313       opt argument is unused.
1314
1315       The widget argument is a pointer to a QWidget or one of its subclasses.
1316       The widget can be cast to the appropriate type based on the value of
1317       stylepixmap. See the table below for the appropriate widget casts:
1318
1319       <center>.nf
1320
1321       </center>
1322
1323       See also StylePixmap.
1324

QRect QStyle::subRect ( SubRect subrect, const QWidget * widget ) const [pure

1326       virtual]
1327       Returns the sub-area subrect for the widget in logical coordinates.
1328
1329       The widget argument is a pointer to a QWidget or one of its subclasses.
1330       The widget can be cast to the appropriate type based on the value of
1331       subrect. See the table below for the appropriate widget casts:
1332
1333       <center>.nf
1334
1335       </center>
1336
1337       The tear-off handle (SR_DockWindowHandleRect) for QDockWindow is a
1338       private class. Use QWidget::parentWidget() to access the QDockWindow:
1339
1340               if ( !widget->parentWidget() )
1341                   return;
1342               const QDockWindow *dw = (const QDockWindow *) widget->parentWidget();
1343
1344       See also SubRect.
1345

void QStyle::tabbarMetrics ( const QWidget * t, int & hf, int & vf, int & ov )

1347       const
1348       This function is obsolete. It is provided to keep old source working.
1349       We strongly advise against using it in new code.
1350

void QStyle::unPolish ( QWidget * ) [virtual]

1352       Undoes the initialization of a widget's appearance.
1353
1354       This function is the counterpart to polish. It is called for every
1355       polished widget when the style is dynamically changed. The former style
1356       has to unpolish its settings before the new style can polish them
1357       again.
1358
1359       See also polish().
1360

void QStyle::unPolish ( QApplication * ) [virtual]

1362       This is an overloaded member function, provided for convenience. It
1363       behaves essentially like the above function.
1364
1365       Undoes the application polish.
1366
1367       See also polish().
1368

QRect QStyle::visualRect ( const QRect & logical, const QWidget * w ) [static]

1370
1371       Returns the rect logical in screen coordinates. The bounding rect for
1372       widget w is used to perform the translation. This function is provided
1373       to aid style implementors in supporting right-to-left mode.
1374
1375       See also QApplication::reverseLayout().
1376

QRect QStyle::visualRect ( const QRect & logical, const QRect & bounding )

1378       [static]
1379       This is an overloaded member function, provided for convenience. It
1380       behaves essentially like the above function.
1381
1382       Returns the rect logical in screen coordinates. The rect bounding is
1383       used to perform the translation. This function is provided to aid style
1384       implementors in supporting right-to-left mode.
1385
1386       See also QApplication::reverseLayout().
1387
1388

SEE ALSO

1390       http://doc.trolltech.com/qstyle.html
1391       http://www.trolltech.com/faq/tech.html
1392
1394       Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com.  See the
1395       license file included in the distribution for a complete license
1396       statement.
1397

AUTHOR

1399       Generated automatically from the source code.
1400

BUGS

1402       If you find a bug in Qt, please report it as described in
1403       http://doc.trolltech.com/bughowto.html.  Good bug reports help us to
1404       help you. Thank you.
1405
1406       The definitive Qt documentation is provided in HTML format; it is
1407       located at $QTDIR/doc/html and can be read using Qt Assistant or with a
1408       web browser. This man page is provided as a convenience for those users
1409       who prefer man pages, although this format is not officially supported
1410       by Trolltech.
1411
1412       If you find errors in this manual page, please report them to qt-
1413       bugs@trolltech.com.  Please include the name of the manual page
1414       (qstyle.3qt) and the Qt version (3.3.8).
1415
1416
1417
1418Trolltech AS                    2 February 2007                    QStyle(3qt)
Impressum