Qt 4.8
Public Functions | Protected Slots | Protected Functions | List of all members
QProxyStyle Class Reference

The QProxyStyle class is a convenience class that simplifies dynamically overriding QStyle elements. More...

#include <qproxystyle.h>

Inheritance diagram for QProxyStyle:
QCommonStyle QStyle QObject

Public Functions

QStylebaseStyle () const
 Returns the proxy base style object. More...
 
void drawComplexControl (ComplexControl control, const QStyleOptionComplex *option, QPainter *painter, const QWidget *widget=0) const
 Reimplemented Function More...
 
void drawControl (ControlElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget=0) const
 Reimplemented Function More...
 
virtual void drawItemPixmap (QPainter *painter, const QRect &rect, int alignment, const QPixmap &pixmap) const
 Reimplemented Function More...
 
void drawItemText (QPainter *painter, const QRect &rect, int flags, const QPalette &pal, bool enabled, const QString &text, QPalette::ColorRole textRole=QPalette::NoRole) const
 Reimplemented Function More...
 
void drawPrimitive (PrimitiveElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget=0) const
 Reimplemented Function More...
 
QPixmap generatedIconPixmap (QIcon::Mode iconMode, const QPixmap &pixmap, const QStyleOption *opt) const
 Reimplemented Function More...
 
SubControl hitTestComplexControl (ComplexControl control, const QStyleOptionComplex *option, const QPoint &pos, const QWidget *widget=0) const
 Reimplemented Function More...
 
QRect itemPixmapRect (const QRect &r, int flags, const QPixmap &pixmap) const
 Reimplemented Function More...
 
QRect itemTextRect (const QFontMetrics &fm, const QRect &r, int flags, bool enabled, const QString &text) const
 Reimplemented Function More...
 
int pixelMetric (PixelMetric metric, const QStyleOption *option=0, const QWidget *widget=0) const
 Reimplemented Function More...
 
void polish (QWidget *widget)
 Reimplemented Function More...
 
void polish (QPalette &pal)
 Reimplemented Function More...
 
void polish (QApplication *app)
 Reimplemented Function More...
 
 QProxyStyle (QStyle *baseStyle=0)
 Constructs a QProxyStyle object for overriding behavior in style or in the current application style if style is 0 (default). More...
 
void setBaseStyle (QStyle *style)
 Sets the base style that should be proxied. More...
 
QSize sizeFromContents (ContentsType type, const QStyleOption *option, const QSize &size, const QWidget *widget) const
 Reimplemented Function More...
 
QPalette standardPalette () const
 Reimplemented Function More...
 
QPixmap standardPixmap (StandardPixmap standardPixmap, const QStyleOption *opt, const QWidget *widget=0) const
 Reimplemented Function More...
 
int styleHint (StyleHint hint, const QStyleOption *option=0, const QWidget *widget=0, QStyleHintReturn *returnData=0) const
 Reimplemented Function More...
 
QRect subControlRect (ComplexControl cc, const QStyleOptionComplex *opt, SubControl sc, const QWidget *widget) const
 Reimplemented Function More...
 
QRect subElementRect (SubElement element, const QStyleOption *option, const QWidget *widget) const
 Reimplemented Function More...
 
void unpolish (QWidget *widget)
 Reimplemented Function More...
 
void unpolish (QApplication *app)
 Reimplemented Function More...
 
 ~QProxyStyle ()
 Destroys the QProxyStyle object. More...
 
- Public Functions inherited from QCommonStyle
 QCommonStyle ()
 Constructs a QCommonStyle. More...
 
 ~QCommonStyle ()
 Destroys the style. More...
 
- Public Functions inherited from QStyle
int combinedLayoutSpacing (QSizePolicy::ControlTypes controls1, QSizePolicy::ControlTypes controls2, Qt::Orientation orientation, QStyleOption *option=0, QWidget *widget=0) const
 Returns the spacing that should be used between controls1 and controls2 in a layout. More...
 
int layoutSpacing (QSizePolicy::ControlType control1, QSizePolicy::ControlType control2, Qt::Orientation orientation, const QStyleOption *option=0, const QWidget *widget=0) const
 Returns the spacing that should be used between control1 and control2 in a layout. More...
 
const QStyleproxy () const
 
 QStyle ()
 Constructs a style object. More...
 
QIcon standardIcon (StandardPixmap standardIcon, const QStyleOption *option=0, const QWidget *widget=0) const
 Returns an icon for the given standardIcon. More...
 
virtual ~QStyle ()
 Destroys the style object. More...
 
- Public Functions inherited from QObject
bool blockSignals (bool b)
 If block is true, signals emitted by this object are blocked (i.e., emitting a signal will not invoke anything connected to it). More...
 
const QObjectListchildren () const
 Returns a list of child objects. More...
 
bool connect (const QObject *sender, const char *signal, const char *member, Qt::ConnectionType type=Qt::AutoConnection) const
 
bool disconnect (const char *signal=0, const QObject *receiver=0, const char *member=0)
 
bool disconnect (const QObject *receiver, const char *member=0)
 
void dumpObjectInfo ()
 Dumps information about signal connections, etc. More...
 
void dumpObjectTree ()
 Dumps a tree of children to the debug output. More...
 
QList< QByteArraydynamicPropertyNames () const
 Returns the names of all properties that were dynamically added to the object using setProperty(). More...
 
virtual bool eventFilter (QObject *, QEvent *)
 Filters events if this object has been installed as an event filter for the watched object. More...
 
template<typename T >
findChild (const QString &aName=QString()) const
 Returns the child of this object that can be cast into type T and that is called name, or 0 if there is no such object. More...
 
template<typename T >
QList< T > findChildren (const QString &aName=QString()) const
 Returns all children of this object with the given name that can be cast to type T, or an empty list if there are no such objects. More...
 
template<typename T >
QList< T > findChildren (const QRegExp &re) const
 
bool inherits (const char *classname) const
 Returns true if this object is an instance of a class that inherits className or a QObject subclass that inherits className; otherwise returns false. More...
 
void installEventFilter (QObject *)
 Installs an event filter filterObj on this object. More...
 
bool isWidgetType () const
 Returns true if the object is a widget; otherwise returns false. More...
 
void killTimer (int id)
 Kills the timer with timer identifier, id. More...
 
virtual const QMetaObjectmetaObject () const
 Returns a pointer to the meta-object of this object. More...
 
void moveToThread (QThread *thread)
 Changes the thread affinity for this object and its children. More...
 
QString objectName () const
 
QObjectparent () const
 Returns a pointer to the parent object. More...
 
QVariant property (const char *name) const
 Returns the value of the object's name property. More...
 
Q_INVOKABLE QObject (QObject *parent=0)
 Constructs an object with parent object parent. More...
 
void removeEventFilter (QObject *)
 Removes an event filter object obj from this object. More...
 
