• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.14.12 API Reference
  • KDE Home
  • Contact Us
 

KDEUI

Classes | Enumerations
KStyle widget representation

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
 

Enumerations

enum  KStyle::Generic::LayoutProp { KStyle::Generic::DefaultFrameWidth, KStyle::Generic::DefaultLayoutSpacing, KStyle::Generic::DefaultLayoutMargin }
 
enum  KStyle::PushButton::LayoutProp {
  KStyle::PushButton::ContentsMargin, KStyle::PushButton::FocusMargin = ContentsMargin + MarginInc, KStyle::PushButton::DefaultIndicatorMargin = FocusMargin + MarginInc, KStyle::PushButton::PressedShiftHorizontal = DefaultIndicatorMargin + MarginInc,
  KStyle::PushButton::PressedShiftVertical, KStyle::PushButton::MenuIndicatorSize, KStyle::PushButton::TextToIconSpace
}
 
enum  KStyle::Splitter::LayoutProp { KStyle::Splitter::Width }
 
enum  KStyle::CheckBox::LayoutProp { KStyle::CheckBox::Size, KStyle::CheckBox::BoxTextSpace, KStyle::CheckBox::NoLabelFocusMargin, KStyle::CheckBox::FocusMargin = NoLabelFocusMargin + MarginInc }
 
enum  KStyle::RadioButton::LayoutProp { KStyle::RadioButton::Size, KStyle::RadioButton::BoxTextSpace, KStyle::RadioButton::FocusMargin }
 
enum  KStyle::DockWidget::LayoutProp { KStyle::DockWidget::TitleTextColor, KStyle::DockWidget::TitleMargin, KStyle::DockWidget::FrameWidth = TitleMargin + MarginInc, KStyle::DockWidget::SeparatorExtent }
 
enum  KStyle::ProgressBar::LayoutProp {
  KStyle::ProgressBar::GrooveMargin, KStyle::ProgressBar::SideText = GrooveMargin + MarginInc, KStyle::ProgressBar::SideTextSpace, KStyle::ProgressBar::Precision,
  KStyle::ProgressBar::BusyIndicatorSize, KStyle::ProgressBar::MaxBusyIndicatorSize
}
 
enum  KStyle::MenuBar::LayoutProp { KStyle::MenuBar::Margin, KStyle::MenuBar::ItemSpacing = Margin + MarginInc }
 
enum  KStyle::MenuBarItem::LayoutProp { KStyle::MenuBarItem::Margin, KStyle::MenuBarItem::Dummy = Margin + MarginInc }
 
enum  KStyle::Menu::LayoutProp { KStyle::Menu::FrameWidth, KStyle::Menu::Margin, KStyle::Menu::ScrollerHeight = Margin + MarginInc, KStyle::Menu::TearOffHeight }
 
enum  KStyle::MenuItem::LayoutProp {
  KStyle::MenuItem::Margin, KStyle::MenuItem::CheckAlongsideIcon = Margin + MarginInc, KStyle::MenuItem::CheckWidth, KStyle::MenuItem::CheckSpace,
  KStyle::MenuItem::IconWidth, KStyle::MenuItem::IconSpace, KStyle::MenuItem::AccelSpace, KStyle::MenuItem::ArrowSpace,
  KStyle::MenuItem::ArrowWidth, KStyle::MenuItem::SeparatorHeight, KStyle::MenuItem::MinHeight, KStyle::MenuItem::ActiveTextColor,
  KStyle::MenuItem::TextColor, KStyle::MenuItem::DisabledTextColor, KStyle::MenuItem::ActiveDisabledTextColor
}
 
enum  KStyle::ScrollBar::LayoutProp {
  KStyle::ScrollBar::DoubleTopButton, KStyle::ScrollBar::DoubleBotButton, KStyle::ScrollBar::SingleButtonHeight, KStyle::ScrollBar::DoubleButtonHeight,
  KStyle::ScrollBar::BarWidth, KStyle::ScrollBar::MinimumSliderHeight, KStyle::ScrollBar::ArrowColor, KStyle::ScrollBar::ActiveArrowColor
}
 
enum  KStyle::TabBar::LayoutProp {
  KStyle::TabBar::TabContentsMargin, KStyle::TabBar::TabFocusMargin = TabContentsMargin + MarginInc, KStyle::TabBar::TabTextToIconSpace = TabFocusMargin + MarginInc, KStyle::TabBar::TabOverlap,
  KStyle::TabBar::BaseHeight, KStyle::TabBar::BaseOverlap, KStyle::TabBar::ScrollButtonWidth
}
 
