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

KDEUI

  • KStyle
  • SpinBox
Public Types | List of all members
KStyle::SpinBox Struct Reference
KStyle widget representation

#include <kstyle.h>

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 1093 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 1110 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 1139 of file kstyle.h.


The documentation for this struct was generated from the following file:
  • kstyle.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:24:03 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDEUI

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

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal