lib

KoUnitDoubleBase Class Reference

#include <KoUnitWidgets.h>

Inheritance diagram for KoUnitDoubleBase:

KoUnitDoubleComboBox KoUnitDoubleLineEdit KoUnitDoubleSpinBox

List of all members.


Detailed Description

Base for the unit widgets.

Since:
1.4 (change of behavior)

Definition at line 60 of file KoUnitWidgets.h.


Public Member Functions

 KoUnitDoubleBase (KoUnit::Unit unit, unsigned int precision)
virtual void changeValue (double)=0
virtual void setUnit (KoUnit::Unit=KoUnit::U_PT)=0
void setValueInUnit (double value, KoUnit::Unit unit)
void setPrecision (unsigned int precision)

Protected Member Functions

QString getVisibleText (double value) const
double toDouble (const QString &str, bool *ok) const

Protected Attributes

KoUnitDoubleValidatorm_validator
KoUnit::Unit m_unit
unsigned int m_precision

Friends

class KoUnitDoubleValidator

Member Function Documentation

QString KoUnitDoubleBase::getVisibleText ( double  value  )  const [protected]

Transform the double in a nice text, using locale symbols.

Parameters:
value the number as double
Returns:
the resulting string

Definition at line 91 of file KoUnitWidgets.cpp.

double KoUnitDoubleBase::toDouble ( const QString &  str,
bool *  ok 
) const [protected]

Transfrom a string into a double, while taking care of locale specific symbols.

Parameters:
str the string to transform into a number
ok true, if the conversion was succesful
Returns:
the value as double

Definition at line 98 of file KoUnitWidgets.cpp.


The documentation for this class was generated from the following files:
KDE Home | KDE Accessibility Home | Description of Access Keys