Changeset 399 for trunk/yao


Ignore:
Timestamp:
08/04/10 15:36:04 (14 years ago)
Author:
yerima
Message:

Opning an existing project. SpaceWindow? is ready.

Location:
trunk/yao/src/interface/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/yao/src/interface/src/MainWindow.cpp

    r397 r399  
    556556                test = builder.readAll(); 
    557557                istringstream iss(test.toStdString()); 
    558                 FilePath aString, name, aType, boot, offset, step, size; 
     558                FilePath aString, theShape, name, parent, aType, boot, offset, step, size; 
     559                vector <int> theShapeVector; 
    559560 
    560561                while ( getline(iss, aString, '\n' ) ) 
     
    601602                                        Trajectory localTrajectory(name, m_trajectoryWindow->toInt(boot), m_trajectoryWindow->toDouble(size), m_trajectoryWindow->toDouble(step), m_trajectoryWindow->toInt(offset), 'M');//Trajectory object. 
    602603                                        theTrajectoryTable.push_back(localTrajectory); //Trajectory vector (contents many objects)    
     604                                        //if (m_trajectoryWindow->isTrajectoryTableEmpty())  
    603605 
    604606                                }               //theConstantTable.push_back(aString.getTitle()); 
    605                                 if (aString.getExtension() == ".sp1") 
     607                                if (aString.getExtension() == ".sp1")//{ 
    606608                                        name = aString.getTitle(); 
    607                                 //if (aString.getExtension() == ".sp2") 
     609                                        //cout << name << endl; 
     610                                //} 
     611                                if (aString.getExtension() == ".sp2"){ 
     612                                        aType = aString.getTitle();      
     613                                        istringstream aShape1(aType);  
     614                                        while ( getline(aShape1, theShape, ' ' )){ 
     615                                                theShapeVector.push_back(m_spaceWindow->toInt(theShape)); 
     616                                                //cout << aType << endl; 
     617                                        } 
     618                                } 
     619                                if (aString.getExtension() == ".sp3") { 
     620                                        parent = aString.getTitle();  
     621                                        //cout << parent << endl; 
     622                                        Space espace(name, theTrajectoryTable.find(parent), theShapeVector); 
     623                                        theSpaceTable.push_back(espace); 
     624                                        theShapeVector.clear(); 
     625                                         
     626                                }        
     627                        } 
    608628                         
    609                         } 
     629                                //m_spaceButton->setEnabled(true); 
    610630                 
    611631        } 
     
    615635                        actionSaveAsProject->setEnabled(true); 
    616636                } 
     637 
     638        //connect(m_trajectoryWindow, SIGNAL(trajRowIsAdded(bool)), m_spaceButton, SLOT(setEnabled(bool))); 
     639        //connect(m_trajectoryWindow, SIGNAL(trajRowIsAdded(bool)), m_operaButton, SLOT(setEnabled(bool))); 
     640 
    617641         
    618642} 
  • trunk/yao/src/interface/src/SpaceWindow.cpp

    r382 r399  
    198198  
    199199                                         if (!(dim.empty() || traj.empty())) { 
    200                                                                                                 if (!d1.empty()) { 
     200                                                if (!d1.empty()) { 
    201201                                                        Space espace(name, localTrajectoryTable->find(traj), theShape); 
    202202                                                        localSpaceTable->push_back(espace);      
Note: See TracChangeset for help on using the changeset viewer.