- Timestamp:
- 07/09/10 19:31:12 (14 years ago)
- Location:
- trunk/yao/src/interface/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/yao/src/interface/src/ModulWindow.cpp
r381 r384 85 85 m_modulModel->setItem(row, 0, new QStandardItem(QString(it->getName().c_str()))); /*!< Gets the name.*/ 86 86 m_modulModel->setItem(row, 1, new QStandardItem(QString(it->getSpaceOrOperator().c_str()))); /*!< Gets the dimension (1, 2 or 3).*/ 87 //m_modulModel->setItem(row, 2, new QStandardItem(QString(it->getProperty(2).c_str()))); /*!< Gets the choosed in the space directive .*/ 87 if (it->isInput()) 88 m_modulModel->setItem(row, 2, new QStandardItem(QString(intToString(it->getInput()).c_str()))); /*!< Gets the choosed in the space directive .*/ 89 if (it->isOutput()) 90 m_modulModel->setItem(row, 3, new QStandardItem(QString(intToString(it->getOutput()).c_str()))); /*!< Gets the choosed in the space directive .*/ 91 88 92 } 89 93 … … 116 120 } 117 121 118 /**************************************** Impl émentation de la méthode addModulRow*****************************************************************/122 /**************************************** Implementation of addModulRow method *****************************************************************/ 119 123 void ModulWindow::addModulRow() { 120 124 try { … … 186 190 m_modulModel->setItem(row, 8, new QStandardItem("non")); 187 191 } 188 189 (m_modulSpaceRadioButton->isChecked())? m_localModulTable->push_back(Modul(modulName, m_localSpaceTable->find(modulParent), true)): m_localModulTable->push_back(Modul(modulName, m_localOperaTable->find(modulParent), false)); 190 192 //bool aBool = m_modulSpaceRadioButton->isChecked()? true: false; 193 194 /*Modul mod =*/ 195 if (m_modulSpaceRadioButton->isChecked()) 196 { 197 Modul mod1(modulName, m_localSpaceTable->find(modulParent), true); 198 if (!input.empty()) 199 mod1.setInput(stringToInt(input)); 200 if (!output.empty()) 201 mod1.setOutput(stringToInt(output)); 202 //if (!target.emty()) 203 //mod1.setTarget(); 204 m_localModulTable->push_back(mod1); 205 206 } 207 else 208 { 209 Modul mod2(modulName, m_localOperaTable->find(modulParent), false); 210 m_localModulTable->push_back(mod2); 211 if (!input.empty()) 212 mod2.setInput(stringToInt(input)); 213 if (!output.empty()) 214 mod2.setOutput(stringToInt(output)); 215 216 m_localModulTable->push_back(mod2); 217 218 } 219 220 191 221 if (!m_modulNowardCheckBox->isChecked ()) generateModulFile(modulName); 192 222 } … … 207 237 } 208 238 209 210 211 /**************************************** Implémentation de la méthode addLoperaRow() **************************************************************/ 239 /**************************************** Implementation of addLoperaRow() method **************************************************************/ 212 240 void ModulWindow::addLoperaRow() { 213 241 … … 216 244 } 217 245 218 /**************************************** Impl émentation de la méthode deleteLoperaRow()**********************************************************/246 /**************************************** Implementation of deleteLoperaRow() method **********************************************************/ 219 247 void ModulWindow::deleteLoperaRow() { 220 248 … … 231 259 } 232 260 } 233 /************************************* Implémentation de la méthode toInitialize() ***********************************************************/ 261 262 /************************************* Implementation of toInitialize() method ***********************************************************/ 234 263 void ModulWindow::toInitialize() { 235 264 … … 253 282 254 283 } 255 /*************************************** Implémentation de la méthode deleteModulRow ****************************************************************/ 284 285 /*************************************** Implementation of deleteModulRow() method. ***************************************************************/ 256 286 void ModulWindow::deleteModulRow() { 257 287 try … … 284 314 } 285 315 286 /*************************************** **************************************************************************************/316 /*************************************** Implementation of saveModulData() method. **************************************************/ 287 317 void ModulWindow::saveModulData() { 288 318 289 319 } 290 /************************************* *********************************/320 /************************************* Implementation of isModulTableEmpty() method. *********************************/ 291 321 bool ModulWindow::isModulTableEmpty() { 292 322 … … 297 327 298 328 } 299 /*****************************************************************************************************************************/ 300 /*void ModulWindow::enregistrerModul() { 301 302 //projetModul = new QFileDialog(this); 303 QStringList filtres; 304 305 //projetModul->setDirectory("."); 306 //projetModul->setFileMode (QFileDialog::AnyFile); 307 filtres << "*.h" 308 << "Tous les fichiers (*.*)"; 309 //projetModul->setFilters(filtres); 310 311 //if(fd->exec()) { 312 //m_cheminProjetModul = projetModul->getSaveFileName(); 313 314 }*/ 315 /*****************************************************************************************************************************/ 316 /*void ModulWindow::ouvrirProjetExistant3() { 317 318 //projetModul = new QFileDialog(this); 319 QStringList filtres; 320 321 //projetModul->setDirectory("."); 322 //projetModul->setFileMode (QFileDialog::AnyFile); 323 filtres << "*.h" 324 << "Tous les fichiers (*.*)"; 325 projetModul->setFilters(filtres); 326 327 m_cheminProjetModul = projetModul->getSaveFileName(); 328 } 329 /**************************************** Implementation of intToString(int anInt) method. ********************************************************/ 330 string ModulWindow::intToString(int anInt) { 331 332 stringstream tampon; 333 tampon << anInt; 334 335 return tampon.str(); 336 } 337 /**************************************** Implementation of stringToInt(const string& s) method. **************************************************/ 338 const int ModulWindow::stringToInt(const string& s) { 339 340 return atoi(s.c_str()); 341 } 342 343 /**************************************** Implementation of stringToShort(const string& s) method. **************************************************/ 344 const short ModulWindow::stringToShort(const string& s) { 345 346 return atoi(s.c_str()); 347 } 348 /*************************************** Implementation of method. *******************************************************************************/ 349 /*QStringList ModulWindow::getModulData() { 350 351 //return filesList; 352 } 329 353 */ 330 /****************************************************************************************************************************/ 331 /*QStringList ModulWindow::getModulData() { 332 333 //return filesList; 334 } 335 */ 354 /*************************************** Implementation of callModulHelp() *************************************************************************/ 355 void ModulWindow::callModulHelp() { 356 357 QMessageBox::about(this, tr("Aide sur la directive Module."),("<p> Cette directive permet de déclarer les modules. Un module est identifié par son nom (modulname). Il doit ensuite être rattaché soit à un espace (introduit par le mot clé space suivi du nom de lâespace(spacename)) soit à un opérateur (introduit par le mot clé opera suivi du nom de lâopérateur (operaname)). <p> <u>Exemple:</u> modul Hfil space Soce input 3 output 1 tempo cout target" 358 "<p>Pour plus d'informations sur la directive module, <a href=\"help/modul_aide.html\">cliquez ici.</a>")); 359 360 } 361 336 362 /************************************ Implementation of generateModulFile(string aFilename) method. *************************************************/ 337 363 void ModulWindow::generateModulFile(string aFilename) … … 382 408 } 383 409 384 /****************************************************************************************************************************/385 void ModulWindow::callModulHelp() {386 387 QMessageBox::about(this, tr("Aide sur la directive Module."),("<p> Cette directive permet de déclarer les modules. Un module est identifié par son nom (modulname). Il doit ensuite être rattaché soit à un espace (introduit par le mot clé space suivi du nom de lâespace(spacename)) soit à un opérateur (introduit par le mot clé opera suivi du nom de lâopérateur (operaname)). <p> <u>Exemple:</u> modul Hfil space Soce input 3 output 1 tempo cout target"388 "<p>Pour plus d'informations sur la directive module, <a href=\"help/modul_aide.html\">cliquez ici.</a>"));389 390 }391 392 410 /********************************************************************/ 393 411 void ModulWindow::closeEvent(QCloseEvent *event) { -
trunk/yao/src/interface/src/include/MainWindow.hpp
r381 r384 241 241 std::vector <string> theHeaderList; 242 242 yao::Context theContext; 243 //yao::Modul theModul; 243 244 yao::Table <yao::Trajectory> theTrajectoryTable; 244 245 yao::Table <yao::Space> theSpaceTable; -
trunk/yao/src/interface/src/include/ModulWindow.hpp
r379 r384 42 42 void closeEvent(QCloseEvent *event); 43 43 void generateModulFile(string aFilename); 44 string intToString(int anInt); 45 const int stringToInt(const string& s); 46 const short stringToShort(const string& s); 44 47 45 48 private: -
trunk/yao/src/interface/src/ui_/trajectorywindow.ui
r362 r384 44 44 <widget class="QLabel" name="m_nameLabel"> 45 45 <property name="text"> 46 <string>Nom Trajectoire</string>46 <string>Nom trajectoire</string> 47 47 </property> 48 48 </widget> … … 177 177 <x>410</x> 178 178 <y>40</y> 179 <width>8 1</width>179 <width>87</width> 180 180 <height>95</height> 181 181 </rect>
Note: See TracChangeset
for help on using the changeset viewer.