enum  KStyle::TabWidget::LayoutProp { KStyle::TabWidget::ContentsMargin, KStyle::TabWidget::DummyProp = ContentsMargin+MarginInc }
 
enum  KStyle::Slider::LayoutProp { KStyle::Slider::HandleThickness, KStyle::Slider::HandleLength }
 
enum  KStyle::Tree::LayoutProp { KStyle::Tree::MaxExpanderSize }
 
enum  KStyle::SpinBox::LayoutProp {
  KStyle::SpinBox::FrameWidth, KStyle::SpinBox::ButtonWidth, KStyle::SpinBox::ButtonMargin, KStyle::SpinBox::ButtonSpacing = ButtonMargin + MarginInc,
  KStyle::SpinBox::SymmetricButtons, KStyle::SpinBox::SupportFrameless, KStyle::SpinBox::ContentsMargin
}
 
enum  KStyle::ComboBox::LayoutProp {
  KStyle::ComboBox::FrameWidth, KStyle::ComboBox::ButtonWidth, KStyle::ComboBox::ButtonMargin, KStyle::ComboBox::FocusMargin = ButtonMargin + MarginInc,
  KStyle::ComboBox::SupportFrameless = FocusMargin + MarginInc, KStyle::ComboBox::ContentsMargin
}
 
enum  KStyle::Header::LayoutProp { KStyle::Header::ContentsMargin, KStyle::Header::TextToIconSpace = ContentsMargin + MarginInc, KStyle::Header::MarkSize }
 
enum  KStyle::GroupBox::LayoutProps { KStyle::GroupBox::FrameWidth, KStyle::GroupBox::TextAlignTop, KStyle::GroupBox::TitleTextColor }
 
enum  KStyle::ToolBar::LayoutProps {
  KStyle::ToolBar::HandleExtent, KStyle::ToolBar::SeparatorExtent, KStyle::ToolBar::ExtensionExtent, KStyle::ToolBar::FrameWidth,
  KStyle::ToolBar::ItemMargin, KStyle::ToolBar::ItemSpacing
}
 
enum  KStyle::ToolBoxTab::LayoutProps { KStyle::ToolBoxTab::Margin }
 
enum  KStyle::ToolButton::LayoutProps {
  KStyle::ToolButton::ContentsMargin, KStyle::ToolButton::FocusMargin = ContentsMargin + MarginInc, KStyle::ToolButton::MenuIndicatorSize, KStyle::ToolButton::InlineMenuIndicatorSize = FocusMargin + MarginInc,
  KStyle::ToolButton::InlineMenuIndicatorXOff, KStyle::ToolButton::InlineMenuIndicatorYOff
}
 
enum  KStyle::Window::LayoutProps {
  KStyle::Window::TitleTextColor, KStyle::Window::TitleHeight, KStyle::Window::NoTitleFrame, KStyle::Window::TitleMargin,
  KStyle::Window::ButtonWidth = TitleMargin + MarginInc, KStyle::Window::ButtonSpace, KStyle::Window::ButtonToTextSpace
}
 
enum  KStyle::MarginOffsets {
  KStyle::MainMargin, KStyle::Top, KStyle::Bot, KStyle::Left,
  KStyle::Right, KStyle::MarginInc
}
 
enum  KStyle::Generic::Primitive {
  KStyle::Generic::Text = 0xFFFF, KStyle::Generic::Icon, KStyle::Generic::FocusIndicator, KStyle::Generic::Frame,
  KStyle::Generic::ArrowUp, KStyle::Generic::ArrowDown, KStyle::Generic::ArrowRight, KStyle::Generic::ArrowLeft
}
 
enum  KStyle::PushButton::Primitive { KStyle::PushButton::Panel, KStyle::PushButton::DefaultButtonFrame }
 
enum  KStyle::Splitter::Primitive { KStyle::Splitter::HandleHor, KStyle::Splitter::HandleVert }
 
enum  KStyle::CheckBox::Primitive { KStyle::CheckBox::CheckOn, KStyle::CheckBox::CheckOff, KStyle::CheckBox::CheckTriState }
 
enum  KStyle::RadioButton::Primitive { KStyle::RadioButton::RadioOn, KStyle::RadioButton::RadioOff }
 
