#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 |
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().
|
virtual |
Definition at line 66 of file Variant.cpp.
|
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 | ( | ) |
Definition at line 289 of file Variant.cpp.
References te::layout::DataTypeNone.
Referenced by te::layout::JSON::loadFromProperties(), and te::layout::JSON::searchProperty().
|
protected |
Definition at line 76 of file Variant.cpp.
References te::layout::DataTypeBool, te::layout::DataTypeColor, te::layout::DataTypeDouble, te::layout::DataTypeFloat, te::layout::DataTypeGridSettings, te::layout::DataTypeInt, te::layout::DataTypeLong, te::layout::DataTypeString, te::layout::DataTypeStringList, and te::layout::getLayoutPropertyDataType().
Referenced by Variant().
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.
|
inline |
Definition at line 140 of file Variant.h.
References getType(), toBool(), toDouble(), and toString().
|
inline |
Definition at line 121 of file Variant.h.
References getType(), toDouble(), and toString().
|
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().
|
protected |
Definition at line 379 of file Variant.cpp.
|
protected |
Definition at line 423 of file Variant.cpp.
|
protected |
Definition at line 401 of file Variant.cpp.
|
protected |
Definition at line 445 of file Variant.cpp.
bool te::layout::Variant::toBool | ( | ) |
Definition at line 262 of file Variant.cpp.
Referenced by te::layout::PropertyBrowser::addProperty(), te::layout::GridSettingsOutside::initBool(), te::layout::GridSettingsOutside::initCombo(), operator!=(), te::layout::ItemModelObservable::updateProperties(), te::layout::GridGeodesicModel::updateProperty(), and te::layout::GridPlanarModel::updateProperty().
te::color::RGBAColor te::layout::Variant::toColor | ( | ) |
Definition at line 267 of file Variant.cpp.
Referenced by te::layout::GridSettingsOutside::initColor(), te::layout::GridGeodesicModel::updateProperty(), and te::layout::GridPlanarModel::updateProperty().
double te::layout::Variant::toDouble | ( | ) |
Definition at line 242 of file Variant.cpp.
Referenced by te::layout::PropertyBrowser::addProperty(), te::layout::BuildGraphicsItem::findCoordinate(), te::layout::GridSettingsOutside::initCombo(), te::layout::GridSettingsOutside::initDouble(), operator!=(), operator==(), te::layout::ScaleModel::updateProperties(), te::layout::ItemModelObservable::updateProperties(), te::layout::GridGeodesicModel::updateProperty(), and te::layout::GridPlanarModel::updateProperty().
float te::layout::Variant::toFloat | ( | ) |
Definition at line 257 of file Variant.cpp.
int te::layout::Variant::toInt | ( | ) |
Definition at line 247 of file Variant.cpp.
Referenced by te::layout::PropertyBrowser::addProperty(), te::layout::BuildGraphicsItem::findZValue(), te::layout::GridSettingsOutside::initCombo(), te::layout::GridSettingsOutside::initInt(), te::layout::ItemModelObservable::updateProperties(), te::layout::GridGeodesicModel::updateProperty(), and te::layout::GridPlanarModel::updateProperty().
long te::layout::Variant::toLong | ( | ) |
Definition at line 252 of file Variant.cpp.
std::string te::layout::Variant::toString | ( | void | ) |
Definition at line 237 of file Variant.cpp.
Referenced by te::layout::PropertyBrowser::addAttribute(), te::layout::PropertiesItemPropertyBrowser::addProperty(), te::layout::PropertyBrowser::addProperty(), te::layout::GridSettingsOutside::initCombo(), te::layout::GridSettingsOutside::initString(), operator!=(), operator==(), te::layout::ScaleModel::updateProperties(), te::layout::LegendModel::updateProperties(), te::layout::ItemModelObservable::updateProperties(), te::layout::GridGeodesicModel::updateProperty(), and te::layout::GridPlanarModel::updateProperty().
|
inlineprotected |
|
protected |
|
protected |