All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
te::layout::Variant Class Reference

#include <Variant.h>

Public Member Functions

void clear ()
 
std::string convertToString ()
 
LayoutPropertyDataType getType ()
 
bool isNull ()
 
bool operator!= (const Variant &other)
 
bool operator== (const Variant &other)
 
template<typename ValueType >
void setValue (typename ValueType value, LayoutPropertyDataType type)
 
bool toBool ()
 
te::color::RGBAColor toColor ()
 
double toDouble ()
 
float toFloat ()
 
int toInt ()
 
long toLong ()
 
std::string toString ()
 
 Variant ()
 
 Variant (LayoutPropertyDataType type, const void *valueCopy)
 
virtual ~Variant ()
 

Protected Member Functions

bool checkNumberAsString (const void *valueCopy)
 
void convertValue (const void *valueCopy)
 
double string2Double (std::string str)
 
float string2Float (std::string str)
 
int string2Int (std::string str)
 
long string2Long (std::string str)
 
template<typename ValueType >
void variantSetValue (Variant &v, const typename ValueType &value, LayoutPropertyDataType type)
 

Protected Attributes

bool m_bValue
 
te::color::RGBAColor m_colorValue
 
double m_dValue
 
float m_fValue
 
int m_iValue
 
long m_lValue
 
bool m_null
 
std::string m_sValue
 
LayoutPropertyDataType m_type
 

Detailed Description

Definition at line 46 of file Variant.h.

Constructor & Destructor Documentation

te::layout::Variant::Variant ( )

Definition at line 37 of file Variant.cpp.

te::layout::Variant::Variant ( LayoutPropertyDataType  type,
const void *  valueCopy 
)

Definition at line 50 of file Variant.cpp.

References convertValue().

te::layout::Variant::~Variant ( )
virtual

Definition at line 66 of file Variant.cpp.

Member Function Documentation

bool te::layout::Variant::checkNumberAsString ( const void *  valueCopy)
protected

Definition at line 339 of file Variant.cpp.

void te::layout::Variant::clear ( )

Definition at line 277 of file Variant.cpp.

References te::layout::DataTypeNone.

Referenced by te::layout::PropertyBrowser::getProperty().

std::string te::layout::Variant::convertToString ( )
te::layout::LayoutPropertyDataType te::layout::Variant::getType ( )

Definition at line 71 of file Variant.cpp.

Referenced by operator!=(), operator==(), and te::layout::Property::setValue().

bool te::layout::Variant::isNull ( )

Definition at line 272 of file Variant.cpp.

bool te::layout::Variant::operator!= ( const Variant other)
inline

Definition at line 140 of file Variant.h.

References getType(), toBool(), toDouble(), and toString().

bool te::layout::Variant::operator== ( const Variant other)
inline

Definition at line 121 of file Variant.h.

References getType(), toDouble(), and toString().

template<typename ValueType >
void te::layout::Variant::setValue ( typename ValueType  value,
LayoutPropertyDataType  type 
)
inline

Definition at line 107 of file Variant.h.

Referenced by te::layout::PropertiesOutside::addDynamicOptions(), te::layout::ScaleModel::getProperties(), te::layout::LegendModel::getProperties(), te::layout::PropertyBrowser::getProperty(), te::layout::GridSettingsOutside::on_chkBottomGeoText_clicked(), te::layout::GridSettingsOutside::on_chkBottomPlanarText_clicked(), te::layout::GridSettingsOutside::on_chkBottomRotateGeoText_clicked(), te::layout::GridSettingsOutside::on_chkBottomRotatePlanarText_clicked(), te::layout::GridSettingsOutside::on_chkDegreesGeoText_clicked(), te::layout::GridSettingsOutside::on_chkLeftGeoText_clicked(), te::layout::GridSettingsOutside::on_chkLeftPlanarText_clicked(), te::layout::GridSettingsOutside::on_chkLeftRotateGeoText_clicked(), te::layout::GridSettingsOutside::on_chkLeftRotatePlanarText_clicked(), te::layout::GridSettingsOutside::on_chkLowerLeftCornerGeoText_clicked(), te::layout::GridSettingsOutside::on_chkLowerRightCornerGeoText_clicked(), te::layout::GridSettingsOutside::on_chkMinutesGeoText_clicked(), te::layout::GridSettingsOutside::on_chkRightGeoText_clicked(), te::layout::GridSettingsOutside::on_chkRightPlanarText_clicked(), te::layout::GridSettingsOutside::on_chkRightRotateGeoText_clicked(), te::layout::GridSettingsOutside::on_chkRightRotatePlanarText_clicked(), te::layout::GridSettingsOutside::on_chkSecondsGeoText_clicked(), te::layout::GridSettingsOutside::on_chkShowGeodesic_clicked(), te::layout::GridSettingsOutside::on_chkShowPlanar_clicked(), te::layout::GridSettingsOutside::on_chkSuperscriptGeoText_clicked(), te::layout::GridSettingsOutside::on_chkSuperscriptPlanarText_clicked(), te::layout::GridSettingsOutside::on_chkTopGeoText_clicked(), te::layout::GridSettingsOutside::on_chkTopPlanarText_clicked(), te::layout::GridSettingsOutside::on_chkTopRotateGeoText_clicked(), te::layout::GridSettingsOutside::on_chkTopRotatePlanarText_clicked(), te::layout::GridSettingsOutside::on_chkUpperLeftCornerGeoText_clicked(), te::layout::GridSettingsOutside::on_chkUpperRightCornerGeoText_clicked(), te::layout::GridSettingsOutside::on_chkVisibleCornerTextsGeoText_clicked(), te::layout::GridSettingsOutside::on_chkVisibleTextsGeoText_clicked(), te::layout::GridSettingsOutside::on_chkVisibleTextsPlanarText_clicked(), te::layout::GridSettingsOutside::on_ckbClip_clicked(), te::layout::GridSettingsOutside::on_ckDefineScale_clicked(), te::layout::GridSettingsOutside::on_cmbCornerGeoFont_currentIndexChanged(), te::layout::GridSettingsOutside::on_cmbCornerGeoTextSize_currentIndexChanged(), te::layout::GridSettingsOutside::on_cmbGeoFont_currentIndexChanged(), te::layout::GridSettingsOutside::on_cmbGeoTextSize_currentIndexChanged(), te::layout::GridSettingsOutside::on_cmbGridStyle_currentIndexChanged(), te::layout::GridSettingsOutside::on_cmbLineType_currentIndexChanged(), te::layout::GridSettingsOutside::on_cmbLineWidth_currentIndexChanged(), te::layout::GridSettingsOutside::on_cmbPlanarFont_currentIndexChanged(), te::layout::GridSettingsOutside::on_cmbPlanarLineType_currentIndexChanged(), te::layout::GridSettingsOutside::on_cmbPlanarLineWidth_currentIndexChanged(), te::layout::GridSettingsOutside::on_cmbPlanarStyle_currentIndexChanged(), te::layout::GridSettingsOutside::on_cmbPlanarTextSize_currentIndexChanged(), te::layout::GridSettingsOutside::on_cmbScale_currentIndexChanged(), te::layout::GridSettingsOutside::on_cmbUnit_currentIndexChanged(), te::layout::GridSettingsOutside::on_lneCornerHrzGeoDisplacement_editingFinished(), te::layout::GridSettingsOutside::on_lneCornerVrtGeoDisplacement_editingFinished(), te::layout::GridSettingsOutside::on_lneHorizontalGap_editingFinished(), te::layout::GridSettingsOutside::on_lneHrzGeoDisplacement_editingFinished(), te::layout::GridSettingsOutside::on_lneHrzPlanarDisplacement_editingFinished(), te::layout::GridSettingsOutside::on_lneHrzPlanarGap_editingFinished(), te::layout::GridSettingsOutside::on_lneVerticalGap_editingFinished(), te::layout::GridSettingsOutside::on_lneVrtGeoDisplacement_editingFinished(), te::layout::GridSettingsOutside::on_lneVrtPlanarDisplacement_editingFinished(), te::layout::GridSettingsOutside::on_lneVrtPlanarGap_editingFinished(), te::layout::GridSettingsOutside::on_lneX1_editingFinished(), te::layout::GridSettingsOutside::on_lneX2_editingFinished(), te::layout::GridSettingsOutside::on_lneX3_editingFinished(), te::layout::GridSettingsOutside::on_lneX4_editingFinished(), te::layout::GridSettingsOutside::on_lneY1_editingFinished(), te::layout::GridSettingsOutside::on_lneY2_editingFinished(), te::layout::GridSettingsOutside::on_lneY3_editingFinished(), te::layout::GridSettingsOutside::on_lneY4_editingFinished(), te::layout::GridSettingsOutside::on_pbCornerTextGeoColor_clicked(), te::layout::GridSettingsOutside::on_pbGridTextGeoColor_clicked(), te::layout::GridSettingsOutside::on_pbGridTextPlanarColor_clicked(), te::layout::GridSettingsOutside::on_pbLineColor_clicked(), te::layout::GridSettingsOutside::on_pbPlanarLineColor_clicked(), te::layout::GridSettingsOutside::on_xGridInitialPoint_geo_textField_editingFinished(), te::layout::GridSettingsOutside::on_xGridInitialPoint_planar_textField_editingFinished(), te::layout::GridSettingsOutside::on_yGridInitialPoint_geo_textField_editingFinished(), te::layout::GridSettingsOutside::on_yGridInitialPoint_planar_textField_editingFinished(), and te::layout::Property::setValue().

double te::layout::Variant::string2Double ( std::string  str)
protected

Definition at line 379 of file Variant.cpp.

float te::layout::Variant::string2Float ( std::string  str)
protected

Definition at line 423 of file Variant.cpp.

int te::layout::Variant::string2Int ( std::string  str)
protected

Definition at line 401 of file Variant.cpp.

long te::layout::Variant::string2Long ( std::string  str)
protected

Definition at line 445 of file Variant.cpp.

float te::layout::Variant::toFloat ( )

Definition at line 257 of file Variant.cpp.

long te::layout::Variant::toLong ( )

Definition at line 252 of file Variant.cpp.

template<typename ValueType >
void te::layout::Variant::variantSetValue ( Variant v,
const typename ValueType &  value,
LayoutPropertyDataType  type 
)
inlineprotected

Definition at line 115 of file Variant.h.

Member Data Documentation

bool te::layout::Variant::m_bValue
protected

Definition at line 100 of file Variant.h.

te::color::RGBAColor te::layout::Variant::m_colorValue
protected

Definition at line 101 of file Variant.h.

double te::layout::Variant::m_dValue
protected

Definition at line 96 of file Variant.h.

float te::layout::Variant::m_fValue
protected

Definition at line 99 of file Variant.h.

int te::layout::Variant::m_iValue
protected

Definition at line 97 of file Variant.h.

long te::layout::Variant::m_lValue
protected

Definition at line 98 of file Variant.h.

bool te::layout::Variant::m_null
protected

Definition at line 103 of file Variant.h.

std::string te::layout::Variant::m_sValue
protected

Definition at line 95 of file Variant.h.

LayoutPropertyDataType te::layout::Variant::m_type
protected

Definition at line 102 of file Variant.h.


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