enum  KStyle::DockWidget::Primitive { KStyle::DockWidget::TitlePanel, KStyle::DockWidget::SeparatorHandle }
 
enum  KStyle::ProgressBar::Primitive { KStyle::ProgressBar::Groove, KStyle::ProgressBar::Indicator, KStyle::ProgressBar::BusyIndicator }
 
enum  KStyle::MenuBarItem::Primitive { KStyle::MenuBarItem::Panel }
 
enum  KStyle::Menu::Primitive { KStyle::Menu::Background, KStyle::Menu::TearOff, KStyle::Menu::Scroller }
 
enum  KStyle::MenuItem::Primitive {
  KStyle::MenuItem::CheckColumn, KStyle::MenuItem::CheckOn, KStyle::MenuItem::CheckOff, KStyle::MenuItem::RadioOn,
  KStyle::MenuItem::RadioOff, KStyle::MenuItem::CheckIcon, KStyle::MenuItem::Separator, KStyle::MenuItem::ItemIndicator
}
 
enum  KStyle::ScrollBar::Primitive {
  KStyle::ScrollBar::SingleButtonVert, KStyle::ScrollBar::SingleButtonHor, KStyle::ScrollBar::DoubleButtonVert, KStyle::ScrollBar::DoubleButtonHor,
  KStyle::ScrollBar::GrooveAreaVertBottom, KStyle::ScrollBar::GrooveAreaHorRight, KStyle::ScrollBar::GrooveAreaVertTop, KStyle::ScrollBar::GrooveAreaHorLeft,
  KStyle::ScrollBar::SliderVert, KStyle::ScrollBar::SliderHor
}
 
enum  KStyle::TabBar::Primitive {
  KStyle::TabBar::EastText, KStyle::TabBar::WestText, KStyle::TabBar::NorthTab, KStyle::TabBar::EastTab,
  KStyle::TabBar::WestTab, KStyle::TabBar::SouthTab, KStyle::TabBar::BaseFrame, KStyle::TabBar::IndicatorTear
}
 
enum  KStyle::Slider::Primitive { KStyle::Slider::HandleVert, KStyle::Slider::HandleHor, KStyle::Slider::GrooveVert, KStyle::Slider::GrooveHor }
 
enum  KStyle::Tree::Primitive { KStyle::Tree::ExpanderClosed, KStyle::Tree::ExpanderOpen, KStyle::Tree::HorizontalBranch, KStyle::Tree::VerticalBranch }
 
enum  KStyle::SpinBox::Primitive {
  KStyle::SpinBox::EditField, KStyle::SpinBox::UpButton, KStyle::SpinBox::DownButton, KStyle::SpinBox::ButtonArea,
  KStyle::SpinBox::PlusSymbol, KStyle::SpinBox::MinusSymbol
}
 
enum  KStyle::ComboBox::Primitive { KStyle::ComboBox::EditField, KStyle::ComboBox::Button }
 
enum  KStyle::Header::Primitive { KStyle::Header::SectionHor, KStyle::Header::SectionVert }
 
enum  KStyle::LineEdit::Primitive { KStyle::LineEdit::Panel }
 
enum  KStyle::GroupBox::Primitive { KStyle::GroupBox::FlatFrame }
 
enum  KStyle::ToolBar::Primitive {
  KStyle::ToolBar::HandleHor, KStyle::ToolBar::HandleVert, KStyle::ToolBar::Separator, KStyle::ToolBar::PanelHor,
  KStyle::ToolBar::PanelVert
}
 
enum  KStyle::ToolBoxTab::Primitive { KStyle::ToolBoxTab::Panel }
 
enum  KStyle::ToolButton::Primitive { KStyle::ToolButton::Panel }
 
enum  KStyle::Window::Primitive {
  KStyle::Window::TitlePanel, KStyle::Window::ButtonMenu, KStyle::Window::ButtonMin, KStyle::Window::ButtonMax,
  KStyle::Window::ButtonRestore, KStyle::Window::ButtonClose, KStyle::Window::ButtonShade, KStyle::Window::ButtonUnshade,
  KStyle::Window::ButtonHelp
}
 
enum  KStyle::MenuBar::Property { KStyle::MenuBar::EmptyArea }
 
