lib

#include <KoUnitWidgets.h>

Inheritance diagram for KoUnitDoubleComboBox:
KComboBox KoUnitDoubleBase

Signals

void valueChanged (double)
 
- Signals inherited from KComboBox
void returnPressed ()
 
void returnPressed (const TQString &)
 
void completion (const TQString &)
 
void substringCompletion (const TQString &)
 
void textRotation (TDECompletionBase::KeyBindingType)
 
void completionModeChanged (TDEGlobalSettings::Completion)
 
void aboutToShowContextMenu (TQPopupMenu *p)
 

Public Member Functions

 KoUnitDoubleComboBox (TQWidget *parent=0L, const char *name=0L)
 
 KoUnitDoubleComboBox (TQWidget *parent, double lower, double upper, double value=0.0, KoUnit::Unit unit=KoUnit::U_PT, unsigned int precision=2, const char *name=0)
 
virtual void changeValue (double)
 
void updateValue (double)
 
virtual void setUnit (KoUnit::Unit=KoUnit::U_PT)
 
double value (void) const
 
void insertItem (double, int index=-1)
 
- Public Member Functions inherited from KComboBox
 KComboBox (TQWidget *parent=0, const char *name=0)
 
 KComboBox (bool rw, TQWidget *parent=0, const char *name=0)
 
void setEditURL (const KURL &url)
 
void insertURL (const KURL &url, int index=-1)
 
void insertURL (const TQPixmap &pixmap, const KURL &url, int index=-1)
 
void changeURL (const KURL &url, int index)
 
void changeURL (const TQPixmap &pixmap, const KURL &url, int index)
 
int cursorPosition () const
 
virtual void setAutoCompletion (bool autocomplete)
 
bool autoCompletion () const
 
virtual void setContextMenuEnabled (bool showMenu)
 
bool isContextMenuEnabled () const
 
void setURLDropsEnabled (bool enable)
 
bool isURLDropsEnabled () const
 
bool contains (const TQString &text) const
 
void setTrapReturnKey (bool trap)
 
bool trapReturnKey () const
 
TDECompletionBox * completionBox (bool create=true)
 
virtual void setLineEdit (TQLineEdit *)
 
- Public Member Functions inherited from KoUnitDoubleBase
 KoUnitDoubleBase (KoUnit::Unit unit, unsigned int precision)
 
void setValueInUnit (double value, KoUnit::Unit unit)
 
void setPrecision (unsigned int precision)
 

Protected Member Functions

bool eventFilter (TQObject *obj, TQEvent *ev)
 
- Protected Member Functions inherited from KComboBox
virtual void create (WId=0, bool initializeWindow=true, bool destroyOldWindow=true)
 
- Protected Member Functions inherited from KoUnitDoubleBase
TQString getVisibleText (double value) const
 
double toDouble (const TQString &str, bool *ok) const
 

Protected Attributes

double m_value
 
double m_lower
 
double m_upper
 
double m_lowerInPoints
 
double m_upperInPoints
 
- Protected Attributes inherited from KoUnitDoubleBase
KoUnitDoubleValidator * m_validator
 
KoUnit::Unit m_unit
 
unsigned int m_precision
 

Additional Inherited Members

- Public Slots inherited from KComboBox
void rotateText (TDECompletionBase::KeyBindingType type)
 
virtual void setCompletedText (const TQString &)
 
void setCompletedItems (const TQStringList &items)
 
void setCurrentItem (const TQString &item, bool insert=false, int index=-1)
 
void setCurrentItem (int index)
 
- Protected Slots inherited from KComboBox
virtual void itemSelected (TQListBoxItem *)
 
virtual void makeCompletion (const TQString &)
 

Detailed Description

Combo box for double precision numbers with unit display.

Since
1.4 (change of behavior)

Definition at line 187 of file KoUnitWidgets.h.

Constructor & Destructor Documentation

◆ KoUnitDoubleComboBox() [1/2]

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

Definition at line 287 of file KoUnitWidgets.cpp.

◆ KoUnitDoubleComboBox() [2/2]

KoUnitDoubleComboBox::KoUnitDoubleComboBox ( TQWidget *  parent,
double  lower,
double  upper,
double  value = 0.0,
KoUnit::Unit  unit = KoUnit::U_PT,
unsigned int  precision = 2,
const char *  name = 0 
)

Definition at line 298 of file KoUnitWidgets.cpp.

Member Function Documentation

◆ changeValue()

void KoUnitDoubleComboBox::changeValue ( double  value)
virtual

Implements KoUnitDoubleBase.

Definition at line 312 of file KoUnitWidgets.cpp.

◆ eventFilter()

bool KoUnitDoubleComboBox::eventFilter ( TQObject *  obj,
TQEvent *  ev 
)
protectedvirtual

Reimplemented from KComboBox.

Definition at line 355 of file KoUnitWidgets.cpp.

◆ insertItem()

void KoUnitDoubleComboBox::insertItem ( double  value,
int  index = -1 
)

Definition at line 328 of file KoUnitWidgets.cpp.

◆ setUnit()

void KoUnitDoubleComboBox::setUnit ( KoUnit::Unit  unit = KoUnit::U_PT)
virtual

Implements KoUnitDoubleBase.

Definition at line 345 of file KoUnitWidgets.cpp.

◆ updateValue()

void KoUnitDoubleComboBox::updateValue ( double  value)

Definition at line 321 of file KoUnitWidgets.cpp.

◆ value()

double KoUnitDoubleComboBox::value ( void  ) const
Returns
the current value, converted in points

Definition at line 370 of file KoUnitWidgets.cpp.

Member Data Documentation

◆ m_lower

double KoUnitDoubleComboBox::m_lower
protected

Definition at line 214 of file KoUnitWidgets.h.

◆ m_lowerInPoints

double KoUnitDoubleComboBox::m_lowerInPoints
protected

lowest value in points

Definition at line 216 of file KoUnitWidgets.h.

◆ m_upper

double KoUnitDoubleComboBox::m_upper
protected

Definition at line 215 of file KoUnitWidgets.h.

◆ m_upperInPoints

double KoUnitDoubleComboBox::m_upperInPoints
protected

highest value in points

Definition at line 217 of file KoUnitWidgets.h.

◆ m_value

double KoUnitDoubleComboBox::m_value
protected

Definition at line 213 of file KoUnitWidgets.h.


The documentation for this class was generated from the following files: