Changeset 374 for trunk/yao


Ignore:
Timestamp:
07/02/10 10:01:46 (14 years ago)
Author:
yerima
Message:

update in connection window.

Location:
trunk/yao/src/interface/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/yao/src/interface/src/ConnectionWindow.cpp

    r373 r374  
    1717#include "include/ConnectionWindow.hpp" 
    1818 
     19using namespace std; 
     20using namespace yao; 
    1921 
    20 ConnectionWindow::ConnectionWindow(QWidget *parent) : QWidget(parent) { /*!< The constructor. */ 
     22/************************************************* Implementation of the construtor *******************************************************************/ 
     23ConnectionWindow::ConnectionWindow(Table <Modul> *aModulTable, QWidget *parent) : QWidget(parent) { /*!< The constructor. */ 
    2124        setupUi(this); 
    2225     
    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                         
    2433         
    2534        m_ctinModel->setHorizontalHeaderLabels(QStringList() << "Entree" << "Nbre Entrees" << "Sortie" << "Nbre Sorties" << "i" << "j" << "k" << "t"); 
     
    3039        m_ctinTableView->setSelectionBehavior(QAbstractItemView::SelectRows); 
    3140        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         
    3252 
     53         
    3354        connect(m_ctinAddButton, SIGNAL(clicked()), this, SLOT(addCtinRow())); /*!< This slot add the object in the view */  
    3455        connect(m_ctinDelButton, SIGNAL(clicked()), this, SLOT(deleteCtinRow()));  /*!< slot  for the delete the object selected in the view*/ 
     
    3859        setFixedWidth(baseSize().width() + 615); 
    3960  } 
    40 /**************************************** This function add the object in the view*************************************/ 
    41 /****************************************************************************************/ 
     61/********************************************** Implementation of the addCtinRow() method  ************************************************************/ 
    4262void ConnectionWindow::addCtinRow() { 
    4363/* 
     
    125145*/ 
    126146} 
    127 /****************************************************************************************/ 
     147/********************************************** Implementation of the deleteCtinRow() method  *********************************************************/ 
    128148void ConnectionWindow::deleteCtinRow()  
    129149{ 
     
    147167}*/ 
    148168 
    149 //****************************************************************************************/ 
     169/****************************************************************************************/ 
    150170 
    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          
    161171 
    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 *********************************************************************/ 
    167173void ConnectionWindow::ctinHelp() { 
    168174 
     
    173179} 
    174180 
    175 /****************************************************************************************/ 
     181/**************************************************************************************************************************************************/ 
    176182void ConnectionWindow::closeEvent(QCloseEvent *event) { 
    177183 
     184 
    178185        emit ctinWindowIsClosed(9); 
     186 
    179187} 
    180 /************************************************************************************/ 
    181 /********************************* End of file. *************************************/ 
    182 /************************************************************************************/ 
     188/**********************************************************************************************************************************************/ 
     189/****************************************************** End of file. **************************************************************************/ 
     190/**********************************************************************************************************************************************/ 
  • trunk/yao/src/interface/src/MainWindow.cpp

    r371 r374  
    406406 
    407407        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(); 
    409409                espace.addWindow(m_ctinWindow)->move(0, 0); 
    410410                m_ctinWindow->show(); 
  • trunk/yao/src/interface/src/MainWindowController.cpp

    r366 r374  
    203203ConnectionWindow *MainWindowController::getCtin() { 
    204204 
    205     return m_ctin = new ConnectionWindow; 
     205        //   return m_ctin = new ConnectionWindow; 
    206206} 
    207207 
  • trunk/yao/src/interface/src/ModulWindow.cpp

    r373 r374  
    189189                        return; // Arrêt de la méthode 
    190190                }  
     191         
    191192        //      m_modulModel->setItem(row, 2, new QStandardItem(m_modulAutonetCombo->currentText()));   
    192193        //      m_modulModel->setItem(row, 3, new QStandardItem(m_comboModulClonof->currentText()));   
     
    337338                        throw ofstream::failure("couldn't create " + path); 
    338339        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;  
    340342        theFile << "//===========================================================================" << endl; 
    341343        theFile << "forward ()                                                                   " << endl; 
     
    350352        theFile << endl; 
    351353        theFile << endl; 
    352         theFile << endl; 
    353354        theFile << "}                                                                            " << endl; 
    354355        theFile << endl; 
    355356        theFile << "//===========================================================================" << endl; 
    356         theFile << "// methodes classe C: backward                                               " << endl; 
     357        theFile << "// methodes classe : backward                                                " << endl; 
    357358        theFile << "//===========================================================================" << endl; 
    358359        theFile << "backward ()                                                                  " << endl; 
     
    367368        theFile << endl; 
    368369        theFile << endl; 
    369         theFile << endl; 
    370370        theFile << "}                                                                            " << endl; 
    371371        theFile << "//===========================================================================" << endl; 
    372         theFile << "//************************** FIN DU MODULE C  *******************************" << endl; 
     372        theFile << "//**************************  FIN DU MODULE   *******************************" << endl; 
    373373 
    374374        theFile.close(); 
  • trunk/yao/src/interface/src/include/ConnectionWindow.hpp

    r373 r374  
    1212#include "../../../YAOObjects/Table.hpp" 
    1313#include "../../../YAOObjects/Connection.hpp" 
     14#include "../../../YAOObjects/Modul.hpp" 
    1415#include <QTextCodec> 
    1516#include <QFileDialog> 
     
    3637 
    3738        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); 
    4446                        QStringList getDataCtin(); /*!< This function returns the connexion's data. */ 
    45                 void initialiseCtin();   
     47                        void initialiseCtin();   
    4648 
    4749        private slots:       /*!< Functions called after a click. */ 
     
    6163                        QStringList CtinData; 
    6264                        QStandardItemModel *m_ctinModel; 
    63                     
     65                        yao::Table <yao::Modul> *m_localModulTable; 
    6466                     
    6567}; 
Note: See TracChangeset for help on using the changeset viewer.