enum  KStyle::WidgetType {
  KStyle::WT_Generic, KStyle::WT_PushButton, KStyle::WT_Splitter, KStyle::WT_CheckBox,
  KStyle::WT_RadioButton, KStyle::WT_DockWidget, KStyle::WT_ProgressBar, KStyle::WT_MenuBar,
  KStyle::WT_MenuBarItem, KStyle::WT_Menu, KStyle::WT_MenuItem, KStyle::WT_ScrollBar,
  KStyle::WT_TabBar, KStyle::WT_TabWidget, KStyle::WT_Slider, KStyle::WT_Tree,
  KStyle::WT_SpinBox, KStyle::WT_ComboBox, KStyle::WT_Header, KStyle::WT_LineEdit,
  KStyle::WT_GroupBox, KStyle::WT_StatusBar, KStyle::WT_ToolBar, KStyle::WT_ToolButton,
  KStyle::WT_ToolBoxTab, KStyle::WT_Window, KStyle::WT_Limit = 0xFFFF
}
 

Detailed Description

Things related to the representation of widgets.

Enumeration Type Documentation

enum KStyle::Generic::LayoutProp

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].

Definition at line 465 of file kstyle.h.

enum KStyle::PushButton::LayoutProp

The layout of a PushButton is structured as follows:

  1. Between the very outside and the bevel is the default indicator area, controlled by the PushButton::DefaultIndicatorMargin .

  1. From the bevel, the content and focus rect margins are measured. Only the content margin is used to size the content area.
  2. Inside the content area, PushButton::MenuIndicatorSize is allocated to the down arrow if there is a popup menu.
  3. 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

Definition at line 511 of file kstyle.h.

enum KStyle::Splitter::LayoutProp
See also
setWidgetLayoutProp()
Enumerator
Width 

(6) size of the splitter handle [sets QStyle::PM_SplitterWidth]

Definition at line 552 of file kstyle.h.

enum KStyle::CheckBox::LayoutProp
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

Todo:
have a look, it isn't as nice as plastique etc.

Definition at line 579 of file kstyle.h.

enum KStyle::RadioButton::LayoutProp
See also
setWidgetLayoutProp()
Enumerator
Size 

[sets QStyle::PM_ExclusiveIndicatorWidth, QStyle::PM_ExclusiveIndicatorHeight]

See also
CheckBox::Size
BoxTextSpace 
See also
CheckBox::BoxTextSpace
FocusMargin 
See also
CheckBox::FocusMargin

Definition at line 617 of file kstyle.h.

enum KStyle::DockWidget::LayoutProp
See also
setWidgetLayoutProp()
Enumerator
TitleTextColor 

(ColorMode(QPalette::HighlightedText)) color mode of the title text

TitleMargin 

(2) Margin around title contents: Note that the symmetric margin (MainMargin) is used to size the title! Additional the Left and Right margins can be used to position the title text a little, though (to set Top and Bottom is not advisable). [the MainMargin sets QStyle::PM_DockWidgetTitleMargin]

FrameWidth 

(3) width of the frame around floating dockwidgets [sets QStyle::PM_DockWidgetFrameWidth]

SeparatorExtent 

(6) width of the area which separates the (docked) dock window from the window contents [sets QStyle::PM_DockWidgetSeparatorExtent]

Definition at line 655 of file kstyle.h.

enum KStyle::ProgressBar::LayoutProp
See also
setWidgetLayoutProp()
Enumerator
GrooveMargin 

(2) Margin to allocate for the groove. Content area will be inside of it.

SideText 

(false) set this to true to have the text positionned to the side

SideTextSpace 

(3) Extra space besides that needed for text to allocate to side indicator (on both sides).

Precision 

(1) The indicator size will always be a multiple of this (modulo busy indicator size clamping). [sets QStyle::PM_ProgressBarChunkWidth]

BusyIndicatorSize 

(10) The busy indicator size, in percent of area size.

MaxBusyIndicatorSize 

(10000) size limit on the busy indicator size

Definition at line 691 of file kstyle.h.

enum KStyle::MenuBar::LayoutProp
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]

Definition at line 729 of file kstyle.h.

enum KStyle::MenuBarItem::LayoutProp
See also
setWidgetLayoutProp()
Enumerator
Margin 

(1) Margin rectangle to allocate for any bevel, etc.

(Text will be drawn with the inside rect).

Dummy 

Definition at line 759 of file kstyle.h.

enum KStyle::Menu::LayoutProp
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.

Todo:
have a look at comments at PM_MenuHMargin...
ScrollerHeight 