void setObjectName (const QString &name)
 
void setParent (QObject *)
 Makes the object a child of parent. More...
 
bool setProperty (const char *name, const QVariant &value)
 Sets the value of the object's name property to value. More...
 
void setUserData (uint id, QObjectUserData *data)
 
bool signalsBlocked () const
 Returns true if signals are blocked; otherwise returns false. More...
 
int startTimer (int interval)
 Starts a timer and returns a timer identifier, or returns zero if it could not start a timer. More...
 
QThreadthread () const
 Returns the thread in which the object lives. More...
 
QObjectUserDatauserData (uint id) const
 
virtual ~QObject ()
 Destroys the object, deleting all its child objects. More...
 

Protected Slots

int layoutSpacingImplementation (QSizePolicy::ControlType control1, QSizePolicy::ControlType control2, Qt::Orientation orientation, const QStyleOption *option=0, const QWidget *widget=0) const
 This slot is called by layoutSpacing() to determine the spacing that should be used between control1 and control2 in a layout. More...
 
QIcon standardIconImplementation (StandardPixmap standardIcon, const QStyleOption *option, const QWidget *widget) const
 Returns an icon for the given standardIcon. More...
 
- Protected Slots inherited from QCommonStyle
QIcon standardIconImplementation (StandardPixmap standardIcon, const QStyleOption *opt=0, const QWidget *widget=0) const
 
- Protected Slots inherited from QStyle
int layoutSpacingImplementation (QSizePolicy::ControlType control1, QSizePolicy::ControlType control2, Qt::Orientation orientation, const QStyleOption *option=0, const QWidget *widget=0) const
 This slot is called by layoutSpacing() to determine the spacing that should be used between control1 and control2 in a layout. More...
 
QIcon standardIconImplementation (StandardPixmap standardIcon, const QStyleOption *opt=0, const QWidget *widget=0) const
 Returns an icon for the given standardIcon. More...
 

Protected Functions

bool event (QEvent *e)
 Reimplemented Function More...
 
- Protected Functions inherited from QCommonStyle
 QCommonStyle (QCommonStylePrivate &dd)
 
- Protected Functions inherited from QStyle
 QStyle (QStylePrivate &dd)
 Constructs a style object. More...
 
- Protected Functions inherited from QObject
virtual void childEvent (QChildEvent *)
 This event handler can be reimplemented in a subclass to receive child events. More...
 
virtual void connectNotify (const char *signal)
 This virtual function is called when something has been connected to signal in this object. More...
 
virtual void customEvent (QEvent *)
 This event handler can be reimplemented in a subclass to receive custom events. More...
 
virtual void disconnectNotify (const char *signal)
 This virtual function is called when something has been disconnected from signal in this object. More...
 
 QObject (QObjectPrivate &dd, QObject *parent=0)
 
int receivers (const char *signal) const
 Returns the number of receivers connected to the signal. More...
 
QObjectsender () const
 Returns a pointer to the object that sent the signal, if called in a slot activated by a signal; otherwise it returns 0. More...
 
int senderSignalIndex () const
 
virtual void timerEvent (QTimerEvent *)
 This event handler can be reimplemented in a subclass to receive timer events for the object. More...
 

Additional Inherited Members

- Public Types inherited from QStyle
enum  ComplexControl {
  CC_SpinBox, CC_ComboBox, CC_ScrollBar, CC_Slider,
  CC_ToolButton, CC_TitleBar, CC_Q3ListView, CC_Dial,
  CC_GroupBox, CC_MdiControls, CC_CustomBase = 0xf0000000
}
 This enum describes the available complex controls. More...
 
enum  ContentsType {
  CT_PushButton, CT_CheckBox, CT_RadioButton, CT_ToolButton,
  CT_ComboBox, CT_Splitter, CT_Q3DockWindow, CT_ProgressBar,
  CT_MenuItem, CT_MenuBarItem, CT_MenuBar, CT_Menu,
  CT_TabBarTab, CT_Slider, CT_ScrollBar, CT_Q3Header,
  CT_LineEdit, CT_SpinBox, CT_SizeGrip, CT_TabWidget,
  CT_DialogButtons, CT_HeaderSection, CT_GroupBox, CT_MdiControls,
  CT_ItemViewItem, CT_CustomBase = 0xf0000000
}
 This enum describes the available contents types. More...
 
enum  ControlElement {
  CE_PushButton, CE_PushButtonBevel, CE_PushButtonLabel, CE_CheckBox,
  CE_CheckBoxLabel, CE_RadioButton, CE_RadioButtonLabel, CE_TabBarTab,
  CE_TabBarTabShape, CE_TabBarTabLabel, CE_ProgressBar, CE_ProgressBarGroove,
  CE_ProgressBarContents, CE_ProgressBarLabel, CE_MenuItem, CE_MenuScroller,
  CE_MenuVMargin, CE_MenuHMargin, CE_MenuTearoff, CE_MenuEmptyArea,
  CE_MenuBarItem, CE_MenuBarEmptyArea, CE_ToolButtonLabel, CE_Header,
  CE_HeaderSection, CE_HeaderLabel, CE_Q3DockWindowEmptyArea, CE_ToolBoxTab,
  CE_SizeGrip, CE_Splitter, CE_RubberBand, CE_DockWidgetTitle,
  CE_ScrollBarAddLine, CE_ScrollBarSubLine, CE_ScrollBarAddPage, CE_ScrollBarSubPage,
  CE_ScrollBarSlider, CE_ScrollBarFirst, CE_ScrollBarLast, CE_FocusFrame,
  CE_ComboBoxLabel, CE_ToolBar, CE_ToolBoxTabShape, CE_ToolBoxTabLabel,
  CE_HeaderEmptyArea, CE_ColumnViewGrip, CE_ItemViewItem, CE_ShapedFrame,
  CE_CustomBase = 0xf0000000
}
 This enum represents a control element. More...
 
