'\" t .TH TQStyle 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*- .\" Copyright 1992-2007 Trolltech ASA. All rights reserved. See the .\" license file included in the distribution for a complete license .\" statement. .\" .ad l .nh .SH NAME TQStyle \- The look and feel of a GUI .SH SYNOPSIS \fC#include \fR .PP Inherits TQObject. .PP Inherited by QCommonStyle. .PP .SS "Public Members" .in +1c .ti -1c .BI "\fBTQStyle\fR ()" .br .ti -1c .BI "virtual \fB~TQStyle\fR ()" .br .ti -1c .BI "virtual void \fBpolish\fR ( TQWidget * )" .br .ti -1c .BI "virtual void \fBunPolish\fR ( TQWidget * )" .br .ti -1c .BI "virtual void \fBpolish\fR ( QApplication * )" .br .ti -1c .BI "virtual void \fBunPolish\fR ( QApplication * )" .br .ti -1c .BI "virtual void \fBpolish\fR ( TQPalette & )" .br .ti -1c .BI "virtual void \fBpolishPopupMenu\fR ( TQPopupMenu * ) = 0" .br .ti -1c .BI "virtual TQRect \fBitemRect\fR ( TQPainter * p, const TQRect & r, int flags, bool enabled, const TQPixmap * pixmap, const TQString & text, int len = -1 ) const" .br .ti -1c .BI "virtual void \fBdrawItem\fR ( TQPainter * p, const TQRect & r, int flags, const TQColorGroup & g, bool enabled, const TQPixmap * pixmap, const TQString & text, int len = -1, const TQColor * penColor = 0 ) const" .br .ti -1c .BI "enum \fBPrimitiveElement\fR { PE_ButtonCommand, PE_ButtonDefault, PE_ButtonBevel, PE_ButtonTool, PE_ButtonDropDown, PE_FocusRect, PE_ArrowUp, PE_ArrowDown, PE_ArrowRight, PE_ArrowLeft, PE_SpinWidgetUp, PE_SpinWidgetDown, PE_SpinWidgetPlus, PE_SpinWidgetMinus, PE_Indicator, PE_IndicatorMask, PE_ExclusiveIndicator, PE_ExclusiveIndicatorMask, PE_DockWindowHandle, PE_DockWindowSeparator, PE_DockWindowResizeHandle, PE_Splitter, PE_Panel, PE_PanelPopup, PE_PanelMenuBar, PE_PanelDockWindow, PE_TabBarBase, PE_HeaderSection, PE_HeaderArrow, PE_StatusBarSection, PE_GroupBoxFrame, PE_Separator, PE_SizeGrip, PE_CheckMark, PE_ScrollBarAddLine, PE_ScrollBarSubLine, PE_ScrollBarAddPage, PE_ScrollBarSubPage, PE_ScrollBarSlider, PE_ScrollBarFirst, PE_ScrollBarLast, PE_ProgressBarChunk, PE_PanelLineEdit, PE_PanelTabWidget, PE_WindowFrame, PE_CheckListController, PE_CheckListIndicator, PE_CheckListExclusiveIndicator, PE_PanelGroupBox, PE_RubberBand, PE_CustomBase = 0xf000000 }" .br .ti -1c .BI "enum \fBStyleFlags\fR { Style_Default = 0x00000000, Style_Enabled = 0x00000001, Style_Raised = 0x00000002, Style_Sunken = 0x00000004, Style_Off = 0x00000008, Style_NoChange = 0x00000010, Style_On = 0x00000020, Style_Down = 0x00000040, Style_Horizontal = 0x00000080, Style_HasFocus = 0x00000100, Style_Top = 0x00000200, Style_Bottom = 0x00000400, Style_FocusAtBorder = 0x00000800, Style_AutoRaise = 0x00001000, Style_MouseOver = 0x00002000, Style_Up = 0x00004000, Style_Selected = 0x00008000, Style_Active = 0x00010000, Style_ButtonDefault = 0x00020000 }" .br .ti -1c .BI "virtual void \fBdrawPrimitive\fR ( PrimitiveElement pe, TQPainter * p, const TQRect & r, const TQColorGroup & cg, SFlags flags = Style_Default, const TQStyleOption & opt = TQStyleOption::Default ) const = 0" .br .ti -1c .BI "enum \fBControlElement\fR { CE_PushButton, CE_PushButtonLabel, CE_CheckBox, CE_CheckBoxLabel, CE_RadioButton, CE_RadioButtonLabel, CE_TabBarTab, CE_TabBarLabel, CE_ProgressBarGroove, CE_ProgressBarContents, CE_ProgressBarLabel, CE_PopupMenuItem, CE_MenuBarItem, CE_ToolButtonLabel, CE_MenuBarEmptyArea, CE_PopupMenuScroller, CE_DockWindowEmptyArea, CE_PopupMenuVerticalExtra, CE_PopupMenuHorizontalExtra, CE_ToolBoxTab, CE_HeaderLabel, CE_CustomBase = 0xf0000000 }" .br .ti -1c .BI "virtual void \fBdrawControl\fR ( ControlElement element, TQPainter * p, const TQWidget * widget, const TQRect & r, const TQColorGroup & cg, SFlags how = Style_Default, const TQStyleOption & opt = TQStyleOption::Default ) const = 0" .br .ti -1c .BI "virtual void \fBdrawControlMask\fR ( ControlElement element, TQPainter * p, const TQWidget * widget, const TQRect & r, const TQStyleOption & opt = TQStyleOption::Default ) const = 0" .br .ti -1c .BI "enum \fBSubRect\fR { SR_PushButtonContents, SR_PushButtonFocusRect, SR_CheckBoxIndicator, SR_CheckBoxContents, SR_CheckBoxFocusRect, SR_RadioButtonIndicator, SR_RadioButtonContents, SR_RadioButtonFocusRect, SR_ComboBoxFocusRect, SR_SliderFocusRect, SR_DockWindowHandleRect, SR_ProgressBarGroove, SR_ProgressBarContents, SR_ProgressBarLabel, SR_ToolButtonContents, SR_DialogButtonAccept, SR_DialogButtonReject, SR_DialogButtonApply, SR_DialogButtonHelp, SR_DialogButtonAll, SR_DialogButtonAbort, SR_DialogButtonIgnore, SR_DialogButtonRetry, SR_DialogButtonCustom, SR_ToolBoxTabContents, SR_CustomBase = 0xf0000000 }" .br .ti -1c .BI "virtual TQRect \fBsubRect\fR ( SubRect subrect, const TQWidget * widget ) const = 0" .br .ti -1c .BI "enum \fBComplexControl\fR { CC_SpinWidget, CC_ComboBox, CC_ScrollBar, CC_Slider, CC_ToolButton, CC_TitleBar, CC_ListView, CC_CustomBase = 0xf0000000 }" .br .ti -1c .BI "enum \fBSubControl\fR { SC_None = 0x00000000, SC_ScrollBarAddLine = 0x00000001, SC_ScrollBarSubLine = 0x00000002, SC_ScrollBarAddPage = 0x00000004, SC_ScrollBarSubPage = 0x00000008, SC_ScrollBarFirst = 0x00000010, SC_ScrollBarLast = 0x00000020, SC_ScrollBarSlider = 0x00000040, SC_ScrollBarGroove = 0x00000080, SC_SpinWidgetUp = 0x00000001, SC_SpinWidgetDown = 0x00000002, SC_SpinWidgetFrame = 0x00000004, SC_SpinWidgetEditField = 0x00000008, SC_SpinWidgetButtonField = 0x00000010, SC_ComboBoxFrame = 0x00000001, SC_ComboBoxEditField = 0x00000002, SC_ComboBoxArrow = 0x00000004, SC_ComboBoxListBoxPopup = 0x00000008, SC_SliderGroove = 0x00000001, SC_SliderHandle = 0x00000002, SC_SliderTickmarks = 0x00000004, SC_ToolButton = 0x00000001, SC_ToolButtonMenu = 0x00000002, SC_TitleBarLabel = 0x00000001, SC_TitleBarSysMenu = 0x00000002, SC_TitleBarMinButton = 0x00000004, SC_TitleBarMaxButton = 0x00000008, SC_TitleBarCloseButton = 0x00000010, SC_TitleBarNormalButton = 0x00000020, SC_TitleBarShadeButton = 0x00000040, SC_TitleBarUnshadeButton = 0x00000080, SC_ListView = 0x00000001, SC_ListViewBranch = 0x00000002, SC_ListViewExpand = 0x00000004, SC_All = 0xffffffff }" .br .ti -1c .BI "virtual void \fBdrawComplexControl\fR ( ComplexControl control, TQPainter * p, const TQWidget * widget, const TQRect & r, const TQColorGroup & cg, SFlags how = Style_Default, SCFlags sub = SC_All, SCFlags subActive = SC_None, const TQStyleOption & opt = TQStyleOption::Default ) const = 0" .br .ti -1c .BI "virtual void \fBdrawComplexControlMask\fR ( ComplexControl control, TQPainter * p, const TQWidget * widget, const TQRect & r, const TQStyleOption & opt = TQStyleOption::Default ) const = 0" .br .ti -1c .BI "virtual TQRect \fBquerySubControlMetrics\fR ( ComplexControl control, const TQWidget * widget, SubControl subcontrol, const TQStyleOption & opt = TQStyleOption::Default ) const = 0" .br .ti -1c .BI "virtual SubControl \fBquerySubControl\fR ( ComplexControl control, const TQWidget * widget, const TQPoint & pos, const TQStyleOption & opt = TQStyleOption::Default ) const = 0" .br .ti -1c .BI "enum \fBPixelMetric\fR { PM_ButtonMargin, PM_ButtonDefaultIndicator, PM_MenuButtonIndicator, PM_ButtonShiftHorizontal, PM_ButtonShiftVertical, PM_DefaultFrameWidth, PM_SpinBoxFrameWidth, PM_MaximumDragDistance, PM_ScrollBarExtent, PM_ScrollBarSliderMin, PM_SliderThickness, PM_SliderControlThickness, PM_SliderLength, PM_SliderTickmarkOffset, PM_SliderSpaceAvailable, PM_DockWindowSeparatorExtent, PM_DockWindowHandleExtent, PM_DockWindowFrameWidth, PM_MenuBarFrameWidth, PM_TabBarTabOverlap, PM_TabBarTabHSpace, PM_TabBarTabVSpace, PM_TabBarBaseHeight, PM_TabBarBaseOverlap, PM_ProgressBarChunkWidth, PM_SplitterWidth, PM_TitleBarHeight, PM_IndicatorWidth, PM_IndicatorHeight, PM_ExclusiveIndicatorWidth, PM_ExclusiveIndicatorHeight, PM_PopupMenuScrollerHeight, PM_CheckListButtonSize, PM_CheckListControllerSize, PM_PopupMenuFrameHorizontalExtra, PM_PopupMenuFrameVerticalExtra, PM_DialogButtonsSeparator, PM_DialogButtonsButtonWidth, PM_DialogButtonsButtonHeight, PM_MDIFrameWidth, PM_MDIMinimizedWidth, PM_HeaderMargin, PM_HeaderMarkSize, PM_HeaderGripMargin, PM_TabBarTabShiftHorizontal, PM_TabBarTabShiftVertical, PM_TabBarScrollButtonWidth, PM_MenuBarItemSpacing, PM_ToolBarItemSpacing, PM_CustomBase = 0xf0000000 }" .br .ti -1c .BI "virtual int \fBpixelMetric\fR ( PixelMetric metric, const TQWidget * widget = 0 ) const = 0" .br .ti -1c .BI "enum \fBContentsType\fR { CT_PushButton, CT_CheckBox, CT_RadioButton, CT_ToolButton, CT_ComboBox, CT_Splitter, CT_DockWindow, CT_ProgressBar, CT_PopupMenuItem, CT_TabBarTab, CT_Slider, CT_Header, CT_LineEdit, CT_MenuBar, CT_SpinBox, CT_SizeGrip, CT_TabWidget, CT_DialogButtons, CT_CustomBase = 0xf0000000 }" .br .ti -1c .BI "virtual TQSize \fBsizeFromContents\fR ( ContentsType contents, const TQWidget * widget, const TQSize & contentsSize, const TQStyleOption & opt = TQStyleOption::Default ) const = 0" .br .ti -1c .BI "enum \fBStyleHint\fR { SH_EtchDisabledText, SH_GUIStyle, SH_ScrollBar_BackgroundMode, SH_ScrollBar_MiddleClickAbsolutePosition, SH_ScrollBar_ScrollWhenPointerLeavesControl, SH_TabBar_SelectMouseType, SH_TabBar_Alignment, SH_Header_ArrowAlignment, SH_Slider_SnapToValue, SH_Slider_SloppyKeyEvents, SH_ProgressDialog_CenterCancelButton, SH_ProgressDialog_TextLabelAlignment, SH_PrintDialog_RightAlignButtons, SH_MainWindow_SpaceBelowMenuBar, SH_FontDialog_SelectAssociatedText, SH_PopupMenu_AllowActiveAndDisabled, SH_PopupMenu_SpaceActivatesItem, SH_PopupMenu_SubMenuPopupDelay, SH_ScrollView_FrameOnlyAroundContents, SH_MenuBar_AltKeyNavigation, SH_ComboBox_ListMouseTracking, SH_PopupMenu_MouseTracking, SH_MenuBar_MouseTracking, SH_ItemView_ChangeHighlightOnFocus, SH_Widget_ShareActivation, SH_Workspace_FillSpaceOnMaximize, SH_ComboBox_Popup, SH_TitleBar_NoBorder, SH_ScrollBar_StopMouseOverSlider, SH_BlinkCursorWhenTextSelected, SH_RichText_FullWidthSelection, SH_PopupMenu_Scrollable, SH_GroupBox_TextLabelVerticalAlignment, SH_GroupBox_TextLabelColor, SH_PopupMenu_SloppySubMenus, SH_Table_GridLineColor, SH_LineEdit_PasswordCharacter, SH_DialogButtons_DefaultButton, SH_ToolBox_SelectedPageTitleBold, SH_TabBar_PreferNoArrows, SH_ScrollBar_LeftClickAbsolutePosition, SH_ListViewExpand_SelectMouseType, SH_UnderlineAccelerator, SH_ToolButton_Uses3D, SH_CustomBase = 0xf0000000 }" .br .ti -1c .BI "virtual int \fBstyleHint\fR ( StyleHint stylehint, const TQWidget * widget = 0, const TQStyleOption & opt = TQStyleOption::Default, TQStyleHintReturn * returnData = 0 ) const = 0" .br .ti -1c .BI "enum \fBStylePixmap\fR { SP_TitleBarMinButton, SP_TitleBarMaxButton, SP_TitleBarCloseButton, SP_TitleBarNormalButton, SP_TitleBarShadeButton, SP_TitleBarUnshadeButton, SP_DockWindowCloseButton, SP_MessageBoxInformation, SP_MessageBoxWarning, SP_MessageBoxCritical, SP_MessageBoxQuestion, SP_CustomBase = 0xf0000000 }" .br .ti -1c .BI "virtual TQPixmap \fBstylePixmap\fR ( StylePixmap stylepixmap, const TQWidget * widget = 0, const TQStyleOption & opt = TQStyleOption::Default ) const = 0" .br .ti -1c .BI "int defaultFrameWidth () const \fI(obsolete)\fR" .br .ti -1c .BI "void tabbarMetrics ( const TQWidget * t, int & hf, int & vf, int & ov ) const \fI(obsolete)\fR" .br .ti -1c .BI "TQSize scrollBarExtent () const \fI(obsolete)\fR" .br .in -1c .SS "Static Public Members" .in +1c .ti -1c .BI "TQRect \fBvisualRect\fR ( const TQRect & logical, const TQWidget * w )" .br .ti -1c .BI "TQRect \fBvisualRect\fR ( const TQRect & logical, const TQRect & bounding )" .br .in -1c .SH DESCRIPTION The TQStyle class specifies the look and feel of a GUI. .PP A large number of GUI elements are common to many widgets. The TQStyle class allows the look of these elements to be modified across all widgets that use the TQStyle functions. It also provides two feel options: Motif and Windows. .PP Although it is not possible to fully enumerate the look of graphical elements and the feel of widgets in a GUI, TQStyle provides a considerable amount of control and customisability. .PP In TQt 1.x the look and feel option for widgets was specified by a single value: the GUIStyle. Starting with TQt 2.0, this notion was expanded to allow the look to be specified by virtual drawing functions. .PP Derived classes may reimplement some or all of the drawing functions to modify the look of all widgets that use those functions. .PP Languages written from right to left (such as Arabic and Hebrew) usually also mirror the whole layout of widgets. If you design a style, you should take special care when drawing asymmetric elements to make sure that they also look correct in a mirrored layout. You can start your application with \fC-reverse\fR to check the mirrored layout. Also notice, that for a reversed layout, the light usually comes from top right instead of top left. .PP The actual reverse layout is performed automatically when possible. However, for the sake of flexibility, the translation cannot be performed everywhere. The documentation for each function in the TQStyle API states whether the function expects/returns logical or screen coordinates. Using logical coordinates (in ComplexControls, for example) provides great flexibility in controlling the look of a widget. Use visualRect() when necessary to translate logical coordinates into screen coordinates for drawing. .PP In TQt versions prior to 3.0, if you wanted a low level route into changing the appearance of a widget, you would reimplement polish(). With the new 3.0 style engine the recommended approach is to reimplement the draw functions, for example drawItem(), drawPrimitive(), drawControl(), drawControlMask(), drawComplexControl() and drawComplexControlMask(). Each of these functions is called with a range of parameters that provide information that you can use to determine how to draw them, e.g. style flags, rectangle, color group, etc. .PP For information on changing elements of an existing style or creating your own style see the Style overview. .PP Styles can also be created as plugins. .PP See also Widget Appearance and Style. .SS "Member Type Documentation" .SH "TQStyle::ComplexControl" This enum represents a ComplexControl. ComplexControls have different behaviour depending upon where the user clicks on them or which keys are pressed. .TP \fCTQStyle::CC_SpinWidget\fR .TP \fCTQStyle::CC_ComboBox\fR .TP \fCTQStyle::CC_ScrollBar\fR .TP \fCTQStyle::CC_Slider\fR .TP \fCTQStyle::CC_ToolButton\fR .TP \fCTQStyle::CC_TitleBar\fR .TP \fCTQStyle::CC_ListView\fR .TP \fCTQStyle::CC_CustomBase\fR - base value for custom ControlElements. All values above this are reserved for custom use. Therefore, custom values must be greater than this value. .PP See also SubControl and drawComplexControl(). .SH "TQStyle::ContentsType" This enum represents a ContentsType. It is used to calculate sizes for the contents of various widgets. .TP \fCTQStyle::CT_PushButton\fR .TP \fCTQStyle::CT_CheckBox\fR .TP \fCTQStyle::CT_RadioButton\fR .TP \fCTQStyle::CT_ToolButton\fR .TP \fCTQStyle::CT_ComboBox\fR .TP \fCTQStyle::CT_Splitter\fR .TP \fCTQStyle::CT_DockWindow\fR .TP \fCTQStyle::CT_ProgressBar\fR .TP \fCTQStyle::CT_PopupMenuItem\fR .TP \fCTQStyle::CT_TabBarTab\fR .TP \fCTQStyle::CT_Slider\fR .TP \fCTQStyle::CT_Header\fR .TP \fCTQStyle::CT_LineEdit\fR .TP \fCTQStyle::CT_MenuBar\fR .TP \fCTQStyle::CT_SpinBox\fR .TP \fCTQStyle::CT_SizeGrip\fR .TP \fCTQStyle::CT_TabWidget\fR .TP \fCTQStyle::CT_DialogButtons\fR .TP \fCTQStyle::CT_CustomBase\fR - base value for custom ControlElements. All values above this are reserved for custom use. Custom values must be greater than this value. .PP See also sizeFromContents(). .SH "TQStyle::ControlElement" This enum represents a ControlElement. A ControlElement is part of a widget that performs some action or displays information to the user. .TP \fCTQStyle::CE_PushButton\fR - the bevel and default indicator of a QPushButton. .TP \fCTQStyle::CE_PushButtonLabel\fR - the label (iconset with text or pixmap) of a QPushButton. .TP \fCTQStyle::CE_CheckBox\fR - the indicator of a QCheckBox. .TP \fCTQStyle::CE_CheckBoxLabel\fR - the label (text or pixmap) of a QCheckBox. .TP \fCTQStyle::CE_RadioButton\fR - the indicator of a QRadioButton. .TP \fCTQStyle::CE_RadioButtonLabel\fR - the label (text or pixmap) of a QRadioButton. .TP \fCTQStyle::CE_TabBarTab\fR - the tab within a QTabBar (a QTab). .TP \fCTQStyle::CE_TabBarLabel\fR - the label within a QTab. .TP \fCTQStyle::CE_ProgressBarGroove\fR - the groove where the progress indicator is drawn in a QProgressBar. .TP \fCTQStyle::CE_ProgressBarContents\fR - the progress indicator of a QProgressBar. .TP \fCTQStyle::CE_ProgressBarLabel\fR - the text label of a QProgressBar. .TP \fCTQStyle::CE_PopupMenuItem\fR - a menu item in a TQPopupMenu. .TP \fCTQStyle::CE_PopupMenuScroller\fR - scrolling areas in a popumenu when the style supports scrolling. .TP \fCTQStyle::CE_PopupMenuHorizontalExtra\fR - extra frame area set aside with PM_PopupMenuFrameHorizontalExtra .TP \fCTQStyle::CE_PopupMenuVerticalExtra\fR - extra frame area set aside with PM_PopupMenuFrameVerticalExtra .TP \fCTQStyle::CE_MenuBarItem\fR - a menu item in a TQMenuBar. .TP \fCTQStyle::CE_ToolButtonLabel\fR - a tool button's label. .TP \fCTQStyle::CE_MenuBarEmptyArea\fR - the empty area of a TQMenuBar. .TP \fCTQStyle::CE_DockWindowEmptyArea\fR - the empty area of a QDockWindow. .TP \fCTQStyle::CE_ToolBoxTab\fR - the toolbox's tab area .TP \fCTQStyle::CE_HeaderLabel\fR - the header's label .TP \fCTQStyle::CE_CustomBase\fR - base value for custom ControlElements. All values above this are reserved for custom use. Therefore, custom values must be greater than this value. .PP See also drawControl(). .SH "TQStyle::PixelMetric" This enum represents a PixelMetric. A PixelMetric is a style dependent size represented as a single pixel value. .TP \fCTQStyle::PM_ButtonMargin\fR - amount of whitespace between pushbutton labels and the frame. .TP \fCTQStyle::PM_ButtonDefaultIndicator\fR - width of the default-button indicator frame. .TP \fCTQStyle::PM_MenuButtonIndicator\fR - width of the menu button indicator proportional to the widget height. .TP \fCTQStyle::PM_ButtonShiftHorizontal\fR - horizontal contents shift of a button when the button is down. .TP \fCTQStyle::PM_ButtonShiftVertical\fR - vertical contents shift of a button when the button is down. .TP \fCTQStyle::PM_DefaultFrameWidth\fR - default frame width, usually 2. .TP \fCTQStyle::PM_SpinBoxFrameWidth\fR - frame width of a spin box. .TP \fCTQStyle::PM_MDIFrameWidth\fR - frame width of an MDI window. .TP \fCTQStyle::PM_MDIMinimizedWidth\fR - width of a minimized MSI window. .TP \fCTQStyle::PM_MaximumDragDistance\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. A value of -1 disables this behavior. .TP \fCTQStyle::PM_ScrollBarExtent\fR - width of a vertical scrollbar and the height of a horizontal scrollbar. .TP \fCTQStyle::PM_ScrollBarSliderMin\fR - the minimum height of a vertical scrollbar's slider and the minimum width of a horiztonal scrollbar slider. .TP \fCTQStyle::PM_SliderThickness\fR - total slider thickness. .TP \fCTQStyle::PM_SliderControlThickness\fR - thickness of the slider handle. .TP \fCTQStyle::PM_SliderLength\fR - length of the slider. .TP \fCTQStyle::PM_SliderTickmarkOffset\fR - the offset between the tickmarks and the slider. .TP \fCTQStyle::PM_SliderSpaceAvailable\fR - the available space for the slider to move. .TP \fCTQStyle::PM_DockWindowSeparatorExtent\fR - width of a separator in a horiztonal dock window and the height of a separator in a vertical dock window. .TP \fCTQStyle::PM_DockWindowHandleExtent\fR - width of the handle in a horizontal dock window and the height of the handle in a vertical dock window. .TP \fCTQStyle::PM_DockWindowFrameWidth\fR - frame width of a dock window. .TP \fCTQStyle::PM_MenuBarFrameWidth\fR - frame width of a menubar. .TP \fCTQStyle::PM_MenuBarItemSpacing\fR - spacing between menubar items. .TP \fCTQStyle::PM_ToolBarItemSpacing\fR - spacing between toolbar items. .TP \fCTQStyle::PM_TabBarTabOverlap\fR - number of pixels the tabs should overlap. .TP \fCTQStyle::PM_TabBarTabHSpace\fR - extra space added to the tab width. .TP \fCTQStyle::PM_TabBarTabVSpace\fR - extra space added to the tab height. .TP \fCTQStyle::PM_TabBarBaseHeight\fR - height of the area between the tab bar and the tab pages. .TP \fCTQStyle::PM_TabBarBaseOverlap\fR - number of pixels the tab bar overlaps the tab bar base. .TP \fCTQStyle::PM_TabBarScrollButtonWidth\fR .TP \fCTQStyle::PM_TabBarTabShiftHorizontal\fR - horizontal pixel shift when a tab is selected. .TP \fCTQStyle::PM_TabBarTabShiftVertical\fR - vertical pixel shift when a tab is selected. .TP \fCTQStyle::PM_ProgressBarChunkWidth\fR - width of a chunk in a progress bar indicator. .TP \fCTQStyle::PM_SplitterWidth\fR - width of a splitter. .TP \fCTQStyle::PM_TitleBarHeight\fR - height of the title bar. .TP \fCTQStyle::PM_PopupMenuFrameHorizontalExtra\fR - additional border, e.g. for panels .TP \fCTQStyle::PM_PopupMenuFrameVerticalExtra\fR - additional border, e.g. for panels .TP \fCTQStyle::PM_IndicatorWidth\fR - width of a check box indicator. .TP \fCTQStyle::PM_IndicatorHeight\fR - height of a checkbox indicator. .TP \fCTQStyle::PM_ExclusiveIndicatorWidth\fR - width of a radio button indicator. .TP \fCTQStyle::PM_ExclusiveIndicatorHeight\fR - height of a radio button indicator. .TP \fCTQStyle::PM_PopupMenuScrollerHeight\fR - height of the scroller area in a popupmenu. .TP \fCTQStyle::PM_PopupMenuScrollerHeight\fR - height of the scroller area in a popupmenu. .TP \fCTQStyle::PM_CheckListButtonSize\fR - area (width/height) of the checkbox/radiobutton in a QCheckListItem .TP \fCTQStyle::PM_CheckListControllerSize\fR - area (width/height) of the controller in a QCheckListItem .TP \fCTQStyle::PM_DialogButtonsSeparator\fR - distance between buttons in a dialog buttons widget. .TP \fCTQStyle::PM_DialogButtonsButtonWidth\fR - minimum width of a button in a dialog buttons widget. .TP \fCTQStyle::PM_DialogButtonsButtonHeight\fR - minimum height of a button in a dialog buttons widget. .TP \fCTQStyle::PM_HeaderMarkSize\fR .TP \fCTQStyle::PM_HeaderGripMargin\fR .TP \fCTQStyle::PM_HeaderMargin\fR .TP \fCTQStyle::PM_CustomBase\fR - base value for custom ControlElements. All values above this are reserved for custom use. Therefore, custom values must be greater than this value. .PP See also pixelMetric(). .SH "TQStyle::PrimitiveElement" This enum represents the PrimitiveElements of a style. A PrimitiveElement is a common GUI element, such as a checkbox indicator or pushbutton bevel. .TP \fCTQStyle::PE_ButtonCommand\fR - button used to initiate an action, for example, a QPushButton. .TP \fCTQStyle::PE_ButtonDefault\fR - this button is the default button, e.g. in a dialog. .TP \fCTQStyle::PE_ButtonBevel\fR - generic button bevel. .TP \fCTQStyle::PE_ButtonTool\fR - tool button, for example, a TQToolButton. .TP \fCTQStyle::PE_ButtonDropDown\fR - drop down button, for example, a tool button that displays a popup menu, for example, TQPopupMenu. .TP \fCTQStyle::PE_FocusRect\fR - generic focus indicator. .TP \fCTQStyle::PE_ArrowUp\fR - up arrow. .TP \fCTQStyle::PE_ArrowDown\fR - down arrow. .TP \fCTQStyle::PE_ArrowRight\fR - right arrow. .TP \fCTQStyle::PE_ArrowLeft\fR - left arrow. .TP \fCTQStyle::PE_SpinWidgetUp\fR - up symbol for a spin widget, for example a QSpinBox. .TP \fCTQStyle::PE_SpinWidgetDown\fR - down symbol for a spin widget. .TP \fCTQStyle::PE_SpinWidgetPlus\fR - increase symbol for a spin widget. .TP \fCTQStyle::PE_SpinWidgetMinus\fR - decrease symbol for a spin widget. .TP \fCTQStyle::PE_Indicator\fR - on/off indicator, for example, a QCheckBox. .TP \fCTQStyle::PE_IndicatorMask\fR - bitmap mask for an indicator. .TP \fCTQStyle::PE_ExclusiveIndicator\fR - exclusive on/off indicator, for example, a QRadioButton. .TP \fCTQStyle::PE_ExclusiveIndicatorMask\fR - bitmap mask for an exclusive indicator. .TP \fCTQStyle::PE_DockWindowHandle\fR - tear off handle for dock windows and toolbars, for example QDockWindows and TQToolBars. .TP \fCTQStyle::PE_DockWindowSeparator\fR - item separator for dock window and toolbar contents. .TP \fCTQStyle::PE_DockWindowResizeHandle\fR - resize handle for dock windows. .TP \fCTQStyle::PE_Splitter\fR - splitter handle; see also QSplitter. .TP \fCTQStyle::PE_Panel\fR - generic panel frame; see also QFrame. .TP \fCTQStyle::PE_PanelPopup\fR - panel frame for popup windows/menus; see also TQPopupMenu. .TP \fCTQStyle::PE_PanelMenuBar\fR - panel frame for menu bars. .TP \fCTQStyle::PE_PanelDockWindow\fR - panel frame for dock windows and toolbars. .TP \fCTQStyle::PE_PanelTabWidget\fR - panel frame for tab widgets. .TP \fCTQStyle::PE_PanelLineEdit\fR - panel frame for line edits. .TP \fCTQStyle::PE_PanelGroupBox\fR - panel frame for group boxes. .TP \fCTQStyle::PE_TabBarBase\fR - area below tabs in a tab widget, for example, QTab. .TP \fCTQStyle::PE_HeaderSection\fR - section of a list or table header; see also QHeader. .TP \fCTQStyle::PE_HeaderArrow\fR - arrow used to indicate sorting on a list or table header .TP \fCTQStyle::PE_StatusBarSection\fR - section of a status bar; see also TQStatusBar. .TP \fCTQStyle::PE_GroupBoxFrame\fR - frame around a group box; see also QGroupBox. .TP \fCTQStyle::PE_WindowFrame\fR - frame around a MDI window or a docking window .TP \fCTQStyle::PE_Separator\fR - generic separator. .TP \fCTQStyle::PE_SizeGrip\fR - window resize handle; see also TQSizeGrip. .TP \fCTQStyle::PE_CheckMark\fR - generic check mark; see also QCheckBox. .TP \fCTQStyle::PE_ScrollBarAddLine\fR - scrollbar line increase indicator (i.e. scroll down); see also QScrollBar. .TP \fCTQStyle::PE_ScrollBarSubLine\fR - scrollbar line decrease indicator (i.e. scroll up). .TP \fCTQStyle::PE_ScrollBarAddPage\fR - scolllbar page increase indicator (i.e. page down). .TP \fCTQStyle::PE_ScrollBarSubPage\fR - scrollbar page decrease indicator (i.e. page up). .TP \fCTQStyle::PE_ScrollBarSlider\fR - scrollbar slider .TP \fCTQStyle::PE_ScrollBarFirst\fR - scrollbar first line indicator (i.e. home). .TP \fCTQStyle::PE_ScrollBarLast\fR - scrollbar last line indicator (i.e. end). .TP \fCTQStyle::PE_ProgressBarChunk\fR - section of a progress bar indicator; see also QProgressBar. .TP \fCTQStyle::PE_CheckListController\fR - controller part of a listview item .TP \fCTQStyle::PE_CheckListIndicator\fR - checkbox part of a listview item .TP \fCTQStyle::PE_CheckListExclusiveIndicator\fR - radiobutton part of a listview item .TP \fCTQStyle::PE_RubberBand\fR - rubber band used in such things as iconview .TP \fCTQStyle::PE_CustomBase\fR - base value for custom PrimitiveElements. All values above this are reserved for custom use. Custom values must be greater than this value. .PP See also drawPrimitive(). .SH "TQStyle::StyleFlags" This enum represents flags for drawing PrimitiveElements. Not all primitives use all of these flags. Note that these flags may mean different things to different primitives. For an explanation of the relationship between primitives and their flags, as well as the different meanings of the flags, see the Style overview. .TP \fCTQStyle::Style_Default\fR .TP \fCTQStyle::Style_Enabled\fR .TP \fCTQStyle::Style_Raised\fR .TP \fCTQStyle::Style_Sunken\fR .TP \fCTQStyle::Style_Off\fR .TP \fCTQStyle::Style_NoChange\fR .TP \fCTQStyle::Style_On\fR .TP \fCTQStyle::Style_Down\fR .TP \fCTQStyle::Style_Horizontal\fR .TP \fCTQStyle::Style_HasFocus\fR .TP \fCTQStyle::Style_Top\fR .TP \fCTQStyle::Style_Bottom\fR .TP \fCTQStyle::Style_FocusAtBorder\fR .TP \fCTQStyle::Style_AutoRaise\fR .TP \fCTQStyle::Style_MouseOver\fR .TP \fCTQStyle::Style_Up\fR .TP \fCTQStyle::Style_Selected\fR .TP \fCTQStyle::Style_HasFocus\fR .TP \fCTQStyle::Style_Active\fR .TP \fCTQStyle::Style_ButtonDefault\fR .PP See also drawPrimitive(). .SH "TQStyle::StyleHint" This enum represents a StyleHint. A StyleHint is a general look and/or feel hint. .TP \fCTQStyle::SH_EtchDisabledText\fR - disabled text is "etched" like Windows. .TP \fCTQStyle::SH_GUIStyle\fR - the GUI style to use. .TP \fCTQStyle::SH_ScrollBar_BackgroundMode\fR - the background mode for a QScrollBar. Possible values are any of those in the BackgroundMode enum. .TP \fCTQStyle::SH_ScrollBar_MiddleClickAbsolutePosition\fR - a boolean value. If TRUE, middle clicking on a scrollbar causes the slider to jump to that position. If FALSE, the middle clicking is ignored. .TP \fCTQStyle::SH_ScrollBar_LeftClickAbsolutePosition\fR - a boolean value. If TRUE, left clicking on a scrollbar causes the slider to jump to that position. If FALSE, the left clicking will behave as appropriate for each control. .TP \fCTQStyle::SH_ScrollBar_ScrollWhenPointerLeavesControl\fR - a boolean value. If TRUE, when clicking a scrollbar SubControl, holding the mouse button down and moving the pointer outside the SubControl, the scrollbar continues to scroll. If FALSE, the scollbar stops scrolling when the pointer leaves the SubControl. .TP \fCTQStyle::SH_TabBar_Alignment\fR - the alignment for tabs in a QTabWidget. Possible values are TQt::AlignLeft, TQt::AlignCenter and TQt::AlignRight. .TP \fCTQStyle::SH_Header_ArrowAlignment\fR - the placement of the sorting indicator may appear in list or table headers. Possible values are TQt::Left or TQt::Right. .TP \fCTQStyle::SH_Slider_SnapToValue\fR - sliders snap to values while moving, like Windows .TP \fCTQStyle::SH_Slider_SloppyKeyEvents\fR - key presses handled in a sloppy manner, i.e. left on a vertical slider subtracts a line. .TP \fCTQStyle::SH_ProgressDialog_CenterCancelButton\fR - center button on progress dialogs, like Motif, otherwise right aligned. .TP \fCTQStyle::SH_ProgressDialog_TextLabelAlignment\fR - TQt::AlignmentFlags -- text label alignment in progress dialogs; Center on windows, Auto|VCenter otherwise. .TP \fCTQStyle::SH_PrintDialog_RightAlignButtons\fR - right align buttons in the print dialog, like Windows. .TP \fCTQStyle::SH_MainWindow_SpaceBelowMenuBar\fR - 1 or 2 pixel space between the menubar and the dockarea, like Windows. .TP \fCTQStyle::SH_FontDialog_SelectAssociatedText\fR - select the text in the line edit, or when selecting an item from the listbox, or when the line edit receives focus, like Windows. .TP \fCTQStyle::SH_PopupMenu_AllowActiveAndDisabled\fR - allows disabled menu items to be active. .TP \fCTQStyle::SH_PopupMenu_SpaceActivatesItem\fR - pressing Space activates the item, like Motif. .TP \fCTQStyle::SH_PopupMenu_SubMenuPopupDelay\fR - the number of milliseconds to wait before opening a submenu; 256 on windows, 96 on Motif. .TP \fCTQStyle::SH_PopupMenu_Scrollable\fR - whether popupmenu's must support scrolling. .TP \fCTQStyle::SH_PopupMenu_SloppySubMenus\fR - whether popupmenu's must support sloppy submenu; as implemented on Mac OS. .TP \fCTQStyle::SH_ScrollView_FrameOnlyAroundContents\fR - whether scrollviews draw their frame only around contents (like Motif), or around contents, scrollbars and corner widgets (like Windows). .TP \fCTQStyle::SH_MenuBar_AltKeyNavigation\fR - menubars items are navigable by pressing Alt, followed by using the arrow keys to select the desired item. .TP \fCTQStyle::SH_ComboBox_ListMouseTracking\fR - mouse tracking in combobox dropdown lists. .TP \fCTQStyle::SH_PopupMenu_MouseTracking\fR - mouse tracking in popup menus. .TP \fCTQStyle::SH_MenuBar_MouseTracking\fR - mouse tracking in menubars. .TP \fCTQStyle::SH_ItemView_ChangeHighlightOnFocus\fR - gray out selected items when losing focus. .TP \fCTQStyle::SH_Widget_ShareActivation\fR - turn on sharing activation with floating modeless dialogs. .TP \fCTQStyle::SH_TabBar_SelectMouseType\fR - which type of mouse event should cause a tab to be selected. .TP \fCTQStyle::SH_ListViewExpand_SelectMouseType\fR - which type of mouse event should cause a listview expansion to be selected. .TP \fCTQStyle::SH_TabBar_PreferNoArrows\fR - whether a tabbar should suggest a size to prevent scoll arrows. .TP \fCTQStyle::SH_ComboBox_Popup\fR - allows popups as a combobox dropdown menu. .TP \fCTQStyle::SH_Workspace_FillSpaceOnMaximize\fR - the workspace should maximize the client area. .TP \fCTQStyle::SH_TitleBar_NoBorder\fR - the titlebar has no border .TP \fCTQStyle::SH_ScrollBar_StopMouseOverSlider\fR - stops autorepeat when slider reaches mouse .TP \fCTQStyle::SH_BlinkCursorWhenTextSelected\fR - whether cursor should blink when text is selected .TP \fCTQStyle::SH_RichText_FullWidthSelection\fR - whether richtext selections should extend the full width of the document. .TP \fCTQStyle::SH_GroupBox_TextLabelVerticalAlignment\fR - how to vertically align a groupbox's text label. .TP \fCTQStyle::SH_GroupBox_TextLabelColor\fR - how to paint a groupbox's text label. .TP \fCTQStyle::SH_DialogButtons_DefaultButton\fR - which buttons gets the default status in a dialog's button widget. .TP \fCTQStyle::SH_CustomBase\fR - base value for custom ControlElements. All values above this are reserved for custom use. Therefore, custom values must be greater than this value. .TP \fCTQStyle::SH_ToolButton_Uses3D\fR - indicates whether TQToolButtons should use a 3D frame when the mouse is over them .TP \fCTQStyle::SH_ToolBox_SelectedPageTitleBold\fR - Boldness of the selected page title in a TQToolBox. .TP \fCTQStyle::SH_LineEdit_PasswordCharacter\fR - The TQChar Unicode character to be used for passwords. .TP \fCTQStyle::SH_Table_GridLineColor\fR .TP \fCTQStyle::SH_UnderlineAccelerator\fR - whether accelerators are underlined .PP See also styleHint(). .SH "TQStyle::StylePixmap" This enum represents a StylePixmap. A StylePixmap is a pixmap that can follow some existing GUI style or guideline. .TP \fCTQStyle::SP_TitleBarMinButton\fR - minimize button on titlebars. For example, in a TQWorkspace. .TP \fCTQStyle::SP_TitleBarMaxButton\fR - maximize button on titlebars. .TP \fCTQStyle::SP_TitleBarCloseButton\fR - close button on titlebars. .TP \fCTQStyle::SP_TitleBarNormalButton\fR - normal (restore) button on titlebars. .TP \fCTQStyle::SP_TitleBarShadeButton\fR - shade button on titlebars. .TP \fCTQStyle::SP_TitleBarUnshadeButton\fR - unshade button on titlebars. .TP \fCTQStyle::SP_MessageBoxInformation\fR - the 'information' icon. .TP \fCTQStyle::SP_MessageBoxWarning\fR - the 'warning' icon. .TP \fCTQStyle::SP_MessageBoxCritical\fR - the 'critical' icon. .TP \fCTQStyle::SP_MessageBoxQuestion\fR - the 'question' icon. .TP \fCTQStyle::SP_DockWindowCloseButton\fR - close button on dock windows; see also QDockWindow. .TP \fCTQStyle::SP_CustomBase\fR - base value for custom ControlElements. All values above this are reserved for custom use. Therefore, custom values must be greater than this value. .PP See also stylePixmap(). .SH "TQStyle::SubControl" This enum represents a SubControl within a ComplexControl. .TP \fCTQStyle::SC_None\fR - special value that matches no other SubControl. .TP \fCTQStyle::SC_ScrollBarAddLine\fR - scrollbar add line (i.e. down/right arrow); see also QScrollbar. .TP \fCTQStyle::SC_ScrollBarSubLine\fR - scrollbar sub line (i.e. up/left arrow). .TP \fCTQStyle::SC_ScrollBarAddPage\fR - scrollbar add page (i.e. page down). .TP \fCTQStyle::SC_ScrollBarSubPage\fR - scrollbar sub page (i.e. page up). .TP \fCTQStyle::SC_ScrollBarFirst\fR - scrollbar first line (i.e. home). .TP \fCTQStyle::SC_ScrollBarLast\fR - scrollbar last line (i.e. end). .TP \fCTQStyle::SC_ScrollBarSlider\fR - scrollbar slider handle. .TP \fCTQStyle::SC_ScrollBarGroove\fR - special subcontrol which contains the area in which the slider handle may move. .TP \fCTQStyle::SC_SpinWidgetUp\fR - spinwidget up/increase; see also QSpinBox. .TP \fCTQStyle::SC_SpinWidgetDown\fR - spinwidget down/decrease. .TP \fCTQStyle::SC_SpinWidgetFrame\fR - spinwidget frame. .TP \fCTQStyle::SC_SpinWidgetEditField\fR - spinwidget edit field. .TP \fCTQStyle::SC_SpinWidgetButtonField\fR - spinwidget button field. .TP \fCTQStyle::SC_ComboBoxEditField\fR - combobox edit field; see also QComboBox. .TP \fCTQStyle::SC_ComboBoxArrow\fR - combobox arrow .TP \fCTQStyle::SC_ComboBoxFrame\fR - combobox frame .TP \fCTQStyle::SC_ComboBoxListBoxPopup\fR - combobox list box .TP \fCTQStyle::SC_SliderGroove\fR - special subcontrol which contains the area in which the slider handle may move. .TP \fCTQStyle::SC_SliderHandle\fR - slider handle. .TP \fCTQStyle::SC_SliderTickmarks\fR - slider tickmarks. .TP \fCTQStyle::SC_ToolButton\fR - tool button; see also TQToolbutton. .TP \fCTQStyle::SC_ToolButtonMenu\fR - subcontrol for opening a popup menu in a tool button; see also TQPopupMenu. .TP \fCTQStyle::SC_TitleBarSysMenu\fR - system menu button (i.e. restore, close, etc.). .TP \fCTQStyle::SC_TitleBarMinButton\fR - minimize button. .TP \fCTQStyle::SC_TitleBarMaxButton\fR - maximize button. .TP \fCTQStyle::SC_TitleBarCloseButton\fR - close button. .TP \fCTQStyle::SC_TitleBarLabel\fR - window title label. .TP \fCTQStyle::SC_TitleBarNormalButton\fR - normal (restore) button. .TP \fCTQStyle::SC_TitleBarShadeButton\fR - shade button. .TP \fCTQStyle::SC_TitleBarUnshadeButton\fR - unshade button. .TP \fCTQStyle::SC_ListView\fR - the list view area. .TP \fCTQStyle::SC_ListViewBranch\fR - (internal) .TP \fCTQStyle::SC_ListViewExpand\fR - expand item (i.e. show/hide child items). .TP \fCTQStyle::SC_All\fR - special value that matches all SubControls. .PP See also ComplexControl. .SH "TQStyle::SubRect" This enum represents a sub-area of a widget. Style implementations would use these areas to draw the different parts of a widget. .TP \fCTQStyle::SR_PushButtonContents\fR - area containing the label (iconset with text or pixmap). .TP \fCTQStyle::SR_PushButtonFocusRect\fR - area for the focus rect (usually larger than the contents rect). .TP \fCTQStyle::SR_CheckBoxIndicator\fR - area for the state indicator (e.g. check mark). .TP \fCTQStyle::SR_CheckBoxContents\fR - area for the label (text or pixmap). .TP \fCTQStyle::SR_CheckBoxFocusRect\fR - area for the focus indicator. .TP \fCTQStyle::SR_RadioButtonIndicator\fR - area for the state indicator. .TP \fCTQStyle::SR_RadioButtonContents\fR - area for the label. .TP \fCTQStyle::SR_RadioButtonFocusRect\fR - area for the focus indicator. .TP \fCTQStyle::SR_ComboBoxFocusRect\fR - area for the focus indicator. .TP \fCTQStyle::SR_SliderFocusRect\fR - area for the focus indicator. .TP \fCTQStyle::SR_DockWindowHandleRect\fR - area for the tear-off handle. .TP \fCTQStyle::SR_ProgressBarGroove\fR - area for the groove. .TP \fCTQStyle::SR_ProgressBarContents\fR - area for the progress indicator. .TP \fCTQStyle::SR_ProgressBarLabel\fR - area for the text label. .TP \fCTQStyle::SR_ToolButtonContents\fR - area for the tool button's label. .TP \fCTQStyle::SR_DialogButtonAccept\fR - area for a dialog's accept button. .TP \fCTQStyle::SR_DialogButtonReject\fR - area for a dialog's reject button. .TP \fCTQStyle::SR_DialogButtonApply\fR - area for a dialog's apply button. .TP \fCTQStyle::SR_DialogButtonHelp\fR - area for a dialog's help button. .TP \fCTQStyle::SR_DialogButtonAll\fR - area for a dialog's all button. .TP \fCTQStyle::SR_DialogButtonRetry\fR - area for a dialog's retry button. .TP \fCTQStyle::SR_DialogButtonAbort\fR - area for a dialog's abort button. .TP \fCTQStyle::SR_DialogButtonIgnore\fR - area for a dialog's ignore button. .TP \fCTQStyle::SR_DialogButtonCustom\fR - area for a dialog's custom widget area (in button row). .TP \fCTQStyle::SR_ToolBoxTabContents\fR - area for a toolbox tab's icon and label .TP \fCTQStyle::SR_CustomBase\fR - base value for custom ControlElements. All values above this are reserved for custom use. Therefore, custom values must be greater than this value. .PP See also subRect(). .SH MEMBER FUNCTION DOCUMENTATION .SH "TQStyle::TQStyle ()" Constructs a TQStyle. .SH "TQStyle::~TQStyle ()\fC [virtual]\fR" Destroys the style and frees all allocated resources. .SH "int TQStyle::defaultFrameWidth () const" \fBThis function is obsolete.\fR It is provided to keep old source working. We strongly advise against using it in new code. .SH "void TQStyle::drawComplexControl ( ComplexControl control, TQPainter * p, const TQWidget * widget, const TQRect & r, const TQColorGroup & cg, SFlags how = Style_Default, SCFlags sub = SC_All, SCFlags subActive = SC_None, const TQStyleOption & opt = TQStyleOption::Default ) const\fC [pure virtual]\fR" Draws the ComplexControl \fIcontrol\fR using the painter \fIp\fR in the area \fIr\fR. Colors are used from the color group \fIcg\fR. The \fIsub\fR argument specifies which SubControls to draw. Multiple SubControls can be OR'ed together. The \fIsubActive\fR argument specifies which SubControl is active. .PP The rect \fIr\fR should be in logical coordinates. Reimplementations of this function should use visualRect() to change the logical coordinates into screen coordinates when using drawPrimitive() and drawControl(). .PP The \fIhow\fR argument is used to control how the ComplexControl is drawn. Multiple flags can OR'ed together. See the table below for an explanation of which flags are used with the various ComplexControls. .PP The \fIwidget\fR argument is a pointer to a TQWidget or one of its subclasses. The widget can be cast to the appropriate type based on the value of \fIcontrol\fR. The \fIopt\fR argument can be used to pass extra information required when drawing the ComplexControl. Note that \fIopt\fR may be the default value even for ComplexControls that can make use of the extra options. See the table below for the appropriate \fIwidget\fR and \fIopt\fR usage: .PP
.nf .TS l - l. ComplexControl .br & Widget Cast Style Flags Notes Options Notes CC_SpinWidget(const QSpinWidget *) Style_Enabled Set if the spinwidget is enabled. Unused. Style_HasFocus Set if the spinwidget has input focus. CC_ComboBox(const QComboBox *) Style_Enabled Set if the combobox is enabled. Unused. Style_HasFocus Set if the combobox has input focus. CC_ScrollBar(const QScrollBar *) Style_Enabled Set if the scrollbar is enabled. Unused. Style_HasFocus Set if the scrollbar has input focus. CC_Slider(const QSlider *) Style_Enabled Set if the slider is enabled. Unused. Style_HasFocus Set if the slider has input focus. CC_ToolButton(const TQToolButton *) Style_Enabled Set if the toolbutton is enabled. TQStyleOption ( ArrowType t ) .TP opt.arrowType() When the tool button only contains an arrow, \fIt\fR is the arrow's type. Style_HasFocus Set if the toolbutton has input focus. Style_Down Set if the toolbutton is down (ie. mouse button or space pressed). Style_On Set if the toolbutton is a toggle button and is toggled on. Style_AutoRaise Set if the toolbutton has auto-raise enabled. Style_Raised Set if the button is not down, not on and doesn't contain the mouse when auto-raise is enabled. CC_TitleBar(const TQWidget *) Style_Enabled Set if the titlebar is enabled. Unused. CC_ListView(const QListView *) Style_Enabled Set if the titlebar is enabled. TQStyleOption ( QListViewItem *item ) .TP opt.listViewItem() .TE .fi
.PP See also ComplexControl and SubControl. .SH "void TQStyle::drawComplexControlMask ( ComplexControl control, TQPainter * p, const TQWidget * widget, const TQRect & r, const TQStyleOption & opt = TQStyleOption::Default ) const\fC [pure virtual]\fR" Draw a bitmask for the ComplexControl \fIcontrol\fR using the painter \fIp\fR in the area \fIr\fR. See drawComplexControl() for an explanation of the use of the \fIwidget\fR and \fIopt\fR arguments. .PP The rect \fIr\fR should be in logical coordinates. Reimplementations of this function should use visualRect() to change the logical corrdinates into screen coordinates when using drawPrimitive() and drawControl(). .PP See also drawComplexControl() and ComplexControl. .SH "void TQStyle::drawControl ( ControlElement element, TQPainter * p, const TQWidget * widget, const TQRect & r, const TQColorGroup & cg, SFlags how = Style_Default, const TQStyleOption & opt = TQStyleOption::Default ) const\fC [pure virtual]\fR" Draws the ControlElement \fIelement\fR using the painter \fIp\fR in the area \fIr\fR. Colors are used from the color group \fIcg\fR. .PP The rect \fIr\fR should be in screen coordinates. .PP The \fIhow\fR argument is used to control how the ControlElement is drawn. Multiple flags can be OR'ed together. See the table below for an explanation of which flags are used with the various ControlElements. .PP The \fIwidget\fR argument is a pointer to a TQWidget or one of its subclasses. The widget can be cast to the appropriate type based on the value of \fIelement\fR. The \fIopt\fR argument can be used to pass extra information required when drawing the ControlElement. Note that \fIopt\fR may be the default value even for ControlElements that can make use of the extra options. See the table below for the appropriate \fIwidget\fR and \fIopt\fR usage: .PP
.nf .TS l - l. ControlElement .br & Widget Cast Style Flags Notes Options Notes CE_PushButton(const QPushButton *) .PP and .PP CE_PushButtonLabel(const QPushButton *) Style_Enabled Set if the button is enabled. Unused. Style_HasFocus Set if the button has input focus. Style_Raised Set if the button is not down, not on and not flat. Style_On Set if the button is a toggle button and toggled on. Style_Down Set if the button is down (i.e., the mouse button or space bar is pressed on the button). Style_ButtonDefault Set if the button is a default button. CE_CheckBox(const QCheckBox *) .PP and .PP CE_CheckBoxLabel(const QCheckBox *) .PP Style_Enabled Set if the checkbox is enabled. Unused. Style_HasFocus Set if the checkbox has input focus. Style_On Set if the checkbox is checked. Style_Off Set if the checkbox is not checked. Style_NoChange Set if the checkbox is in the NoChange state. Style_Down Set if the checkbox is down (i.e., the mouse button or space bar is pressed on the button). CE_RadioButton(const QRadioButton *) .PP and .PP CE_RadioButtonLabel(const QRadioButton *) Style_Enabled Set if the radiobutton is enabled. Unused. Style_HasFocus Set if the radiobutton has input focus. Style_On Set if the radiobutton is checked. Style_Off Set if the radiobutton is not checked. Style_Down Set if the radiobutton is down (i.e., the mouse button or space bar is pressed on the radiobutton). CE_TabBarTab(const QTabBar *) .PP and .PP CE_TabBarLabel(const QTabBar *) .PP Style_Enabled Set if the tabbar and tab is enabled. TQStyleOption ( QTab *t ) .TP opt.tab() \fIt\fR is the QTab being drawn. Style_Selected Set if the tab is the current tab. CE_ProgressBarGroove(const QProgressBar *) .PP and .PP CE_ProgressBarContents(const QProgressBar *) .PP and .PP CE_ProgressBarLabel(const QProgressBar *) .PP Style_Enabled Set if the progressbar is enabled. Unused. Style_HasFocus Set if the progressbar has input focus. CE_PopupMenuItem(const TQPopupMenu *) Style_Enabled Set if the menuitem is enabled. TQStyleOption ( TQMenuItem *mi, int tabwidth, int maxpmwidth ) .TP opt.menuItem() .TP opt.tabWidth() .TP opt.maxIconWidth() \fImi\fR is the menu item being drawn. TQMenuItem is currently an internal class. Style_Active Set if the menuitem is the current item. \fItabwidth\fR is the width of the tab column where key accelerators are drawn. Style_Down Set if the menuitem is down (i.e., the mouse button or space bar is pressed). \fImaxpmwidth\fR is the maximum width of the check column where checkmarks and iconsets are drawn. CE_MenuBarItem(const TQMenuBar *) Style_Enabled Set if the menuitem is enabled TQStyleOption ( TQMenuItem *mi ) .TP opt.menuItem() \fImi\fR is the menu item being drawn. Style_Active Set if the menuitem is the current item. Style_Down Set if the menuitem is down (i.e., a mouse button or the space bar is pressed). Style_HasFocus Set if the menubar has input focus. CE_ToolButtonLabel(const TQToolButton *) Style_Enabled Set if the toolbutton is enabled. TQStyleOption ( ArrowType t ) .TP opt.arrowType() When the tool button only contains an arrow, \fIt\fR is the arrow's type. Style_HasFocus Set if the toolbutton has input focus. Style_Down Set if the toolbutton is down (i.e., a mouse button or the space is pressed). Style_On Set if the toolbutton is a toggle button and is toggled on. Style_AutoRaise Set if the toolbutton has auto-raise enabled. Style_MouseOver Set if the mouse pointer is over the toolbutton. Style_Raised .TE .fi
.PP See also ControlElement and StyleFlags. .SH "void TQStyle::drawControlMask ( ControlElement element, TQPainter * p, const TQWidget * widget, const TQRect & r, const TQStyleOption & opt = TQStyleOption::Default ) const\fC [pure virtual]\fR" Draw a bitmask for the ControlElement \fIelement\fR using the painter \fIp\fR in the area \fIr\fR. See drawControl() for an explanation of the use of the \fIwidget\fR and \fIopt\fR arguments. .PP The rect \fIr\fR should be in screen coordinates. .PP See also drawControl() and ControlElement. .SH "void TQStyle::drawItem ( TQPainter * p, const TQRect & r, int flags, const TQColorGroup & g, bool enabled, const TQPixmap * pixmap, const TQString & text, int len = -1, const TQColor * penColor = 0 ) const\fC [virtual]\fR" Draws the \fItext\fR or \fIpixmap\fR in rectangle \fIr\fR using painter \fIp\fR and color group \fIg\fR. The pen color is specified with \fIpenColor\fR. The \fIenabled\fR bool indicates whether or not the item is enabled; when reimplementing this bool should influence how the item is drawn. If \fIlen\fR is -1 (the default) all the \fItext\fR is drawn; otherwise only the first \fIlen\fR characters of \fItext\fR are drawn. The text is aligned and wrapped according to the alignment \fIflags\fR (see TQt::AlignmentFlags). .PP By default, if both the text and the pixmap are not null, the pixmap is drawn and the text is ignored. .SH "void TQStyle::drawPrimitive ( PrimitiveElement pe, TQPainter * p, const TQRect & r, const TQColorGroup & cg, SFlags flags = Style_Default, const TQStyleOption & opt = TQStyleOption::Default ) const\fC [pure virtual]\fR" Draws the style PrimitiveElement \fIpe\fR using the painter \fIp\fR in the area \fIr\fR. Colors are used from the color group \fIcg\fR. .PP The rect \fIr\fR should be in screen coordinates. .PP The \fIflags\fR argument is used to control how the PrimitiveElement is drawn. Multiple flags can be OR'ed together. .PP For example, a pressed button would be drawn with the flags Style_Enabled and Style_Down. .PP The \fIopt\fR argument can be used to control how various PrimitiveElements are drawn. Note that \fIopt\fR may be the default value even for PrimitiveElements that make use of extra options. When \fIopt\fR is non-default, it is used as follows: .PP
.nf .TS l - l. PrimitiveElement Options Notes PE_FocusRect TQStyleOption ( const TQColor & bg ) .TP opt.color() \fIbg\fR is the background color on which the focus rect is being drawn. PE_Panel TQStyleOption ( int linewidth, int midlinewidth ) .TP opt.lineWidth() .TP opt.midLineWidth() \fIlinewidth\fR is the line width for drawing the panel. \fImidlinewidth\fR is the mid-line width for drawing the panel. PE_PanelPopup TQStyleOption ( int linewidth, int midlinewidth ) .TP opt.lineWidth() .TP opt.midLineWidth() \fIlinewidth\fR is the line width for drawing the panel. \fImidlinewidth\fR is the mid-line width for drawing the panel. PE_PanelMenuBar TQStyleOption ( int linewidth, int midlinewidth ) .TP opt.lineWidth() .TP opt.midLineWidth() \fIlinewidth\fR is the line width for drawing the panel. \fImidlinewidth\fR is the mid-line width for drawing the panel. PE_PanelDockWindow TQStyleOption ( int linewidth, int midlinewidth ) .TP opt.lineWidth() .TP opt.midLineWidth() \fIlinewidth\fR is the line width for drawing the panel. \fImidlinewidth\fR is the mid-line width for drawing the panel. PE_GroupBoxFrame TQStyleOption ( int linewidth, int midlinewidth, int shape, int shadow ) .TP opt.lineWidth() .TP opt.midLineWidth() .TP opt.frameShape() .TP opt.frameShadow() \fIlinewidth\fR is the line width for the group box. \fImidlinewidth\fR is the mid-line width for the group box. \fIshape\fR is the frame shape for the group box. .TE .fi
.PP For all other PrimitiveElements, \fIopt\fR is unused. .PP See also StyleFlags. .PP Example: themes/wood.cpp. .SH "TQRect TQStyle::itemRect ( TQPainter * p, const TQRect & r, int flags, bool enabled, const TQPixmap * pixmap, const TQString & text, int len = -1 ) const\fC [virtual]\fR" Returns the appropriate area (see below) within rectangle \fIr\fR in which to draw the \fItext\fR or \fIpixmap\fR using painter \fIp\fR. If \fIlen\fR is -1 (the default) all the \fItext\fR is drawn; otherwise only the first \fIlen\fR characters of \fItext\fR are drawn. The text is aligned in accordance with the alignment \fIflags\fR (see TQt::AlignmentFlags). The \fIenabled\fR bool indicates whether or not the item is enabled. .PP If \fIr\fR is larger than the area needed to render the \fItext\fR the rectangle that is returned will be offset within \fIr\fR in accordance with the alignment \fIflags\fR. For example if \fIflags\fR is AlignCenter the returned rectangle will be centered within \fIr\fR. If \fIr\fR is smaller than the area needed the rectangle that is returned will be \fIlarger\fR than \fIr\fR (the smallest rectangle large enough to render the \fItext\fR or \fIpixmap\fR). .PP By default, if both the text and the pixmap are not null, the pixmap is drawn and the text is ignored. .SH "int TQStyle::pixelMetric ( PixelMetric metric, const TQWidget * widget = 0 ) const\fC [pure virtual]\fR" Returns the pixel metric for \fImetric\fR. The \fIwidget\fR argument is a pointer to a TQWidget or one of its subclasses. The widget can be cast to the appropriate type based on the value of \fImetric\fR. Note that \fIwidget\fR may be zero even for PixelMetrics that can make use of \fIwidget\fR. See the table below for the appropriate \fIwidget\fR casts: .PP
.nf .TS l - l. PixelMetric Widget Cast PM_SliderControlThickness (const QSlider *) PM_SliderLength (const QSlider *) PM_SliderTickmarkOffset (const QSlider *) PM_SliderSpaceAvailable (const QSlider *) PM_TabBarTabOverlap (const QTabBar *) PM_TabBarTabHSpace (const QTabBar *) PM_TabBarTabVSpace (const QTabBar *) PM_TabBarBaseHeight (const QTabBar *) PM_TabBarBaseOverlap .TE .fi
.SH "void TQStyle::polish ( TQWidget * )\fC [virtual]\fR" Initializes the appearance of a widget. .PP This function is called for every widget at some point after it has been fully created but just \fIbefore\fR it is shown the very first time. .PP Reasonable actions in this function might be to call TQWidget::setBackgroundMode() for the widget. An example of highly unreasonable use would be setting the geometry! Reimplementing this function gives you a back-door through which you can change the appearance of a widget. With TQt 3.0's style engine you will rarely need to write your own polish(); instead reimplement drawItem(), drawPrimitive(), etc. .PP The TQWidget::inherits() function may provide enough information to allow class-specific customizations. But be careful not to hard-code things too much because new TQStyle subclasses are expected to work reasonably with all current and \fIfuture\fR widgets. .PP See also unPolish(). .SH "void TQStyle::polish ( QApplication * )\fC [virtual]\fR" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP Late initialization of the QApplication object. .PP See also unPolish(). .SH "void TQStyle::polish ( TQPalette & )\fC [virtual]\fR" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP The style may have certain requirements for color palettes. In this function it has the chance to change the palette according to these requirements. .PP See also TQPalette and QApplication::setPalette(). .SH "void TQStyle::polishPopupMenu ( TQPopupMenu * )\fC [pure virtual]\fR" Polishes the popup menu according to the GUI style. This usually means setting the mouse tracking (TQPopupMenu::setMouseTracking()) and whether the menu is checkable by default (TQPopupMenu::setCheckable()). .SH "SubControl TQStyle::querySubControl ( ComplexControl control, const TQWidget * widget, const TQPoint & pos, const TQStyleOption & opt = TQStyleOption::Default ) const\fC [pure virtual]\fR" Returns the SubControl for \fIwidget\fR at the point \fIpos\fR. The \fIwidget\fR argument is a pointer to a TQWidget or one of its subclasses. The widget can be cast to the appropriate type based on the value of \fIcontrol\fR. The \fIopt\fR argument can be used to pass extra information required when drawing the ComplexControl. Note that \fIopt\fR may be the default value even for ComplexControls that can make use of the extra options. See drawComplexControl() for an explanation of the \fIwidget\fR and \fIopt\fR arguments. .PP Note that \fIpos\fR is passed in screen coordinates. When using querySubControlMetrics() to check for hits and misses, use visualRect() to change the logical coordinates into screen coordinates. .PP See also drawComplexControl(), ComplexControl, SubControl, and querySubControlMetrics(). .SH "TQRect TQStyle::querySubControlMetrics ( ComplexControl control, const TQWidget * widget, SubControl subcontrol, const TQStyleOption & opt = TQStyleOption::Default ) const\fC [pure virtual]\fR" Returns the rect for the SubControl \fIsubcontrol\fR for \fIwidget\fR in logical coordinates. .PP The \fIwidget\fR argument is a pointer to a TQWidget or one of its subclasses. The widget can be cast to the appropriate type based on the value of \fIcontrol\fR. The \fIopt\fR argument can be used to pass extra information required when drawing the ComplexControl. Note that \fIopt\fR may be the default value even for ComplexControls that can make use of the extra options. See drawComplexControl() for an explanation of the \fIwidget\fR and \fIopt\fR arguments. .PP See also drawComplexControl(), ComplexControl, and SubControl. .SH "TQSize TQStyle::scrollBarExtent () const" \fBThis function is obsolete.\fR It is provided to keep old source working. We strongly advise against using it in new code. .SH "TQSize TQStyle::sizeFromContents ( ContentsType contents, const TQWidget * widget, const TQSize & contentsSize, const TQStyleOption & opt = TQStyleOption::Default ) const\fC [pure virtual]\fR" Returns the size of \fIwidget\fR based on the contents size \fIcontentsSize\fR. .PP The \fIwidget\fR argument is a pointer to a TQWidget or one of its subclasses. The widget can be cast to the appropriate type based on the value of \fIcontents\fR. The \fIopt\fR argument can be used to pass extra information required when calculating the size. Note that \fIopt\fR may be the default value even for ContentsTypes that can make use of the extra options. See the table below for the appropriate \fIwidget\fR and \fIopt\fR usage: .PP
.nf .TS l - l. ContentsType Widget Cast Options Notes CT_PushButton (const QPushButton *) Unused. CT_CheckBox (const QCheckBox *) Unused. CT_RadioButton (const QRadioButton *) Unused. CT_ToolButton (const TQToolButton *) Unused. CT_ComboBox (const QComboBox *) Unused. CT_Splitter (const QSplitter *) Unused. CT_DockWindow (const QDockWindow *) Unused. CT_ProgressBar (const QProgressBar *) Unused. CT_PopupMenuItem (const TQPopupMenu *) TQStyleOption ( TQMenuItem *mi ) .TP opt.menuItem() .TE .fi
.SH "int TQStyle::styleHint ( StyleHint stylehint, const TQWidget * widget = 0, const TQStyleOption & opt = TQStyleOption::Default, TQStyleHintReturn * returnData = 0 ) const\fC [pure virtual]\fR" Returns the style hint \fIstylehint\fR for \fIwidget\fR. Currently, \fIwidget\fR, \fIopt\fR, and \fIreturnData\fR are unused; they're included to allow for future enhancements. .PP For an explanation of the return value see StyleHint. .SH "TQPixmap TQStyle::stylePixmap ( StylePixmap stylepixmap, const TQWidget * widget = 0, const TQStyleOption & opt = TQStyleOption::Default ) const\fC [pure virtual]\fR" Returns a pixmap for \fIstylepixmap\fR. .PP The \fIopt\fR argument can be used to pass extra information required when drawing the ControlElement. Note that \fIopt\fR may be the default value even for StylePixmaps that can make use of the extra options. Currently, the \fIopt\fR argument is unused. .PP The \fIwidget\fR argument is a pointer to a TQWidget or one of its subclasses. The widget can be cast to the appropriate type based on the value of \fIstylepixmap\fR. See the table below for the appropriate \fIwidget\fR casts: .PP
.nf .TS l - l. StylePixmap Widget Cast SP_TitleBarMinButton (const TQWidget *) SP_TitleBarMaxButton (const TQWidget *) SP_TitleBarCloseButton (const TQWidget *) SP_TitleBarNormalButton (const TQWidget *) SP_TitleBarShadeButton (const TQWidget *) SP_TitleBarUnshadeButton (const TQWidget *) SP_DockWindowCloseButton .TE .fi
.PP See also StylePixmap. .SH "TQRect TQStyle::subRect ( SubRect subrect, const TQWidget * widget ) const\fC [pure virtual]\fR" Returns the sub-area \fIsubrect\fR for the \fIwidget\fR in logical coordinates. .PP The \fIwidget\fR argument is a pointer to a TQWidget or one of its subclasses. The widget can be cast to the appropriate type based on the value of \fIsubrect\fR. See the table below for the appropriate \fIwidget\fR casts: .PP
.nf .TS l - l. SubRect Widget Cast SR_PushButtonContents (const QPushButton *) SR_PushButtonFocusRect (const QPushButton *) SR_CheckBoxIndicator (const QCheckBox *) SR_CheckBoxContents (const QCheckBox *) SR_CheckBoxFocusRect (const QCheckBox *) SR_RadioButtonIndicator (const QRadioButton *) SR_RadioButtonContents (const QRadioButton *) SR_RadioButtonFocusRect (const QRadioButton *) SR_ComboBoxFocusRect (const QComboBox *) SR_DockWindowHandleRect (const TQWidget *) SR_ProgressBarGroove (const QProgressBar *) SR_ProgressBarContents (const QProgressBar *) SR_ProgressBarLabel .TE .fi
.PP The tear-off handle (SR_DockWindowHandleRect) for QDockWindow is a private class. Use TQWidget::parentWidget() to access the QDockWindow: .PP .nf .br if ( !widget->parentWidget() ) .br return; .br const QDockWindow *dw = (const QDockWindow *) widget->parentWidget(); .br .fi .PP See also SubRect. .SH "void TQStyle::tabbarMetrics ( const TQWidget * t, int & hf, int & vf, int & ov ) const" \fBThis function is obsolete.\fR It is provided to keep old source working. We strongly advise against using it in new code. .SH "void TQStyle::unPolish ( TQWidget * )\fC [virtual]\fR" Undoes the initialization of a widget's appearance. .PP This function is the counterpart to polish. It is called for every polished widget when the style is dynamically changed. The former style has to unpolish its settings before the new style can polish them again. .PP See also polish(). .SH "void TQStyle::unPolish ( QApplication * )\fC [virtual]\fR" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP Undoes the application polish. .PP See also polish(). .SH "TQRect TQStyle::visualRect ( const TQRect & logical, const TQWidget * w )\fC [static]\fR" Returns the rect \fIlogical\fR in screen coordinates. The bounding rect for widget \fIw\fR is used to perform the translation. This function is provided to aid style implementors in supporting right-to-left mode. .PP See also QApplication::reverseLayout(). .SH "TQRect TQStyle::visualRect ( const TQRect & logical, const TQRect & bounding )\fC [static]\fR" This is an overloaded member function, provided for convenience. It behaves essentially like the above function. .PP Returns the rect \fIlogical\fR in screen coordinates. The rect \fIbounding\fR is used to perform the translation. This function is provided to aid style implementors in supporting right-to-left mode. .PP See also QApplication::reverseLayout(). .SH "SEE ALSO" .BR http://doc.trolltech.com/tqstyle.html .BR http://www.trolltech.com/faq/tech.html .SH COPYRIGHT Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the license file included in the distribution for a complete license statement. .SH AUTHOR Generated automatically from the source code. .SH BUGS If 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. .P The definitive TQt documentation is provided in HTML format; it is located at $TQTDIR/doc/html and can be read using TQt Assistant or with a web browser. This man page is provided as a convenience for those users who prefer man pages, although this format is not officially supported by Trolltech. .P If you find errors in this manual page, please report them to .BR qt-bugs@trolltech.com . Please include the name of the manual page (tqstyle.3qt) and the Qt version (3.3.8).