]> Creatis software - bbtkGEditor.git/blobdiff - lib/EditorGraphicBBS/bbsKernelEditorGraphic/GBoxModel.cxx
#3084 bbGEditor Bug New Normal - Color refresh for inputs and outputs
[bbtkGEditor.git] / lib / EditorGraphicBBS / bbsKernelEditorGraphic / GBoxModel.cxx
index d924c66910983472723c2f8657bf6886a25a7c2c..b8c4e4eae69d8dcf7d128cc1225a2c1a23c3bd3d 100644 (file)
@@ -64,19 +64,16 @@ Version:   $Revision$
 namespace bbtk
 {
        //=========================================================================
-
        GBoxModel::GBoxModel()
        {               
        }
 
        //=========================================================================
-
        GBoxModel::~GBoxModel()
        {
        }
 
        //=========================================================================
-
        void GBoxModel::setInicPoint(double& x, double& y, double& z)
        {
                GObjectModel::setInicPoint(x,y,z);
@@ -85,56 +82,47 @@ namespace bbtk
        }
 
        //=========================================================================
-
        void GBoxModel::addInputPort(GPortModel *inputport)
        {
                _inputs.push_back(inputport);
        }
 
        //=========================================================================
-
        void GBoxModel::addOutputPort(GPortModel *outputport)
        {
                _outputs.push_back(outputport);
        }
 
        //=========================================================================
-
        int GBoxModel::getNumInputPorts()
        {
                return _inputs.size();
        }
 
        //=========================================================================
-
        int GBoxModel::getNumOutputPorts()
        {
                return _outputs.size();
        }
 
        //=========================================================================
-
        void GBoxModel::move(double xx,double yy,double zz)
        {
                setInicPoint(xx,yy,zz);
-
                //Refresh inputs position
                int i;
                for(i=0;i<(int)_inputs.size();i++)
                {
                        _inputs[i]->updatePortPosition();
                }
-               
                //Refresh outputs position
                for(i=0;i<(int)_outputs.size();i++)
                {
                        _outputs[i]->updatePortPosition();
                }
-
        }
        
        //=========================================================================
-       
        std::string GBoxModel::getStatusText()
        {
                std::string temp = "";
@@ -143,21 +131,18 @@ namespace bbtk
        }
 
        //=========================================================================
-
        std::vector<GPortModel*> GBoxModel::getInputPorts()
        {
                return _inputs;
        }
 
        //=========================================================================
-
        std::vector<GPortModel*> GBoxModel::getOutputPorts()
        {
                return _outputs;
        }
 
        //=========================================================================     
-
        void GBoxModel::save(std::string &content)
        {
                content+="\n";
@@ -165,7 +150,6 @@ namespace bbtk
        
 
        //=========================================================================
-
        GPortModel* GBoxModel::getInputPort(std::string name)
        {
                for(int i = 0; i<(int)_inputs.size();i++)
@@ -179,7 +163,6 @@ namespace bbtk
        }
 
        //=========================================================================
-       
        GPortModel* GBoxModel::getOutputPort(std::string name)
        {
                for(int i = 0; i<(int)_outputs.size();i++)
@@ -193,12 +176,10 @@ namespace bbtk
        }
 
        //=========================================================================
-
        GPortModel* GBoxModel::getInputPort(int pos)
        {
                return _inputs[pos];
        }
-
        //=========================================================================
        
        GPortModel* GBoxModel::getOutputPort(int pos)