📄 qstyle.cpp
字号:
\o \l QStyleOptionSpinBox \o \l State_Sunken \o Indicates that the button is pressed. \endtable \sa PrimitiveElement, State, QStyleOption*//*! \enum QStyle::ControlElement This enum represents a ControlElement. A ControlElement is part of a widget that performs some action or displays information to the user. \value CE_PushButton A QPushButton, draws CE_PushButtonBevel, CE_PushButtonLabel and PE_FrameFocusRect \value CE_PushButtonBevel The bevel and default indicator of a QPushButton. \value CE_PushButtonLabel The label (icon with text or pixmap) of a QPushButton \value CE_DockWidgetTitle Dock window title. \value CE_Splitter Splitter handle; see also QSplitter. \value CE_CheckBox A QCheckBox, draws a PE_IndicatorCheckBox, a CE_CheckBoxLabel and a PE_FrameFocusRect \value CE_CheckBoxLabel The label (text or pixmap) of a QCheckBox \value CE_RadioButton A QRadioButton, draws a PE_ExclusiveRadioButton, a CE_RadioButtonLabel and a PE_FrameFocusRect \value CE_RadioButtonLabel The label (text or pixmap) of a QRadioButton \value CE_TabBarTab The tab and label within a QTabBar \value CE_TabBarTabShape The tab shape within a tab bar \value CE_TabBarTabLabel The label within a tab \value CE_ProgressBar A QProgressBar, draws CE_ProgressBarGroove, CE_ProgressBarContents and CE_ProgressBarLabel \value CE_ProgressBarGroove The groove where the progress indicator is drawn in a QProgressBar \value CE_ProgressBarContents The progress indicator of a QProgressBar \value CE_ProgressBarLabel The text label of a QProgressBar \value CE_ToolButtonLabel A tool button's label \value CE_MenuBarItem A menu item in a QMenuBar \value CE_MenuBarEmptyArea The empty area of a QMenuBar \value CE_MenuItem A menu item in a QMenu \value CE_MenuScroller Scrolling areas in a QMenu when the style supports scrolling \value CE_MenuTearoff A menu item representing the tear off section of a QMenu \value CE_MenuEmptyArea The area in a menu without menu items \value CE_MenuHMargin The horizontal extra space on the left/right of a menu \value CE_MenuVMargin The vertical extra space on the top/bottom of a menu \value CE_Q3DockWindowEmptyArea The empty area of a QDockWidget \value CE_ToolBoxTab The toolbox's tab area \value CE_SizeGrip Window resize handle; see also QSizeGrip. \value CE_Header A header \value CE_HeaderSection A header section \value CE_HeaderLabel The header's label \value CE_ScrollBarAddLine Scroll bar line increase indicator. (i.e., scroll down); see also QScrollBar. \value CE_ScrollBarSubLine Scroll bar line decrease indicator (i.e., scroll up). \value CE_ScrollBarAddPage Scolllbar page increase indicator (i.e., page down). \value CE_ScrollBarSubPage Scroll bar page decrease indicator (i.e., page up). \value CE_ScrollBarSlider Scroll bar slider. \value CE_ScrollBarFirst Scroll bar first line indicator (i.e., home). \value CE_ScrollBarLast Scroll bar last line indicator (i.e., end). \value CE_RubberBand Rubber band used in such things as iconview. \value CE_FocusFrame Focus Frame that can is style controled. \value CE_CustomBase Base value for custom ControlElements; custom values must be greater than this value \value CE_ComboBoxLabel The label of a non-editable QComboBox \value CE_ToolBar A toolbar like QToolBar \sa drawControl()*//*! \fn void QStyle::drawControl(ControlElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const Draws the ControlElement \a element with \a painter with the style options specified by \a option. The \a widget argument is optional and may contain a widget that may aid in drawing the control. What follows is a table of the elements and the QStyleOption structure the \a option parameter can cast to. The flags stored in the QStyleOption state variable are also listed. If a ControlElement is not listed here, it uses a plain QStyleOption. \table \header \o ControlElement \o Option Cast \o Style Flag \o Remark \row \o{1,4} \l CE_MenuItem, \l CE_MenuBarItem \o{1,4} \l QStyleOptionMenuItem \o \l State_Selected \o The menu item is currently selected item \row \o \l State_Enabled \o The item is enabled \row \o \l State_DownArrow \o Set if the menu item is down (i.e., if the mouse button or the space bar is pressed) \row \o \l State_HasFocus \o Set if the menubar has input focus \row \o{1,5} \l CE_PushButton, \l CE_PushButtonLabel \o{1,5} \l QStyleOptionButton \o \l State_Enabled \o Set if the button is enabled \row \o \l State_HasFocus \o Set if the button has input focus \row \o \l State_Raised \o Set if the button is not down, not on and not flat \row \o \l State_On \o Set if the button is a toggle button and is toggled on \row \o \l State_Sunken \o Set if the button is down (i.e., the mouse button or the space bar is pressed on the button) \row \o{1,6} \l CE_RadioButton, \l CE_RadioButtonLabel, \l CE_CheckBox, \l CE_CheckBoxLabel \o{1,6} \l QStyleOptionButton \o \l State_Enabled \o Set if the button is enabled \row \o \l State_HasFocus \o Set if the button has input focus \row \o \l State_On \o Set if the button is checked \row \o \l State_Off \o Set if the button is not checked \row \o \l State_NoChange \o Set if the button is in the NoChange state \row \o \l State_Sunken \o Set if the button is down (i.e., the mouse button or the space bar is pressed on the button) \row \o{1,2} \l CE_ProgressBarContents, \l CE_ProgressBarLabel, \l CE_ProgressBarGroove \o{1,2} \l QStyleOptionProgressBar \o \l State_Enabled \o Set if the progressbar is enabled \row \o \l State_HasFocus \o Set if the progressbar has input focus \row \o \l CE_Header, \l CE_HeaderSection, \c CE_HeaderLabel \o \l QStyleOptionHeader \o \o \row \o{1,7} \l CE_ToolButtonLabel \o{1,7} \l QStyleOptionToolButton \o \l State_Enabled \o Set if the tool button is enabled \row \o \l State_HasFocus \o Set if the tool button has input focus \row \o \l State_Sunken \o Set if the tool button is down (i.e., a mouse button or the space bar is pressed) \row \o \l State_On \o Set if the tool button is a toggle button and is toggled on \row \o \l State_AutoRaise \o Set if the tool button has auto-raise enabled \row \o \l State_MouseOver \o Set if the mouse pointer is over the tool button \row \o \l State_Raised \o Set if the button is not down and is not on \row \o \l CE_ToolBoxTab \o \l QStyleOptionToolBox \o \l State_Selected \o The tab is the currently selected tab \row \o{1,3} \l CE_HeaderSection \o{1,3} \l QStyleOptionHeader \o \l State_Sunken \o Indicates that the section is pressed. \row \o \l State_UpArrow \o Indicates that the sort indicator should be pointing up. \row \o \l State_DownArrow \o Indicates that the sort indicator should be pointing down. \endtable \sa ControlElement, State, QStyleOption*//*! \enum QStyle::SubElement This enum represents a sub-area of a widget. Style implementations use these areas to draw the different parts of a widget. \value SE_PushButtonContents Area containing the label (icon with text or pixmap) \value SE_PushButtonFocusRect Area for the focus rect (usually larger than the contents rect) \value SE_CheckBoxIndicator Area for the state indicator (e.g., check mark) \value SE_CheckBoxContents Area for the label (text or pixmap) \value SE_CheckBoxFocusRect Area for the focus indicator \value SE_CheckBoxClickRect Clickable area, defaults to SE_CheckBoxFocusRect \value SE_RadioButtonIndicator Area for the state indicator \value SE_RadioButtonContents Area for the label \value SE_RadioButtonFocusRect Area for the focus indicator \value SE_RadioButtonClickRect Clickable area, defaults to SE_RadioButtonFocusRect \value SE_ComboBoxFocusRect Area for the focus indicator \value SE_SliderFocusRect Area for the focus indicator \value SE_Q3DockWindowHandleRect Area for the tear-off handle \value SE_ProgressBarGroove Area for the groove \value SE_ProgressBarContents Area for the progress indicator \value SE_ProgressBarLabel Area for the text label \value SE_DialogButtonAccept Area for a dialog's accept button \value SE_DialogButtonReject Area for a dialog's reject button \value SE_DialogButtonApply Area for a dialog's apply button \value SE_DialogButtonHelp Area for a dialog's help button \value SE_DialogButtonAll Area for a dialog's all button \value SE_DialogButtonRetry Area for a dialog's retry button \value SE_DialogButtonAbort Area for a dialog's abort button \value SE_DialogButtonIgnore Area for a dialog's ignore button \value SE_DialogButtonCustom Area for a dialog's custom widget area (in the button row) \value SE_HeaderArrow \value SE_HeaderLabel \value SE_TabWidgetLeftCorner \value SE_TabWidgetRightCorner \value SE_TabWidgetTabBar \value SE_TabWidgetTabContents \value SE_TabWidgetTabPane \value SE_ToolBoxTabContents Area for a toolbox tab's icon and label \value SE_ViewItemCheckIndicator Area for a view item's check mark \value SE_TabBarTearIndicator Area for the tear indicator on a tab bar with scroll arrows. \value SE_TreeViewDisclosureItem Area for the actual disclosure item in a tree branch. \value SE_CustomBase Base value for custom ControlElements Custom values must be greater than this value \sa subElementRect()*//*! \fn QRect QStyle::subElementRect(SubElement element, const QStyleOption *option, const QWidget *widget) const Returns the sub-area \a element as described in \a option in logical coordinates. The \a widget argument is optional and may contain a widget that may aid determining the subRect. The QStyleOption can be cast to the appropriate type based on the value of \a element. See the table below for the appropriate \a option casts: \table \header \o SubElement \o Option Cast \row \o \l SE_PushButtonContents \o \l QStyleOptionButton \row \o \l SE_PushButtonFocusRect \o \l QStyleOptionButton \row \o \l SE_CheckBoxIndicator \o \l QStyleOptionButton \row \o \l SE_CheckBoxContents \o \l QStyleOptionButton \row \o \l SE_CheckBoxFocusRect \o \l QStyleOptionButton \row \o \l SE_RadioButtonIndicator \o \l QStyleOptionButton \row \o \l SE_RadioButtonContents \o \l QStyleOptionButton \row \o \l SE_RadioButtonFocusRect \o \l QStyleOptionButton \row \o \l SE_ComboBoxFocusRect \o \l QStyleOptionComboBox \row \o \l SE_Q3DockWindowHandleRect \o \l QStyleOptionQ3DockWindow \row \o \l SE_ProgressBarGroove \o \l QStyleOptionProgressBar \row \o \l SE_ProgressBarContents \o \l QStyleOptionProgressBar \row \o \l SE_ProgressBarLabel \o \l QStyleOptionProgressBar \endtable \sa SubElement QStyleOption*//*! \enum QStyle::ComplexControl This enum represents a ComplexControl. ComplexControls have different behavior depending upon where the user clicks on them or which keys are pressed. \value CC_SpinBox A spinbox, like QSpinBox \value CC_ComboBox A combobox, like QComboBox \value CC_ScrollBar A scroll bar, like QScrollBar \value CC_Slider A slider, like QSlider \value CC_ToolButton A tool button, like QToolButton \value CC_TitleBar A Title bar, like what is used in Q3Workspace \value CC_Q3ListView Used for drawing the Q3ListView class \value CC_GroupBox A group box, like QGroupBox \value CC_Dial A dial, like QDial \value CC_CustomBase Base value for custom ControlElements. Custom values must be greater than this value. \sa SubControl drawComplexControl()*//*! \enum QStyle::SubControl This enum represents a SubControl within a ComplexControl. \value SC_None Special value that matches no other SubControl. \value SC_ScrollBarAddLine Scroll bar add line (i.e., down/right arrow); see also QScrollBar \value SC_ScrollBarSubLine Scroll bar sub line (i.e., up/left arrow) \value SC_ScrollBarAddPage Scroll bar add page (i.e., page down) \value SC_ScrollBarSubPage Scroll bar sub page (i.e., page up) \value SC_ScrollBarFirst Scroll bar first line (i.e., home) \value SC_ScrollBarLast Scroll bar last line (i.e., end) \value SC_ScrollBarSlider Scroll bar slider handle \value SC_ScrollBarGroove Special sub-control which contains the area in which the slider handle may move \value SC_SpinBoxUp Spinwidget up/increase; see also QSpinBox \value SC_SpinBoxDown Spinwidget down/decrease \value SC_SpinBoxFrame Spinwidget frame \value SC_SpinBoxEditField Spinwidget edit field \value SC_ComboBoxEditField Combobox edit field; see also QComboBox \value SC_ComboBoxArrow Combobox arrow button \value SC_ComboBoxFrame Combobox frame \value SC_ComboBoxListBoxPopup The reference rect for the combobox popup Used to calculate the position of the popup. \value SC_SliderGroove Special sub-control which contains the area in which the slider handle may move \value SC_SliderHandle Slider handle \value SC_SliderTickmarks Slider tickmarks \value SC_ToolButton Tool button (see also QToolButton) \value SC_ToolButtonMenu Sub-control for opening a popup menu in a tool button; see also Q3PopupMenu \value SC_TitleBarSysMenu System menu button (i.e., restore, close, etc.) \value SC_TitleBarMinButton Minimize button \value SC_TitleBarMaxButton Maximize button \value SC_TitleBarCloseButton Close button \value SC_TitleBarLabel Window title label \value SC_TitleBarNormalButton Normal (restore) button \value SC_TitleBarShadeButton Shade button \value SC_TitleBarUnshadeButton Unshade button \value SC_TitleBarContextHelpButton Context Help button
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -