KDEUI
kstyle.h
Go to the documentation of this file.
75 // - Remi Villatel: extend QStyle enums for KColorButton, KColorCombo, KKeyButton, split PE_HeaderSection into KPopupTitle, PopupMenuTitle, TaskContainer)
77 // - RV: KMulitTabBarTab ... does it need support from KStyle (instead of manual button rotation etc.)? Or is it dumped already?
79 // - RV: fixed colors (e.g. Konqueror, KToolbarButton label text ->KPE_ToolbarButton?): To prevent hacks like "preventing any PaletteChange()"... mor related to KDE4 color schemes... I guess
81 // - e.g. drawFancyPE() in kdeui for KDE widgets: check "qobject_cast<KStyle*>(style())", or fallback drawing...
83 // TODO: maybe the arrow in CE_PushButtonLabel should be painted in CE_PushButtonBevel like QCommonStyle
204 BWAutoContrastMode = 0x8000000
323 Bottom
353 // /// whether the button is hovered, this doesn't work at the moment (not even in any Qt style)...
429 WT_Limit = 0xFFFF
449 MarginInc
469 DefaultLayoutMargin
479 Text = 0xFFFF,
482 Frame,
488 ArrowLeft
514 FocusMargin = ContentsMargin + MarginInc,
515 DefaultIndicatorMargin = FocusMargin + MarginInc,
516 PressedShiftHorizontal = DefaultIndicatorMargin + MarginInc,
519 TextToIconSpace
534 Panel,
536 DefaultButtonFrame
565 HandleVert
583 NoLabelFocusMargin,
586 FocusMargin = NoLabelFocusMargin + MarginInc
605 CheckTriState
619 Size,
623 FocusMargin
640 RadioOff
659 FrameWidth = TitleMargin + MarginInc,
660 SeparatorExtent
675 SeparatorHandle
694 SideText = GrooveMargin + MarginInc,
698 MaxBusyIndicatorSize
709 Groove,
712 BusyIndicator
731 Margin,
733 ItemSpacing = Margin + MarginInc
741 EmptyArea
761 Margin,
772 Panel
790 ScrollerHeight = Margin + MarginInc,
791 TearOffHeight
803 TearOff,
805 Scroller
836 CheckAlongsideIcon = Margin + MarginInc,
839 CheckWidth,
841 CheckSpace,
853 ActiveDisabledTextColor
897 MinimumSliderHeight,
900 ArrowColor,
902 ActiveArrowColor
918 DoubleButtonVert,
927 SliderHor
954 TabFocusMargin = TabContentsMargin + MarginInc,
957 TabTextToIconSpace = TabFocusMargin + MarginInc,
959 TabOverlap,
966 ScrollButtonWidth
985 IndicatorTear
1007 ContentsMargin,
1014 DummyProp = ContentsMargin+MarginInc
1034 HandleLength
1048 GrooveHor
1069 MaxExpanderSize
1082 HorizontalBranch,
1086 VerticalBranch
1112 FrameWidth,
1115 ButtonMargin,
1119 ButtonSpacing = ButtonMargin + MarginInc,
1120 SymmetricButtons,
1125 SupportFrameless,
1129 ContentsMargin
1141 EditField,
1146 ButtonArea,
1149 PlusSymbol,
1151 MinusSymbol
1176 ButtonMargin,
1178 FocusMargin = ButtonMargin + MarginInc,
1181 SupportFrameless = FocusMargin + MarginInc,
1184 ContentsMargin
1217 TextToIconSpace = ContentsMargin + MarginInc,
1221 MarkSize
1235 SectionVert
1254 Panel
1278 TextAlignTop,
1281 TitleTextColor
1288 FlatFrame
1326 FrameWidth,
1329 ItemSpacing
1344 PanelVert
1361 Margin
1371 Panel
1395 ContentsMargin,
1397 FocusMargin = ContentsMargin + MarginInc,
1400 MenuIndicatorSize,
1402 InlineMenuIndicatorSize = FocusMargin + MarginInc,
1405 InlineMenuIndicatorXOff,
1408 InlineMenuIndicatorYOff
1425 Panel
1447 NoTitleFrame,
1450 TitleMargin,
1453 ButtonWidth = TitleMargin + MarginInc,
1455 ButtonToTextSpace
1477 ButtonHelp
1568 QSize expandDim(const QSize& orig, WidgetType widget, int baseMarginMetric, const QStyleOption* opt, const QWidget* w, bool rotated = false) const;
1572 QRect insideMargin(const QRect &orig, WidgetType widget, int baseMarginMetric, const QStyleOption* opt, const QWidget* w) const;
1594 void drawControl (ControlElement elem, const QStyleOption* opt, QPainter* p, const QWidget* w) const;
1595 void drawPrimitive (PrimitiveElement elem, const QStyleOption* opt, QPainter* p, const QWidget* w) const;
1693 if ( qstrcmp(typeid(*option).name(), typeid(extractOptionHelper(static_cast<T>(0))).name()) == 0 )
The spacing used by layouts, unless the style implements layoutSpacingImplementation(), default is 6 [sets QStyle::PM_DefaultLayoutSpacing].
Definition: kstyle.h:468
(10) The busy indicator size, in percent of area size.
Definition: kstyle.h:697
scrollbar slider, vertical. Flags: State_On&&State_Sunken for pressed state
Definition: kstyle.h:926
QPixmap standardPixmap(StandardPixmap standardPixmap, const QStyleOption *opt, const QWidget *widget=0) const
Definition: kstyle.cpp:583
MarginOffsets
These constants describe how to access various fields of a margin property.
Definition: kstyle.h:440
(ColorMode(QPalette::Text)) color for inactive text and arrow
Definition: kstyle.h:851
QRect subElementRect(SubElement subRect, const QStyleOption *opt, const QWidget *w) const
Definition: kstyle.cpp:2962
QRect subControlRect(ComplexControl control, const QStyleOptionComplex *opt, SubControl subControl, const QWidget *w) const
Definition: kstyle.cpp:3650
Horizontal scrollbar: The right button is active.
Definition: kstyle.h:322
#define T
Definition: kstyle.h:406
(6) the width/height of a ToolBar separator [sets QStyle::PM_ToolBarSeparatorExtent] ...
Definition: kstyle.h:1324
QSize sizeFromContents(ContentsType type, const QStyleOption *opt, const QSize &contentsSize, const QWidget *w) const
Definition: kstyle.cpp:4092
Definition: kstyle.h:403
WidgetType
This enum is used to represent KStyle's concept of a widget, and to associate drawing requests and me...
Definition: kstyle.h:401
used to draw a 1-button bevel, horizontal
Definition: kstyle.h:917
Definition: kstyle.h:411
[implements QStyle::PE_IndicatorToolBarSeparator]
Definition: kstyle.h:1342
bool contains(const QString &str, Qt::CaseSensitivity cs) const
(2) vertical contents shift for pressed buttons [sets QStyle::PM_ButtonShiftVertical] ...
Definition: kstyle.h:517
scrollbar groove area, vertical. An interesting flag is State_Sunken for pressed state ...
Definition: kstyle.h:922
Definition: kstyle.h:871
(6) space to leave between checkbox and text (and icon between them in case there is one) ...
Definition: kstyle.h:582
Definition: kstyle.h:416
Option representing text drawing info. For Generic::Text.
Definition: kstyle.h:369
(16) size of the checkbox [sets PM_IndicatorWidth, PM_IndicatorHeight]
Definition: kstyle.h:581
(2) the number of pixels the tabs overlap with the base (i.e. tabWidget frame) [sets QStyle::PM_TabBa...
Definition: kstyle.h:965
typedef Alignment
Definition: kstyle.h:417
Vertical scrollbar: The upper button is active.
Definition: kstyle.h:320
QIcon standardIconImplementation(StandardPixmap standardIcon, const QStyleOption *option=0, const QWidget *widget=0) const
Definition: kstyle.cpp:462
(1) The width of the frame, note that this does not affect the layout.
Definition: kstyle.h:788
Intermediatary base that helps implement subtypes of Option that properly handle defaults.
Definition: kstyle.h:254
The FrameWidth used by LineEdit, etc..., default is 2 [sets QStyle::PM_DefaultFrameWidth].
Definition: kstyle.h:467
(11) space to reserve for the menu arrow column
Definition: kstyle.h:847
int layoutSpacingImplementation(QSizePolicy::ControlType control1, QSizePolicy::ControlType control2, Qt::Orientation orientation, const QStyleOption *option, const QWidget *widget) const
Definition: kstyle.cpp:2833
whole titlebar panel/background, by KStyle default it's filled with plain highlight color ...
Definition: kstyle.h:1469
(2) Margin around title contents: Note that the symmetric margin (MainMargin) is used to size the tit...
Definition: kstyle.h:658
(3) margin around contents used to size the header.
Definition: kstyle.h:1216
button to remove the shade state, passes TitleButtonOption
Definition: kstyle.h:1476
const char * name() const
void drawItemText(QPainter *painter, const QRect &rect, int flags, const QPalette &pal, bool enabled, const QString &text, QPalette::ColorRole textRole=QPalette::NoRole) const
Definition: kstyle.cpp:444
Definition: kstyle.h:983
ActiveButton activeButton
Whether any of the two buttons is active; and if yes, which one.
Definition: kstyle.h:330
(6) margin around the tab contents, used to size the tab
Definition: kstyle.h:953
When CheckAlongsideIcon is disabled and item is checked: checkmark Indicator painted below the icon...
Definition: kstyle.h:870
Definition: kstyle.h:424
The checkmark of exclusive actions - not selected.
Definition: kstyle.h:869
Definition: kstyle.h:203
void drawControl(ControlElement elem, const QStyleOption *opt, QPainter *p, const QWidget *w) const
Definition: kstyle.cpp:1327
An opened tree expander, usually drawn as '-' KStyle has a default implementation.
Definition: kstyle.h:1081
int styleHint(StyleHint hint, const QStyleOption *opt, const QWidget *w, QStyleHintReturn *returnData) const
Definition: kstyle.cpp:2512
int pixelMetric(PixelMetric metric, const QStyleOption *opt=0, const QWidget *w=0) const
Definition: kstyle.cpp:2589
(3) space between the icon column and text column
Definition: kstyle.h:844
(10) the width/height of a ToolBar extender, when there is not enough room for toolbar buttons [sets ...
Definition: kstyle.h:1325
Definition: kstyle.h:921
Definition: kstyle.h:981
Definition: kstyle.h:409
Definition: kstyle.h:410
(2) the height of the tabBar's base, usually the frame width [sets QStyle::PM_TabBarBaseHeight] ...
Definition: kstyle.h:964
QPixmap generatedIconPixmap(QIcon::Mode iconMode, const QPixmap &pixmap, const QStyleOption *opt) const
Definition: kstyle.cpp:588
Definition: kstyle.h:414
void drawComplexControl(ComplexControl cc, const QStyleOptionComplex *opt, QPainter *p, const QWidget *w) const
Definition: kstyle.cpp:3155
Primitive
[the Handles implement QStyle::PE_IndicatorToolBarHandle] [the Panels implement QStyle::CE_ToolBar] ...
Definition: kstyle.h:1338
Definition: kstyle.h:622
Definition: kstyle.h:428
Definition: kstyle.h:425
(1) set to non-zero to have two buttons on bottom
Definition: kstyle.h:893
(5) space between the bevel and the button contents
Definition: kstyle.h:513
SubControl hitTestComplexControl(ComplexControl cc, const QStyleOptionComplex *opt, const QPoint &pt, const QWidget *w) const
Definition: kstyle.cpp:4039
Definition: kstyle.h:1199
Template class which helps implementing the widget style plugin interface.
Definition: kstyle.h:1656
Panel of the spinbox button which decreases the value.
Definition: kstyle.h:1145
scrollbar groove area, vertical. An interesting flag is State_Sunken for pressed state ...
Definition: kstyle.h:924
static T extractOption(Option *option)
The extractOption method casts the passed in option object, and returns it, if available, or the defaults for the given type.
Definition: kstyle.h:1684
QRect itemPixmapRect(const QRect &r, int flags, const QPixmap &pixmap) const
Definition: kstyle.cpp:440
Definition: kstyle.h:408
Definition: kstyle.h:980
Definition: kstyle.h:419
Horizontal scrollbar: The left button is active.
Definition: kstyle.h:321
Definition: kstyle.h:404
Definition: kstyle.h:418
LayoutProp
The layout of a PushButton is structured as follows:Between the very outside and the bevel is the def...
Definition: kstyle.h:511
Definition: kstyle.h:422
(ColorMode(QPalette::HighlightedText)) color for active text and arrow
Definition: kstyle.h:850
Definition: kstyle.h:412
Definition: kstyle.h:415
A closed tree expander, usually drawn as '+'. KStyle has a default implementation (Windows-like look)...
Definition: kstyle.h:1080
(0 ?) space between text and keyboard accelerator label
Definition: kstyle.h:845
(8) Space inside the content area, which is allocated to the down arrow if there is a popup menu [set...
Definition: kstyle.h:518
virtual void drawKStylePrimitive(WidgetType widgetType, int primitive, const QStyleOption *opt, const QRect &r, const QPalette &pal, State flags, QPainter *p, const QWidget *widget=0, Option *kOpt=0) const
Draws primitives which are used inside KStyle.
Definition: kstyle.cpp:611
LayoutProp
For trees, all the control we provide here is to provide a cap on the size of the expander widget...
Definition: kstyle.h:1067
QRect itemTextRect(const QFontMetrics &fm, const QRect &r, int flags, bool enabled, const QString &text) const
Definition: kstyle.cpp:434
(ColorMode(QPalette::HighlightedText)) color mode of the title text
Definition: kstyle.h:657
Describes widgets like QToolButton (usually inside a QToolBar).
Definition: kstyle.h:1388
(3) Extra space besides that needed for text to allocate to side indicator (on both sides)...
Definition: kstyle.h:695
Definition: kstyle.h:979
Definition: kstyle.h:405
Option for drawing icons: represents whether the icon should be active or not.
Definition: kstyle.h:297
(2) Margin to allocate for the groove. Content area will be inside of it.
Definition: kstyle.h:693
Definition: kstyle.h:423
Option for drawing WT_Window titlebar buttons, indicating whether the button is pressed, and containing the window icon.
Definition: kstyle.h:349
Definition: kstyle.h:413
void drawPrimitive(PrimitiveElement elem, const QStyleOption *opt, QPainter *p, const QWidget *w) const
Definition: kstyle.cpp:979
Option for drawing double scrollbar buttons, indicating whether a button should be drawn active or no...
Definition: kstyle.h:312
Definition: kstyle.h:982
Definition: kstyle.h:427
(16) Space reserved for the widget, right of the EditField
Definition: kstyle.h:1114
A representation for colors for use as a widget layout property.
Definition: kstyle.h:191
(0) set to non-zero to have two buttons on top
Definition: kstyle.h:892
Option
(16) width of a scrollbar [sets QStyle::PM_ScrollBarExtent]
Definition: kstyle.h:896
(ColorMode(QPalette::Text)) color for inactive + disabled text and arrow
Definition: kstyle.h:852
virtual int widgetLayoutProp(WidgetType widgetType, int metric, const QStyleOption *opt=0, const QWidget *w=0) const
Used to obtain information about KStyle layout properties and metrics.
Definition: kstyle.cpp:913
Definition: kstyle.h:421
(ColorMode(QPalette::HighlightedText)) color mode of the titlebar text
Definition: kstyle.h:1445
void drawItemPixmap(QPainter *painter, const QRect &rect, int alignment, const QPixmap &pixmap) const
Definition: kstyle.cpp:451
void setWidgetLayoutProp(WidgetType widget, int metric, int value)
Interface for the style to configure various metrics that KStyle has customizable.
Definition: kstyle.cpp:901
Definition: kstyle.h:426
(20) height of the titlebar [sets QStyle::PM_TitleBarHeight]
Definition: kstyle.h:1446
Definition: kstyle.h:420
Panel of the spinbox button which increases the value.
Definition: kstyle.h:1144
Definition: kstyle.h:407
(1) The indicator size will always be a multiple of this (modulo busy indicator size clamping)...
Definition: kstyle.h:696
(6) the width(hor)/height(vert) of a ToolBar handle [sets QStyle::PM_ToolBarHandleExtent] ...
Definition: kstyle.h:1323
LayoutProp
Each tab is basically built hiearchically out of the following areas:Content area, one of the following layouts:
Definition: kstyle.h:951
(3) space between the text column and arrow column (indicating sub menus)
Definition: kstyle.h:846
scrollbar groove area, horizontal. Flags: State_Sunken for pressed state
Definition: kstyle.h:925
scrollbar groove area, horizontal. Flags: State_Sunken for pressed state
Definition: kstyle.h:923
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:24:00 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:24:00 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.