• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

KDEUI

KStyle::ToolButton

KStyle::ToolButton Struct Reference
[KStyle widget representation]

Describes widgets like QToolButton (usually inside a QToolBar). More...

#include <kstyle.h>

List of all members.


Public Types

enum  LayoutProps {
  ContentsMargin, FocusMargin = ContentsMargin + MarginInc, MenuIndicatorSize, InlineMenuIndicatorSize = FocusMargin + MarginInc,
  InlineMenuIndicatorXOff, InlineMenuIndicatorYOff
}
enum  Primitive { Panel }

Detailed Description

Describes widgets like QToolButton (usually inside a QToolBar).

The drawing of ToolButton's is much like that of PushButtons; however, in some cases the widget is configured to not have a separate arrow area, but to incorporate the area inside the button itself. To handle this mode, set InlineMenuIndicatorSize to the size of the arrow, and the InlineMenuIndicatorXOff, and InlineMenuIndicatorYOff to offset from the bottom-right corner to place that rectangle. If InlineMenuIndicatorSize isn't set, the arrow won't be drawn.

See also:
WT_ToolButton

Definition at line 1387 of file kstyle.h.


Member Enumeration Documentation

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 1392 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 1422 of file kstyle.h.


The documentation for this struct was generated from the following file:
  • kstyle.h

KDEUI

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

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.7
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal