Lens.cpp   Lens.cpp 
skipping to change at line 25 skipping to change at line 25
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA. * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
*/ */
#include "Lens.hpp" #include "Lens.hpp"
#include <QSettings> #include <QSettings>
Lens::Lens() Lens::Lens()
: m_multipler(0.)
{ {
} }
Lens::Lens(const QObject& other) Lens::Lens(const QObject& other)
: m_name(other.property("name").toString())
, m_multipler(other.property("multipler").toDouble())
{ {
this->m_multipler = other.property("multipler").toDouble();
this->m_name = other.property("name").toString();
} }
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()) {
skipping to change at line 69 skipping to change at line 70
double Lens::multipler() const double Lens::multipler() 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)
{
QString prefix = "lens/" + QVariant(index).toString() + "/";
settings->setValue(prefix + "name", this->name());
settings->setValue(prefix + "multipler", this->multipler());
}
/* ********************************************************************* */ /* ********************************************************************* */
#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();
 End of changes. 4 change blocks. 
2 lines changed or deleted 10 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/