enum  PixelMetric {
  PM_ButtonMargin, PM_ButtonDefaultIndicator, PM_MenuButtonIndicator, PM_ButtonShiftHorizontal,
  PM_ButtonShiftVertical, PM_DefaultFrameWidth, PM_SpinBoxFrameWidth, PM_ComboBoxFrameWidth,
  PM_MaximumDragDistance, PM_ScrollBarExtent, PM_ScrollBarSliderMin, PM_SliderThickness,
  PM_SliderControlThickness, PM_SliderLength, PM_SliderTickmarkOffset, PM_SliderSpaceAvailable,
  PM_DockWidgetSeparatorExtent, PM_DockWidgetHandleExtent, PM_DockWidgetFrameWidth, PM_TabBarTabOverlap,
  PM_TabBarTabHSpace, PM_TabBarTabVSpace, PM_TabBarBaseHeight, PM_TabBarBaseOverlap,
  PM_ProgressBarChunkWidth, PM_SplitterWidth, PM_TitleBarHeight, PM_MenuScrollerHeight,
  PM_MenuHMargin, PM_MenuVMargin, PM_MenuPanelWidth, PM_MenuTearoffHeight,
  PM_MenuDesktopFrameWidth, PM_MenuBarPanelWidth, PM_MenuBarItemSpacing, PM_MenuBarVMargin,
  PM_MenuBarHMargin, PM_IndicatorWidth, PM_IndicatorHeight, PM_ExclusiveIndicatorWidth,
  PM_ExclusiveIndicatorHeight, PM_CheckListButtonSize, PM_CheckListControllerSize, PM_DialogButtonsSeparator,
  PM_DialogButtonsButtonWidth, PM_DialogButtonsButtonHeight, PM_MdiSubWindowFrameWidth, PM_MDIFrameWidth = PM_MdiSubWindowFrameWidth,
  PM_MdiSubWindowMinimizedWidth, PM_MDIMinimizedWidth = PM_MdiSubWindowMinimizedWidth, PM_HeaderMargin, PM_HeaderMarkSize,
  PM_HeaderGripMargin, PM_TabBarTabShiftHorizontal, PM_TabBarTabShiftVertical, PM_TabBarScrollButtonWidth,
  PM_ToolBarFrameWidth, PM_ToolBarHandleExtent, PM_ToolBarItemSpacing, PM_ToolBarItemMargin,
  PM_ToolBarSeparatorExtent, PM_ToolBarExtensionExtent, PM_SpinBoxSliderHeight, PM_DefaultTopLevelMargin,
  PM_DefaultChildMargin, PM_DefaultLayoutSpacing, PM_ToolBarIconSize, PM_ListViewIconSize,
  PM_IconViewIconSize, PM_SmallIconSize, PM_LargeIconSize, PM_FocusFrameVMargin,
  PM_FocusFrameHMargin, PM_ToolTipLabelFrameWidth, PM_CheckBoxLabelSpacing, PM_TabBarIconSize,
  PM_SizeGripSize, PM_DockWidgetTitleMargin, PM_MessageBoxIconSize, PM_ButtonIconSize,
  PM_DockWidgetTitleBarButtonMargin, PM_RadioButtonLabelSpacing, PM_LayoutLeftMargin, PM_LayoutTopMargin,
  PM_LayoutRightMargin, PM_LayoutBottomMargin, PM_LayoutHorizontalSpacing, PM_LayoutVerticalSpacing,
  PM_TabBar_ScrollButtonOverlap, PM_TextCursorWidth, PM_TabCloseIndicatorWidth, PM_TabCloseIndicatorHeight,
  PM_ScrollView_ScrollBarSpacing, PM_SubMenuOverlap, PM_CustomBase = 0xf0000000
}
 This enum describes the various available pixel metrics. More...
 
enum  PrimitiveElement {
  PE_Q3CheckListController, PE_Q3CheckListExclusiveIndicator, PE_Q3CheckListIndicator, PE_Q3DockWindowSeparator,
  PE_Q3Separator, PE_Frame, PE_FrameDefaultButton, PE_FrameDockWidget,
  PE_FrameFocusRect, PE_FrameGroupBox, PE_FrameLineEdit, PE_FrameMenu,
  PE_FrameStatusBar, PE_FrameStatusBarItem = PE_FrameStatusBar, PE_FrameTabWidget, PE_FrameWindow,
  PE_FrameButtonBevel, PE_FrameButtonTool, PE_FrameTabBarBase, PE_PanelButtonCommand,
  PE_PanelButtonBevel, PE_PanelButtonTool, PE_PanelMenuBar, PE_PanelToolBar,
  PE_PanelLineEdit, PE_IndicatorArrowDown, PE_IndicatorArrowLeft, PE_IndicatorArrowRight,
  PE_IndicatorArrowUp, PE_IndicatorBranch, PE_IndicatorButtonDropDown, PE_IndicatorViewItemCheck,
  PE_IndicatorItemViewItemCheck = PE_IndicatorViewItemCheck, PE_IndicatorCheckBox, PE_IndicatorDockWidgetResizeHandle, PE_IndicatorHeaderArrow,
  PE_IndicatorMenuCheckMark, PE_IndicatorProgressChunk, PE_IndicatorRadioButton, PE_IndicatorSpinDown,
  PE_IndicatorSpinMinus, PE_IndicatorSpinPlus, PE_IndicatorSpinUp, PE_IndicatorToolBarHandle,
  PE_IndicatorToolBarSeparator, PE_PanelTipLabel, PE_IndicatorTabTear, PE_PanelScrollAreaCorner,
  PE_Widget, PE_IndicatorColumnViewArrow, PE_IndicatorItemViewItemDrop, PE_PanelItemViewItem,
  PE_PanelItemViewRow, PE_PanelStatusBar, PE_IndicatorTabClose, PE_PanelMenu,
  PE_CustomBase = 0xf000000
}
 This enum describes the various primitive elements. More...
 
enum  RequestSoftwareInputPanel { RSIP_OnMouseClickAndAlreadyFocused, RSIP_OnMouseClick }
 This enum describes under what circumstances a software input panel will be requested by input capable widgets. More...
 
enum  StandardPixmap {
  SP_TitleBarMenuButton, SP_TitleBarMinButton, SP_TitleBarMaxButton, SP_TitleBarCloseButton,
  SP_TitleBarNormalButton, SP_TitleBarShadeButton, SP_TitleBarUnshadeButton, SP_TitleBarContextHelpButton,
  SP_DockWidgetCloseButton, SP_MessageBoxInformation, SP_MessageBoxWarning, SP_MessageBoxCritical,
  SP_MessageBoxQuestion, SP_DesktopIcon, SP_TrashIcon, SP_ComputerIcon,
  SP_DriveFDIcon, SP_DriveHDIcon, SP_DriveCDIcon, SP_DriveDVDIcon,
  SP_DriveNetIcon, SP_DirOpenIcon, SP_DirClosedIcon, SP_DirLinkIcon,
  SP_FileIcon, SP_FileLinkIcon, SP_ToolBarHorizontalExtensionButton, SP_ToolBarVerticalExtensionButton,
  SP_FileDialogStart, SP_FileDialogEnd, SP_FileDialogToParent, SP_FileDialogNewFolder,
  SP_FileDialogDetailedView, SP_FileDialogInfoView, SP_FileDialogContentsView, SP_FileDialogListView,
  SP_FileDialogBack, SP_DirIcon, SP_DialogOkButton, SP_DialogCancelButton,
  SP_DialogHelpButton, SP_DialogOpenButton, SP_DialogSaveButton, SP_DialogCloseButton,
  SP_DialogApplyButton, SP_DialogResetButton, SP_DialogDiscardButton, SP_DialogYesButton,
  SP_DialogNoButton, SP_ArrowUp, SP_ArrowDown, SP_ArrowLeft,
  SP_ArrowRight, SP_ArrowBack, SP_ArrowForward, SP_DirHomeIcon,
  SP_CommandLink, SP_VistaShield, SP_BrowserReload, SP_BrowserStop,
  SP_MediaPlay, SP_MediaStop, SP_MediaPause, SP_MediaSkipForward,
  SP_MediaSkipBackward, SP_MediaSeekForward, SP_MediaSeekBackward, SP_MediaVolume,
  SP_MediaVolumeMuted, SP_CustomBase = 0xf0000000
}
 This enum describes the available standard pixmaps. More...
 
