KDEUI
Classes | |
struct | KStyle::CheckBox |
struct | KStyle::ComboBox |
struct | KStyle::DockWidget |
struct | KStyle::Generic |
struct | KStyle::GroupBox |
struct | KStyle::Header |
struct | KStyle::LineEdit |
struct | KStyle::Menu |
struct | KStyle::MenuBar |
struct | KStyle::MenuBarItem |
struct | KStyle::MenuItem |
struct | KStyle::ProgressBar |
struct | KStyle::PushButton |
struct | KStyle::RadioButton |
struct | KStyle::ScrollBar |
struct | KStyle::Slider |
struct | KStyle::SpinBox |
struct | KStyle::Splitter |
struct | KStyle::StatusBar |
struct | KStyle::TabBar |
struct | KStyle::TabWidget |
struct | KStyle::ToolBar |
struct | KStyle::ToolBoxTab |
struct | KStyle::ToolButton |
struct | KStyle::Tree |
struct | KStyle::Window |
Detailed Description
Things related to the representation of widgets.
Enumeration Type Documentation
Layout properties.
These can be set with setWidgetLayoutProp() Generic LayoutProps contain a few properties which are not directly related to a specific widget type.
Enumerator | |
---|---|
DefaultFrameWidth |
The FrameWidth used by LineEdit, etc..., default is 2 [sets QStyle::PM_DefaultFrameWidth]. |
DefaultLayoutSpacing |
The spacing used by layouts, unless the style implements layoutSpacingImplementation(), default is 6 [sets QStyle::PM_DefaultLayoutSpacing]. |
DefaultLayoutMargin |
The margin used by layouts, default is 9 [sets QStyle::PM_DefaultChildMargin and QStyle::PM_DefaultTopLevelMargin]. |
The layout of a PushButton is structured as follows:
- Between the very outside and the bevel is the default indicator area, controlled by the
PushButton::DefaultIndicatorMargin
.
- From the bevel, the content and focus rect margins are measured. Only the content margin is used to size the content area.
- Inside the content area,
PushButton::MenuIndicatorSize
is allocated to the down arrow if there is a popup menu. PushButton::TextToIconSpace
is allocated between icon and text if both exist
- See also
- setWidgetLayoutProp()
Enumerator | |
---|---|
ContentsMargin |
(5) space between the bevel and the button contents |
FocusMargin |
(3) Used to calculate the area of the focus indicator. Measured from the bevel. |
DefaultIndicatorMargin |
(0 ?) Default indicator between the very outside and the bevel. KStyle may reserve this for auto-default buttons, too, for consistency's sake. [the MainMargin sets QStyle::PM_ButtonDefaultIndicator] |
PressedShiftHorizontal |
(2) horizontal contents shift for pressed buttons [sets QStyle::PM_ButtonShiftHorizontal] |
PressedShiftVertical |
(2) vertical contents shift for pressed buttons [sets QStyle::PM_ButtonShiftVertical] |
MenuIndicatorSize |
(8) Space inside the content area, which is allocated to the down arrow if there is a popup menu [sets QStyle::PM_MenuButtonIndicator, except for toolbuttons] |
TextToIconSpace |
(6) space between the icon and the text if both exist |
- See also
- setWidgetLayoutProp()
Enumerator | |
---|---|
Width |
(6) size of the splitter handle [sets QStyle::PM_SplitterWidth] |
- See also
- setWidgetLayoutProp()
Enumerator | |
---|---|
Size |
(16) size of the checkbox [sets PM_IndicatorWidth, PM_IndicatorHeight] |
BoxTextSpace |
(6) space to leave between checkbox and text (and icon between them in case there is one) |
NoLabelFocusMargin |
(1) rectangle to apply to the checkbox rectangle to get where to paint the focus rectangle in case of a labelless checkbox |
FocusMargin |
(0) margin around the checkbox contents reserved for the focus rect
|
- See also
- setWidgetLayoutProp()
Enumerator | |
---|---|
Size |
[sets QStyle::PM_ExclusiveIndicatorWidth, QStyle::PM_ExclusiveIndicatorHeight]
|
BoxTextSpace |
|
FocusMargin |
|
- See also
- setWidgetLayoutProp()
- See also
- setWidgetLayoutProp()
- See also
- setWidgetLayoutProp()
Enumerator | |
---|---|
Margin |
(MainMargin 2, Left 4, Right 4) Margin rectangle for the contents. |
ItemSpacing |
(14) Space between items [sets QStyle::PM_MenuBarItemSpacing] |
- See also
- setWidgetLayoutProp()
Enumerator | |
---|---|
Margin |
(1) Margin rectangle to allocate for any bevel, etc. (Text will be drawn with the inside rect). |
Dummy |
- See also
- setWidgetLayoutProp()
Enumerator | |
---|---|
FrameWidth |
(1) The width of the frame, note that this does not affect the layout. |
Margin |
(3) The margin of the menu.
|
ScrollerHeight |
(10) Height of a menu scroller. [sets QStyle::PM_MenuScrollerHeight] |
TearOffHeight |
(10) Height of the TearOff area. [sets QStyle::PM_MenuTearoffHeight] |
- See also
- setWidgetLayoutProp()
- Note
- Dimensions of LayoutProperties are generally specified with respect to the vertical scrollbar. Of course, for horizontal ones they're flipped.
- See also
- setWidgetLayoutProp()
Enumerator | |
---|---|
DoubleTopButton |
(0) set to non-zero to have two buttons on top |
DoubleBotButton |
(1) set to non-zero to have two buttons on bottom |
SingleButtonHeight |
(16) height of a single button |
DoubleButtonHeight |
(32) height of a double button |
BarWidth |
(16) width of a scrollbar [sets QStyle::PM_ScrollBarExtent] |
MinimumSliderHeight |
(0 ?) the minimum slider height
|
ArrowColor |
(ColorMode(ColorMode::BWAutoContrastMode, QPalette::Button)) color mode of a button arrow
|
ActiveArrowColor |
(ColorMode(ColorMode::BWAutoContrastMode, QPalette::ButtonText)) color mode of a pressed button arrow (?) |
Each tab is basically built hiearchically out of the following areas:
- Content area, one of the following layouts:
- Icon <- TextToIconSpace -> Text
- Icon
- Text
Bevel: LP_TabBar_TabContentsMargin
outside of the content area
- Focus indicator is placed
LP_TabBar_TabFocusMargin
inside the bevel
- Note
- The side tabs just have those rotated, bottom tabs have the margins reversed.
- See also
- setWidgetLayoutProp()
Enumerator | |
---|---|
TabContentsMargin |
(6) margin around the tab contents, used to size the tab |
TabFocusMargin |
(3) where the tab focus rect is placed, measured from the tab sides (?) |
TabTextToIconSpace |
(0 ?) space between icon and text if the tab contains both |
TabOverlap |
(0) Amount of pixels tabs should overlap. The paint rectangle will be extended to the left for all tabs which are not at the beginning (accordingly extended to the right in RightToLeft mode; extended to the top for East/West tabs). |
BaseHeight |
(2) the height of the tabBar's base, usually the frame width [sets QStyle::PM_TabBarBaseHeight]
|
BaseOverlap |
(2) the number of pixels the tabs overlap with the base (i.e. tabWidget frame) [sets QStyle::PM_TabBarBaseOverlap] |
ScrollButtonWidth |
(10) buttons which are shown when there's not enough space for tabs (A ToolButton is used for this) [sets QStyle::PM_TabBarScrollButtonWidth] |
- See also
- setWidgetLayoutProp()
- Note
- The description applies to horizontal sliders.
- See also
- setWidgetLayoutProp()
Enumerator | |
---|---|
HandleThickness |
(20) The height of a slider handle |
HandleLength |
(16) The width of a slider handle [sets QStyle::PM_SliderLength] |
For trees, all the control we provide here is to provide a cap on the size of the expander widget, which is always square.
There are 4 primitives to implement: open and closed expander, and horizontal and vertical lines. If you're using dots, it's suggested you use global brush alignment to keep it all nicely aligned.
- See also
- setWidgetLayoutProp()
Enumerator | |
---|---|
MaxExpanderSize |
(9)
|
- Note
- The description applies to LTR (left to right) mode.
FrameWidth
andButtonWidth
are used to size the contents area. To the EditField,FrameWidth
is added at the left, top, bottom whileButtonWidth
is added at the right.- The
ButtonMargin
is measured from the right side of the EditField and the outside. Inside it, the up and down buttons are aligned with spacingButtonSpacing
. - To make sure that both buttons are always of the same height, enable
SymmetricButtons
.
- See also
- setWidgetLayoutProp()
Enumerator | |
---|---|
FrameWidth |
(1) Space reserved left, top, bottom of the SpinBox [sets QStyle::PM_SpinBoxFrameWidth] |
ButtonWidth |
(16) Space reserved for the widget, right of the EditField |
ButtonMargin |
(MainMargin 0, Right Top Bot 1) Where the up/down buttons are located, measured from right of the edit field and the top/right/bottom widget edges. |
ButtonSpacing |
(1) spacing between up/down buttons |
SymmetricButtons |
(0) Set to non-zero to make sure both buttons are always of the same height. To achieve this, the spacing of the buttons will be reduced by 1 if necessary to avoid rounding problems. Needs to be handled in your drawing code. |
SupportFrameless |
(0) Set to non-zero to indicate that you are able to handle frame-less SpinBoxes. For a SpinBox with no frame, FrameWidth and Top/Bottom/Right ButtonMargin is ignored. |
ContentsMargin |
(5) space between the bevel and the spinbox contents |
- Note
- The description applies to LTR (left to right) mode.
FrameWidth
andButtonWidth
are used to size the contents area. To the EditField,FrameWidth
is added at the left, top, bottom whileButtonWidth
is added at the right.- The
ButtonMargin
is measured from the right side of the EditField and the outside. Inside it, the button is aligned. - The
FocusMargin
is measured from the EditField rect.
Enumerator | |
---|---|
FrameWidth |
(1)
|
ButtonWidth |
(16)
|
ButtonMargin |
(MainMargin 0, Right Top Bot 1)
|
FocusMargin |
(1) Focus margin for ComboBoxes that aren't editable, measured from the EditField rect |
SupportFrameless |
(0)
|
ContentsMargin |
(5) space between the bevel and the combobox contents |
- See also
- setWidgetLayoutProp()
- See also
- setWidgetLayoutProp()
- See also
- setWidgetLayoutProp()
Enumerator | |
---|---|
HandleExtent |
(6) the width(hor)/height(vert) of a ToolBar handle [sets QStyle::PM_ToolBarHandleExtent] |
SeparatorExtent |
(6) the width/height of a ToolBar separator [sets QStyle::PM_ToolBarSeparatorExtent] |
ExtensionExtent |
(10) the width/height of a ToolBar extender, when there is not enough room for toolbar buttons [sets PM_ToolBarExtensionExtent] |
FrameWidth |
(2) width of the frame around toolbars [sets QStyle::PM_ToolBarFrameWidth] |
ItemMargin |
(1) [sets QStyle::PM_ToolBarItemMargin] |
ItemSpacing |
(3) [sets QStyle::PM_ToolBarItemSpacing] |
- See also
- setWidgetLayoutProp()
Enumerator | |
---|---|
Margin |
(0) used to specify the position of the tab contents, doesn't influence the tab size [sets QStyle::SE_ToolBoxTabContents] |
- See also
- setWidgetLayoutProp()
- See also
- setWidgetLayoutProp()
|
protected |
These constants describe how to access various fields of a margin property.
For example, to set an additional top margin of 2 pixels, use
Primitive drawing operations.
- Note
- The arrows are centering primitives, which means they draw in the center of the specified rectangle.
Enumerator | |
---|---|
Text |
Passes in TextOption. |
Icon |
Passes in IconOption. |
FocusIndicator |
Indication that this widget has focus. |
Frame |
Frame around widget.
|
ArrowUp |
Up arrow (pointing up) |
ArrowDown |
Down arrow. |
ArrowRight |
Right arrow. |
ArrowLeft |
Left arrow. |
Relevant Generic elements:
Generic::Text
the button's textGeneric::FocusIndicator
indicating that the button has keyboard focusGeneric::ArrowDown
indicating that the button has a popup menu associated to it
[KStyle implements QStyle::CE_PushButtonBevel
to compose the primitives]
- See also
- drawKStylePrimitive()
[the Handles implement QStyle::CE_Splitter]
- See also
- drawKStylePrimitive()
Enumerator | |
---|---|
HandleHor |
The splitter handle, horizontal. Flags: |
HandleVert |
The splitter handle, vertical. Flags: |
Relevant elements:
Generic::Text
the CheckBox label alongside the CheckBoxGeneric::FocusIndicator
the focus indicator. Usually drawn around the text label. If no label exists, it is drawn around the CheckBox.
[check primitives implement QStyle::PE_IndicatorCheckBox] [KStyle implements QStyle::CE_CheckBox to compose a CheckBox using the mentioned primitives]
- See also
- drawKStylePrimitive()
Enumerator | |
---|---|
CheckOn |
checkbox which is checked |
CheckOff |
checkbox which is not checked |
CheckTriState |
tristate checkbox (neither off nor on) |
Relevant Generic elements:
Generic::Text
the RadioButton label alongside the RadioButtonGeneric::FocusIndicator
the keyboard focus indicator
[check primitives implement QStyle::PE_IndicatorRadioButton] [KStyle implements QStyle::CE_RadioButton to compose a RadioButton using the mentioned primitives]
- See also
- drawKStylePrimitive()
Enumerator | |
---|---|
RadioOn |
radiobutton which is checked |
RadioOff |
radiobutton which is not checked |
Relevant Generic elements:
Generic::Text
the title textGeneric::Frame
the frame around floating dockwidgets
[KStyle implements QStyle::CE_DockWidgetTitle
to split it into KStyle primitives]
- See also
- drawKStylePrimitive()
Enumerator | |
---|---|
TitlePanel |
the panel/background of the title bar |
SeparatorHandle |
the splitter between dockwidgets |
Relevant Generic elements:
Generic::Text
the progress label
- See also
- drawKStylePrimitive()
- See also
- drawKStylePrimitive()
Enumerator | |
---|---|
Panel |
The panel/background of a menubar item. Interesting flags: State_Selected && State_HasFocus for mouseOver, State_Sunken for pressed state. |
Relevant Generic elements:
Generic::Frame
frame around the menu panel
- See also
- drawKStylePrimitive()
Enumerator | |
---|---|
Background | |
TearOff |
paints the area where a menu can be teared off [implements QStyle::CE_MenuTearoff] |
Scroller |
scrolling areas in a QMenu [implements QStyle::CE_MenuScroller] |
Relevant Generic elements:
Generic::Text
the text of the menu itemGeneric::ArrowLeft
Generic::ArrowRight
arrows indicating a sub-menu
- See also
- drawKStylePrimitive()
Relevant Generic elements:
- The
Generic
arrows
[Groove Areas implement QStyle::CE_ScrollBarAddPage and QStyle::CE_ScrollBarSubPage] [Sliders implement QStyle::CE_ScrollBarSlider]
- See also
- drawKStylePrimitive()
Enumerator | |
---|---|
SingleButtonVert |
used to draw a 1-button bevel, vertical |
SingleButtonHor |
used to draw a 1-button bevel, horizontal |
DoubleButtonVert |
Used to draw a 2-button bevel, vertical. A DoubleButtonOption is passed to say which button is pressed. |
DoubleButtonHor | |
GrooveAreaVertBottom |
scrollbar groove area, vertical. An interesting flag is
|
GrooveAreaHorRight |
scrollbar groove area, horizontal. Flags: |
GrooveAreaVertTop |
scrollbar groove area, vertical. An interesting flag is |
GrooveAreaHorLeft |
scrollbar groove area, horizontal. Flags: |
SliderVert |
scrollbar slider, vertical. Flags: |
SliderHor |
scrollbar slider, horizontal. Flags: |
Relevant elements:
Generic::Text
for the TabBar labelsGeneric::FocusIndicator
for focused tabsGeneric::Icon
for icons associated to tabsToolButton::Panel
paints the scroll button (when the tabs don't fit the tab bar)
Enumerator | |
---|---|
EastText |
Special rotated text for east tabs. |
WestText |
|
NorthTab |
|
EastTab | |
WestTab | |
SouthTab | |
BaseFrame |
[implements QStyle::PE_FrameTabBarBase] |
IndicatorTear |
painted in the left edge of a tabbar when the left tab is scrolled out [implements PE_IndicatorTabTear] |
Relevant Generic elements:
Generic::FocusIndicator
indicating keyboard focus
- See also
- drawKStylePrimitive()
Enumerator | |
---|---|
HandleVert |
A vertical slider handle. |
HandleHor |
A horizontal slider handle. |
GrooveVert |
A vertical slider groove. |
GrooveHor |
A horizontal slider groove. |
- See also
- drawKStylePrimitive()
Enumerator | |
---|---|
ExpanderClosed |
A closed tree expander, usually drawn as '+'. KStyle has a default implementation (Windows-like look). |
ExpanderOpen |
An opened tree expander, usually drawn as '-' KStyle has a default implementation. |
HorizontalBranch |
A horizontal tree line.
|
VerticalBranch |
|
Relevant Generic elements:
Generic::Frame
for the area around text input field and buttonsGeneric::ArrowUp
Generic::ArrowDown
drawn on the buttons
Enumerator | |
---|---|
EditField |
the text contents area, painted after Generic::Frame
|
UpButton |
Panel of the spinbox button which increases the value. |
DownButton |
Panel of the spinbox button which decreases the value. |
ButtonArea |
Can be used in addition or instead of The button area is painted before them. |
PlusSymbol |
Plus symbol painted on top of the up button, centering primitive. |
MinusSymbol |
Minus symbol painted on top of the down button, centering primitive. |
Relevant Generic elements:
Generic::Frame
for the area around text input field and buttonGeneric::ArrowDown
drawn on the buttonGeneric::FocusIndicator
to indicate keyboard focus
- See also
- drawKStylePrimitive()
Enumerator | |
---|---|
EditField |
|
Button |
The button panel of the combobox. |
Relevant Generic elements:
Generic::Text
for the header text labelGeneric::ArrowUp
Generic::ArrowDown
to indicate the sorting of the column
[the Sections implement QStyle::CE_HeaderSection]
Enumerator | |
---|---|
SectionHor |
header section, horizontal |
SectionVert |
header section, vertical |
Relevant Generic elements:
Generic::Frame
paints a lineedit frame only [implements QStyle::PE_FrameLineEdit]
- See also
- drawKStylePrimitive()
Enumerator | |
---|---|
Panel |
the panel for a QLineEdit (including frame...) [implements QStyle::PE_PanelLineEdit] |
- See also
- drawKStylePrimitive()
Enumerator | |
---|---|
FlatFrame |
For groupboxes which are set to be 'flat' (usually a divider line from top left to top right). KStyle has a basic default implementation |
[the Handles implement QStyle::PE_IndicatorToolBarHandle] [the Panels implement QStyle::CE_ToolBar]
- See also
- drawKStylePrimitive()
- See also
- drawKStylePrimitive()
Enumerator | |
---|---|
Panel |
the panel of a toolbox tab, KStyles default implementation paints WT_ToolButton/ToolButton::Panel [implements CE_ToolBoxTab] |
Relevant Generic elements:
Generic::ArrowDown
indicating an associated sub-menu
- Todo:
- Implement CE_ToolButtonLabel to have own Generic::Text, Generic::Icon, and LayoutProps PressedShiftHorizontal, PressedShiftVertical, TextToIconSpace, MenuIndicatorSize...
- See also
- drawKStylePrimitive()
Enumerator | |
---|---|
Panel |
the toolbutton panel [implements QStyle::PE_PanelButtonTool] |
Relevant Generic elements:
Generic::Text
paints the titlebar text labelGeneric::Frame
indicating an associated sub-menu
[titlebar elements implement CC_TitleBar]
- See also
- drawKStylePrimitive()
Enumerator | |
---|---|
TitlePanel |
whole titlebar panel/background, by KStyle default it's filled with plain highlight color |
ButtonMenu |
system menu button, passes TitleButtonOption |
ButtonMin |
minimize button, passes TitleButtonOption |
ButtonMax |
maximize button, passes TitleButtonOption |
ButtonRestore |
restore button, passes TitleButtonOption
|
ButtonClose |
close button, passes TitleButtonOption |
ButtonShade |
shade button, passes TitleButtonOption |
ButtonUnshade |
button to remove the shade state, passes TitleButtonOption |
ButtonHelp |
context help button, passes TitleButtonOption |
- See also
- drawKStylePrimitive()
Enumerator | |
---|---|
EmptyArea |
Empty area of a menu bar, e.g. background color. Maybe the place to fake toolbar separators (?) [implements QStyle::CE_MenuBarEmptyArea] |
|
protected |
This enum is used to represent KStyle's concept of a widget, and to associate drawing requests and metrics with it.
The generic value is used for primitives and metrics that are common between many widgets
Enumerator | |
---|---|
WT_Generic |
|
WT_PushButton |
|
WT_Splitter |
|
WT_CheckBox |
|
WT_RadioButton |
|
WT_DockWidget |
|
WT_ProgressBar |
|
WT_MenuBar |
|
WT_MenuBarItem |
|
WT_Menu |
|
WT_MenuItem |
|
WT_ScrollBar |
|
WT_TabBar |
|
WT_TabWidget |
|
WT_Slider |
|
WT_Tree |
|
WT_SpinBox |
|
WT_ComboBox |
|
WT_Header |
|
WT_LineEdit |
|
WT_GroupBox |
|
WT_StatusBar |
|
WT_ToolBar |
|
WT_ToolButton |
|
WT_ToolBoxTab |
|
WT_Window |
|
WT_Limit |
For enum extensibility. |
Documentation copyright © 1996-2015 The KDE developers.
Generated on Tue Sep 22 2015 14:04:19 by doxygen 1.8.9.1 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.