(10) Height of a menu scroller. [sets QStyle::PM_MenuScrollerHeight]

TearOffHeight 

(10) Height of the TearOff area. [sets QStyle::PM_MenuTearoffHeight]

Definition at line 786 of file kstyle.h.

enum KStyle::MenuItem::LayoutProp
See also
setWidgetLayoutProp()
Enumerator
Margin 

(2) margin for each entry

CheckAlongsideIcon 

(0) Set to non-zero to have checkmarks painted separate from icons.

CheckWidth 

(12) size of the checkmark column (CheckAlongsideButton enabled).

CheckSpace 

(3) Space between the checkmark column and the icon column (CheckAlongsideButton enabled).

IconWidth 

(12) minimum size of the icon column

IconSpace 

(3) space between the icon column and text column

AccelSpace 

(0 ?) space between text and keyboard accelerator label

ArrowSpace 

(3) space between the text column and arrow column (indicating sub menus)

ArrowWidth 

(11) space to reserve for the menu arrow column

SeparatorHeight 

(0) heigh of separator

MinHeight 

(16) limit on the size of item content

ActiveTextColor 

(ColorMode(QPalette::HighlightedText)) color for active text and arrow

TextColor 

(ColorMode(QPalette::Text)) color for inactive text and arrow

DisabledTextColor 

(ColorMode(QPalette::Text)) color for inactive + disabled text and arrow

ActiveDisabledTextColor 

(ColorMode(QPalette::Text)) color for active + disabled text and arrow

Definition at line 833 of file kstyle.h.

enum KStyle::ScrollBar::LayoutProp
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

Note
If the scrollbar is too small to accommodate this, this will not be enforced.
ArrowColor 

(ColorMode(ColorMode::BWAutoContrastMode, QPalette::Button)) color mode of a button arrow

See also
ColorMode
ActiveArrowColor 

(ColorMode(ColorMode::BWAutoContrastMode, QPalette::ButtonText)) color mode of a pressed button arrow (?)

Definition at line 890 of file kstyle.h.

enum KStyle::TabBar::LayoutProp

Each tab is basically built hiearchically out of the following areas:

  1. Content area, one of the following layouts:

  • Icon <- TextToIconSpace -> Text
  • Icon
  • Text

Bevel: LP_TabBar_TabContentsMargin outside of the content area

  1. 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]

Todo:
is this used for things like I intended TabWidget::ContentsMargin for?
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]

Definition at line 951 of file kstyle.h.

enum KStyle::TabWidget::LayoutProp
See also
setWidgetLayoutProp()
Enumerator
ContentsMargin 

(2) Width of the frame around a tab widget.

Margins for a tabwidget with tab position 'North' are specified as expected. For other positions, the sides are rotated accordingly, e.g. the left margin of a 'West' tabwidget is the same as top for a 'North' tabwidget. [sets QStyle::SE_TabWidgetTabContents]

DummyProp 

Definition at line 1005 of file kstyle.h.

enum KStyle::Slider::LayoutProp
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]

Definition at line 1031 of file kstyle.h.

enum KStyle::Tree::LayoutProp

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
If you set MaxExpanderSize to a value less than 9, designer will look funny. The value should also be odd, or value - 1 will be used.

Definition at line 1067 of file kstyle.h.

enum KStyle::SpinBox::LayoutProp
Note
The description applies to LTR (left to right) mode.
  1. FrameWidth and ButtonWidth are used to size the contents area. To the EditField, FrameWidth is added at the left, top, bottom while ButtonWidth is added at the right.
  2. The ButtonMargin is measured from the right side of the EditField and the outside. Inside it, the up and down buttons are aligned with spacing ButtonSpacing.
  3. 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

Definition at line 1110 of file kstyle.h.

enum KStyle::ComboBox::LayoutProp
Note
The description applies to LTR (left to right) mode.
  1. FrameWidth and ButtonWidth are used to size the contents area. To the EditField, FrameWidth is added at the left, top, bottom while ButtonWidth is added at the right.
  2. The ButtonMargin is measured from the right side of the EditField and the outside. Inside it, the button is aligned.
  3. The FocusMargin is measured from the EditField rect.
Enumerator
FrameWidth 

(1)

See also
SpinBox::FrameWidth
ButtonWidth 

(16)

See also
SpinBox::ButtonWidth
ButtonMargin 

(MainMargin 0, Right Top Bot 1)

See also
SpinBox::ButtonMargin
FocusMargin 

(1) Focus margin for ComboBoxes that aren't editable, measured from the EditField rect

SupportFrameless 

(0)

See also
LP_SpinBox_SupportFrameless same description applies here
ContentsMargin 

(5) space between the bevel and the combobox contents

Definition at line 1172 of file kstyle.h.

enum KStyle::Header::LayoutProp
See also
setWidgetLayoutProp()
Enumerator
ContentsMargin 

(3) margin around contents used to size the header.

TextToIconSpace 

(3) space that is allocated between icon and text if both exist [sets QStyle::PM_HeaderMargin]

MarkSize 

(9) size of the sort indicator in a header [sets QStyle::PM_HeaderMarkSize]

Definition at line 1214 of file kstyle.h.

enum KStyle::GroupBox::LayoutProps
See also
setWidgetLayoutProp()
Enumerator
FrameWidth 

(2) width of a groupbox frame

TextAlignTop 

(0) set to non-zero, the title will be aligned above the groupbox frame, not vertically centered [sets QStyle::SH_GroupBox_TextLabelVerticalAlignment]

TitleTextColor 

(ColorMode(QPalette::Text)) color of the title text label

Definition at line 1275 of file kstyle.h.

enum KStyle::ToolBar::LayoutProps
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]

Definition at line 1321 of file kstyle.h.

enum KStyle::ToolBoxTab::LayoutProps
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]

Definition at line 1359 of file kstyle.h.

enum KStyle::ToolButton::LayoutProps
See also
setWidgetLayoutProp()
Enumerator
ContentsMargin 

(5) Margin reserved around the contents size of a toolbutton.

Used to size the contents.

FocusMargin 

(3) Where the focus rect will be drawn, measured from the widget sides

MenuIndicatorSize 

(11) Size for the separate menu arrows on tool buttons [sets QStyle::PM_MenuButtonIndicator wheen a toolbutton option is passed in]

InlineMenuIndicatorSize 

(0) Size of arrow when it's incorporated into the button directly.

If it's 0, it will not be drawn

Since
4.1
InlineMenuIndicatorXOff 

Horizontal offset off the bottom-right corner to place the arrow if it's incorporated directly, and not in a separate area.

Since
4.1
InlineMenuIndicatorYOff 

Vertical offset off the bottom-right corner to place the arrow if it's incorporated directly, and not in a separate area.

Since
4.1

Definition at line 1393 of file kstyle.h.

enum KStyle::Window::LayoutProps
See also
setWidgetLayoutProp()
Enumerator
TitleTextColor 

(ColorMode(QPalette::HighlightedText)) color mode of the titlebar text

TitleHeight 

(20) height of the titlebar [sets QStyle::PM_TitleBarHeight]

NoTitleFrame 

(0) if set to non-zero, the frame primitive is not expected to paint around the titlebar area [sets QStyle::SH_TitleBar_NoBorder]

TitleMargin 

(2) margin around titlebar contents (buttons, text label), used to position them and determine the height of titlebar buttons, doesn't influence size

ButtonWidth 

(16) width of a titlebar button

ButtonSpace 

(2) space between titlebar buttons

ButtonToTextSpace 

(3) space between buttons and the title text

Definition at line 1443 of file kstyle.h.

enum KStyle::MarginOffsets
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

setWidgetLayoutProp(WT_SomeWidget, SomeWidget::Margin + Top, 2);
Enumerator
MainMargin 

The main margin is applied equally on each side.

In the example above, 'SomeWidget::Margin+MainMargin' is the same as 'SomeWidget::Margin'.

Top 

Apply an additional top margin.

Bot 

Apply an additional bottom margin.

Left 

Apply an additional left margin.

Right 

Apply an additional right margin.

MarginInc 

Used to reserve space in an enum for the Top, Bot, Left, Right margins.

Definition at line 440 of file kstyle.h.

enum KStyle::Generic::Primitive

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.

Note
QFrame derived widgets are painted using WT_Generic widget type and this Generic::Frame primitive.
ArrowUp 

Up arrow (pointing up)

ArrowDown 

Down arrow.

ArrowRight 

Right arrow.

ArrowLeft 

Left arrow.

Definition at line 477 of file kstyle.h.

enum KStyle::PushButton::Primitive

