- Timestamp:
- 10/25/10 12:48:40 (14 years ago)
- Location:
- trunk/yao/src/interface/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/yao/src/interface/src/ContextWindow.cpp
r460 r466 19 19 //! \brief Implementation of the Context window for visual_YAO. 20 20 /******************************************************************************************************************************************************/ 21 ContextWindow::ContextWindow(Context *aContext, Table <Constant> *aConstantTable, QWidget *parent) : QWidget(parent), localConstantTable(NULL) {21 ContextWindow::ContextWindow(Context *aContext, Table <Constant> *aConstantTable, string *contextData, QWidget *parent) : QWidget(parent), localConstantTable(NULL) { 22 22 23 23 setupUi(this); 24 24 localConstantTable = aConstantTable; 25 25 m_localContext = aContext; 26 m_contextParameters = contextData; 27 26 28 if (isContextListEmpty()) m_delButtonO_EXTOBJ->setDisabled(true); 27 29 m_comboContextO_REAL->insertItem(0, ""); … … 40 42 m_comboContextO_PARALLEL->setEditable(true); 41 43 44 //m_contextSaveButton->setDisabled(true); 45 42 46 for (Table<Constant>::reverse_iterator it = localConstantTable->rbegin(); it != localConstantTable->rend(); it++) 43 47 { //To full the some comboboxs. … … 78 82 79 83 */ 80 m_contextParameters .clear();84 m_contextParameters->clear(); 81 85 82 86 string option = "option "; … … 151 155 { 152 156 string test = "option "; 153 m_contextParameters .append(test.append(it->c_str()));// << endl;154 m_contextParameters .append("\n");157 m_contextParameters->append(test.append(it->c_str()));// << endl; 158 m_contextParameters->append("\n"); 155 159 156 160 } 157 161 158 162 if (!o_real2.empty()) 159 m_contextParameters = "\n" + o_real2;163 m_contextParameters->append("\n" + o_real2) ; 160 164 if (!o_mqn2.empty()) 161 m_contextParameters += "\n" + o_mqn2;165 m_contextParameters->append("\n" + o_mqn2) ; 162 166 if (!o_parallel2.empty()) 163 m_contextParameters += "\n" + o_parallel2;167 m_contextParameters->append("\n" + o_parallel2) ; 164 168 if (!o_netward2.empty()) 165 m_contextParameters += "\n" + o_netward2;169 m_contextParameters->append("\n" + o_netward2) ; 166 170 if (m_checkBoxO_GRADTEST->isChecked()) 167 m_contextParameters += "\noption O_GRADTEST ";171 m_contextParameters->append("\noption O_GRADTEST "); 168 172 if (m_checkBoxO_VARINCR->isChecked()) 169 m_contextParameters += "\noption O_VARINCR ";173 m_contextParameters->append("\noption O_VARINCR "); 170 174 if (m_checkBoxO_DBG_NANF->isChecked()) 171 m_contextParameters += "\noption O_DBG_NANF ";175 m_contextParameters->append("\noption O_DBG_NANF "); 172 176 if (m_checkBoxO_DBG_TING->isChecked()) 173 m_contextParameters += "\noption O_DBG_TING ";177 m_contextParameters->append("\noption O_DBG_TING "); 174 178 if (m_checkBoxO_DBG_BETA->isChecked()) 175 m_contextParameters += "\noption O_DBG_BETA ";179 m_contextParameters->append("\noption O_DBG_BETA "); 176 180 if (m_checkBoxO_DBG_TRC_FWARD->isChecked()) 177 m_contextParameters += "\noption O_DBG_TRC_FWARD ";181 m_contextParameters->append("\noption O_DBG_TRC_FWARD "); 178 182 if (m_checkBoxO_DBG_TRC_BWARD->isChecked()) 179 m_contextParameters += "\noption O_DBG_TRC_BWARD ";183 m_contextParameters->append("\noption O_DBG_TRC_BWARD "); 180 184 if (m_checkBoxO_DBG_TRC_LWARD->isChecked()) 181 m_contextParameters += "\noption O_DBG_TRC_LWARD ";185 m_contextParameters->append("\noption O_DBG_TRC_LWARD "); 182 186 if (m_checkBoxO_DBG_TRC_AWARD->isChecked()) 183 m_contextParameters += "\noption O_DBG_TRC_AWARD ";187 m_contextParameters->append("\noption O_DBG_TRC_AWARD "); 184 188 185 189 m_localContext->addExternal(m_fileList); 186 //cout << "voici les parametres: " << endl << m_contextParameters << endl; 187 188 eraseDataFromLineEdit(); 190 //string *test; 191 //cout << "voici les parametres: " << *m_contextParameters << endl; 192 //eraseDataFromLineEdit(); 193 m_contextSaveButton->setDisabled(true); 189 194 } 190 195 catch(...) … … 231 236 232 237 /********************************** Implementation of the method getContextParameters() ************************************************************/ 233 string ContextWindow::getContextParameters() {238 /*string ContextWindow::getContextParameters() { 234 239 235 240 //if (!m_contextParameters.empty()) 236 241 return m_contextParameters; 237 242 //else 238 } 243 }*/ 239 244 /******************************** Implementation of the method isEmpty() *************************************************************************/ 240 245 bool ContextWindow::isEmpty() { 241 246 242 if (m_contextParameters .empty())247 if (m_contextParameters->empty()) 243 248 return true; 244 249 else -
trunk/yao/src/interface/src/MainWindow.cpp
r460 r466 363 363 if (m_contextWindow == NULL) { //to test if the object is already created. 364 364 365 m_contextWindow = new ContextWindow(&theContext, &theConstantTable ); //mwc.getContext();365 m_contextWindow = new ContextWindow(&theContext, &theConstantTable, &theContextData); //mwc.getContext(); 366 366 espace.addWindow(m_contextWindow)->move(5, 0); 367 367 m_contextWindow->show(); … … 900 900 description << endl; 901 901 } 902 /*if (contextTest) {902 if (!theContextData.empty()) { 903 903 description << "#OPTION (optionAttribute)+ ---------------------------------------------------------------------" << endl; 904 description << m_contextWindow->getContextParameters()<< endl; //"option " << it->toStdString() << endl;904 description << /*m_contextWindow->getContextParameters()*/ theContextData << endl; //"option " << it->toStdString() << endl; 905 905 // cout << m_contextWindow->getContextParameters() << endl; //"option " << it->toStdString() << endl; 906 906 description << endl; 907 } */907 } 908 908 if (!theTrajectoryTable.empty()) { 909 909 description << "#TRAJ name type uptime offtime dtime steptime ------------------------------------------" << endl; … … 941 941 description << "#CONNECTIONS name range[0] FROM! name range[1] range_i ( range_jkt )? -------------------------" << endl; 942 942 for (Table<Connection>::iterator it = theConnectionTable.begin(); it != theConnectionTable.end(); it++) 943 description << "ctin " << it->getInModule() << " " << it->getIn() << " from " << it->getOutModule() << " " << it->getOut() /*<< it->getI() */<< endl;943 description << "ctin " << it->getInModule() << " " << it->getIn() << " from " << it->getOutModule() << " " << it->getOut() /*<< it->getI() */<< endl; 944 944 945 945 description << endl; -
trunk/yao/src/interface/src/include/ContextWindow.hpp
r428 r466 30 30 31 31 public : 32 ContextWindow(yao::Context *aContext, yao::Table <yao::Constant> *aConstantTable, QWidget *parent=0);32 ContextWindow(yao::Context *aContext, yao::Table <yao::Constant> *aConstantTable, string *contextData, QWidget *parent=0); 33 33 //QStringList getContextData(); 34 34 void eraseDataFromLineEdit(); 35 std::string getContextParameters();35 //std::string getContextParameters(); 36 36 bool isEmpty(); 37 37 … … 73 73 yao::Context *m_localContext; 74 74 std::vector <std::string> m_fileList; 75 std::string m_contextParameters;75 std::string *m_contextParameters; 76 76 yao::Table <yao::Constant> *localConstantTable; 77 MainWindowController *localMwc;77 //MainWindowController *localMwc; 78 78 bool test; 79 79 int compteur; -
trunk/yao/src/interface/src/include/MainWindow.hpp
r459 r466 268 268 //yao::Table <yao::Order> theOrderTable; 269 269 yao::Table <yao::Function> theFunctionTable; 270 270 271 std::string theContextData; 272 271 273 std::vector <std::string> theInstructionData; 272 274
Note: See TracChangeset
for help on using the changeset viewer.