KDEUI
kstyle.cpp
Go to the documentation of this file.
130 m_componentData = KComponentData(name.toLatin1(), name.toLatin1(), KComponentData::SkipMainComponentRegistration);
198 setWidgetLayoutProp(WT_MenuItem, MenuItem::ActiveTextColor, ColorMode(QPalette::HighlightedText));
299 name, containing the typical element prefix ("CE_", etc.) and being supported by the current style
301 query, try to dump out a string and hope for the best, we now manipulate the widgets objectName().
302 Plain Qt dependent widgets can do that themselves and if a widget uses KStyle's convenience access
305 2) The key problem is that a common KDE widget will run into an apps custom style which will then
331 static inline int newStyleElement(const QString &element, const char *check, int &counter, QHash<QString, int> *elements)
370 The functions called by widgets that request custom element support, passed to the effective style.
374 static inline int customStyleElement(QStyle::StyleHint type, const QString &element, QWidget *widget)
388 return (StyleHint) customStyleElement(SH_KCustomStyleElement, element, const_cast<QWidget*>(widget));
391 QStyle::ControlElement KStyle::customControlElement(const QString &element, const QWidget *widget)
393 return (ControlElement) customStyleElement(SH_KCustomStyleElement, element, const_cast<QWidget*>(widget));
398 return (SubElement) customStyleElement(SH_KCustomStyleElement, element, const_cast<QWidget*>(widget));
462 QIcon KStyle::standardIconImplementation(StandardPixmap standardIcon, const QStyleOption *option,
806 drawItemText(p, r, Qt::AlignVCenter | Qt::TextShowMnemonic | textOpts->hAlign, pal, flags & State_Enabled,
979 void KStyle::drawPrimitive(PrimitiveElement elem, const QStyleOption* option, QPainter* painter, const QWidget* widget) const
989 drawKStylePrimitive(WT_Generic, Generic::FocusIndicator, option, r, pal, flags, painter, widget);
1009 drawKStylePrimitive(WT_CheckBox, CheckBox::CheckTriState, option, r, pal, flags, painter, widget);
1017 drawKStylePrimitive(WT_RadioButton, RadioButton::RadioOn, option, r, pal, flags, painter, widget);
1019 drawKStylePrimitive(WT_RadioButton, RadioButton::RadioOff, option, r, pal, flags, painter, widget);
1050 drawKStylePrimitive(WT_Tree, Tree::VerticalBranch, option, topLine, pal, flags, painter, widget);
1063 drawKStylePrimitive(WT_Tree, Tree::HorizontalBranch, option, horLine, pal, flags, painter, widget);
1071 drawKStylePrimitive(WT_Tree, Tree::VerticalBranch, option, botLine, pal, flags, painter, widget);
1185 drawKStylePrimitive(WT_PushButton, PushButton::DefaultButtonFrame, option, r, pal, flags, painter, widget);
1193 drawKStylePrimitive(WT_ToolButton, Generic::ArrowDown, option, r, pal, flags, painter, widget);
1205 bool hasSolidBackground = !hasCustomBackground || opt->backgroundBrush.style() == Qt::SolidPattern;
1327 void KStyle::drawControl(ControlElement element, const QStyleOption* option, QPainter* p, const QWidget* widget) const
1348 if ((bOpt->features & QStyleOptionButton::DefaultButton) || (bOpt->features & QStyleOptionButton::AutoDefaultButton))
1349 labelRect = insideMargin(labelRect, WT_PushButton, PushButton::DefaultIndicatorMargin, option, widget);
1352 labelRect = insideMargin(labelRect, WT_PushButton, PushButton::ContentsMargin, option, widget);
1370 drawKStylePrimitive(WT_PushButton, Generic::FocusIndicator, &foOpts, focusRect, pal, flags, p, widget);
1387 if ((bOpt->features & QStyleOptionButton::DefaultButton) || (bOpt->features & QStyleOptionButton::AutoDefaultButton))
1388 bevelRect = insideMargin(r, WT_PushButton, PushButton::DefaultIndicatorMargin, option, widget);
1419 int indicatorWidth = widgetLayoutProp(WT_PushButton, PushButton::MenuIndicatorSize, option, widget);
1420 int indicatorSpacing = widgetLayoutProp(WT_PushButton, PushButton::TextToIconSpace, option, widget);
1485 const QStyleOptionDockWidget* dwOpt = ::qstyleoption_cast<const QStyleOptionDockWidget*>(option);
1494 drawKStylePrimitive(WT_DockWidget, Generic::Text, option, textRect, pal, flags, p, widget, &lbOpt);
1638 const QStyleOptionProgressBar* pbOpt = qstyleoption_cast<const QStyleOptionProgressBar*>(option);
1639 const QStyleOptionProgressBarV2* pbOpt2 = qstyleoption_cast<const QStyleOptionProgressBarV2*>(option);
1655 widthFrac = widgetLayoutProp(WT_ProgressBar, ProgressBar::BusyIndicatorSize, option, widget) / 100.0;
1669 if (size > widgetLayoutProp(WT_ProgressBar, ProgressBar::MaxBusyIndicatorSize, option, widget))
1676 int remSize = (horizontal ? r.width() : r.height()) - size; //The space around which we move around...
1684 // - ( (remWidth + some delta) - 2* remWidth ) = - (some deleta - remWidth) = remWidth - some delta..
1693 drawKStylePrimitive(WT_ProgressBar, ProgressBar::BusyIndicator, option, handleRTL(option, indicatorRect),
1703 drawKStylePrimitive(WT_ProgressBar, ProgressBar::Indicator, option, handleRTL(option, indicatorRect),
1711 const QStyleOptionProgressBar* pbOpt = qstyleoption_cast<const QStyleOptionProgressBar*>(option);
1712 const QStyleOptionProgressBarV2* pbOpt2 = qstyleoption_cast<const QStyleOptionProgressBarV2*>(option);
1747 horizontal? r.adjusted(0, marWidth, 0, -marWidth) : QRect(0, marWidth, r.height(), r.width()-marWidth),
1890 drawKStylePrimitive(WT_MenuItem, MenuItem::CheckColumn, option, handleRTL(option, leftColRect),
1905 drawKStylePrimitive(WT_MenuItem, MenuItem::ItemIndicator, option, handleRTL(option, r), pal, flags, p, widget);
1984 QRect textRect = QRect(ir.x() + leftColW, ir.y(), ir.width() - leftColW - rightColW, ir.height());
2043 if (element == CE_ScrollBarAddLine && widgetLayoutProp(WT_ScrollBar, ScrollBar::DoubleBotButton, option, widget))
2045 if (element == CE_ScrollBarSubLine && widgetLayoutProp(WT_ScrollBar, ScrollBar::DoubleTopButton, option, widget))
2364 iconRect = QRect(labelRect.x(), labelRect.y() + (labelRect.height() - iconSize.height() + 1) / 2,
2375 labelRect.y() + (labelRect.height() - iconSize.height() + 1) / 2, iconSize.width(), iconSize.height());
2391 iconRect = QRect(labelRect.x() + (labelRect.width() - iconSize.width() + 1) / 2, labelRect.y(),
2451 if (const QStyleOptionHeader *header = qstyleoption_cast<const QStyleOptionHeader *>(option)) {
2452 drawKStylePrimitive(WT_Header, (header->orientation==Qt::Horizontal)?Header::SectionHor:Header::SectionVert,
2460 if (const QStyleOptionHeader *header = qstyleoption_cast<const QStyleOptionHeader *>(option)) {
2464 QPixmap pm = header->icon.pixmap(pixelMetric(PM_SmallIconSize), enabled?QIcon::Normal:QIcon::Disabled);
2474 drawKStylePrimitive(WT_Header, Generic::Icon, option, iconRect, pal, flags, p, widget, &iconOpt);
2490 drawKStylePrimitive(WT_Header, Generic::Text, option, textRect, pal, flags, p, widget, &lbOpt);
2512 int KStyle::styleHint (StyleHint hint, const QStyleOption* option, const QWidget* widget, QStyleHintReturn* returnData) const
2553 return d->m_componentData.config()->group("KDE").readEntry("SingleClick", KDE_DEFAULT_SINGLECLICK );
2589 int KStyle::pixelMetric(PixelMetric metric, const QStyleOption* option, const QWidget* widget) const
2696 int spaceL = widgetLayoutProp(WT_MenuBar, MenuBar::Margin, option, widget) + widgetLayoutProp(WT_MenuBar, MenuBar::Margin + Left, option, widget);
2704 int spaceT = widgetLayoutProp(WT_MenuBar, MenuBar::Margin, option, widget) + widgetLayoutProp(WT_MenuBar, MenuBar::Margin + Top, option, widget);
2722 int spaceL = widgetLayoutProp(WT_Menu, Menu::Margin, option, widget) + widgetLayoutProp(WT_Menu, Menu::Margin + Left, option, widget) -
2731 int spaceT = widgetLayoutProp(WT_Menu, Menu::Margin, option, widget) + widgetLayoutProp(WT_Menu, Menu::Margin + Top, option, widget) -
2833 int KStyle::layoutSpacingImplementation(QSizePolicy::ControlType control1, QSizePolicy::ControlType control2, Qt::Orientation orientation, const QStyleOption *option, const QWidget *widget) const
2962 QRect KStyle::subElementRect(SubElement sr, const QStyleOption* option, const QWidget* widget) const
2973 if ((bOpt->features & QStyleOptionButton::DefaultButton) || (bOpt->features & QStyleOptionButton::AutoDefaultButton))
2984 if ((bOpt->features & QStyleOptionButton::DefaultButton) || (bOpt->features & QStyleOptionButton::AutoDefaultButton))
3048 const QStyleOptionProgressBar* pbOpt = ::qstyleoption_cast<const QStyleOptionProgressBar*>(option);
3067 const QStyleOptionProgressBar* pbOpt = ::qstyleoption_cast<const QStyleOptionProgressBar*>(option);
3081 const QStyleOptionTabWidgetFrame* tabOpt = qstyleoption_cast<const QStyleOptionTabWidgetFrame*>(option);
3168 if ((mutableOpt->subControls & SC_ScrollBarSubLine) || (mutableOpt->subControls & SC_ScrollBarAddLine))
3299 drawKStylePrimitive(WT_Slider, hor ? Slider::GrooveHor : Slider::GrooveVert, opt, groove, pal, flags, p, w);
3304 drawKStylePrimitive(WT_Slider, hor ? Slider::HandleHor : Slider::HandleVert, opt, handle, pal, flags, p, w);
3398 drawKStylePrimitive(WT_ComboBox, Generic::FocusIndicator, opt, focusRect, pal, flags, p, w, 0);
3424 if (const QStyleOptionToolButton *tool = qstyleoption_cast<const QStyleOptionToolButton *>(opt)) {
3473 drawKStylePrimitive(WT_ToolButton, Generic::FocusIndicator, &tOpt, focusRect, pal, bflags, p, w);
3601 QRect KStyle::internalSubControlRect (ComplexControl control, const QStyleOptionComplex* option,
3671 QRect top = handleRTL(option, internalSubControlRect(control, option, SC_ScrollBarSubLine, widget));
3672 QRect bot = handleRTL(option, internalSubControlRect(control, option, SC_ScrollBarAddLine, widget));
3715 if (sliderSize < widgetLayoutProp(WT_ScrollBar, ScrollBar::MinimumSliderHeight, option, widget))
3744 return handleRTL(option, QRect(groove.x(), groove.y(), slider.x() - groove.x(), groove.height()));
3746 return handleRTL(option, QRect(groove.x(), groove.y(), groove.width(), slider.y() - groove.y()));
3782 bool supportFrameless = widgetLayoutProp(WT_SpinBox, SpinBox::SupportFrameless, option, widget);
3837 if (const QStyleOptionComboBox *cb = qstyleoption_cast<const QStyleOptionComboBox *>(option)) {
3846 bool supportFrameless = widgetLayoutProp(WT_ComboBox, ComboBox::SupportFrameless, option, widget);
4029 return pt.x() < totalRect.center().x() ? QStyle::SC_ScrollBarSubLine : QStyle::SC_ScrollBarAddLine;
4031 return pt.x() > totalRect.center().x() ? QStyle::SC_ScrollBarSubLine : QStyle::SC_ScrollBarAddLine;
4035 return pt.y() < totalRect.center().y() ? QStyle::SC_ScrollBarSubLine : QStyle::SC_ScrollBarAddLine;
4039 QStyle::SubControl KStyle::hitTestComplexControl(ComplexControl cc, const QStyleOptionComplex* opt,
4092 QSize KStyle::sizeFromContents(ContentsType type, const QStyleOption* option, const QSize& contentsSize, const QWidget* widget) const
4103 if ((bOpt->features & QStyleOptionButton::DefaultButton) || (bOpt->features & QStyleOptionButton::AutoDefaultButton))
4110 size.setWidth(size.width() + widgetLayoutProp(WT_PushButton, PushButton::TextToIconSpace, option, widget));
4116 size.setWidth(size.width() - 4 + widgetLayoutProp(WT_PushButton, PushButton::TextToIconSpace, option, widget));
4130 if (const QStyleOptionToolButton* tbOpt = qstyleoption_cast<const QStyleOptionToolButton*>(option)) {
4134 size.setWidth(size.width() + widgetLayoutProp(WT_ToolButton, ToolButton::InlineMenuIndicatorSize, tbOpt, widget));
4170 QSize size = expandDim(contentsSize, WT_RadioButton, RadioButton::FocusMargin, option, widget);
4185 const QStyleOptionProgressBar* pbOpt = ::qstyleoption_cast<const QStyleOptionProgressBar*>(option);
4268 int h = qMax(contentsSize.height(), widgetLayoutProp(WT_MenuItem, MenuItem::MinHeight, option, widget));
4275 insideSize = QSize(10, widgetLayoutProp(WT_MenuItem, MenuItem::SeparatorHeight, option, widget));
4311 const QStyleOptionTabWidgetFrame* tabOpt = qstyleoption_cast<const QStyleOptionTabWidgetFrame*>(option);
4338 if (const QStyleOptionHeader *header = qstyleoption_cast<const QStyleOptionHeader *>(option)) {
The spacing used by layouts, unless the style implements layoutSpacingImplementation(), default is 6 [sets QStyle::PM_DefaultLayoutSpacing].
Definition: kstyle.h:468
(10000) size limit on the busy indicator size
Definition: kstyle.h:698
(6) space between the icon and the text if both exist
Definition: kstyle.h:519
(10) The busy indicator size, in percent of area size.
Definition: kstyle.h:697
(0) Set to non-zero to indicate that you are able to handle frame-less SpinBoxes. ...
Definition: kstyle.h:1125
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
(ColorMode(QPalette::Text)) color for inactive text and arrow
Definition: kstyle.h:851
the text contents area, painted after Generic::Frame
Definition: kstyle.h:1141
(1) rectangle to apply to the checkbox rectangle to get where to paint the focus rectangle in case of...
Definition: kstyle.h:583
(3) Space between the checkmark column and the icon column (CheckAlongsideButton enabled).
Definition: kstyle.h:841
const char header[]
QRect subElementRect(SubElement subRect, const QStyleOption *opt, const QWidget *w) const
Definition: kstyle.cpp:2962
Used to draw a 2-button bevel, vertical.
Definition: kstyle.h:918
int currentSize(KIconLoader::Group group) const
Returns the current size of the icon group.
Definition: kiconloader.cpp:1370
QRect subControlRect(ComplexControl control, const QStyleOptionComplex *opt, SubControl subControl, const QWidget *w) const
Definition: kstyle.cpp:3650
(ColorMode(ColorMode::BWAutoContrastMode, QPalette::Button)) color mode of a button arrow ...
Definition: kstyle.h:900
Horizontal scrollbar: The right button is active.
Definition: kstyle.h:322
(0) Set to non-zero to make sure both buttons are always of the same height.
Definition: kstyle.h:1120
the toolbutton panel [implements QStyle::PE_PanelButtonTool]
Definition: kstyle.h:1425
StyleHint newStyleHint(const QString &element)
Runtime element extension, allows inheriting styles to add support custom elements merges supporting ...
Definition: kstyle.cpp:344
(16) The width of a slider handle [sets QStyle::PM_SliderLength]
Definition: kstyle.h:1034
(3) space that is allocated between icon and text if both exist [sets QStyle::PM_HeaderMargin] ...
Definition: kstyle.h:1217
static KIconLoader * global()
Returns the global icon loader initialized with the global KComponentData.
static StyleHint customStyleHint(const QString &element, const QWidget *widget)
Runtime element extension This is just convenience and does /not/ require the using widgets style to ...
Definition: kstyle.cpp:386
Definition: kstyle.h:406
(6) the width/height of a ToolBar separator [sets QStyle::PM_ToolBarSeparatorExtent] ...
Definition: kstyle.h:1324
Vertical scrollbar: The lower button is active.
Definition: kstyle.h:323
static int newStyleElement(const QString &element, const char *check, int &counter, QHash< QString, int > *elements)
Definition: kstyle.cpp:331
static int customStyleElement(QStyle::StyleHint type, const QString &element, QWidget *widget)
Definition: kstyle.cpp:374
QSize sizeFromContents(ContentsType type, const QStyleOption *opt, const QSize &contentsSize, const QWidget *w) const
Definition: kstyle.cpp:4092
(false) set this to true to have the text positionned to the side
Definition: kstyle.h:694
Definition: kstyle.h:403
(10) Height of the TearOff area. [sets QStyle::PM_MenuTearoffHeight]
Definition: kstyle.h:791
(MainMargin 0, Right Top Bot 1) Where the up/down buttons are located, measured from right of the edi...
Definition: kstyle.h:1115
WidgetType
This enum is used to represent KStyle's concept of a widget, and to associate drawing requests and me...
Definition: kstyle.h:401
void drawInsideRect(QPainter *p, const QRect &r) const
Draws inside the rectangle using a thinkness 0 pen.
Definition: kstyle.cpp:594
used to draw a 1-button bevel, horizontal
Definition: kstyle.h:917
Definition: kstyle.h:411
[implements QStyle::PE_IndicatorToolBarSeparator]
Definition: kstyle.h:1342
static ControlElement customControlElement(const QString &element, const QWidget *widget)
Definition: kstyle.cpp:391
(5) space between the bevel and the spinbox contents
Definition: kstyle.h:1129
const char * name(StandardAction id)
This will return the internal name of a given standard action.
Definition: kstandardaction.cpp:223
Horizontal offset off the bottom-right corner to place the arrow if it's incorporated directly...
Definition: kstyle.h:1405
(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
(3) where the tab focus rect is placed, measured from the tab sides (?)
Definition: kstyle.h:954
(11) Size for the separate menu arrows on tool buttons [sets QStyle::PM_MenuButtonIndicator wheen a t...
Definition: kstyle.h:1400
(2) Width of the frame around a tab widget.
Definition: kstyle.h:1007
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
void init()
Called by the constructor to set the default value of hAlign.
Definition: kstyle.cpp:4478
Option representing text drawing info. For Generic::Text.
Definition: kstyle.h:369
(9) size of the sort indicator in a header [sets QStyle::PM_HeaderMarkSize]
Definition: kstyle.h:1221
(ColorMode(QPalette::Text)) color for active + disabled text and arrow
Definition: kstyle.h:853
(16) size of the checkbox [sets PM_IndicatorWidth, PM_IndicatorHeight]
Definition: kstyle.h:581
frame indicating a default button, painted before the button Panel [implements QStyle::PE_FrameDefaul...
Definition: kstyle.h:536
the panel of a toolbox tab, KStyles default implementation paints WT_ToolButton/ToolButton::Panel [im...
Definition: kstyle.h:1371
(2) the number of pixels the tabs overlap with the base (i.e. tabWidget frame) [sets QStyle::PM_TabBa...
Definition: kstyle.h:965
The margin used by layouts, default is 9 [sets QStyle::PM_DefaultChildMargin and QStyle::PM_DefaultTo...
Definition: kstyle.h:469
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
(ColorMode(QPalette::Text)) color of the title text label
Definition: kstyle.h:1281
(5) Margin reserved around the contents size of a toolbutton.
Definition: kstyle.h:1395
(1) The width of the frame, note that this does not affect the layout.
Definition: kstyle.h:788
(0 ?) Default indicator between the very outside and the bevel. KStyle may reserve this for auto-defa...
Definition: kstyle.h:515
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
(5) space between the bevel and the combobox contents
Definition: kstyle.h:1184
(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
(0) Set to non-zero to have checkmarks painted separate from icons.
Definition: kstyle.h:836
Definition: kstyle.h:872
(12) size of the checkmark column (CheckAlongsideButton enabled).
Definition: kstyle.h:839
[sets QStyle::PM_ExclusiveIndicatorWidth, QStyle::PM_ExclusiveIndicatorHeight]
Definition: kstyle.h:619
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
QRect centerRect(const QRect &in, int w, int h) const
Returns a w x h QRect center inside the 'in' rectangle.
Definition: kstyle.cpp:599
(6) width of the area which separates the (docked) dock window from the window contents [sets QStyle:...
Definition: kstyle.h:660
Definition: kstandardshortcut.h:69
(0) if set to non-zero, the frame primitive is not expected to paint around the titlebar area [sets Q...
Definition: kstyle.h:1447
(0 ?) space between icon and text if the tab contains both
Definition: kstyle.h:957
(ColorMode(ColorMode::BWAutoContrastMode, QPalette::ButtonText)) color mode of a pressed button arrow...
Definition: kstyle.h:902
(6) margin around the tab contents, used to size the tab
Definition: kstyle.h:953
the panel for a QLineEdit (including frame...) [implements QStyle::PE_PanelLineEdit] ...
Definition: kstyle.h:1254
static QPalette createApplicationPalette(const KSharedConfigPtr &config=KSharedConfigPtr())
Used to obtain the QPalette that will be used to set the application palette.
Definition: kglobalsettings.cpp:975
Used to indicate business, for example when no progress is known (minimum and maximum values both set...
Definition: kstyle.h:712
When CheckAlongsideIcon is disabled and item is checked: checkmark Indicator painted below the icon...
Definition: kstyle.h:870
(2) horizontal contents shift for pressed buttons [sets QStyle::PM_ButtonShiftHorizontal] ...
Definition: kstyle.h:516
Definition: kstyle.h:424
The checkmark of exclusive actions - not selected.
Definition: kstyle.h:869
(6) size of the splitter handle [sets QStyle::PM_SplitterWidth]
Definition: kstyle.h:554
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
(10) Height of a menu scroller. [sets QStyle::PM_MenuScrollerHeight]
Definition: kstyle.h:790
void drawComplexControl(ComplexControl cc, const QStyleOptionComplex *opt, QPainter *p, const QWidget *w) const
Definition: kstyle.cpp:3155
static const qint32 u_arrow[]
KStyle for KDE4 Copyright (C) 2004-2005 Maksim Orlovich maksim@kde.org Copyright (C) 2005...
Definition: kstyle.cpp:74
For groupboxes which are set to be 'flat' (usually a divider line from top left to top right)...
Definition: kstyle.h:1288
(0) set to non-zero, the title will be aligned above the groupbox frame, not vertically centered [set...
Definition: kstyle.h:1278
Definition: kstyle.h:622
static bool preceeds(const QPoint &pt, const QRect &bound, const QStyleOption *opt)
Definition: kstyle.cpp:4004
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
(14) Space between items [sets QStyle::PM_MenuBarItemSpacing]
Definition: kstyle.h:733
Panel of the spinbox button which decreases the value.
Definition: kstyle.h:1145
static bool showIconsOnPushButtons()
This function determines if the user wishes to see icons on the push buttons.
Definition: kglobalsettings.cpp:768
scrollbar groove area, vertical. An interesting flag is State_Sunken for pressed state ...
Definition: kstyle.h:924
(1) Margin rectangle to allocate for any bevel, etc.
Definition: kstyle.h:761
Plus symbol painted on top of the up button, centering primitive.
Definition: kstyle.h:1149
static QStyle::SubControl buttonPortion(const QRect &totalRect, const QPoint &pt, const QStyleOption *opt)
Definition: kstyle.cpp:4021
QRect itemPixmapRect(const QRect &r, int flags, const QPixmap &pixmap) const
Definition: kstyle.cpp:440
Definition: kstyle.h:408
Definition: kstyle.h:980
(3) width of the frame around floating dockwidgets [sets QStyle::PM_DockWidgetFrameWidth] ...
Definition: kstyle.h:659
ControlElement newControlElement(const QString &element)
Definition: kstyle.cpp:349
Definition: kstyle.h:419
Minus symbol painted on top of the down button, centering primitive.
Definition: kstyle.h:1151
Horizontal scrollbar: The left button is active.
Definition: kstyle.h:321
static const QStyle::StyleHint SH_KCustomStyleElement
Definition: kstyle.cpp:101
(0) Size of arrow when it's incorporated into the button directly.
Definition: kstyle.h:1402
Definition: kstyle.h:404
Definition: kstyle.h:418
Vertical offset off the bottom-right corner to place the arrow if it's incorporated directly...
Definition: kstyle.h:1408
Definition: kstyle.h:422
painted in the left edge of a tabbar when the left tab is scrolled out [implements PE_IndicatorTabTea...
Definition: kstyle.h:985
(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
(3) space between buttons and the title text
Definition: kstyle.h:1455
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
(1) Space reserved left, top, bottom of the SpinBox [sets QStyle::PM_SpinBoxFrameWidth] ...
Definition: kstyle.h:1112
(3) Extra space besides that needed for text to allocate to side indicator (on both sides)...
Definition: kstyle.h:695
(0) margin around the checkbox contents reserved for the focus rect
Definition: kstyle.h:586
Can be used in addition or instead of KPE_SpinBox_UpButton and KPE_SpinBox_DownButton.
Definition: kstyle.h:1146
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) width of the frame around toolbars [sets QStyle::PM_ToolBarFrameWidth]
Definition: kstyle.h:1326
(2) Margin to allocate for the groove. Content area will be inside of it.
Definition: kstyle.h:693
Definition: kstyle.h:423
(MainMargin 2, Left 4, Right 4) Margin rectangle for the contents.
Definition: kstyle.h:731
(2) margin around titlebar contents (buttons, text label), used to position them and determine the he...
Definition: kstyle.h:1450
const KComponentData & mainComponent()
bool hasMainComponent()
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:623
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
(3) Used to calculate the area of the focus indicator. Measured from the bevel.
Definition: kstyle.h:514
Definition: kstyle.h:427
(16) Space reserved for the widget, right of the EditField
Definition: kstyle.h:1114
(3) Where the focus rect will be drawn, measured from the widget sides
Definition: kstyle.h:1397
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
(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
ColorMode(QPalette::ColorRole _role)
Constructor, using a the given palette role _role and a default mode.
Definition: kstyle.cpp:4432
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
scrollbar slider, horizontal. Flags: State_On&&State_Sunken for pressed state
Definition: kstyle.h:927
void setWidgetLayoutProp(WidgetType widget, int metric, int value)
Interface for the style to configure various metrics that KStyle has customizable.
Definition: kstyle.cpp:901
QColor color(const QPalette &palette)
Return the color corresponding to our role from the palette, automatically compensating for the contr...
Definition: kstyle.cpp:4453
Definition: kstyle.h:426
(20) height of the titlebar [sets QStyle::PM_TitleBarHeight]
Definition: kstyle.h:1446
the progressbar groove, drawn before the progress Indicator [implements QStyle::CE_ProgressBarGroove]...
Definition: kstyle.h:709
Definition: kstyle.h:420
Definition: kstyle.h:1086
Panel of the spinbox button which increases the value.
Definition: kstyle.h:1144
(1) Focus margin for ComboBoxes that aren't editable, measured from the EditField rect ...
Definition: kstyle.h:1178
Definition: kstyle.h:407
(10) buttons which are shown when there's not enough space for tabs (A ToolButton is used for this) [...
Definition: kstyle.h:966
(1) The indicator size will always be a multiple of this (modulo busy indicator size clamping)...
Definition: kstyle.h:696
The panel/background of a menubar item. Interesting flags: State_Selected && State_HasFocus for mouse...
Definition: kstyle.h:772
(6) the width(hor)/height(vert) of a ToolBar handle [sets QStyle::PM_ToolBarHandleExtent] ...
Definition: kstyle.h:1323
static SubElement customSubElement(const QString &element, const QWidget *widget)
Definition: kstyle.cpp:396
(0) used to specify the position of the tab contents, doesn't influence the tab size [sets QStyle::SE...
Definition: kstyle.h:1361
(3) space between the text column and arrow column (indicating sub menus)
Definition: kstyle.h:846
the pushbutton panel [implements QStyle::PE_PanelButtonCommand]
Definition: kstyle.h:534
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-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:49:15 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:49:15 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.