enum  StateFlag {
  State_None = 0x00000000, State_Enabled = 0x00000001, State_Raised = 0x00000002, State_Sunken = 0x00000004,
  State_Off = 0x00000008, State_NoChange = 0x00000010, State_On = 0x00000020, State_DownArrow = 0x00000040,
  State_Horizontal = 0x00000080, State_HasFocus = 0x00000100, State_Top = 0x00000200, State_Bottom = 0x00000400,
  State_FocusAtBorder = 0x00000800, State_AutoRaise = 0x00001000, State_MouseOver = 0x00002000, State_UpArrow = 0x00004000,
  State_Selected = 0x00008000, State_Active = 0x00010000, State_Window = 0x00020000, State_Open = 0x00040000,
  State_Children = 0x00080000, State_Item = 0x00100000, State_Sibling = 0x00200000, State_Editing = 0x00400000,
  State_KeyboardFocusChange = 0x00800000, State_ReadOnly = 0x02000000, State_Small = 0x04000000, State_Mini = 0x08000000
}
 This enum describes flags that are used when drawing primitive elements. More...
 
enum  StyleHint {
  SH_EtchDisabledText, SH_DitherDisabledText, 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_Menu_AllowActiveAndDisabled, SH_Menu_SpaceActivatesItem,
  SH_Menu_SubMenuPopupDelay, SH_ScrollView_FrameOnlyAroundContents, SH_MenuBar_AltKeyNavigation, SH_ComboBox_ListMouseTracking,
  SH_Menu_MouseTracking, SH_MenuBar_MouseTracking, SH_ItemView_ChangeHighlightOnFocus, SH_Widget_ShareActivation,
  SH_Workspace_FillSpaceOnMaximize, SH_ComboBox_Popup, SH_TitleBar_NoBorder, SH_Slider_StopMouseOverSlider,
  SH_ScrollBar_StopMouseOverSlider = SH_Slider_StopMouseOverSlider, SH_BlinkCursorWhenTextSelected, SH_RichText_FullWidthSelection, SH_Menu_Scrollable,
  SH_GroupBox_TextLabelVerticalAlignment, SH_GroupBox_TextLabelColor, SH_Menu_SloppySubMenus, SH_Table_GridLineColor,
  SH_LineEdit_PasswordCharacter, SH_DialogButtons_DefaultButton, SH_ToolBox_SelectedPageTitleBold, SH_TabBar_PreferNoArrows,
  SH_ScrollBar_LeftClickAbsolutePosition, SH_Q3ListViewExpand_SelectMouseType, SH_UnderlineShortcut, SH_SpinBox_AnimateButton,
  SH_SpinBox_KeyPressAutoRepeatRate, SH_SpinBox_ClickAutoRepeatRate, SH_Menu_FillScreenWithScroll, SH_ToolTipLabel_Opacity,
  SH_DrawMenuBarSeparator, SH_TitleBar_ModifyNotification, SH_Button_FocusPolicy, SH_MenuBar_DismissOnSecondClick,
  SH_MessageBox_UseBorderForButtonSpacing, SH_TitleBar_AutoRaise, SH_ToolButton_PopupDelay, SH_FocusFrame_Mask,
  SH_RubberBand_Mask, SH_WindowFrame_Mask, SH_SpinControls_DisableOnBounds, SH_Dial_BackgroundRole,
  SH_ComboBox_LayoutDirection, SH_ItemView_EllipsisLocation, SH_ItemView_ShowDecorationSelected, SH_ItemView_ActivateItemOnSingleClick,
  SH_ScrollBar_ContextMenu, SH_ScrollBar_RollBetweenButtons, SH_Slider_AbsoluteSetButtons, SH_Slider_PageSetButtons,
  SH_Menu_KeyboardSearch, SH_TabBar_ElideMode, SH_DialogButtonLayout, SH_ComboBox_PopupFrameStyle,
  SH_MessageBox_TextInteractionFlags, SH_DialogButtonBox_ButtonsHaveIcons, SH_SpellCheckUnderlineStyle, SH_MessageBox_CenterButtons,
  SH_Menu_SelectionWrap, SH_ItemView_MovementWithoutUpdatingSelection, SH_ToolTip_Mask, SH_FocusFrame_AboveWidget,
  SH_TextControl_FocusIndicatorTextCharFormat, SH_WizardStyle, SH_ItemView_ArrowKeysNavigateIntoChildren, SH_Menu_Mask,
  SH_Menu_FlashTriggeredItem, SH_Menu_FadeOutOnHide, SH_SpinBox_ClickAutoRepeatThreshold, SH_ItemView_PaintAlternatingRowColorsForEmptyArea,
  SH_FormLayoutWrapPolicy, SH_TabWidget_DefaultTabPosition, SH_ToolBar_Movable, SH_FormLayoutFieldGrowthPolicy,
  SH_FormLayoutFormAlignment, SH_FormLayoutLabelAlignment, SH_ItemView_DrawDelegateFrame, SH_TabBar_CloseButtonPosition,
  SH_DockWidget_ButtonsHaveFrame, SH_ToolButtonStyle, SH_RequestSoftwareInputPanel, SH_CustomBase = 0xf0000000
}
 This enum describes the available style hints. More...
 
enum  SubControl {
  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_SpinBoxUp = 0x00000001, SC_SpinBoxDown = 0x00000002, SC_SpinBoxFrame = 0x00000004,
  SC_SpinBoxEditField = 0x00000008, 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_TitleBarSysMenu = 0x00000001, SC_TitleBarMinButton = 0x00000002,
  SC_TitleBarMaxButton = 0x00000004, SC_TitleBarCloseButton = 0x00000008, SC_TitleBarNormalButton = 0x00000010, SC_TitleBarShadeButton = 0x00000020,
  SC_TitleBarUnshadeButton = 0x00000040, SC_TitleBarContextHelpButton = 0x00000080, SC_TitleBarLabel = 0x00000100, SC_Q3ListView = 0x00000001,
  SC_Q3ListViewBranch = 0x00000002, SC_Q3ListViewExpand = 0x00000004, SC_DialGroove = 0x00000001, SC_DialHandle = 0x00000002,
  SC_DialTickmarks = 0x00000004, SC_GroupBoxCheckBox = 0x00000001, SC_GroupBoxLabel = 0x00000002, SC_GroupBoxContents = 0x00000004,
  SC_GroupBoxFrame = 0x00000008, SC_MdiMinButton = 0x00000001, SC_MdiNormalButton = 0x00000002, SC_MdiCloseButton = 0x00000004,
  SC_CustomBase = 0xf0000000, SC_All = 0xffffffff
}
 This enum describes the available sub controls. More...
 
