1 #include "BlockParameterUser.h"
\r
3 BlockParameterUser::BlockParameterUser() : BlockParameter() {
\r
4 userValue = defaultValue;
\r
7 BlockParameterUser::BlockParameterUser(AbstractBlock* _owner, const QString &_name, const QString &_type, const QString &_value) : BlockParameter(_owner, _name, _type, _value) {
\r
8 userValue = defaultValue;
\r
11 QVariant BlockParameterUser::getValue() {
\r
15 return defaultValue;
\r
18 bool BlockParameterUser::isUserParameter() {
\r
22 bool BlockParameterUser::isValueSet() {
\r
23 if (userValue.isNull()) return false;
\r
27 bool BlockParameterUser::isDefaultValue() {
\r
28 if (userValue == defaultValue) return true;
\r
32 BlockParameter* BlockParameterUser::clone() {
\r
33 BlockParameter* block = new BlockParameterUser(owner,name,getTypeString(), defaultValue.toString());
\r
37 QString BlockParameterUser::toVHDL(int context, int flags) {
\r
39 // NB : context and flags are purely ignored
\r
41 if (!userValue.isNull()) {
\r
42 ret = userValue.toString();
\r
44 if (!defaultValue.isNull()) {
\r
45 ret = defaultValue.toString();
\r
53 void BlockParameterUser::setValue(const QString& _value) {
\r
54 userValue = QVariant(_value);
\r