diff options
Diffstat (limited to 'attic/muse2-oom/muse2/muse/value.cpp')
-rw-r--r-- | attic/muse2-oom/muse2/muse/value.cpp | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/attic/muse2-oom/muse2/muse/value.cpp b/attic/muse2-oom/muse2/muse/value.cpp new file mode 100644 index 00000000..dfdbe1ad --- /dev/null +++ b/attic/muse2-oom/muse2/muse/value.cpp @@ -0,0 +1,62 @@ +//========================================================= +// MusE +// Linux Music Editor +// $Id: value.cpp,v 1.2 2004/02/28 14:58:21 wschweer Exp $ +// +// (C) Copyright 2000 Werner Schweer (ws@seh.de) +//========================================================= + +#include "value.h" +#include "xml.h" + + +IValue::IValue(QObject* parent, const char* name) + : QObject(parent) + { + setObjectName(name); + } +BValue::BValue(QObject* parent, const char* name) + : QObject(parent) + { + setObjectName(name); + } + +//--------------------------------------------------------- +// save +//--------------------------------------------------------- + +void BValue::save(int level, Xml& xml) + { + xml.intTag(level, objectName().toLatin1().constData(), val); + } + +//--------------------------------------------------------- +// save +//--------------------------------------------------------- + +void IValue::save(int level, Xml& xml) + { + xml.intTag(level, objectName().toLatin1().constData(), val); + } + +//--------------------------------------------------------- +// setValue +//--------------------------------------------------------- + +void BValue::setValue(bool v) + { + if (val != v) { + val = v; + emit valueChanged(val); + emit valueChanged(int(val)); + } + } + +void IValue::setValue(int v) + { + if (val != v) { + val = v; + emit valueChanged(val); + } + } + |