• 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
KNumInput Class Referenceabstract

#include <knuminput.h>

Inheritance diagram for KNumInput:
Inheritance graph
[legend]

Public Member Functions

 KNumInput (QWidget *parent=0)
 
KDE_CONSTRUCTOR_DEPRECATED KNumInput (QWidget *parent, KNumInput *below)
 
 ~KNumInput ()
 
QString label () const
 
virtual void setLabel (const QString &label, Qt::Alignment a=Qt::AlignLeft|Qt::AlignTop)
 
void setSteps (int minor, int major)
 
bool showSlider () const
 
virtual QSize sizeHint () const
 

Protected Member Functions

virtual void doLayout ()=0
 
void layout (bool deep)
 
QSlider * slider () const
 

Properties

QString label
 

Detailed Description

You need to inherit from this class if you want to implement K*NumInput for a different variable type.

Definition at line 43 of file knuminput.h.

Constructor & Destructor Documentation

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

Default constructor.

Parameters
parentIf parent is 0, the new widget becomes a top-level window. If parent is another widget, this widget becomes a child window inside parent. The new widget is deleted when its parent is deleted.

Definition at line 91 of file knuminput.cpp.

KNumInput::KNumInput ( QWidget *  parent,
KNumInput *  below 
)
Parameters
belowA pointer to another KNumInput.
parentparent widget
Deprecated:
  • use the version without the below parameter instead

Definition at line 99 of file knuminput.cpp.

KNumInput::~KNumInput ( )

Destructor.

Definition at line 107 of file knuminput.cpp.

Member Function Documentation

virtual void KNumInput::doLayout ( )
protectedpure virtual

You need to overwrite this method and implement your layout calculations there.

See KIntNumInput::doLayout and KDoubleNumInput::doLayout implementation for details.

Implemented in KDoubleNumInput, and KIntNumInput.

QString KNumInput::label ( ) const
Returns
the text of the label.
void KNumInput::layout ( bool  deep)
protected

Call this function whenever you change something in the geometry of your KNumInput child.

Definition at line 158 of file knuminput.cpp.

void KNumInput::setLabel ( const QString &  label,
Qt::Alignment  a = Qt::AlignLeft | Qt::AlignTop 
)
virtual

Sets the text and alignment of the main description label.

Parameters
labelThe text of the label. Use QString() to remove an existing one.
aThe alignment of the label (Qt::Alignment). Default is Qt:AlignLeft | Qt:AlignTop.

The vertical alignment flags have special meaning with this widget:

@li @p Qt:AlignTop     The label is placed above the edit/slider
@li @p Qt:AlignVCenter The label is placed left beside the edit
@li @p Qt:AlignBottom  The label is placed below the edit/slider

Reimplemented in KDoubleNumInput, and KIntNumInput.

Definition at line 130 of file knuminput.cpp.

void KNumInput::setSteps ( int  minor,
int  major 
)

Sets the spacing of tickmarks for the slider.

Parameters
minorMinor tickmark separation.
majorMajor tickmark separation.

Definition at line 223 of file knuminput.cpp.

bool KNumInput::showSlider ( ) const
Returns
if the num input has a slider.

Definition at line 125 of file knuminput.cpp.

QSize KNumInput::sizeHint ( void  ) const
virtual

Returns a size which fits the contents of the control.

Returns
the preferred size necessary to show the control

Definition at line 218 of file knuminput.cpp.

QSlider * KNumInput::slider ( ) const
protected
Returns
the slider widget.

Definition at line 120 of file knuminput.cpp.

Property Documentation

QString KNumInput::label
readwrite

Definition at line 46 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