lib Library API Documentation

KoUnitDoubleBase Class Reference

Base for the unit widgets. More...

#include <koUnitWidgets.h>

Inheritance diagram for KoUnitDoubleBase:

Inheritance graph
[legend]
Collaboration diagram for KoUnitDoubleBase:

Collaboration graph
[legend]
List of all members.

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

Detailed Description

Base for the unit widgets.

Since:
1.4 (change of behavior)

Definition at line 60 of file koUnitWidgets.h.


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 90 of file koUnitWidgets.cc.

References KoUnit::unitName().

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 97 of file koUnitWidgets.cc.

References KoUnit::unitName().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for lib Library Version 1.4.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Mon Feb 13 09:41:41 2006 by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2003