Relevant Generic elements:

  • Generic::Text the button's text
  • Generic::FocusIndicator indicating that the button has keyboard focus
  • Generic::ArrowDown indicating that the button has a popup menu associated to it

[KStyle implements QStyle::CE_PushButtonBevel to compose the primitives]

See also
drawKStylePrimitive()
Enumerator
Panel 

the pushbutton panel [implements QStyle::PE_PanelButtonCommand]

DefaultButtonFrame 

frame indicating a default button, painted before the button Panel [implements QStyle::PE_FrameDefaultButton]

Definition at line 532 of file kstyle.h.

enum KStyle::Splitter::Primitive

[the Handles implement QStyle::CE_Splitter]

See also
drawKStylePrimitive()
Enumerator
HandleHor 

The splitter handle, horizontal.

Flags: State_Enabled&&State_MouseOver for mouseOver

HandleVert 

The splitter handle, vertical.

Flags: State_Enabled&&State_MouseOver for mouseOver

Definition at line 562 of file kstyle.h.

enum KStyle::CheckBox::Primitive

Relevant elements:

  • Generic::Text the CheckBox label alongside the CheckBox
  • Generic::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)

Definition at line 601 of file kstyle.h.

enum KStyle::RadioButton::Primitive

Relevant Generic elements:

  • Generic::Text the RadioButton label alongside the RadioButton
  • Generic::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

Definition at line 637 of file kstyle.h.

enum KStyle::DockWidget::Primitive

Relevant Generic elements:

  • Generic::Text the title text
  • Generic::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

Definition at line 672 of file kstyle.h.

enum KStyle::ProgressBar::Primitive

Relevant Generic elements:

  • Generic::Text the progress label
See also
drawKStylePrimitive()
Enumerator
Groove 

the progressbar groove, drawn before the progress Indicator [implements QStyle::CE_ProgressBarGroove]

Indicator 

The actual bar indicating the progress...

BusyIndicator 

Used to indicate business, for example when no progress is known (minimum and maximum values both set to 0)

Definition at line 707 of file kstyle.h.

enum KStyle::MenuBarItem::Primitive
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.

Definition at line 770 of file kstyle.h.

enum KStyle::Menu::Primitive

Relevant Generic elements:

  • Generic::Frame frame around the menu panel
See also
drawKStylePrimitive()
Enumerator
Background 

Menu and MenuItem 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]

Definition at line 800 of file kstyle.h.

enum KStyle::MenuItem::Primitive

Relevant Generic elements:

  • Generic::Text the text of the menu item
  • Generic::ArrowLeft Generic::ArrowRight arrows indicating a sub-menu
See also
drawKStylePrimitive()
Enumerator
CheckColumn 

Background of the checkmark/icon column.

CheckOn 

The checkmark - checked.

CheckOff 

The checkmark - not checked.

RadioOn 

The checkmark of exclusive actions - selected.

RadioOff 

The checkmark of exclusive actions - not selected.

CheckIcon 

When CheckAlongsideIcon is disabled and item is checked: checkmark Indicator painted below the icon.

Separator 
ItemIndicator 

Definition at line 863 of file kstyle.h.

enum KStyle::ScrollBar::Primitive

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 State_Sunken for pressed state

See also
DoubleButtonVert
GrooveAreaHorRight 

scrollbar groove area, horizontal. Flags: State_Sunken for pressed state

GrooveAreaVertTop 

scrollbar groove area, vertical. An interesting flag is State_Sunken for pressed state

GrooveAreaHorLeft 

scrollbar groove area, horizontal. Flags: State_Sunken for pressed state

SliderVert 

scrollbar slider, vertical. Flags: State_On&&State_Sunken for pressed state

SliderHor 

scrollbar slider, horizontal. Flags: State_On&&State_Sunken for pressed state

Definition at line 914 of file kstyle.h.

enum KStyle::TabBar::Primitive

Relevant elements:

  • Generic::Text for the TabBar labels
  • Generic::FocusIndicator for focused tabs
  • Generic::Icon for icons associated to tabs
  • ToolButton::Panel paints the scroll button (when the tabs don't fit the tab bar)
Enumerator
EastText 

Special rotated text for east tabs.

WestText 
See also
EastText
NorthTab 
Todo:
say something about triangular shape etc.
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]

Todo:
KStyle default implementation...?

Definition at line 976 of file kstyle.h.

enum KStyle::Slider::Primitive

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.

Definition at line 1043 of file kstyle.h.

enum KStyle::Tree::Primitive
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.

Note
If you're using dots, it's suggested you use global brush alignment to keep it all nicely aligned.
VerticalBranch 
See also
HorizontalBranch

Definition at line 1078 of file kstyle.h.

enum KStyle::SpinBox::Primitive

Relevant Generic elements:

  • Generic::Frame for the area around text input field and buttons
  • Generic::ArrowUp Generic::ArrowDown drawn on the buttons
Enumerator
EditField 

the text contents area, painted after Generic::Frame

Note
This is respected only if the combobox is not editable.
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 KPE_SpinBox_UpButton and KPE_SpinBox_DownButton.

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.

Definition at line 1139 of file kstyle.h.

enum KStyle::ComboBox::Primitive

Relevant Generic elements:

  • Generic::Frame for the area around text input field and button
  • Generic::ArrowDown drawn on the button
  • Generic::FocusIndicator to indicate keyboard focus
See also
drawKStylePrimitive()
Enumerator
EditField 
See also
SpinBox::EditField
Button 

The button panel of the combobox.

Definition at line 1197 of file kstyle.h.

enum KStyle::Header::Primitive

Relevant Generic elements:

  • Generic::Text for the header text label
  • Generic::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

Definition at line 1232 of file kstyle.h.

enum KStyle::LineEdit::Primitive

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]

Definition at line 1252 of file kstyle.h.

enum KStyle::GroupBox::Primitive
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

Definition at line 1286 of file kstyle.h.

enum KStyle::ToolBar::Primitive

[the Handles implement QStyle::PE_IndicatorToolBarHandle] [the Panels implement QStyle::CE_ToolBar]

See also
drawKStylePrimitive()
Enumerator
HandleHor 

handle of a toolbar, horizontal

HandleVert 

handle of a toolbar, vertical

Separator 

[implements QStyle::PE_IndicatorToolBarSeparator]

PanelHor 

the actual toolbar, horizontal

PanelVert 

the actual toolbar, vertical

Definition at line 1338 of file kstyle.h.

enum KStyle::ToolBoxTab::Primitive
See also
drawKStylePrimitive()
Enumerator
Panel 

the panel of a toolbox tab, KStyles default implementation paints WT_ToolButton/ToolButton::Panel [implements CE_ToolBoxTab]

Definition at line 1369 of file kstyle.h.

enum KStyle::ToolButton::Primitive

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]

Definition at line 1423 of file kstyle.h.

enum KStyle::Window::Primitive

Relevant Generic elements:

  • Generic::Text paints the titlebar text label
  • Generic::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

Todo:
split min/max restore?
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

Definition at line 1467 of file kstyle.h.

enum KStyle::MenuBar::Property
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]

Definition at line 739 of file kstyle.h.

enum KStyle::WidgetType
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 
See also
Generic
WT_PushButton 
See also
PushButton
WT_Splitter 
See also
Splitter
WT_CheckBox 
See also
CheckBox
WT_RadioButton 
See also
RadioButton
WT_DockWidget 
See also
DockWidget
WT_ProgressBar 
See also
ProgressBar
WT_MenuBar 
See also
MenuBar
WT_MenuBarItem 
See also
MenuBarItem
WT_Menu 
See also
Menu
WT_MenuItem 
See also
MenuItem
WT_ScrollBar 
See also
ScrollBar
WT_TabBar 
See also
TabBar
WT_TabWidget 
See also
TabWidget
WT_Slider 
See also
Slider
WT_Tree 
See also
Tree
WT_SpinBox 
See also
SpinBox
WT_ComboBox 
See also
ComboBox
WT_Header 
See also
Header
WT_LineEdit 
See also
LineEdit
WT_GroupBox 
See also
GroupBox
WT_StatusBar 
See also
StatusBar
WT_ToolBar 
See also
ToolBar
WT_ToolButton 
See also
ToolButton
WT_ToolBoxTab 
See also
ToolBoxTab
WT_Window 
See also
Window
WT_Limit 

For enum extensibility.

Definition at line 401 of file kstyle.h.

This file is part of the KDE documentation.
Documentation copyright © 1996-2015 The KDE developers.
Generated on Tue Sep 29 2015 19:42:00 by doxygen 1.8.9.1 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDEUI

Skip menu "KDEUI"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • Related Pages

kdelibs-4.14.12 API Reference

Skip menu "kdelibs-4.14.12 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal