+ //=========================================================================
+
+ int GPortModel::getPosInBox()
+ {
+ return _posInBox;
+ }
+
+ //=========================================================================
+
+ std::string GPortModel::getStatusText()
+ {
+ std::string temp = "";
+
+ temp+=_bbtkName;
+ if(isValueSet())
+ {
+ temp+="(";
+ temp+=_value;
+ temp+=")";
+ }
+ temp+=" ";
+ temp+=_bbtkType;
+
+ return temp;
+ }
+
+ //=========================================================================
+
+ GBoxModel* GPortModel::getParentBox()
+ {
+ return _parentBox;
+ }
+
+ //=========================================================================
+
+ bool GPortModel::isConnected()
+ {
+ return _isConnected;
+ }
+
+ //=========================================================================
+
+ void GPortModel::setConnected(bool value)
+ {
+ _isConnected=value;
+ notifyObservers(_objectId);
+ }
+
+ //=========================================================================
+
+ void GPortModel::setValue(std::string value)
+ {
+ _value = value;
+ if(_value=="")
+ {
+ _isValueSet=false;
+ }
+ else
+ {
+ _isValueSet=true;
+ }
+ notifyObservers(_objectId);
+ }
+
+ //=========================================================================
+
+ std::string GPortModel::getValue()
+ {
+ return _value;
+ }
+
+ //=========================================================================
+
+ bool GPortModel::isValueSet()
+ {
+ return _isValueSet;
+ }
+
+ //=========================================================================
+
+ void GPortModel::save(std::string &content)
+ {
+ content+="PORT\n";
+
+ // Port value info
+ content+=_bbtkName;
+ content+=":";
+ content+=_value;
+ content+="\n";
+ }
+
+ //=========================================================================
+