Class to define a numeric display format. More...
#include <MeshViz/graph/PbNumericDisplayFormat.h>
Public Types | |
enum | FormatType { AUTO_FORMAT , FLOAT_FORMAT , INTEGER_FORMAT } |
Public Member Functions | |
PbNumericDisplayFormat (FormatType type=AUTO_FORMAT, int tenPower=0, int numDecimal=0) | |
Constructor. | |
PbNumericDisplayFormat (const PbNumericDisplayFormat &format) | |
Copy constructor. | |
void | setFormat (FormatType type=AUTO_FORMAT, int tenPower=0, int numDecimal=0) |
Sets the numerical display format. | |
void | getFormat (FormatType &type, int &tenPower, int &numDecimal) const |
Gets the numerical display format. | |
PbNumericDisplayFormat & | operator= (const PbNumericDisplayFormat &format) |
Assignment operator. | |
Public Member Functions inherited from PbBase | |
void | enableConnection (SbBool flag) |
Activates/deactivates the mechanism of connection. | |
SbBool | isConnectionEnabled () const |
Returns TRUE if the connection mechanism is active, otherwise FALSE. | |
void | touch () |
Simulates the changing of an instance of this object, so all connected objects are informed of this change. | |
PbBase & | operator= (const PbBase &base) |
Assignment operator. | |
Class to define a numeric display format.
This class is used to define a numerical display format for numerical values to be displayed. There are three formats available: automatic format, floating point format, integer format. The default format is the automatic format. The automatic format selects the best format adapted to the domain of values to be displayed. The floating point format and the integer format divide the numerical value to be displayed by the power of ten, and then display it in the selected format.
Definition at line 43 of file PbNumericDisplayFormat.h.
Enumerator | |
---|---|
AUTO_FORMAT | Automatic numerical display format. |
FLOAT_FORMAT | Floating-point numerical display format. |
INTEGER_FORMAT | Integer numerical display format. |
Definition at line 48 of file PbNumericDisplayFormat.h.
PbNumericDisplayFormat::PbNumericDisplayFormat | ( | FormatType | type = AUTO_FORMAT , |
int | tenPower = 0 , |
||
int | numDecimal = 0 |
||
) |
Constructor.
PbNumericDisplayFormat::PbNumericDisplayFormat | ( | const PbNumericDisplayFormat & | format | ) |
Copy constructor.
|
inline |
Gets the numerical display format.
Definition at line 91 of file PbNumericDisplayFormat.h.
PbNumericDisplayFormat & PbNumericDisplayFormat::operator= | ( | const PbNumericDisplayFormat & | format | ) |
Assignment operator.
void PbNumericDisplayFormat::setFormat | ( | FormatType | type = AUTO_FORMAT , |
int | tenPower = 0 , |
||
int | numDecimal = 0 |
||
) |
Sets the numerical display format.
If the format is AUTO_FORMAT, numDecimal and tenPower are useless. If the format is FLOAT_FORMAT, numDecimal indicates the number of decimals placed after the decimal point and tenPower is the power of ten divisor. If the format is INTEGER_FORMAT, numDecimal is useless.