enum  SubElement {
  SE_PushButtonContents, SE_PushButtonFocusRect, SE_CheckBoxIndicator, SE_CheckBoxContents,
  SE_CheckBoxFocusRect, SE_CheckBoxClickRect, SE_RadioButtonIndicator, SE_RadioButtonContents,
  SE_RadioButtonFocusRect, SE_RadioButtonClickRect, SE_ComboBoxFocusRect, SE_SliderFocusRect,
  SE_Q3DockWindowHandleRect, SE_ProgressBarGroove, SE_ProgressBarContents, SE_ProgressBarLabel,
  SE_DialogButtonAccept, SE_DialogButtonReject, SE_DialogButtonApply, SE_DialogButtonHelp,
  SE_DialogButtonAll, SE_DialogButtonAbort, SE_DialogButtonIgnore, SE_DialogButtonRetry,
  SE_DialogButtonCustom, SE_ToolBoxTabContents, SE_HeaderLabel, SE_HeaderArrow,
  SE_TabWidgetTabBar, SE_TabWidgetTabPane, SE_TabWidgetTabContents, SE_TabWidgetLeftCorner,
  SE_TabWidgetRightCorner, SE_ViewItemCheckIndicator, SE_ItemViewItemCheckIndicator = SE_ViewItemCheckIndicator, SE_TabBarTearIndicator,
  SE_TreeViewDisclosureItem, SE_LineEditContents, SE_FrameContents, SE_DockWidgetCloseButton,
  SE_DockWidgetFloatButton, SE_DockWidgetTitleBarText, SE_DockWidgetIcon, SE_CheckBoxLayoutItem,
  SE_ComboBoxLayoutItem, SE_DateTimeEditLayoutItem, SE_DialogButtonBoxLayoutItem, SE_LabelLayoutItem,
  SE_ProgressBarLayoutItem, SE_PushButtonLayoutItem, SE_RadioButtonLayoutItem, SE_SliderLayoutItem,
  SE_SpinBoxLayoutItem, SE_ToolButtonLayoutItem, SE_FrameLayoutItem, SE_GroupBoxLayoutItem,
  SE_TabWidgetLayoutItem, SE_ItemViewItemDecoration, SE_ItemViewItemText, SE_ItemViewItemFocusRect,
  SE_TabBarTabLeftButton, SE_TabBarTabRightButton, SE_TabBarTabText, SE_ShapedFrameContents,
  SE_ToolBarHandle, SE_CustomBase = 0xf0000000
}
 This enum represents a sub-area of a widget. More...
 
- Public Slots inherited from QObject
void deleteLater ()
 Schedules this object for deletion. More...
 
- Signals inherited from QObject
void destroyed (QObject *=0)
 This signal is emitted immediately before the object obj is destroyed, and can not be blocked. More...
 
- Static Public Functions inherited from QStyle
static QRect alignedRect (Qt::LayoutDirection direction, Qt::Alignment alignment, const QSize &size, const QRect &rectangle)
 Returns a new rectangle of the specified size that is aligned to the given rectangle according to the specified alignment and direction. More...
 
static int sliderPositionFromValue (int min, int max, int val, int space, bool upsideDown=false)
 Converts the given logicalValue to a pixel position. More...
 
static int sliderValueFromPosition (int min, int max, int pos, int space, bool upsideDown=false)
 Converts the given pixel position to a logical value. More...
 
static Qt::Alignment visualAlignment (Qt::LayoutDirection direction, Qt::Alignment alignment)
 Transforms an alignment of Qt::AlignLeft or Qt::AlignRight without Qt::AlignAbsolute into Qt::AlignLeft or Qt::AlignRight with Qt::AlignAbsolute according to the layout direction. More...
 
static QPoint visualPos (Qt::LayoutDirection direction, const QRect &boundingRect, const QPoint &logicalPos)
 Returns the given logicalPosition converted to screen coordinates based on the specified direction. More...
 
static QRect visualRect (Qt::LayoutDirection direction, const QRect &boundingRect, const QRect &logicalRect)
 Returns the given logicalRectangle converted to screen coordinates based on the specified direction. More...
 
- Static Public Functions inherited from QObject
static bool connect (const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
 Creates a connection of the given type from the signal in the sender object to the method in the receiver object. More...
 
static bool connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type=Qt::AutoConnection)
 
static bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *member)
 Disconnects signal in object sender from method in object receiver. More...
 
static bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &member)
 
static uint registerUserData ()
 
static QString tr (const char *sourceText, const char *comment=0, int n=-1)
 
static QString trUtf8 (const char *sourceText, const char *comment=0, int n=-1)
 
- Static Public Variables inherited from QObject
static const QMetaObject staticMetaObject
 This variable stores the meta-object for the class. More...
 
- Protected Variables inherited from QObject
QScopedPointer< QObjectDatad_ptr
 
- Static Protected Variables inherited from QObject
static const QMetaObject staticQtMetaObject
 

Detailed Description

The QProxyStyle class is a convenience class that simplifies dynamically overriding QStyle elements.

Since
4.6

A QProxyStyle wraps a QStyle (usually the default system style) for the purpose of dynamically overriding painting or other specific style behavior.

The following example shows how to override the shortcut underline behavior on any platform:

#include "textedit.h"
#include <QApplication>
#include <QProxyStyle>
class MyProxyStyle : public QProxyStyle
{
public:
int styleHint(StyleHint hint, const QStyleOption *option = 0,
const QWidget *widget = 0, QStyleHintReturn *returnData = 0) const
{
return 0;
return QProxyStyle::styleHint(hint, option, widget, returnData);
}
};
int main(int argc, char **argv)
{
Q_INIT_RESOURCE(textedit);
QApplication a(argc, argv);
a.setStyle(new MyProxyStyle);
mw.resize(700, 800);
mw.show();
//...
}

Warning: The QCommonStyle {common styles} provided by Qt will respect this hint, because they call QStyle::proxy(), but there is no guarantee that QStyle::proxy() will be called for user defined or system controlled styles. It would not work on a Mac, for example, where menus are handled by the operating system.

See also
QStyle

Definition at line 56 of file qproxystyle.h.

Constructors and Destructors

◆ QProxyStyle()

QProxyStyle::QProxyStyle ( QStyle style = 0)

Constructs a QProxyStyle object for overriding behavior in style or in the current application style if style is 0 (default).

Normally style is 0, because you want to override behavior in the system style.

Ownership of style is transferred to QProxyStyle.

Definition at line 119 of file qproxystyle.cpp.

119  :
121 {
122  Q_D(QProxyStyle);
123  if (style) {
124  style->setProxy(this);
125  style->setParent(this); // Take ownership
126  d->baseStyle = style;
127  }
128 }
double d
Definition: qnumeric_p.h:62
The QProxyStyle class is a convenience class that simplifies dynamically overriding QStyle elements...
Definition: qproxystyle.h:56
#define Q_D(Class)
Definition: qglobal.h:2482
void setParent(QObject *)
Makes the object a child of parent.
Definition: qobject.cpp:1950
QCommonStyle()
Constructs a QCommonStyle.
void setProxy(QStyle *style)
Definition: qstyle.cpp:2557
friend class QProxyStylePrivate
Definition: qstyle.h:874

◆ ~QProxyStyle()

QProxyStyle::~QProxyStyle ( )

Destroys the QProxyStyle object.

Definition at line 133 of file qproxystyle.cpp.

134 {
135 }

Functions

◆ baseStyle()

QStyle * QProxyStyle::baseStyle ( ) const

Returns the proxy base style object.

If no base style is set on the proxy style, QProxyStyle will create an instance of the application style instead.

See also
setBaseStyle(), QStyle

Definition at line 144 of file qproxystyle.cpp.

145 {
146  Q_D (const QProxyStyle);
147  d->ensureBaseStyle();
148  return d->baseStyle;
149 }
double d
Definition: qnumeric_p.h:62
The QProxyStyle class is a convenience class that simplifies dynamically overriding QStyle elements...
Definition: qproxystyle.h:56
#define Q_D(Class)
Definition: qglobal.h:2482

◆ drawComplexControl()

void QProxyStyle::drawComplexControl ( ComplexControl  control,
const QStyleOptionComplex option,
QPainter painter,
const QWidget widget = 0 
) const
virtual

Reimplemented Function

Reimplemented from QCommonStyle.

Definition at line 195 of file qproxystyle.cpp.

196 {
197  Q_D (const QProxyStyle);
198  d->ensureBaseStyle();
199  d->baseStyle->drawComplexControl(control, option, painter, widget);
200 }
double d
Definition: qnumeric_p.h:62
The QProxyStyle class is a convenience class that simplifies dynamically overriding QStyle elements...
Definition: qproxystyle.h:56
#define Q_D(Class)
Definition: qglobal.h:2482

◆ drawControl()

void QProxyStyle::drawControl ( ControlElement  element,
const QStyleOption option,
QPainter painter,
const QWidget widget = 0 
) const
virtual

Reimplemented Function

Reimplemented from QCommonStyle.

Definition at line 186 of file qproxystyle.cpp.

187 {
188  Q_D (const QProxyStyle);
189  d->ensureBaseStyle();
190  d->baseStyle->drawControl(element, option, painter, widget);
191 }
double d
Definition: qnumeric_p.h:62
The QProxyStyle class is a convenience class that simplifies dynamically overriding QStyle elements...
Definition: qproxystyle.h:56
#define Q_D(Class)
Definition: qglobal.h:2482

◆ drawItemPixmap()

void QProxyStyle::drawItemPixmap ( QPainter painter,
const QRect rect,
int  alignment,
const QPixmap pixmap 
) const
virtual

Reimplemented Function

Reimplemented from QStyle.

Definition at line 214 of file qproxystyle.cpp.

215 {
216  Q_D (const QProxyStyle);
217  d->ensureBaseStyle();
218  d->baseStyle->drawItemPixmap(painter, rect, alignment, pixmap);
219 }
double d
Definition: qnumeric_p.h:62
The QProxyStyle class is a convenience class that simplifies dynamically overriding QStyle elements...
Definition: qproxystyle.h:56
#define Q_D(Class)
Definition: qglobal.h:2482

◆ drawItemText()

void QProxyStyle::drawItemText ( QPainter painter,
const QRect rect,
int  flags,
const QPalette pal,
bool  enabled,
const QString text,
QPalette::ColorRole  textRole = QPalette::NoRole 
) const
virtual

Reimplemented Function

Reimplemented from QStyle.

Definition at line 204 of file qproxystyle.cpp.

206 {
207  Q_D (const QProxyStyle);
208  d->ensureBaseStyle();
209  d->baseStyle->drawItemText(painter, rect, flags, pal, enabled, text, textRole);
210 }
double d
Definition: qnumeric_p.h:62
The QProxyStyle class is a convenience class that simplifies dynamically overriding QStyle elements...
Definition: qproxystyle.h:56
#define Q_D(Class)
Definition: qglobal.h:2482
#define enabled

◆ drawPrimitive()

void QProxyStyle::drawPrimitive ( PrimitiveElement  element,
const QStyleOption option,
QPainter painter,
const QWidget widget = 0 
) const
virtual

Reimplemented Function

Reimplemented from QCommonStyle.

Definition at line 176 of file qproxystyle.cpp.

177 {
178  Q_D (const QProxyStyle);
179  d->ensureBaseStyle();
180  d->baseStyle->drawPrimitive(element, option, painter, widget);
181 }
double d
Definition: qnumeric_p.h:62
The QProxyStyle class is a convenience class that simplifies dynamically overriding QStyle elements...
Definition: qproxystyle.h:56
#define Q_D(Class)
Definition: qglobal.h:2482

◆ event()

bool QProxyStyle::event ( QEvent e)
protectedvirtual

Reimplemented Function

Reimplemented from QObject.

Definition at line 367 of file qproxystyle.cpp.

368 {
369  Q_D (QProxyStyle);
370  d->ensureBaseStyle();
371  return d->baseStyle->event(e);
372 }
double d
Definition: qnumeric_p.h:62
The QProxyStyle class is a convenience class that simplifies dynamically overriding QStyle elements...
Definition: qproxystyle.h:56
#define Q_D(Class)
Definition: qglobal.h:2482

◆ generatedIconPixmap()

QPixmap QProxyStyle::generatedIconPixmap ( QIcon::Mode  iconMode,
const QPixmap pixmap,
const QStyleOption opt 
) const
virtual

Reimplemented Function

Reimplemented from QCommonStyle.

Definition at line 304 of file qproxystyle.cpp.

305 {
306  Q_D (const QProxyStyle);
307  d->ensureBaseStyle();
308  return d->baseStyle->generatedIconPixmap(iconMode, pixmap, opt);
309 }
double d
Definition: qnumeric_p.h:62
The QProxyStyle class is a convenience class that simplifies dynamically overriding QStyle elements...
Definition: qproxystyle.h:56
#define Q_D(Class)
Definition: qglobal.h:2482

