- Timestamp:
- 07/23/10 18:37:41 (14 years ago)
- Location:
- trunk/yao/src/interface
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/yao/src/interface/src/ConstantWindow.cpp
r381 r389 77 77 m_delButton->setEnabled(true); 78 78 Constant localConstant (Nom.toStdString(), Val.toStdString()); 79 for (Table<Constant>::iterator it = m_localConstantTable->begin(); it != m_localConstantTable->end(); it++)80 if (m_localConstantTable->size() == 0 )// it->getName().c_str() == "" /*Nom.toStdString()*/)79 //for (Table<Constant>::iterator it = m_localConstantTable->begin(); it != m_localConstantTable->end(); it++) 80 // if (m_localConstantTable->size() == 0 )// it->getName().c_str() == "" /*Nom.toStdString()*/) 81 81 82 {83 cout << it->getName() << endl;82 // { 83 //cout << it->getName() << endl; 84 84 85 85 // else { 86 86 // QMessageBox::critical(this, "Avertissement", "Cet élément existe déjà !"); 87 87 // return; // Arrêt de la méthode 88 }88 // } 89 89 90 90 m_localConstantTable->push_back(localConstant); … … 118 118 m_defvalModel->removeRows(m_tableView->currentIndex().row(), 1); 119 119 m_localConstantTable->erase(m_localConstantTable->begin() + r); 120 121 for (unsigned int i=0; i < localHeaderList->size(); i++ ) //Parcourt le vecteur de HatName en fonction de sa taille (nombre d'éléments) 122 { 120 121 string chaine = element.toString().toStdString(); 122 for (Table<Constant>::iterator it = m_localConstantTable->begin(); it != m_localConstantTable->end(); it++) 123 { 124 125 //cout << "Chaine dans la boucle: " << chaine << endl; 126 if (chaine == it->getName()) 127 chaine = it->getText().c_str(); 128 } 129 //cout << "Chaine aprÚs la boucle: " << chaine << endl; 130 //for (unsigned int i=0; i < localHeaderList->size(); i++ ) //Parcourt le vecteur de HatName en fonction de sa taille (nombre d'éléments) 131 // { 132 133 134 123 135 //localConstantTable->find(hatFile)->getText(); 124 if (element.toString().toStdString() == localHeaderList->at(i)) //Teste si l'élément à supprimer dans defval est aussi dans hat 125 localHeaderList->erase(localHeaderList->begin() + i);//localHeaderList->begin() +i ); 126 } 136 //Constant *constantForUptime; 137 //chaine = m_localConstantTable->find(chaine)->getText(); 138 //element.toString().toStdString(); 139 // if (element.toString().toStdString() == localHeaderList->at(i)) //Teste si l'élément à supprimer dans defval est aussi dans hat 140 // localHeaderList->erase(localHeaderList->begin() + i);//localHeaderList->begin() +i ); 141 // } 142 //ostringstream t << element.toString().toStdString(); 143 //string test = m_localConstantTable->find(element.toString().toStdString())->getText(); 127 144 128 145 emit rowIsDeleted(element.toString()); // signal emis lorsqu'une ligne est retirée du tableau. -
trunk/yao/src/interface/src/HatNameWindow.cpp
r373 r389 117 117 string constantValue = localConstantTable->find(hatFile)->getText(); //"getText()" returns the constant value. 118 118 constantValue.append(".h"); 119 m_hatnameModel->setItem(m_hatnameModel->rowCount(), new QStandardItem(QString( hatFile.c_str())));120 localHeaderList->push_back( hatFile);119 m_hatnameModel->setItem(m_hatnameModel->rowCount(), new QStandardItem(QString(constantValue.c_str()))); 120 localHeaderList->push_back(constantValue); 121 121 eraseDataFromLineEdit(); 122 122 m_delHatButton->setEnabled(true); -
trunk/yao/src/interface/src/MainWindow.cpp
r388 r389 75 75 76 76 } 77 77 78 /******************************************* Implementation of the method setTitle() *****************************************************************/ 78 79 void MainWindow::setTitle() { … … 83 84 84 85 /************************************ Implementation of the method createMenus() *******************************************************************/ 85 86 86 void MainWindow::createMenus() { 87 87 … … 447 447 448 448 theHeaderList.push_back(getProjectName() + ".h") ; 449 450 449 451 450 } 452 451 453 452 /*********************************** Implementation of the method activateToolBarButtons() *********************************************************/ 454 455 453 void MainWindow::activateToolBarButtons() { 456 454 … … 469 467 } 470 468 /********************************** Implementation of the method desactivateToolBarButtons() *******************************************************/ 471 472 469 void MainWindow::desactivateToolBarButtons() { 473 470 … … 565 562 else 566 563 return; 567 568 564 } 569 565 -
trunk/yao/src/interface/src/ModulWindow.cpp
r384 r389 89 89 if (it->isOutput()) 90 90 m_modulModel->setItem(row, 3, new QStandardItem(QString(intToString(it->getOutput()).c_str()))); /*!< Gets the choosed in the space directive .*/ 91 91 if (it->isTarget()) 92 m_modulModel->setItem(row, 4, new QStandardItem(m_modulTargetCombo->itemText(it->getTarget()-1))); 92 93 } 93 94 … … 110 111 connect(m_modulOperaRadioButton, SIGNAL(toggled(bool )), m_modulSpaceCombo, SLOT(setDisabled(bool ))); 111 112 113 connect(m_modulCoutCheckBox, SIGNAL(toggled(bool )), m_modulNowardCheckBox, SLOT(setChecked(bool ))); 114 115 connect(m_modulTempoCheckBox, SIGNAL(toggled(bool )), m_modulCovtCombo, SLOT(setDisabled(bool ))); 116 //connect(m_modulTempoCheckBox, SIGNAL(toggled(bool )), , SLOT(setDisabled(bool ))); 112 117 113 118 connect(m_buttonLoperaAdd, SIGNAL(clicked()), this, SLOT(addLoperaRow())); 119 114 120 115 121 connect(m_buttonLoperaDel, SIGNAL(clicked()), this, SLOT(deleteLoperaRow())); … … 132 138 int row = m_modulModel->rowCount(); 133 139 140 //modulname 141 if (modulName.empty()) 142 { 143 QMessageBox::critical(this, "Erreur", "Veuillez d'abord renseigner le champ \"nom module\"."); 144 return; // Arrêt de la méthode 145 } 146 134 147 if ((m_modulSpaceRadioButton->isChecked()) && (!m_modulSpaceCombo->currentText().isEmpty())) 135 148 modulParent = m_modulSpaceCombo->currentText().toStdString() ; … … 137 150 if ((m_modulOperaRadioButton->isChecked()) && (!m_modulOperaCombo->currentText().isEmpty())) 138 151 modulParent = m_modulOperaCombo->currentText().toStdString() ; 139 //input a nd output attribut.152 //input attribut. 140 153 if(!input.empty()) 141 154 { … … 145 158 modulAttributs += "output " + output; 146 159 } 147 // Target attribut. 148 if(!target.empty()) 149 { 150 151 modulAttributs = "target " + target; 152 } 160 161 //output attribut. 153 162 if (!(output.empty() && input.empty()) && modulName.empty()) 154 163 { … … 157 166 158 167 } 168 // Target attribut. 169 if(!target.empty()) 170 { 171 modulAttributs = "target " + target; 172 } 159 173 // the modul parent must to be here. 160 174 if (modulParent.empty()) … … 164 178 165 179 } 180 if (m_modulTempoCheckBox->isChecked() && output.empty()) 181 { 182 QMessageBox::critical(this, "Erreur", "Si target est coché, output doit-être obligatoirement renseigné."); 183 return; // Arrêt de la méthode 184 185 } 186 if (!(!target.empty() && output.empty())) { 187 QMessageBox::critical(this, "Erreur", "Si target est défini, output doit-être obligatoirement renseigné."); 188 return; // Arrêt de la méthode 189 } 166 190 167 191 if (!modulName.empty() && !modulParent.empty()) … … 180 204 return; // Arrêt de la méthode 181 205 } 182 if (!target.empty() )206 if (!target.empty() && (!output.empty())) 183 207 m_modulModel->setItem(row, 4, new QStandardItem(QString(target.c_str()))); 184 208 185 209 if(m_modulNowardCheckBox->isChecked()) 186 210 { … … 200 224 if (!output.empty()) 201 225 mod1.setOutput(stringToInt(output)); 202 //if (!target.emty())203 //mod1.setTarget();226 if (!target.empty()) 227 mod1.setTarget(intToShort(m_modulTargetCombo->currentIndex()) + 1); 204 228 m_localModulTable->push_back(mod1); 205 229 … … 208 232 { 209 233 Modul mod2(modulName, m_localOperaTable->find(modulParent), false); 210 m_localModulTable->push_back(mod2);211 234 if (!input.empty()) 212 235 mod2.setInput(stringToInt(input)); 213 236 if (!output.empty()) 214 237 mod2.setOutput(stringToInt(output)); 215 238 if (!target.empty()) 239 mod2.setTarget(intToShort(m_modulTargetCombo->currentIndex()) + 1); 216 240 m_localModulTable->push_back(mod2); 217 241 … … 346 370 return atoi(s.c_str()); 347 371 } 372 /**************************************** Implementation of intToShort(const int anInt) method. **************************************************/ 373 const short ModulWindow::intToShort(const int anInt) { 374 375 return atoi(intToString(anInt).c_str()); 376 } 377 348 378 /*************************************** Implementation of method. *******************************************************************************/ 349 379 /*QStringList ModulWindow::getModulData() { -
trunk/yao/src/interface/src/include/ModulWindow.hpp
r384 r389 45 45 const int stringToInt(const string& s); 46 46 const short stringToShort(const string& s); 47 const short intToShort(const int anInt); 47 48 48 49 private: -
trunk/yao/src/interface/src/ui_/connectionwindow.ui
r375 r389 47 47 <x>500</x> 48 48 <y>20</y> 49 <width>8 1</width>49 <width>87</width> 50 50 <height>95</height> 51 51 </rect> … … 95 95 <property name="autoDefault"> 96 96 <bool>true</bool> 97 </property>98 </widget>99 <widget class="QGroupBox" name="groupBox_2">100 <property name="enabled">101 <bool>false</bool>102 </property>103 <property name="geometry">104 <rect>105 <x>190</x>106 <y>70</y>107 <width>212</width>108 <height>45</height>109 </rect>110 </property>111 <property name="title">112 <string/>113 97 </property> 114 98 </widget> … … 237 221 <string/> 238 222 </property> 239 <widget class="QWidget" name=" ">223 <widget class="QWidget" name="layoutWidget"> 240 224 <property name="geometry"> 241 225 <rect> 242 226 <x>10</x> 243 227 <y>8</y> 244 <width> 191</width>228 <width>202</width> 245 229 <height>41</height> 246 230 </rect> … … 283 267 </layout> 284 268 </widget> 285 <widget class="QWidget" name=" ">269 <widget class="QWidget" name="layoutWidget"> 286 270 <property name="geometry"> 287 271 <rect> 288 272 <x>10</x> 289 273 <y>60</y> 290 <width> 191</width>274 <width>202</width> 291 275 <height>41</height> 292 276 </rect> -
trunk/yao/src/interface/ui_newprojectwindow.h
r387 r389 2 2 ** Form generated from reading UI file 'newprojectwindow.ui' 3 3 ** 4 ** Created: Mon Jul 19 16:25:1320104 ** Created: Wed Jul 21 16:50:22 2010 5 5 ** by: Qt User Interface Compiler version 4.6.3 6 6 **
Note: See TracChangeset
for help on using the changeset viewer.