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

KDEUI

KStyle::SpinBox

KStyle::SpinBox Struct Reference
[KStyle widget representation]

Describes a widget like QSpinBox. More...

#include <kstyle.h>

List of all members.


Public Types

enum  LayoutProp {
  FrameWidth, ButtonWidth, ButtonMargin, ButtonSpacing = ButtonMargin + MarginInc,
  SymmetricButtons, SupportFrameless, ContentsMargin
}
enum  Primitive {
  EditField, UpButton, DownButton, ButtonArea,
  PlusSymbol, MinusSymbol
}

Detailed Description

Describes a widget like QSpinBox.

Definition at line 1092 of file kstyle.h.


Member Enumeration Documentation

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 1109 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 1138 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