◆ hitTestComplexControl()

QStyle::SubControl QProxyStyle::hitTestComplexControl ( ComplexControl  control,
const QStyleOptionComplex option,
const QPoint pos,
const QWidget widget = 0 
) const
virtual

Reimplemented Function

Reimplemented from QCommonStyle.

Definition at line 268 of file qproxystyle.cpp.

269 {
270  Q_D (const QProxyStyle);
271  d->ensureBaseStyle();
272  return d->baseStyle->hitTestComplexControl(control, option, pos, widget);
273 }
double d
Definition: qnumeric_p.h:62
The QProxyStyle class is a convenience class that simplifies dynamically overriding QStyle elements...
Definition: qproxystyle.h:56
#define Q_D(Class)
Definition: qglobal.h:2482

◆ itemPixmapRect()

QRect QProxyStyle::itemPixmapRect ( const QRect r,
int  flags,
const QPixmap pixmap 
) const
virtual

Reimplemented Function

Reimplemented from QStyle.

Definition at line 259 of file qproxystyle.cpp.

260 {
261  Q_D (const QProxyStyle);
262  d->ensureBaseStyle();
263  return d->baseStyle->itemPixmapRect(r, flags, pixmap);
264 }
double d
Definition: qnumeric_p.h:62
The QProxyStyle class is a convenience class that simplifies dynamically overriding QStyle elements...
Definition: qproxystyle.h:56
#define Q_D(Class)
Definition: qglobal.h:2482

◆ itemTextRect()

QRect QProxyStyle::itemTextRect ( const QFontMetrics fm,
const QRect r,
int  flags,
bool  enabled,
const QString text 
) const
virtual

Reimplemented Function

Reimplemented from QStyle.

Definition at line 250 of file qproxystyle.cpp.

251 {
252  Q_D (const QProxyStyle);
253  d->ensureBaseStyle();
254  return d->baseStyle->itemTextRect(fm, r, flags, enabled, text);
255 }
double d
Definition: qnumeric_p.h:62
The QProxyStyle class is a convenience class that simplifies dynamically overriding QStyle elements...
Definition: qproxystyle.h:56
#define Q_D(Class)
Definition: qglobal.h:2482
#define enabled

◆ layoutSpacingImplementation

int QProxyStyle::layoutSpacingImplementation ( QSizePolicy::ControlType  control1,
QSizePolicy::ControlType  control2,
Qt::Orientation  orientation,
const QStyleOption option = 0,
const QWidget widget = 0 
) const
protectedslot

This slot is called by layoutSpacing() to determine the spacing that should be used between control1 and control2 in a layout.

orientation specifies whether the controls are laid out side by side or stacked vertically. The option parameter can be used to pass extra information about the parent widget. The widget parameter is optional and can also be used if option is 0.

The default implementation returns -1.

See also
layoutSpacing(), combinedLayoutSpacing()

Definition at line 410 of file qproxystyle.cpp.

415 {
416  Q_D (const QProxyStyle);
417  d->ensureBaseStyle();
418  return d->baseStyle->layoutSpacing(control1, control2, orientation, option, widget);
419 }
double d
Definition: qnumeric_p.h:62
The QProxyStyle class is a convenience class that simplifies dynamically overriding QStyle elements...
Definition: qproxystyle.h:56
#define Q_D(Class)
Definition: qglobal.h:2482

◆ pixelMetric()

int QProxyStyle::pixelMetric ( PixelMetric  metric,
const QStyleOption option = 0,
const QWidget widget = 0 
) const
virtual

Reimplemented Function

Reimplemented from QCommonStyle.

Definition at line 286 of file qproxystyle.cpp.

287 {
288  Q_D (const QProxyStyle);
289  d->ensureBaseStyle();
290  return d->baseStyle->pixelMetric(metric, option, widget);
291 }
double d
Definition: qnumeric_p.h:62
The QProxyStyle class is a convenience class that simplifies dynamically overriding QStyle elements...
Definition: qproxystyle.h:56
#define Q_D(Class)
Definition: qglobal.h:2482

◆ polish() [1/3]

void QProxyStyle::polish ( QWidget widget)
virtual

Reimplemented Function

Reimplemented from QCommonStyle.

Definition at line 322 of file qproxystyle.cpp.

323 {
324  Q_D (QProxyStyle);
325  d->ensureBaseStyle();
326  d->baseStyle->polish(widget);
327 }
double d
Definition: qnumeric_p.h:62
The QProxyStyle class is a convenience class that simplifies dynamically overriding QStyle elements...
Definition: qproxystyle.h:56
#define Q_D(Class)
Definition: qglobal.h:2482

◆ polish() [2/3]

void QProxyStyle::polish ( QPalette pal)
virtual

Reimplemented Function

Reimplemented from QCommonStyle.

Definition at line 331 of file qproxystyle.cpp.

332 {
333  Q_D (QProxyStyle);
334  d->ensureBaseStyle();
335  d->baseStyle->polish(pal);
336 }
double d
Definition: qnumeric_p.h:62
The QProxyStyle class is a convenience class that simplifies dynamically overriding QStyle elements...
Definition: qproxystyle.h:56
#define Q_D(Class)
Definition: qglobal.h:2482

◆ polish() [3/3]

void QProxyStyle::polish ( QApplication app)
virtual

Reimplemented Function

Reimplemented from QCommonStyle.

Definition at line 340 of file qproxystyle.cpp.

341 {
342  Q_D (QProxyStyle);
343  d->ensureBaseStyle();
344  d->baseStyle->polish(app);
345 }
double d
Definition: qnumeric_p.h:62
The QProxyStyle class is a convenience class that simplifies dynamically overriding QStyle elements...
Definition: qproxystyle.h:56
#define Q_D(Class)
Definition: qglobal.h:2482

◆ setBaseStyle()

void QProxyStyle::setBaseStyle ( QStyle style)

Sets the base style that should be proxied.

Ownership of style is transferred to QProxyStyle.

If style is zero, a desktop-dependant style will be assigned automatically.

Definition at line 159 of file qproxystyle.cpp.

160 {
161  Q_D (QProxyStyle);
162 
163  if (d->baseStyle && d->baseStyle->parent() == this)
164  d->baseStyle->deleteLater();
165 
166  d->baseStyle = style;
167 
168  if (d->baseStyle) {
169  d->baseStyle->setProxy(this);
170  d->baseStyle->setParent(this);
171  }
172 }
double d
Definition: qnumeric_p.h:62
The QProxyStyle class is a convenience class that simplifies dynamically overriding QStyle elements...
Definition: qproxystyle.h:56
#define Q_D(Class)
Definition: qglobal.h:2482

◆ sizeFromContents()

