Commit 9975d2c5 authored by Wouter's avatar Wouter

Add QVariant conversion to wrapped types

parent b4aea796
......@@ -43,13 +43,27 @@ class AbstractWrapper {
* Check if the current value is valid.
*/
virtual bool isValid() {
return true;
return true;
};
/**
* Assign a new value.
*/
void setValue(const T& value) { m_value = value; };
/**
* Convert to a QVariant.
*/
QVariant toVariant() const {
return value();
}
/**
* Convert to a QVariant.
*/
operator QVariant() const {
return value();
}
};
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment