• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.14.38 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:

Public Member Functions

 KIntSpinBox (int lower, int upper, int singleStep, int value, QWidget *parent, int base=10)
 
 KIntSpinBox (QWidget *parent=0)
 
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.

KDE Integer Input Spinboxes with hexadecimal and binary input

Definition at line 717 of file knuminput.h.

Constructor & Destructor Documentation

◆ KIntSpinBox() [1/2]

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() [2/2]

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::~KIntSpinBox ( )
virtual

Destructor.

Definition at line 261 of file knuminput.cpp.

Member Function Documentation

◆ base()

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

Definition at line 280 of file knuminput.cpp.

◆ setBase()

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.

◆ setEditFocus()

void KIntSpinBox::setEditFocus ( bool  mark)

sets focus and optionally marks all text

Definition at line 303 of file knuminput.cpp.

◆ setSuffix()

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.

◆ textFromValue()

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.

◆ valueFromText()

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

◆ base

int KIntSpinBox::base
readwrite

Definition at line 698 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-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 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-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 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
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