QSize QProxyStyle::sizeFromContents ( ContentsType  type,
const QStyleOption option,
const QSize size,
const QWidget widget 
) const
virtual

Reimplemented Function

Reimplemented from QCommonStyle.

Definition at line 223 of file qproxystyle.cpp.

224 {
225  Q_D (const QProxyStyle);
226  d->ensureBaseStyle();
227  return d->baseStyle->sizeFromContents(type, option, size, widget);
228 }
double d
Definition: qnumeric_p.h:62
int type
Definition: qmetatype.cpp:239
The QProxyStyle class is a convenience class that simplifies dynamically overriding QStyle elements...
Definition: qproxystyle.h:56
#define Q_D(Class)
Definition: qglobal.h:2482

◆ standardIconImplementation

QIcon QProxyStyle::standardIconImplementation ( StandardPixmap  standardIcon,
const QStyleOption option,
const QWidget widget 
) const
protectedslot

Returns an icon for the given standardIcon.

Reimplement this slot to provide your own icons in a QStyle subclass. The option argument can be used to pass extra information required to find the appropriate icon. The widget argument is optional and can also be used to help find the icon.

Note
Because of binary compatibility constraints, standardIcon() introduced in Qt 4.1 is not virtual. Therefore it must dynamically detect and call this slot. This default implementation simply calls standardIcon() with the given parameters.
See also
standardIcon()

Definition at line 389 of file qproxystyle.cpp.

392 {
393  Q_D (const QProxyStyle);
394  d->ensureBaseStyle();
395  return d->baseStyle->standardIcon(standardIcon, option, widget);
396 }
double d
Definition: qnumeric_p.h:62
The QProxyStyle class is a convenience class that simplifies dynamically overriding QStyle elements...
Definition: qproxystyle.h:56
#define Q_D(Class)
Definition: qglobal.h:2482
QIcon standardIcon(StandardPixmap standardIcon, const QStyleOption *option=0, const QWidget *widget=0) const
Returns an icon for the given standardIcon.
Definition: qstyle.cpp:2327

◆ standardPalette()

QPalette QProxyStyle::standardPalette ( ) const
virtual

Reimplemented Function

Reimplemented from QStyle.

Definition at line 313 of file qproxystyle.cpp.

314 {
315  Q_D (const QProxyStyle);
316  d->ensureBaseStyle();
317  return d->baseStyle->standardPalette();
318 }
double d
Definition: qnumeric_p.h:62
The QProxyStyle class is a convenience class that simplifies dynamically overriding QStyle elements...
Definition: qproxystyle.h:56
#define Q_D(Class)
Definition: qglobal.h:2482

◆ standardPixmap()

QPixmap QProxyStyle::standardPixmap ( StandardPixmap  standardPixmap,
const QStyleOption opt,
const QWidget widget = 0 
) const
virtual

Reimplemented Function

Reimplemented from QCommonStyle.

Definition at line 295 of file qproxystyle.cpp.

296 {
297  Q_D (const QProxyStyle);
298  d->ensureBaseStyle();
299  return d->baseStyle->standardPixmap(standardPixmap, opt, widget);
300 }
double d
Definition: qnumeric_p.h:62
The QProxyStyle class is a convenience class that simplifies dynamically overriding QStyle elements...
Definition: qproxystyle.h:56
#define Q_D(Class)
Definition: qglobal.h:2482
QPixmap standardPixmap(StandardPixmap standardPixmap, const QStyleOption *opt, const QWidget *widget=0) const
Reimplemented Function

◆ styleHint()

int QProxyStyle::styleHint ( StyleHint  hint,
const QStyleOption option = 0,
const QWidget widget = 0,
QStyleHintReturn returnData = 0 
) const
virtual

Reimplemented Function

Reimplemented from QCommonStyle.

Definition at line 277 of file qproxystyle.cpp.

278 {
279  Q_D (const QProxyStyle);
280  d->ensureBaseStyle();
281  return d->baseStyle->styleHint(hint, option, widget, returnData);
282 }
double d
Definition: qnumeric_p.h:62
The QProxyStyle class is a convenience class that simplifies dynamically overriding QStyle elements...
Definition: qproxystyle.h:56
#define Q_D(Class)
Definition: qglobal.h:2482

◆ subControlRect()

QRect QProxyStyle::subControlRect ( ComplexControl  cc,
const QStyleOptionComplex opt,
SubControl  sc,
const QWidget widget 
) const
virtual

Reimplemented Function

Reimplemented from QCommonStyle.

Definition at line 241 of file qproxystyle.cpp.

242 {
243  Q_D (const QProxyStyle);
244  d->ensureBaseStyle();
245  return d->baseStyle->subControlRect(cc, option, sc, widget);
246 }
double d
Definition: qnumeric_p.h:62
The QProxyStyle class is a convenience class that simplifies dynamically overriding QStyle elements...
Definition: qproxystyle.h:56
#define Q_D(Class)
Definition: qglobal.h:2482

◆ subElementRect()

QRect QProxyStyle::subElementRect ( SubElement  element,
const QStyleOption option,
const QWidget widget 
) const
virtual

Reimplemented Function

Reimplemented from QCommonStyle.

Definition at line 232 of file qproxystyle.cpp.

233 {
234  Q_D (const QProxyStyle);
235  d->ensureBaseStyle();
236  return d->baseStyle->subElementRect(element, option, widget);
237 }
double d
Definition: qnumeric_p.h:62
The QProxyStyle class is a convenience class that simplifies dynamically overriding QStyle elements...
Definition: qproxystyle.h:56
#define Q_D(Class)
Definition: qglobal.h:2482

◆ unpolish() [1/2]

void QProxyStyle::unpolish ( QWidget widget)
virtual

Reimplemented Function

Reimplemented from QCommonStyle.

Definition at line 349 of file qproxystyle.cpp.

350 {
351  Q_D (QProxyStyle);
352  d->ensureBaseStyle();
353  d->baseStyle->unpolish(widget);
354 }
double d
Definition: qnumeric_p.h:62
The QProxyStyle class is a convenience class that simplifies dynamically overriding QStyle elements...
Definition: qproxystyle.h:56
#define Q_D(Class)
Definition: qglobal.h:2482

◆ unpolish() [2/2]

void QProxyStyle::unpolish ( QApplication app)
virtual

Reimplemented Function

Reimplemented from QCommonStyle.

Definition at line 358 of file qproxystyle.cpp.

359 {
360  Q_D (QProxyStyle);
361  d->ensureBaseStyle();
362  d->baseStyle->unpolish(app);
363 }
double d
Definition: qnumeric_p.h:62
The QProxyStyle class is a convenience class that simplifies dynamically overriding QStyle elements...
Definition: qproxystyle.h:56
#define Q_D(Class)
Definition: qglobal.h:2482

The documentation for this class was generated from the following files: