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;
WidgetType
This enum is used to represent KStyle's concept of a widget, and to associate drawing requests and me...
Definition: kstyle.h:401
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
SubControl hitTestComplexControl(ComplexControl cc, const QStyleOptionComplex *opt, const QPoint &pt, const QWidget *w) const
Definition: kstyle.cpp:4039
@ GrooveAreaHorRight
scrollbar groove area, horizontal. Flags: State_Sunken for pressed state
Definition: kstyle.h:923
@ PressedShiftVertical
(2) vertical contents shift for pressed buttons [sets QStyle::PM_ButtonShiftVertical]
Definition: kstyle.h:517
@ TitleMargin
(2) Margin around title contents: Note that the symmetric margin (MainMargin) is used to size the tit...
Definition: kstyle.h:658
QRect itemTextRect(const QFontMetrics &fm, const QRect &r, int flags, bool enabled, const QString &text) const
Definition: kstyle.cpp:434
@ SliderVert
scrollbar slider, vertical. Flags: State_On&&State_Sunken for pressed state
Definition: kstyle.h:926
@ SideTextSpace
(3) Extra space besides that needed for text to allocate to side indicator (on both sides).
Definition: kstyle.h:695
@ BoxTextSpace
(6) space to leave between checkbox and text (and icon between them in case there is one)
Definition: kstyle.h:582
Template class which helps implementing the widget style plugin interface.
Definition: kstyle.h:1656
@ Size
(16) size of the checkbox [sets PM_IndicatorWidth, PM_IndicatorHeight]
Definition: kstyle.h:581
@ ArrowSpace
(3) space between the text column and arrow column (indicating sub menus)
Definition: kstyle.h:846
@ BaseHeight
(2) the height of the tabBar's base, usually the frame width [sets QStyle::PM_TabBarBaseHeight]
Definition: kstyle.h:964
void drawControl(ControlElement elem, const QStyleOption *opt, QPainter *p, const QWidget *w) const
Definition: kstyle.cpp:1327
void drawComplexControl(ComplexControl cc, const QStyleOptionComplex *opt, QPainter *p, const QWidget *w) const
Definition: kstyle.cpp:3155
#define T
@ GrooveMargin
(2) Margin to allocate for the groove. Content area will be inside of it.
Definition: kstyle.h:693
Button
Intermediatary base that helps implement subtypes of Option that properly handle defaults.
Definition: kstyle.h:254
@ DefaultFrameWidth
The FrameWidth used by LineEdit, etc..., default is 2 [sets QStyle::PM_DefaultFrameWidth].
Definition: kstyle.h:467
@ GrooveAreaVertBottom
scrollbar groove area, vertical. An interesting flag is State_Sunken for pressed state
Definition: kstyle.h:922
QRect subControlRect(ComplexControl control, const QStyleOptionComplex *opt, SubControl subControl, const QWidget *w) const
Definition: kstyle.cpp:3650
void drawPrimitive(PrimitiveElement elem, const QStyleOption *opt, QPainter *p, const QWidget *w) const
Definition: kstyle.cpp:979
QPixmap standardPixmap(StandardPixmap standardPixmap, const QStyleOption *opt, const QWidget *widget=0) const
Definition: kstyle.cpp:583
@ HandleExtent
(6) the width(hor)/height(vert) of a ToolBar handle [sets QStyle::PM_ToolBarHandleExtent]
Definition: kstyle.h:1323
@ TitleTextColor
(ColorMode(QPalette::HighlightedText)) color mode of the title text
Definition: kstyle.h:657
ActiveButton activeButton
Whether any of the two buttons is active; and if yes, which one.
Definition: kstyle.h:330
@ ExtensionExtent
(10) the width/height of a ToolBar extender, when there is not enough room for toolbar buttons [sets ...
Definition: kstyle.h:1325
@ SeparatorExtent
(6) the width/height of a ToolBar separator [sets QStyle::PM_ToolBarSeparatorExtent]
Definition: kstyle.h:1324
Option for drawing WT_Window titlebar buttons, indicating whether the button is pressed,...
Definition: kstyle.h:349
Option for drawing double scrollbar buttons, indicating whether a button should be drawn active or no...
Definition: kstyle.h:312
int styleHint(StyleHint hint, const QStyleOption *opt, const QWidget *w, QStyleHintReturn *returnData) const
Definition: kstyle.cpp:2512
QSize sizeFromContents(ContentsType type, const QStyleOption *opt, const QSize &contentsSize, const QWidget *w) const
Definition: kstyle.cpp:4092
@ CheckIcon
When CheckAlongsideIcon is disabled and item is checked: checkmark Indicator painted below the icon.
Definition: kstyle.h:870
Primitive
[the Handles implement QStyle::PE_IndicatorToolBarHandle] [the Panels implement QStyle::CE_ToolBar]
Definition: kstyle.h:1338
@ ExpanderOpen
An opened tree expander, usually drawn as '-' KStyle has a default implementation.
Definition: kstyle.h:1081
@ ExpanderClosed
A closed tree expander, usually drawn as '+'. KStyle has a default implementation (Windows-like look)...
Definition: kstyle.h:1080
@ DefaultLayoutSpacing
The spacing used by layouts, unless the style implements layoutSpacingImplementation(),...
Definition: kstyle.h:468
QRect itemPixmapRect(const QRect &r, int flags, const QPixmap &pixmap) const
Definition: kstyle.cpp:440
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
@ GrooveAreaVertTop
scrollbar groove area, vertical. An interesting flag is State_Sunken for pressed state
Definition: kstyle.h:924
int layoutSpacingImplementation(QSizePolicy::ControlType control1, QSizePolicy::ControlType control2, Qt::Orientation orientation, const QStyleOption *option, const QWidget *widget) const
Definition: kstyle.cpp:2833
QRect subElementRect(SubElement subRect, const QStyleOption *opt, const QWidget *w) const
Definition: kstyle.cpp:2962
Option for drawing icons: represents whether the icon should be active or not.
Definition: kstyle.h:297
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
@ MenuIndicatorSize
(8) Space inside the content area, which is allocated to the down arrow if there is a popup menu [set...
Definition: kstyle.h:518
Width
Describes widgets like QToolButton (usually inside a QToolBar).
Definition: kstyle.h:1388
@ BaseOverlap
(2) the number of pixels the tabs overlap with the base (i.e. tabWidget frame) [sets QStyle::PM_TabBa...
Definition: kstyle.h:965
@ DisabledTextColor
(ColorMode(QPalette::Text)) color for inactive + disabled text and arrow
Definition: kstyle.h:852
const char * name(StandardAction id)
This will return the internal name of a given standard action.
Definition: kstandardaction.cpp:223
void drawItemPixmap(QPainter *painter, const QRect &rect, int alignment, const QPixmap &pixmap) const
Definition: kstyle.cpp:451
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
QIcon standardIconImplementation(StandardPixmap standardIcon, const QStyleOption *option=0, const QWidget *widget=0) const
Definition: kstyle.cpp:462
@ ActiveTextColor
(ColorMode(QPalette::HighlightedText)) color for active text and arrow
Definition: kstyle.h:850
@ FrameWidth
(1) The width of the frame, note that this does not affect the layout.
Definition: kstyle.h:788
@ TitlePanel
whole titlebar panel/background, by KStyle default it's filled with plain highlight color
Definition: kstyle.h:1469
QPixmap generatedIconPixmap(QIcon::Mode iconMode, const QPixmap &pixmap, const QStyleOption *opt) const
Definition: kstyle.cpp:588
static T extractOption(Option *option)
The extractOption method casts the passed in option object, and returns it, if available,...
Definition: kstyle.h:1684
@ Precision
(1) The indicator size will always be a multiple of this (modulo busy indicator size clamping)....
Definition: kstyle.h:696
int pixelMetric(PixelMetric metric, const QStyleOption *opt=0, const QWidget *w=0) const
Definition: kstyle.cpp:2589
LayoutProp
Each tab is basically built hiearchically out of the following areas:
Definition: kstyle.h:951
None
@ GrooveAreaHorLeft
scrollbar groove area, horizontal. Flags: State_Sunken for pressed state
Definition: kstyle.h:925
MarginOffsets
These constants describe how to access various fields of a margin property.
Definition: kstyle.h:440
@ TitleTextColor
(ColorMode(QPalette::HighlightedText)) color mode of the titlebar text
Definition: kstyle.h:1445
A representation for colors for use as a widget layout property.
Definition: kstyle.h:191
void setWidgetLayoutProp(WidgetType widget, int metric, int value)
Interface for the style to configure various metrics that KStyle has customizable.
Definition: kstyle.cpp:901
Option
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sun Jan 19 2020 00:00:00 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sun Jan 19 2020 00:00:00 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.