- Timestamp:
- 06/30/10 12:48:23 (14 years ago)
- Location:
- trunk/yao/src/interface/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/yao/src/interface/src/ContextWindow.cpp
r368 r369 27 27 if (isContextListEmpty()) m_delButtonO_EXTOBJ->setDisabled(true); 28 28 m_comboContextO_REAL->insertItem(0, ""); 29 m_comboContextO_REAL->insertItem(1, " FLOAT");30 m_comboContextO_REAL->insertItem(2, " DOUBLE");29 m_comboContextO_REAL->insertItem(1, "float"); 30 m_comboContextO_REAL->insertItem(2, "double"); 31 31 m_comboContextO_MQN->insertItem(0, ""); 32 32 m_comboContextO_MQN->insertItem(1, "M1QN3"); 33 33 m_comboContextO_MQN->insertItem(2, "M2QN1"); 34 34 m_comboContextO_PARALLEL->insertItem(0, ""); 35 m_comboContextO_PARALLEL->insertItem(1, "A CTIF");35 m_comboContextO_PARALLEL->insertItem(1, "Actif"); 36 36 37 37 m_comboContextO_NETWARD->insertItem(0, ""); … … 50 50 filesListModele = new QStringListModel(filesList); 51 51 52 /*m_contextTableView->setModel(m_contextModel);53 m_contextTableView->resizeColumnsToContents();54 m_contextTableView->setEditTriggers(QAbstractItemView::NoEditTriggers);55 m_contextTableView->setShowGrid(false);56 m_contextTableView->setSelectionBehavior(QAbstractItemView::SelectRows);57 */58 /*for (Table<Constant>::reverse_iterator it = localConstantTable->rbegin(); it != localConstantTable->rend(); it++) {59 60 m_contextModel->setItem(row, 0, new QStandardItem(m_comboContextO_REAL->currentText()));61 } */62 52 63 53 O_EXTOBJModele = new QStandardItemModel(0, 1) ; … … 90 80 /* m_contextModel->setItem(row, 0, new QStandardItem()); 91 81 92 m_checkBoxO_GRADTEST->isChecked() 93 m_checkBoxO_VARINCR->isChecked() 94 m_checkBoxO_DBG_NANF->isChecked() 95 m_checkBoxO_DBG_TING->isChecked() 96 m_checkBoxO_DBG_BETA->isChecked() 97 m_checkBoxO_DBG_TRC_FWARD->isChecked() 98 m_checkBoxO_DBG_TRC_BWARD->isChecked() 99 m_checkBoxO_DBG_TRC_LWARD->isChecked() 100 m_checkBoxO_DBG_TRC_AWARD->isChecked()*/ 101 m_contextParametersToString.clear(); 82 */ m_contextParametersToString.clear(); 102 83 string option = "option "; 103 84 string o_real = m_comboContextO_REAL->currentText().toStdString(), … … 109 90 if (!o_real.empty()) 110 91 //QMessageBox::critical(this, "Erreur", ""); 111 if ((o_real == " FLOAT") || (o_real == "DOUBLE"))92 if ((o_real == "float") || (o_real == "double")) 112 93 o_real2 = option + "O_REAL " + o_real; 113 94 … … 118 99 if (!o_parallel.empty()) 119 100 { 120 if ((o_parallel == "A CTIF"))101 if ((o_parallel == "Actif")) 121 102 o_parallel2 = option + "O_PARALLEL" ; 122 103 else … … 169 150 170 151 171 //if (!o_netward.empty())172 //if ((o_netward == "M1QN3") || (o_mqn == "M2QN1"))173 // o_netward2 = option + "O_NETWARD " + localConstantTable->find(o_parallel)->getText();174 175 176 152 for (vector <string>::reverse_iterator it = m_fileList.rbegin(); it != m_fileList.rend(); it++ ) 177 153 { … … 183 159 //cout << "coucou" << endl; 184 160 } 161 162 163 164 185 165 if (!o_real2.empty()) 186 166 m_contextParametersToString = o_real2 + "\n"; … … 190 170 m_contextParametersToString += o_parallel2 + "\n"; 191 171 if (!o_netward2.empty()) 192 m_contextParametersToString += o_netward2; 193 172 m_contextParametersToString += o_netward2 + "\n"; 173 if (m_checkBoxO_GRADTEST->isChecked()) 174 m_contextParametersToString += "option O_GRADTEST \n"; 175 if (m_checkBoxO_VARINCR->isChecked()) 176 m_contextParametersToString += "option O_VARINCR \n"; 177 if (m_checkBoxO_DBG_NANF->isChecked()) 178 m_contextParametersToString += "option O_DBG_NANF \n"; 179 if (m_checkBoxO_DBG_TING->isChecked()) 180 m_contextParametersToString += "option O_DBG_TING \n"; 181 if (m_checkBoxO_DBG_BETA->isChecked()) 182 m_contextParametersToString += "option O_DBG_BETA \n"; 183 if (m_checkBoxO_DBG_TRC_FWARD->isChecked()) 184 m_contextParametersToString += "option O_DBG_TRC_FWARD \n"; 185 if (m_checkBoxO_DBG_TRC_BWARD->isChecked()) 186 m_contextParametersToString += "option O_DBG_TRC_BWARD \n"; 187 if (m_checkBoxO_DBG_TRC_LWARD->isChecked()) 188 m_contextParametersToString += "option O_DBG_TRC_LWARD \n"; 189 if (m_checkBoxO_DBG_TRC_AWARD->isChecked()) 190 m_contextParametersToString += "option O_DBG_TRC_AWARD \n"; 191 192 193 194 195 196 197 198 194 199 m_localContext->addExternal(m_fileList); 195 200 cout << "voici les parametres: " << endl << m_contextParametersToString << endl; … … 239 244 } 240 245 246 /********************************** Implementation of the method getContextParameters() ************************************************************/ 247 string ContextWindow::getContextParameters() { 248 249 return m_contextParametersToString; 250 251 } 241 252 /*************************************** Implémentation de la méthode resetParameters ****************************************************************/ 242 253 void ContextWindow::resetParameters() { 243 254 244 /* QItemSelectionModel *selection = m_contextTableView->selectionModel();245 QModelIndex indexElementSelectionne = selection->currentIndex();246 QVariant elementSelectionne = filesListModele->data(indexElementSelectionne, Qt::DisplayRole);247 248 filesList.removeOne(elementSelectionne.toString());//Retrait de l'élément sélectionné de l'objet QStringList249 filesListModele->setStringList(filesList); //On indique au modÚle la liste des éléments à afficher.250 251 */252 255 eraseDataFromLineEdit(); 253 256 } … … 319 322 }*/ 320 323 321 //event->accept();322 //emit contextWindowIsClosed(3);324 event->accept(); 325 emit contextWindowIsClosed(3); 323 326 // for (vector <string>::iterator it = m_fileList.begin(); it != m_fileList.end(); it++ ) 324 327 // { -
trunk/yao/src/interface/src/InsertFCTWindow.cpp
r366 r369 15 15 m_insertFCTModel = new QStandardItemModel(0, 2); 16 16 localFunctionTable = aFunctionTable; 17 18 QRegExp regExp("[A-Za-z_][A-Za-z0-9_]*"); 19 m_insertFCTNameLine->setValidator(new QRegExpValidator(regExp, this)); 17 20 18 21 m_insertFCTModel->setHorizontalHeaderLabels(QStringList() << "Nom Fonction" << "Argument"); /*!< displays tableWidgetfct */ -
trunk/yao/src/interface/src/MainWindow.cpp
r367 r369 614 614 description << "//DEFVAL name value -------------------------------------------------------" << endl; 615 615 for (Table<Constant>::iterator it = theConstantTable.begin(); it != theConstantTable.end(); it++) 616 description << "defval " << it->getName() << " " << it->getText() << endl; ///*<< dynamic_cast <string>(*it)*/ << endl;616 description << "defval " << it->getName() << " " << it->getText() << endl; 617 617 description << endl; 618 619 618 description << "//HATNAME --------------------------------------------------------------------------" << endl; 620 619 for(vector <string>::iterator it = theHeaderList.begin(); it != theHeaderList.end(); it++) 621 620 description << "hat_name \"" << it->c_str() << "\"" << endl; 622 621 description << endl; 623 //description << "//Contexts ----------------------------------------------------------------------" << endl; 624 625 //for(QStringList::iterator it = m_contextWindow->getContextData().begin(); it != m_contextWindow->getContextData().end(); it++) 626 // description << "option " << it->toStdString() << endl; 627 // description << endl; 628 622 description << "//Contexts ----------------------------------------------------------------------" << endl; 623 description << m_contextWindow->getContextParameters() << endl; //"option " << it->toStdString() << endl; 624 description << endl; 629 625 description << "//TRAJECTOIRES name type uptime offtime dtime steptime -------------" << endl; 630 631 /* for(vector <string>::iterator it = m_contextWindow->getContextData().begin(); it != m_contextWindow->getContextData().end(); it++)632 description << "option " << it->toStdString() << endl;633 description << endl;634 */635 636 626 for (Table<Trajectory>::iterator it = theTrajectoryTable.begin(); it != theTrajectoryTable.end(); it++) 637 627 description << "traj " << it->getName() << " " << it->getType() << " " << it->getBoot() << " " << it->getOffset() << " " << it->getStep() << " " << it->getSize()<< " " << endl; 638 628 description << endl; 639 629 description << "//SPACE name type dim1 [[dim2]---[dim3]] traj------------------" << endl; 640 641 630 for (Table<Space>::iterator it = theSpaceTable.begin(); it != theSpaceTable.end(); it++) 642 description << "space " << it->getProperty(0) << " " << it->getProperty(1) << " " << it->getProperty(2) << endl; //<< " " << it->getBoot() << " " << it->getSize() << " " << it->getStep() << " " << it->getOffset() << " " << it->getType() << endl;631 description << "space " << it->getProperty(0) << " " << it->getProperty(1) << " " << it->getProperty(2) << endl; 643 632 description << endl; 644 description << "//DIMENSION ---------------------------------------------" << endl; 645 646 647 // for (QStringList::iterator it = m_spaceWindow->getData().begin(); it != m_spaceWindow->getData().end(); it++) 648 // description << "space " << it->toStdString() << endl; 649 // description << endl; 650 651 //description << "//NETWARD ---------------------------------------------------------------------------" << endl; 633 description << "//OPERATOR ---------------------------------------------" << endl; 634 for (Table<Operator>::iterator it = theOperaTable.begin(); it != theOperaTable.end(); it++) 635 description << "opera " << it->getProperty(0) << " " << it->getProperty(1) << " " << it->getProperty(2) << endl; 636 description << "//NETWARD ---------------------------------------------------------------------------" << endl; 652 637 653 638 /*for (QStringList::iterator it = m_netwardWindow->getDataNetward().begin(); it != m_netwardWindow->getDataNetward().end(); it++) 654 639 description << "netward " << it->toStdString() << endl; 655 640 description << endl;*/ 656 //description << "//MODUL --------------------------------------------------------------------------" << endl;641 description << "//MODUL --------------------------------------------------------------------------" << endl; 657 642 658 643 /* for (QStringList::iterator it = m_modulWindow->getDataModul().begin(); it != m_modulWindow->getDataModul().end(); it++) 659 644 description << "modul " << it->toStdString() << endl; 660 645 description << endl;*/ 661 //description << "//CONNECTIONS----------------------------------------------------------------------" << endl;646 description << "//CONNECTIONS----------------------------------------------------------------------" << endl; 662 647 663 648 /* for (QStringList::iterator it = m_ctinWindow->getDataCtin().begin(); it != m_ctinWindow->getDataCtin().end(); it++) 664 649 description << "ctin " << it->toStdString() << endl; */ 665 // description << "//USER FUNCTIONS ----------------------------------------------------------------" << endl; 666 //description << endl; 650 description << "//USER FUNCTIONS----------------------------------------------------------------" << endl; 651 for (Table<Function>::iterator it = theFunctionTable.begin(); it != theFunctionTable.end(); it++) { 652 653 string aString = it->isParameterized()? "arg" : " "; 654 description << "insert_fct " << aString << " " << it->getName() << endl; 655 } 656 description << endl; 667 657 668 658 /* for (QStringList::iterator it = m_insertFCTWindow->getDataFCT().begin(); it != m_insertFCTWindow->getDataFCT().end(); it++) -
trunk/yao/src/interface/src/include/ContextWindow.hpp
r367 r369 33 33 QStringList getContextData(); 34 34 void eraseDataFromLineEdit(); 35 std::string getContextParameters(); 35 36 36 37 private slots: … … 53 54 54 55 void contextWindowIsClosed(int anInt); 55 56 56 57 57 private :
Note: See TracChangeset
for help on using the changeset viewer.