• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdeui
 

tdeui

Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
KNumInput Class Referenceabstract

#include <knuminput.h>

Inheritance diagram for KNumInput:
KDoubleNumInput KIntNumInput

Public Member Functions

 KNumInput (TQWidget *parent=0, const char *name=0)
 
 KNumInput (KNumInput *below, TQWidget *parent=0, const char *name=0)
 
virtual void setLabel (const TQString &label, int a=AlignLeft|AlignTop)
 
TQString label () const
 
bool showSlider () const
 
void setSteps (int minor, int major)
 
TQSizePolicy sizePolicy () const
 
virtual TQSize sizeHint () const
 

Protected Member Functions

void layout (bool deep)
 
virtual void doLayout ()=0
 
virtual void virtual_hook (int id, void *data)
 

Protected Attributes

KNumInput * m_prev
 
KNumInput * m_next
 
int m_colw1
 
int m_colw2
 
TQLabel * m_label
 
TQSlider * m_slider
 
TQSize m_sizeSlider
 
TQSize m_sizeLabel
 
int m_alignment
 

Detailed Description

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

Definition at line 49 of file knuminput.h.

Constructor & Destructor Documentation

◆ KNumInput() [1/2]

KNumInput::KNumInput ( TQWidget *  parent = 0,
const char *  name = 0 
)

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.
nameThe name is sent to the TQObject constructor.

Definition at line 61 of file knuminput.cpp.

◆ KNumInput() [2/2]

KNumInput::KNumInput ( KNumInput *  below,
TQWidget *  parent = 0,
const char *  name = 0 
)
Parameters
belowA pointer to another KNumInput.
parentparent widget
namename of the widget

Definition at line 67 of file knuminput.cpp.

◆ ~KNumInput()

KNumInput::~KNumInput ( )

Definition at line 91 of file knuminput.cpp.

Member Function Documentation

◆ doLayout()

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 KIntNumInput, and KDoubleNumInput.

◆ label()

TQString KNumInput::label ( ) const
Returns
the text of the label.

Definition at line 121 of file knuminput.cpp.

◆ layout()

void KNumInput::layout ( bool  deep)
protected

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

Definition at line 127 of file knuminput.cpp.

◆ setLabel()

void KNumInput::setLabel ( const TQString &  label,
int  a = AlignLeft | AlignTop 
)
virtual

Sets the text and alignment of the main description label.

Parameters
labelThe text of the label. Use TQString::null to remove an existing one.
aone of AlignLeft, AlignHCenter, YAlignRight and AlignTop, AlignVCenter, AlignBottom. default is AlignLeft | AlignTop.

The vertical alignment flags have special meaning with this widget:

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

Reimplemented in KIntNumInput, and KDoubleNumInput.

Definition at line 100 of file knuminput.cpp.

◆ setSteps()

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 194 of file knuminput.cpp.

◆ showSlider()

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

Definition at line 99 of file knuminput.h.

◆ sizeHint()

TQSize 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 189 of file knuminput.cpp.

◆ sizePolicy()

TQSizePolicy KNumInput::sizePolicy ( ) const

Specifies that this widget may stretch horizontally, but is fixed vertically (like TQSpinBox itself).

Definition at line 184 of file knuminput.cpp.

◆ virtual_hook()

void KNumInput::virtual_hook ( int  id,
void *  data 
)
protectedvirtual

Definition at line 1193 of file knuminput.cpp.

Member Data Documentation

◆ m_alignment

int KNumInput::m_alignment
protected

Definition at line 147 of file knuminput.h.

◆ m_colw1

int KNumInput::m_colw1
protected

Definition at line 141 of file knuminput.h.

◆ m_colw2

int KNumInput::m_colw2
protected

Definition at line 141 of file knuminput.h.

◆ m_label

TQLabel* KNumInput::m_label
protected

Definition at line 143 of file knuminput.h.

◆ m_next

KNumInput * KNumInput::m_next
protected

Definition at line 140 of file knuminput.h.

◆ m_prev

KNumInput* KNumInput::m_prev
protected

Definition at line 140 of file knuminput.h.

◆ m_sizeLabel

TQSize KNumInput::m_sizeLabel
protected

Definition at line 145 of file knuminput.h.

◆ m_sizeSlider

TQSize KNumInput::m_sizeSlider
protected

Definition at line 145 of file knuminput.h.

◆ m_slider

TQSlider* KNumInput::m_slider
protected

Definition at line 144 of file knuminput.h.


The documentation for this class was generated from the following files:
  • knuminput.h
  • knuminput.cpp

tdeui

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

tdeui

Skip menu "tdeui"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeui by doxygen 1.9.4
This website is maintained by Timothy Pearson.