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

KDEUI

Public Member Functions | Protected Member Functions | Properties | List of all members
KIntSpinBox Class Reference

#include <knuminput.h>

Inheritance diagram for KIntSpinBox:
Inheritance graph
[legend]

Public Member Functions

 KIntSpinBox (QWidget *parent=0)
 
 KIntSpinBox (int lower, int upper, int singleStep, int value, QWidget *parent, int base=10)
 
virtual ~KIntSpinBox ()
 
int base () const
 
void setBase (int base)
 
void setEditFocus (bool mark)
 
void setSuffix (const KLocalizedString &suffix)
 

Protected Member Functions

virtual QString textFromValue (int) const
 
virtual int valueFromText (const QString &text) const
 

Properties

int base
 

Detailed Description

A QSpinBox with support for arbitrary base numbers.

A QSpinBox with support for arbitrary base numbers (e.g. hexadecimal).

The class provides an easy interface to use other numeric systems than the decimal.

kintspinbox.png
KDE Integer Input Spinboxes with hexadecimal and binary input

Definition at line 717 of file knuminput.h.

Constructor & Destructor Documentation

KIntSpinBox::KIntSpinBox ( QWidget *  parent = 0)
explicit

Constructor.

Constructs a widget with an integer inputline with a little scrollbar and a slider, with minimal value 0, maximal value 99, step 1, base 10 and initial value 0.

Definition at line 255 of file knuminput.cpp.

KIntSpinBox::KIntSpinBox ( int  lower,
int  upper,
int  singleStep,
int  value,
QWidget *  parent,
int  base = 10 
)

Constructor.

Constructs a widget with an integer inputline with a little scrollbar and a slider.

Parameters
lowerThe lowest valid value.
upperThe greatest valid value.
singleStepThe step size of the scrollbar.
valueThe actual value.
baseThe base of the used number system.
parentThe parent of the widget.

Definition at line 266 of file knuminput.cpp.

KIntSpinBox::~KIntSpinBox ( )
virtual

Destructor.

Definition at line 261 of file knuminput.cpp.

Member Function Documentation

int KIntSpinBox::base ( ) const
Returns
the base in which numbers in the spin box are represented.
void KIntSpinBox::setBase ( int  base)

Sets the base in which the numbers in the spin box are represented.

Definition at line 274 of file knuminput.cpp.

void KIntSpinBox::setEditFocus ( bool  mark)

sets focus and optionally marks all text

Definition at line 303 of file knuminput.cpp.

void KIntSpinBox::setSuffix ( const KLocalizedString &  suffix)

Sets the suffix to suffix.

Use this to add a plural-aware suffix, e.g. by using ki18np("singular", "plural").

Since
4.3

Definition at line 311 of file knuminput.cpp.

QString KIntSpinBox::textFromValue ( int  v) const
protectedvirtual

Overloaded the method in QSpinBox to make use of the base given in the constructor.

Definition at line 285 of file knuminput.cpp.

int KIntSpinBox::valueFromText ( const QString &  text) const
protectedvirtual

Overloaded the method in QSpinBox to make use of the base given in the constructor.

Definition at line 290 of file knuminput.cpp.

Property Documentation

int KIntSpinBox::base
readwrite

Definition at line 720 of file knuminput.h.


The documentation for this class was generated from the following files:
  • knuminput.h
  • knuminput.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:49:17 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
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • 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