Lens.cpp   Lens.cpp 
skipping to change at line 42 skipping to change at line 42
{ {
} }
Lens::~Lens() Lens::~Lens()
{ {
} }
static QMap<int, QString> mapping; static QMap<int, QString> mapping;
QMap<int, QString> Lens::propertyMap() QMap<int, QString> Lens::propertyMap()
{ {
if(mapping.isEmpty()) { if(mapping.isEmpty()) {
mapping = QMap<int, QString>(); mapping = QMap<int, QString>();
mapping[0] = "name"; mapping[0] = "name";
mapping[1] = "multipler"; mapping[1] = "multipler";
} }
return mapping; return mapping;
} }
const QString Lens::name() const const QString Lens::getName() const
{ {
return m_name; return m_name;
} }
void Lens::setName(const QString& theValue) void Lens::setName(const QString& theValue)
{ {
m_name = theValue; m_name = theValue;
} }
double Lens::multipler() const double Lens::getMultipler() const
{ {
return m_multipler; return m_multipler;
} }
void Lens::setMultipler(double theValue) void Lens::setMultipler(double theValue)
{ {
m_multipler = theValue; m_multipler = theValue;
} }
void Lens::writeToSettings(QSettings * settings, const int index) void Lens::writeToSettings(QSettings * settings, const int index)
{ {
QString prefix = "lens/" + QVariant(index).toString() + "/"; QString prefix = "lens/" + QVariant(index).toString() + "/";
settings->setValue(prefix + "name", this->name()); settings->setValue(prefix + "name", this->getName());
settings->setValue(prefix + "multipler", this->multipler()); settings->setValue(prefix + "multipler", this->getMultipler());
} }
/* ********************************************************************* */ /* ********************************************************************* */
#if 0 #if 0
#pragma mark - #pragma mark -
#pragma mark Static Methods #pragma mark Static Methods
#endif #endif
/* ********************************************************************* */ /* ********************************************************************* */
Lens* Lens:: lensFromSettings(QSettings* theSettings, int lensIndex) Lens* Lens:: lensFromSettings(QSettings* theSettings, int lensIndex)
{ {
Lens* lens = new Lens(); Lens* lens = new Lens();
QString prefix = "lens/" + QVariant(lensIndex).toString() + "/"; QString prefix = "lens/" + QVariant(lensIndex).toString() + "/";
lens->setName(theSettings->value(prefix + "name", "").toString()); lens->setName(theSettings->value(prefix + "name", "").toString());
lens->setMultipler(theSettings->value(prefix + "multipler", "1").toDoub lens->setMultipler(theSettings->value(prefix + "multipler", "1").toD
le()); ouble());
return lens; return lens;
} }
Lens* Lens::lensModel() Lens* Lens::lensModel()
{ {
Lens* model = new Lens(); Lens* model = new Lens();
model->setName("My Lens"); model->setName("My Lens");
model->setMultipler(2.0f); model->setMultipler(2.0f);
return model; return model;
} }
 End of changes. 12 change blocks. 
24 lines changed or deleted 24 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/