Changeset View
Changeset View
Standalone View
Standalone View
libscience/chemicaldataobject.cpp
Show First 20 Lines • Show All 165 Lines • ▼ Show 20 Line(s) | |||||
166 | 166 | | |||
167 | void ChemicalDataObject::setType(BlueObelisk type) | 167 | void ChemicalDataObject::setType(BlueObelisk type) | ||
168 | { | 168 | { | ||
169 | d->m_type = type; | 169 | d->m_type = type; | ||
170 | } | 170 | } | ||
171 | 171 | | |||
172 | void ChemicalDataObject::setType(int type) | 172 | void ChemicalDataObject::setType(int type) | ||
173 | { | 173 | { | ||
174 | d->m_type = (ChemicalDataObject::BlueObelisk) type; | 174 | d->m_type = static_cast<ChemicalDataObject::BlueObelisk>(type); | ||
175 | } | 175 | } | ||
176 | 176 | | |||
177 | QString ChemicalDataObject::unitAsString() const | 177 | QString ChemicalDataObject::unitAsString() const | ||
178 | { | 178 | { | ||
179 | return KUnitConversion::Converter().unit(KUnitConversion::UnitId(d->m_unit)).symbol(); | 179 | return KUnitConversion::Converter().unit(KUnitConversion::UnitId(d->m_unit)).symbol(); | ||
180 | } | 180 | } |