- Timestamp:
- 07/02/10 10:01:46 (14 years ago)
- Location:
- trunk/yao/src/interface/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/yao/src/interface/src/ConnectionWindow.cpp
r373 r374 17 17 #include "include/ConnectionWindow.hpp" 18 18 19 using namespace std; 20 using namespace yao; 19 21 20 ConnectionWindow::ConnectionWindow(QWidget *parent) : QWidget(parent) { /*!< The constructor. */ 22 /************************************************* Implementation of the construtor *******************************************************************/ 23 ConnectionWindow::ConnectionWindow(Table <Modul> *aModulTable, QWidget *parent) : QWidget(parent) { /*!< The constructor. */ 21 24 setupUi(this); 22 25 23 m_ctinModel = new QStandardItemModel(0, 10); 26 m_ctinModel = new QStandardItemModel(0, 8); 27 28 m_localModulTable = aModulTable; 29 30 m_ctinComboModulIn->insertItem(0, ""); 31 m_ctinComboModulOut->insertItem(0, ""); 32 24 33 25 34 m_ctinModel->setHorizontalHeaderLabels(QStringList() << "Entree" << "Nbre Entrees" << "Sortie" << "Nbre Sorties" << "i" << "j" << "k" << "t"); … … 30 39 m_ctinTableView->setSelectionBehavior(QAbstractItemView::SelectRows); 31 40 m_ctinTableView->resizeColumnsToContents(); 41 42 for (Table<Modul>::iterator it = m_localModulTable->begin(); it != m_localModulTable->end(); it++) 43 { 44 //int row = m_ctinModel->rowCount(); 45 46 m_ctinComboModulIn->insertItem(1, QString(it->getName().c_str())); 47 m_ctinComboModulOut->insertItem(1, QString(it->getName().c_str())); 48 //m_ctinModel->setItem(row, 0, new QStandardItem(QString(it->getName().c_str()))); /*!< Gets the name.*/ 49 //m_ctinModel->setItem(row, 1, new QStandardItem(QString(it->getSpaceOrOperator().c_str()))); 50 } 51 32 52 53 33 54 connect(m_ctinAddButton, SIGNAL(clicked()), this, SLOT(addCtinRow())); /*!< This slot add the object in the view */ 34 55 connect(m_ctinDelButton, SIGNAL(clicked()), this, SLOT(deleteCtinRow())); /*!< slot for the delete the object selected in the view*/ … … 38 59 setFixedWidth(baseSize().width() + 615); 39 60 } 40 /**************************************** This function add the object in the view*************************************/ 41 /****************************************************************************************/ 61 /********************************************** Implementation of the addCtinRow() method ************************************************************/ 42 62 void ConnectionWindow::addCtinRow() { 43 63 /* … … 125 145 */ 126 146 } 127 /********************************************** ******************************************/147 /********************************************** Implementation of the deleteCtinRow() method *********************************************************/ 128 148 void ConnectionWindow::deleteCtinRow() 129 149 { … … 147 167 }*/ 148 168 149 / /****************************************************************************************/169 /****************************************************************************************/ 150 170 151 /*void ConnectionWindow::initialiseCtin() {152 153 comboBoxctin1->clearEditText();154 comboBoxctin2->clearEditText();155 comboBoxctin3->clearEditText();156 comboBoxctin4->clearEditText();157 //comboBoxctin_i->clearEditText();158 comboBoxctin_j->clearEditText();159 comboBoxctin_k->clearEditText();160 161 171 162 QMessageBox::about(this, tr("Aide sur la directive Ctin."), tr("Lâobjet de la connectivité est dâétablir lâéchange dâinformation entre modules.<b r> Chaque module possÚdant un certain nombre dâentrées et de sorties; les modules sont distribués dans lâespace-temps répérable par des coordonnées (i, j , k, t).<p> La connectivité doit donc permettre dâindiquer les liens entre les différentes entrées et sorties des modules selon leur point de coordonnée (notion de voisinage). <p>Pour plus d'informations sur la directive, <a href=\"help/ctin_aide.html\">cliquez ici.</a>")); 163 164 165 }*/ 166 //****************************************************************************************/ 172 /********************************************* Implementation of ctinHelp() method *********************************************************************/ 167 173 void ConnectionWindow::ctinHelp() { 168 174 … … 173 179 } 174 180 175 /**************************************************************************************** /181 /**************************************************************************************************************************************************/ 176 182 void ConnectionWindow::closeEvent(QCloseEvent *event) { 177 183 184 178 185 emit ctinWindowIsClosed(9); 186 179 187 } 180 /************************************************************************************ /181 /********************************* End of file.*************************************/182 /************************************************************************************ /188 /**********************************************************************************************************************************************/ 189 /****************************************************** End of file. **************************************************************************/ 190 /**********************************************************************************************************************************************/ -
trunk/yao/src/interface/src/MainWindow.cpp
r371 r374 406 406 407 407 if (m_ctinWindow == NULL) { //to test if the object is already created. 408 m_ctinWindow = new ConnectionWindow ; //mwc.getCtin();408 m_ctinWindow = new ConnectionWindow(&theModulTable); //mwc.getCtin(); 409 409 espace.addWindow(m_ctinWindow)->move(0, 0); 410 410 m_ctinWindow->show(); -
trunk/yao/src/interface/src/MainWindowController.cpp
r366 r374 203 203 ConnectionWindow *MainWindowController::getCtin() { 204 204 205 return m_ctin = new ConnectionWindow;205 // return m_ctin = new ConnectionWindow; 206 206 } 207 207 -
trunk/yao/src/interface/src/ModulWindow.cpp
r373 r374 189 189 return; // Arrêt de la méthode 190 190 } 191 191 192 // m_modulModel->setItem(row, 2, new QStandardItem(m_modulAutonetCombo->currentText())); 192 193 // m_modulModel->setItem(row, 3, new QStandardItem(m_comboModulClonof->currentText())); … … 337 338 throw ofstream::failure("couldn't create " + path); 338 339 theFile << endl; 339 theFile << " Date: " << date->date().toString().toStdString().c_str() << " " << endl; 340 theFile << "//===========================================================================" << endl; 341 theFile << "// Date: " << date->date().toString().toStdString().c_str() << endl; 340 342 theFile << "//===========================================================================" << endl; 341 343 theFile << "forward () " << endl; … … 350 352 theFile << endl; 351 353 theFile << endl; 352 theFile << endl;353 354 theFile << "} " << endl; 354 355 theFile << endl; 355 356 theFile << "//===========================================================================" << endl; 356 theFile << "// methodes classe C: backward " << endl;357 theFile << "// methodes classe : backward " << endl; 357 358 theFile << "//===========================================================================" << endl; 358 359 theFile << "backward () " << endl; … … 367 368 theFile << endl; 368 369 theFile << endl; 369 theFile << endl;370 370 theFile << "} " << endl; 371 371 theFile << "//===========================================================================" << endl; 372 theFile << "//************************** FIN DU MODULE C*******************************" << endl;372 theFile << "//************************** FIN DU MODULE *******************************" << endl; 373 373 374 374 theFile.close(); -
trunk/yao/src/interface/src/include/ConnectionWindow.hpp
r373 r374 12 12 #include "../../../YAOObjects/Table.hpp" 13 13 #include "../../../YAOObjects/Connection.hpp" 14 #include "../../../YAOObjects/Modul.hpp" 14 15 #include <QTextCodec> 15 16 #include <QFileDialog> … … 36 37 37 38 public : 38 /*! 39 * \brief Constructor 40 * Constructor of the class ConnectionWindow 41 * \param parent : initialized at zero. 42 */ 43 ConnectionWindow(QWidget *parent=0); 39 /*! 40 * \brief Constructor 41 * Constructor of the class ConnectionWindow 42 * \param parent : initialized at zero. 43 */ 44 45 ConnectionWindow(yao::Table <yao::Modul> *aModulTable, QWidget *parent=0); 44 46 QStringList getDataCtin(); /*!< This function returns the connexion's data. */ 45 void initialiseCtin();47 void initialiseCtin(); 46 48 47 49 private slots: /*!< Functions called after a click. */ … … 61 63 QStringList CtinData; 62 64 QStandardItemModel *m_ctinModel; 63 65 yao::Table <yao::Modul> *m_localModulTable; 64 66 65 67 };
Note: See TracChangeset
for help on using the changeset viewer.