Changeset 367 for trunk


Ignore:
Timestamp:
06/29/10 23:22:38 (14 years ago)
Author:
yerima
Message:

Changing the inteface of the Option window. Visual Yao.

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

Legend:

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

    r363 r367  
    1919//! \brief Implementation of the Context window for visual_YAO. 
    2020/******************************************************************************************************************************************************/ 
    21 ContextWindow::ContextWindow(Context *aContext, Table <Constant> *aConstantTable, MainWindowController *mwc, QWidget *parent) : QWidget(parent), localConstantTable(NULL), m_contextModel(NULL) { 
     21ContextWindow::ContextWindow(Context *aContext, Table <Constant> *aConstantTable, MainWindowController *mwc, QWidget *parent) : QWidget(parent), localConstantTable(NULL), m_contextModel(NULL), O_EXTOBJModele(NULL) { 
    2222 
    2323        setupUi(this); 
     
    2525        localConstantTable       = aConstantTable; 
    2626        m_localContext           = aContext; 
    27 //      localMwc                 = mwc; 
    28         if (isContextListEmpty()) m_contextDelButton->setDisabled(true);   
     27        if (isContextListEmpty()) m_delButtonO_EXTOBJ->setDisabled(true);   
    2928                m_comboContextO_REAL->insertItem(0, "");  
    3029                m_comboContextO_REAL->insertItem(1, "FLOAT");  
     
    4039                m_comboContextO_EXTOBJ->insertItem(0, "");  
    4140 
     41                m_comboContextO_PARALLEL->setEditable(true); 
     42 
    4243        for (Table<Constant>::reverse_iterator it = localConstantTable->rbegin(); it != localConstantTable->rend(); it++)  
    4344                { 
     
    4849 
    4950        filesListModele = new QStringListModel(filesList); 
    50         m_contextModel = new  QStandardItemModel(0, 14);//Nombre de lignes et colonnes du modÚle. 
    51              m_contextModel->setHorizontalHeaderLabels(QStringList() << "O_REAL" << "O_MQN" << "O_PARALLEL" << "O_NETWARD" << "O_EXTOBJ" << "O_GRADTEST" << "O_VARINCR" << "DBG_NANF" << "DBG_TING" << "DBG_BETA" << "DBG_TRC_FWARD" << "DBG_TRC_BWARD" << "DBG_TRC_LWARD" << "DBG_TRC_AWARD"); /*!< displays the QTableView */ 
    52  
    53         m_contextTableView->setModel(m_contextModel); 
     51 
     52        /*m_contextTableView->setModel(m_contextModel); 
    5453                  m_contextTableView->resizeColumnsToContents(); 
    55                   m_contextTableView->setEditTriggers(QAbstractItemView::NoEditTriggers); /*!< this ligne give no edit mode*/ 
    56                   m_contextTableView->setShowGrid(false);  /*!< this ligne cover the grille in table */ 
     54                  m_contextTableView->setEditTriggers(QAbstractItemView::NoEditTriggers);  
     55                  m_contextTableView->setShowGrid(false);   
    5756                  m_contextTableView->setSelectionBehavior(QAbstractItemView::SelectRows);  
    58  
     57        */ 
    5958        /*for (Table<Constant>::reverse_iterator it = localConstantTable->rbegin(); it != localConstantTable->rend(); it++)  { 
    6059         
     
    6463        O_EXTOBJModele = new QStandardItemModel(0, 1) ;          
    6564 
    66         m_O_EXTOBJListView->setModel(O_EXTOBJModele);  
     65 
     66        for (vector <string>::reverse_iterator it = m_fileList.rbegin(); it != m_fileList.rend(); it++ )  
     67                { 
     68                        O_EXTOBJModele->appendRow(new QStandardItem(QString(it->c_str())));      
     69                } 
     70         
     71        m_contextO_EXTOBJListView->setModel(O_EXTOBJModele);  
    6772 
    6873        //connect(m_enregContext, SIGNAL(clicked()), this, SLOT(saveContextData())); 
     74        connect(m_contextSaveButton, SIGNAL(clicked()), this, SLOT(saveParameters())); 
     75        connect(m_contextResetButton, SIGNAL(clicked()), this, SLOT(resetParameters())); 
    6976        connect(m_contextQuitButton, SIGNAL(clicked()), this, SLOT(close())); 
    70         connect(m_contextAddButton, SIGNAL(clicked()), this, SLOT(addContextRow())); 
    71         connect(m_contextDelButton, SIGNAL(clicked()), this, SLOT(deleteContextRow())); 
    7277        connect(m_contextHelpButton, SIGNAL(clicked()), this, SLOT(callContextHelp())); 
    7378         
     
    7580        connect(m_delButtonO_EXTOBJ, SIGNAL(clicked()), this, SLOT(deleteO_EXTOBJRow())); 
    7681 
    77         setFixedWidth(baseSize().width() + 699); 
     82        setFixedWidth(baseSize().width() + 560); 
    7883 
    7984} 
    8085/**************************************** Implémentation de la méthode addContextRow *****************************************************************/ 
    81 void ContextWindow::addContextRow() { 
     86/*void ContextWindow::addContextRow() { 
    8287 
    8388        try { 
    84                         /*m_comboContextO_REAL->setCurrentIndex(0);  
    85                         m_comboContextO_MQN->setCurrentIndex(0);  
    86                         m_comboContextO_PARALLEL->setCurrentIndex(0); 
    87                         m_comboContextO_NETWARD->setCurrentIndex(0);  
    88                         m_comboContextO_EXTOBJ->setCurrentIndex(0); 
    89                         m_checkBoxO_GRADTEST->setChecked(false);         
    90                         m_checkBoxO_VARINCR->setChecked(false); 
    91                         m_checkBoxO_DBG_NANF->setChecked(false); 
    92                         m_checkBoxO_DBG_TING->setChecked(false); 
    93                         m_checkBoxO_DBG_BETA->setChecked(false); 
    94                         m_checkBoxO_DBG_TRC_FWARD->setChecked(false); 
    95                         m_checkBoxO_DBG_TRC_BWARD->setChecked(false); 
    96                         m_checkBoxO_DBG_TRC_LWARD->setChecked(false); 
    97                         m_checkBoxO_DBG_TRC_AWARD 
    98                         */ 
    9989                        //filesList.append(m_comboContextO_REAL->currentText()); 
    10090                        //filesListModele->setStringList(filesList); 
     
    10292                 
    10393                        int row = m_contextModel->rowCount(); 
    104                         /*if (!localMwc->isIntegerLiteral(m_comboContextO_PARALLEL->currentText().toStdString())) {  
    105                          
    106                         QMessageBox::critical(this, "Avertissement", "CaractÚre(s) non permis dans le champ \"O_PARALLEL\"."); 
    107                         return; // Arrêt de la méthode 
    108                         }*/ 
    10994                        m_contextModel->setItem(row, 0, new QStandardItem(m_comboContextO_REAL->currentText()));   
    11095                        m_contextModel->setItem(row, 1, new QStandardItem(m_comboContextO_MQN->currentText()));   
     
    125110 
    126111                        eraseDataFromLineEdit(); 
    127                         if (!isContextListEmpty()) m_contextDelButton->setEnabled(true); 
     112                        if (!isContextListEmpty()) m_contextResetButton->setEnabled(true); 
    128113        } 
    129114 
     
    132117                        QMessageBox::critical(this, "Erreur", "Erreur dans la methode addContextRow()"); 
    133118                } 
    134 } 
    135  
    136 /**************************************** Implémentation de la méthode addO_EXTOBJRow() **************************************************************/ 
     119} */ 
     120 
     121/**************************************** Implémentation de la méthode saveParameters() **************************************************************/ 
     122void ContextWindow::saveParameters() { 
     123 
     124        try  
     125                { 
     126                        /*      m_contextModel->setItem(row, 0, new QStandardItem());   
     127                 
     128                        m_checkBoxO_GRADTEST->isChecked() 
     129                        m_checkBoxO_VARINCR->isChecked() 
     130                        m_checkBoxO_DBG_NANF->isChecked() 
     131                        m_checkBoxO_DBG_TING->isChecked() 
     132                        m_checkBoxO_DBG_BETA->isChecked() 
     133                        m_checkBoxO_DBG_TRC_FWARD->isChecked() 
     134                        m_checkBoxO_DBG_TRC_BWARD->isChecked() 
     135                        m_checkBoxO_DBG_TRC_LWARD->isChecked() 
     136                        m_checkBoxO_DBG_TRC_AWARD->isChecked()*/ 
     137                        m_contextParametersToString.clear(); 
     138                        string option = "option "; 
     139                        string o_real           = m_comboContextO_REAL->currentText().toStdString(), 
     140                                o_mqn           = m_comboContextO_MQN->currentText().toStdString(), 
     141                                o_parallel      = m_comboContextO_PARALLEL->currentText().toStdString(), 
     142                                o_netward       = m_comboContextO_NETWARD->currentText().toStdString(),  
     143                                o_real2, o_mqn2, o_parallel2    ;        
     144                         
     145                        if (!o_real.empty()) 
     146                                //QMessageBox::critical(this, "Erreur", ""); 
     147                                if ((o_real == "FLOAT") || (o_real == "DOUBLE"))  
     148                                        o_real2 = option + o_real;               
     149                                 
     150                        if (!o_mqn.empty()) 
     151                                if ((o_mqn == "M1QN3") || (o_mqn == "M2QN1")) 
     152                                        o_mqn2 = option + o_mqn; 
     153         
     154                        if (!o_parallel.empty()) 
     155                                if ((o_parallel == "ACTIF"))  
     156                                        o_parallel2 = option + "o_parallel" ; 
     157 
     158                         
     159                        for (vector <string>::reverse_iterator it = m_fileList.rbegin(); it != m_fileList.rend(); it++ ) 
     160                                { 
     161                                        //string test.insert(""); 
     162                                        string test = "option "; 
     163                                        m_contextParametersToString.append(test.append(it->c_str()));// << endl; 
     164                                        m_contextParametersToString.append("\n"); 
     165 
     166                                        //cout << "coucou" << endl; 
     167                                } 
     168                        m_contextParametersToString = o_real2 + "\n" + o_mqn2 + "\n" + o_parallel2 + "\n"; 
     169 
     170                        cout << "voici les parametres: " << endl << m_contextParametersToString << endl;  
     171                } 
     172                catch(...)  
     173                        { 
     174                                QMessageBox::critical(this, "Erreur", "Erreur dans la methode saveParameters()"); 
     175                        } 
     176} 
     177               
     178/**************************************** Implémentation de la méthode saveParameters() **************************************************************/ 
    137179void ContextWindow::addO_EXTOBJRow() { 
    138180 
     
    140182                { 
    141183                        O_EXTOBJModele->appendRow(new QStandardItem(m_comboContextO_EXTOBJ->currentText()));  
     184                        m_fileList.push_back(m_comboContextO_EXTOBJ->currentText().toStdString());       
    142185                        m_comboContextO_EXTOBJ->setCurrentIndex(0); 
    143186                } 
     
    147190                        } 
    148191} 
    149 /********************************************************************/ 
    150 bool ContextWindow::isContextListEmpty() { 
    151  
    152         if (filesList.empty()) 
    153                 return true; 
    154         else  
    155                 return false; 
    156 } 
    157  
    158 /**********************************************************************/ 
    159 void ContextWindow::closeEvent(QCloseEvent *event){ 
    160   
    161      /* if (!(m_comboHatName->currentText().isEmpty()) && !(m_comboHatName->currentText().isEmpty())) {                                                   
    162           int ret = QMessageBox::warning(this, tr("Confirmation de fermeture"), tr("Voulez-vous vraiment quitter?"),                                       
    163                          QMessageBox::Yes | QMessageBox::Default, QMessageBox::Cancel | QMessageBox::Escape);                                             
    164                                                                             
    165           if (ret == QMessageBox::Yes)  
    166                  event->accept(); //cout << " test qui marche!" << endl; 
    167           //         event->accept(); 
    168                  else 
    169                    event->ignore(); 
    170           }*/ 
    171                   
    172                  emit contextWindowIsClosed(3); 
    173  }                
    174  
    175192 
    176193/**************************************** Implémentation de la méthode deleteO_EXTOBJRow() **********************************************************/ 
    177194void ContextWindow::deleteO_EXTOBJRow() { 
    178195 
    179         QItemSelectionModel *selection = m_O_EXTOBJListView->selectionModel();  
     196        QItemSelectionModel *selection = m_contextO_EXTOBJListView->selectionModel();  
    180197        O_EXTOBJIndex = selection->currentIndex();  
    181          if (!O_EXTOBJIndex.isValid())  
     198 
     199        if (!O_EXTOBJIndex.isValid())  
    182200                return;  
     201 
    183202        QVariant element = O_EXTOBJModele->data(O_EXTOBJIndex, Qt::DisplayRole); 
    184203        int r = O_EXTOBJIndex.row(); 
    185         if (selection->hasSelection()) { 
    186          O_EXTOBJModele->removeRows(m_O_EXTOBJListView->currentIndex().row(), 1);  
    187         //localHeaderList->erase(localHeaderList->begin() + r); 
    188         //if(isHeaderListEmpty()) m_delHatButton->setDisabled(true); 
    189         } 
     204 
     205        if (selection->hasSelection())  
     206                { 
     207                        O_EXTOBJModele->removeRows(m_contextO_EXTOBJListView->currentIndex().row(), 1);  
     208                        //localHeaderList->erase(localHeaderList->begin() + r); 
     209                        //if(isHeaderListEmpty()) m_delHatButton->setDisabled(true); 
     210                } 
    190211        //cout << "Salut" << endl; 
    191212} 
     213 
     214/*************************************** Implémentation de la méthode resetParameters ****************************************************************/ 
     215void ContextWindow::resetParameters() { 
     216 
     217/*      QItemSelectionModel *selection = m_contextTableView->selectionModel(); 
     218        QModelIndex indexElementSelectionne = selection->currentIndex(); 
     219        QVariant elementSelectionne = filesListModele->data(indexElementSelectionne, Qt::DisplayRole); 
     220 
     221        filesList.removeOne(elementSelectionne.toString());//Retrait de l'élément sélectionné de l'objet QStringList 
     222        filesListModele->setStringList(filesList); //On indique au modÚle la liste des éléments à afficher. 
     223 
     224*/ 
     225        eraseDataFromLineEdit();         
     226} 
     227 
     228/*****************************************************************************************************************************/ 
     229void ContextWindow::saveContextData() { 
     230         
     231} 
     232 
     233/********************************************************************/ 
     234bool ContextWindow:: isContextListEmpty() { 
     235 
     236        //int row = O_EXTOBJModele->rowCount(); 
     237        //if (row == 0) 
     238        //      return true; 
     239        //else  
     240                return false; 
     241} 
     242 
     243 
     244/*****************************************************************************************************************************/ 
     245/*****************************************************************************************************************************/ 
     246/****************************************************************************************************************************/ 
     247QStringList ContextWindow::getContextData() { 
     248 
     249        return filesList; 
     250} 
     251 
     252/****************************************************************************************************************************/ 
     253 
    192254/************************************* Implémentation de la méthode eraseDataFromLineEdit() ***********************************************************/ 
    193255void ContextWindow::eraseDataFromLineEdit() { 
     
    209271                 
    210272} 
    211 /*************************************** Implémentation de la méthode deleteContextRow ****************************************************************/ 
    212 void ContextWindow::deleteContextRow() { 
    213  
    214         QItemSelectionModel *selection = m_contextTableView->selectionModel(); 
    215         QModelIndex indexElementSelectionne = selection->currentIndex(); 
    216         QVariant elementSelectionne = filesListModele->data(indexElementSelectionne, Qt::DisplayRole); 
    217  
    218         filesList.removeOne(elementSelectionne.toString());//Retrait de l'élément sélectionné de l'objet QStringList 
    219         filesListModele->setStringList(filesList); //On indique au modÚle la liste des éléments à afficher. 
    220  
    221         //compteur --; 
    222         //testContenu(compteur); 
    223          
    224 } 
    225  
    226  
    227 /*****************************************************************************************************************************/ 
    228 void ContextWindow::saveContextData() { 
    229          
    230 } 
    231 /*****************************************************************************************************************************/ 
    232 /*void ContextWindow::enregistrerContext() { 
    233  
    234           projetContext = new QFileDialog(this); 
    235           QStringList filtres; 
    236  
    237           projetContext->setDirectory("."); 
    238           projetContext->setFileMode (QFileDialog::AnyFile); 
    239           filtres << "*.h" 
    240                   << "Tous les fichiers (*.*)"; 
    241           projetContext->setFilters(filtres); 
    242  
    243           //if(fd->exec()) { 
    244             m_cheminProjetContext = projetContext->getSaveFileName(); 
    245  
    246 }*/ 
    247 /*****************************************************************************************************************************/ 
    248 /*void ContextWindow::ouvrirProjetExistant3() { 
    249  
    250             projetContext = new QFileDialog(this); 
    251           QStringList filtres; 
    252  
    253           projetContext->setDirectory("."); 
    254           projetContext->setFileMode (QFileDialog::AnyFile); 
    255           filtres << "*.h" 
    256           << "Tous les fichiers (*.*)"; 
    257           projetContext->setFilters(filtres); 
    258  
    259             m_cheminProjetContext = projetContext->getSaveFileName(); 
    260  }*/ 
    261  
    262 /****************************************************************************************************************************/ 
    263 QStringList ContextWindow::getContextData() { 
    264  
    265         return filesList; 
    266 } 
    267  
    268 /****************************************************************************************************************************/ 
    269  
    270 bool ContextWindow::testContenu(int anInt) { 
    271  
    272         if (anInt != 0) { 
    273                 m_contextDelButton->setEnabled(true); 
    274                 //m_enregContext->setEnabled(true); 
    275  
    276                 return true; 
    277  
    278         } 
    279         else 
    280         { 
    281                 m_contextDelButton->setDisabled(true); 
    282                 //m_enregContext->setDisabled(true); 
    283  
    284                 return false; 
    285         } 
    286 } 
    287273/****************************************************************************************************************************/ 
    288274void ContextWindow::callContextHelp() { 
     
    291277 
    292278} 
     279 
     280/****************************************** Implement of the method closeEvent(QCloseEvent *event) ****************************/ 
     281void ContextWindow::closeEvent(QCloseEvent *event){ 
     282  
     283     /* if (!(m_comboHatName->currentText().isEmpty()) && !(m_comboHatName->currentText().isEmpty())) {                                                   
     284          int ret = QMessageBox::warning(this, tr("Confirmation de fermeture"), tr("Voulez-vous vraiment quitter?"),                                       
     285                         QMessageBox::Yes | QMessageBox::Default, QMessageBox::Cancel | QMessageBox::Escape);                                             
     286                                                                            
     287          if (ret == QMessageBox::Yes)  
     288                 event->accept(); //cout << " test qui marche!" << endl; 
     289          //         event->accept(); 
     290                 else 
     291                   event->ignore(); 
     292          }*/ 
     293                  
     294           //        event->accept(); 
     295          //       emit contextWindowIsClosed(3); 
     296        //      for (vector <string>::iterator it = m_fileList.begin(); it != m_fileList.end(); it++ ) 
     297            //                     { 
     298                                         //string test.insert(""); 
     299                                         //string test = "opera "; 
     300              //                           cout << it->c_str() << endl; 
     301                //                         //cout << "coucou" << endl; 
     302                  //               } 
     303 
     304 }  
     305/******************************************************************************************************************************************************/ 
     306/********************************************** End of the Context.cpp file ***************************************************************************/ 
     307/******************************************************************************************************************************************************/ 
  • trunk/yao/src/interface/src/HatNameWindow.cpp

    r366 r367  
    220220void HatNameWindow::closeEvent(QCloseEvent *event){ 
    221221 
    222         if (!(m_comboHatName->currentText().isEmpty()) && !(m_comboHatName->currentText().isEmpty())) {      
     222        if (!(m_comboHatName->currentText().isEmpty()) && !(m_comboHatName->currentText().isEmpty()))  
     223                {      
    223224  
    224          int ret = QMessageBox::warning(this, tr("Confirmation de fermeture"), tr("Voulez-vous vraiment quitter?"), 
    225                          QMessageBox::Yes | QMessageBox::Default, QMessageBox::Cancel | QMessageBox::Escape); 
     225                        int ret = QMessageBox::warning(this, tr("Confirmation de fermeture"), tr("Voulez-vous vraiment quitter?"), 
     226                                QMessageBox::Yes | QMessageBox::Default, QMessageBox::Cancel | QMessageBox::Escape); 
    226227  
    227         if (ret == QMessageBox::Yes)  
    228                 event->accept(); //cout << " test qui marche!" << endl; 
     228                        if (ret == QMessageBox::Yes)  
     229                                event->accept(); //cout << " test qui marche!" << endl; 
    229230         //         event->accept(); 
    230                 else 
    231                   event->ignore(); 
    232          } 
    233  
    234                 emit hatWindowIsClosed(2); 
     231                        else 
     232                                event->ignore(); 
     233                } 
     234 
     235        emit hatWindowIsClosed(2); 
    235236} 
    236237 
  • trunk/yao/src/interface/src/MainWindow.cpp

    r366 r367  
    309309        connect(m_constantWindow, SIGNAL(rowIsAdded()), this, SLOT(hatUpdate())); 
    310310        connect(m_constantWindow, SIGNAL(rowIsDeleted(QString )), this, SLOT(hatUpdate(QString ))); 
     311        connect(m_constantWindow, SIGNAL(rowIsAdded()), this, SLOT(contextUpdate())); 
    311312        connect(m_constantWindow, SIGNAL(windowIsClosed(int )), this, SLOT(initializeWindow(int )));// The signal is in the ConstantWindow.hpp file. 
    312313 
     
    393394        if (m_modulWindow == NULL) { //to test if the object is already created. 
    394395                m_modulWindow = new ModulWindow(&theModulTable, &theSpaceTable, &theOperaTable, &theConstantTable, &the_mwc); //mwc.getModul(); 
    395                 espace.addWindow(m_modulWindow); 
    396396                espace.addWindow(m_modulWindow)->move(30, 15); 
    397397                m_modulWindow->show();  
     
    499499         
    500500        //m_hatnameWindow->repaint();//update(); 
    501         theConstantTable; 
     501        //theConstantTable; 
    502502        if (m_hatnameWindow != NULL) //Teste si l'objet n'est pas déjà crée. S'il n'est pas  
    503503                {  
    504                         //delete m_hatnameWindow; 
     504                        delete m_hatnameWindow; 
    505505                        m_hatnameWindow = new HatNameWindow(&theHeaderList, &theConstantTable); //Crée un autre objet. 
    506506                        espace.addWindow(m_hatnameWindow)->move(350, 0); 
    507507                        m_hatnameWindow->show(); 
    508508                        espace.setActiveWindow(m_constantWindow); 
    509                         m_hatnameWindow->update(); 
     509                        //m_hatnameWindow->update(); 
     510 
     511                        connect(m_hatnameWindow, SIGNAL(hatWindowIsClosed(int)), this, SLOT(initializeWindow(int)));// The signal is in the HatNameWindow.hpp file. 
    510512                } 
     513 
    511514        else 
    512515                return; 
     
    519522        if (m_hatnameWindow != NULL) //Teste si l'objet n'est pas déjà crée. 
    520523                {  
    521                         //delete m_hatnameWindow; 
     524                        delete m_hatnameWindow; 
    522525                        m_hatnameWindow = new HatNameWindow(&theHeaderList, &theConstantTable); //Crée un autre objet. 
    523526                        espace.addWindow(m_hatnameWindow)->move(350, 0); 
    524527                        m_hatnameWindow->show(); 
    525528                        espace.setActiveWindow(m_constantWindow); 
     529 
     530                        connect(m_hatnameWindow, SIGNAL(hatWindowIsClosed(int)), this, SLOT(initializeWindow(int)));// The signal is in the HatNameWindow.hpp file. 
     531                } 
     532        else 
     533                return; 
     534} 
     535/******************************************* Implementation of the method contextUpdate(QString choix) ************************************************/ 
     536void MainWindow::contextUpdate() { 
     537 
     538        if (m_contextWindow != NULL) //Teste si l'objet n'est pas déjà crée. 
     539                {  
     540                        delete m_contextWindow ; 
     541                        m_contextWindow = new ContextWindow(&theContext, &theConstantTable, &the_mwc); //mwc.getContext(); 
     542                        espace.addWindow(m_contextWindow)->move(350, 0); 
     543                        m_contextWindow->show(); 
     544                        espace.setActiveWindow(m_constantWindow); 
     545                        //m_contextWindow->update();  
     546 
     547                        connect(m_contextWindow, SIGNAL(contextWindowIsClosed(int)), this, SLOT(initializeWindow(int))); 
     548 
    526549                } 
    527550        else 
  • trunk/yao/src/interface/src/include/ContextWindow.hpp

    r359 r367  
    1212#include <QStandardItemModel>  
    1313#include "../../ui_contextwindow.h" 
    14 #include "Entete.hpp" 
    1514#include "MainWindowController.hpp" 
    1615#include <QString> 
     
    2019#include <QFileDialog> 
    2120#include <QStringListModel> 
     21#include <iostream> 
     22#include <vector> 
    2223#include "../../../YAOObjects/Context.hpp" 
    2324#include "../../../YAOObjects/Constant.hpp" 
     
    3132                ContextWindow(yao::Context *aContext, yao::Table <yao::Constant> *aConstantTable, MainWindowController *mwc, QWidget *parent=0); 
    3233                QStringList getContextData(); 
    33                 bool testContenu(int anInt); 
    3434                void eraseDataFromLineEdit();  
    3535 
     
    3939                //void ouvrirProjetExistant3(); 
    4040                void saveContextData(); 
    41                 void addContextRow(); 
     41        //      void addContextRow(); 
     42                void saveParameters(); 
    4243                void addO_EXTOBJRow(); 
    4344                void deleteO_EXTOBJRow(); 
    44                 void deleteContextRow(); 
     45                void resetParameters(); 
    4546                void callContextHelp();          
    4647                bool isContextListEmpty(); 
     
    7172 
    7273                yao::Context *m_localContext; 
    73                 std::vector<std::string> anVector; 
     74                std::vector <std::string> m_fileList; 
     75                std::string m_contextParametersToString; 
    7476                yao::Table <yao::Constant> *localConstantTable; 
    7577                MainWindowController *localMwc; 
  • trunk/yao/src/interface/src/include/MainWindow.hpp

    r364 r367  
    126126                        void hatUpdate(); 
    127127                        void hatUpdate(QString choix ); 
     128                        void contextUpdate(); 
    128129 
    129130        signals : 
  • trunk/yao/src/interface/src/ui_/contextwindow.ui

    r362 r367  
    77    <x>0</x> 
    88    <y>0</y> 
    9     <width>697</width> 
    10     <height>517</height> 
     9    <width>562</width> 
     10    <height>341</height> 
    1111   </rect> 
    1212  </property> 
     
    1919     <x>10</x> 
    2020     <y>10</y> 
    21      <width>681</width> 
     21     <width>451</width> 
    2222     <height>321</height> 
    2323    </rect> 
     
    3434      <x>10</x> 
    3535      <y>10</y> 
    36       <width>191</width> 
     36      <width>211</width> 
    3737      <height>136</height> 
    3838     </rect> 
     
    102102      <x>10</x> 
    103103      <y>150</y> 
    104       <width>191</width> 
    105       <height>151</height> 
     104      <width>211</width> 
     105      <height>161</height> 
    106106     </rect> 
    107107    </property> 
     
    117117       <x>10</x> 
    118118       <y>10</y> 
    119        <width>171</width> 
     119       <width>191</width> 
    120120       <height>29</height> 
    121121      </rect> 
     
    134134     </layout> 
    135135    </widget> 
    136     <widget class="QListView" name="m_O_EXTOBJListView"> 
     136    <widget class="QListView" name="m_contextO_EXTOBJListView"> 
    137137     <property name="geometry"> 
    138138      <rect> 
    139        <x>100</x> 
     139       <x>10</x> 
    140140       <y>50</y> 
    141        <width>81</width> 
    142        <height>91</height> 
     141       <width>101</width> 
     142       <height>101</height> 
    143143      </rect> 
    144144     </property> 
     
    147147     <property name="geometry"> 
    148148      <rect> 
    149        <x>10</x> 
    150        <y>60</y> 
     149       <x>120</x> 
     150       <y>70</y> 
    151151       <width>87</width> 
    152152       <height>62</height> 
     
    171171    </widget> 
    172172   </widget> 
    173    <widget class="QGroupBox" name="m_groupO_DBG"> 
     173   <widget class="QFrame" name="frame_2"> 
    174174    <property name="geometry"> 
    175175     <rect> 
    176       <x>230</x> 
    177       <y>80</y> 
    178       <width>151</width> 
    179       <height>241</height> 
     176      <x>240</x> 
     177      <y>100</y> 
     178      <width>201</width> 
     179      <height>211</height> 
    180180     </rect> 
    181181    </property> 
    182     <property name="title"> 
    183      <string>O_DBG_</string> 
    184     </property> 
    185     <property name="checkable"> 
    186      <bool>true</bool> 
    187     </property> 
    188     <property name="checked"> 
    189      <bool>false</bool> 
    190     </property> 
    191     <widget class="QFrame" name="frame_2"> 
     182    <property name="frameShape"> 
     183     <enum>QFrame::StyledPanel</enum> 
     184    </property> 
     185    <property name="frameShadow"> 
     186     <enum>QFrame::Raised</enum> 
     187    </property> 
     188    <widget class="QWidget" name="layoutWidget"> 
    192189     <property name="geometry"> 
    193190      <rect> 
    194191       <x>10</x> 
    195        <y>20</y> 
    196        <width>131</width> 
    197        <height>211</height> 
     192       <y>10</y> 
     193       <width>181</width> 
     194       <height>192</height> 
    198195      </rect> 
    199196     </property> 
    200      <property name="frameShape"> 
    201       <enum>QFrame::StyledPanel</enum> 
    202      </property> 
    203      <property name="frameShadow"> 
    204       <enum>QFrame::Raised</enum> 
    205      </property> 
    206      <widget class="QWidget" name="layoutWidget"> 
    207       <property name="geometry"> 
    208        <rect> 
    209         <x>10</x> 
    210         <y>10</y> 
    211         <width>106</width> 
    212         <height>192</height> 
    213        </rect> 
    214       </property> 
    215       <layout class="QVBoxLayout" name="verticalLayout_3"> 
    216        <item> 
    217         <widget class="QCheckBox" name="m_checkBoxO_DBG_NANF"> 
    218          <property name="text"> 
    219           <string>NANF</string> 
    220          </property> 
    221         </widget> 
    222        </item> 
    223        <item> 
    224         <widget class="QCheckBox" name="m_checkBoxO_DBG_BETA"> 
    225          <property name="text"> 
    226           <string>BETA</string> 
    227          </property> 
    228         </widget> 
    229        </item> 
    230        <item> 
    231         <widget class="QCheckBox" name="m_checkBoxO_DBG_TING"> 
    232          <property name="text"> 
    233           <string>TING</string> 
    234          </property> 
    235         </widget> 
    236        </item> 
    237        <item> 
    238         <widget class="QCheckBox" name="m_checkBoxO_DBG_TRC_BWARD"> 
    239          <property name="text"> 
    240           <string>TRC_BWARD</string> 
    241          </property> 
    242         </widget> 
    243        </item> 
    244        <item> 
    245         <widget class="QCheckBox" name="m_checkBoxO_DBG_TRC_AWARD"> 
    246          <property name="text"> 
    247           <string>TRC_AWARD</string> 
    248          </property> 
    249         </widget> 
    250        </item> 
    251        <item> 
    252         <widget class="QCheckBox" name="m_checkBoxO_DBG_TRC_LWARD"> 
    253          <property name="text"> 
    254           <string>TRC_LWARD</string> 
    255          </property> 
    256         </widget> 
    257        </item> 
    258        <item> 
    259         <widget class="QCheckBox" name="m_checkBoxO_DBG_TRC_FWARD"> 
    260          <property name="text"> 
    261           <string>TRC_FWARD</string> 
    262          </property> 
    263         </widget> 
    264        </item> 
    265       </layout> 
    266      </widget> 
     197     <layout class="QVBoxLayout" name="verticalLayout_3"> 
     198      <item> 
     199       <widget class="QCheckBox" name="m_checkBoxO_DBG_NANF"> 
     200        <property name="text"> 
     201         <string>O_DBG_NANF</string> 
     202        </property> 
     203       </widget> 
     204      </item> 
     205      <item> 
     206       <widget class="QCheckBox" name="m_checkBoxO_DBG_BETA"> 
     207        <property name="text"> 
     208         <string>O_DBG_BETA</string> 
     209        </property> 
     210       </widget> 
     211      </item> 
     212      <item> 
     213       <widget class="QCheckBox" name="m_checkBoxO_DBG_TING"> 
     214        <property name="text"> 
     215         <string>O_DBG_TING</string> 
     216        </property> 
     217       </widget> 
     218      </item> 
     219      <item> 
     220       <widget class="QCheckBox" name="m_checkBoxO_DBG_TRC_BWARD"> 
     221        <property name="text"> 
     222         <string>O_DBG_TRC_BWARD</string> 
     223        </property> 
     224       </widget> 
     225      </item> 
     226      <item> 
     227       <widget class="QCheckBox" name="m_checkBoxO_DBG_TRC_AWARD"> 
     228        <property name="text"> 
     229         <string>O_DBG_TRC_AWARD</string> 
     230        </property> 
     231       </widget> 
     232      </item> 
     233      <item> 
     234       <widget class="QCheckBox" name="m_checkBoxO_DBG_TRC_LWARD"> 
     235        <property name="text"> 
     236         <string>O_DBG_TRC_LWARD</string> 
     237        </property> 
     238       </widget> 
     239      </item> 
     240      <item> 
     241       <widget class="QCheckBox" name="m_checkBoxO_DBG_TRC_FWARD"> 
     242        <property name="text"> 
     243         <string>O_DBG_TRC_FWARD</string> 
     244        </property> 
     245       </widget> 
     246      </item> 
     247     </layout> 
    267248    </widget> 
    268249   </widget> 
     
    270251    <property name="geometry"> 
    271252     <rect> 
    272       <x>230</x> 
    273       <y>20</y> 
    274       <width>114</width> 
    275       <height>52</height> 
     253      <x>240</x> 
     254      <y>10</y> 
     255      <width>201</width> 
     256      <height>78</height> 
    276257     </rect> 
    277258    </property> 
    278     <layout class="QVBoxLayout" name="verticalLayout_5"> 
    279      <item> 
    280       <widget class="QCheckBox" name="m_checkBoxO_GRADTEST"> 
    281        <property name="text"> 
    282         <string>O_GRADTEST</string> 
     259    <layout class="QVBoxLayout" name="verticalLayout"> 
     260     <item> 
     261      <layout class="QVBoxLayout" name="verticalLayout_5"> 
     262       <item> 
     263        <widget class="QCheckBox" name="m_checkBoxO_GRADTEST"> 
     264         <property name="text"> 
     265          <string>O_GRADTEST</string> 
     266         </property> 
     267        </widget> 
     268       </item> 
     269       <item> 
     270        <widget class="QCheckBox" name="m_checkBoxO_VARINCR"> 
     271         <property name="text"> 
     272          <string>O_VARINCR</string> 
     273         </property> 
     274        </widget> 
     275       </item> 
     276      </layout> 
     277     </item> 
     278     <item> 
     279      <spacer name="verticalSpacer"> 
     280       <property name="orientation"> 
     281        <enum>Qt::Vertical</enum> 
    283282       </property> 
    284       </widget> 
    285      </item> 
    286      <item> 
    287       <widget class="QCheckBox" name="m_checkBoxO_VARINCR"> 
    288        <property name="text"> 
    289         <string>O_VARINCR</string> 
     283       <property name="sizeHint" stdset="0"> 
     284        <size> 
     285         <width>20</width> 
     286         <height>18</height> 
     287        </size> 
    290288       </property> 
    291       </widget> 
     289      </spacer> 
    292290     </item> 
    293291    </layout> 
    294292   </widget> 
    295293  </widget> 
    296   <widget class="QFrame" name="frame_4"> 
     294  <widget class="QPushButton" name="m_contextHelpButton"> 
    297295   <property name="geometry"> 
    298296    <rect> 
    299      <x>10</x> 
    300      <y>340</y> 
    301      <width>681</width> 
    302      <height>171</height> 
     297     <x>470</x> 
     298     <y>300</y> 
     299     <width>41</width> 
     300     <height>27</height> 
    303301    </rect> 
    304302   </property> 
    305    <property name="frameShape"> 
    306     <enum>QFrame::StyledPanel</enum> 
    307    </property> 
    308    <property name="frameShadow"> 
    309     <enum>QFrame::Raised</enum> 
    310    </property> 
    311    <widget class="QTableView" name="m_contextTableView"> 
    312     <property name="geometry"> 
    313      <rect> 
    314       <x>10</x> 
    315       <y>10</y> 
    316       <width>571</width> 
    317       <height>151</height> 
    318      </rect> 
    319     </property> 
    320     <property name="showGrid"> 
    321      <bool>false</bool> 
    322     </property> 
    323     <attribute name="horizontalHeaderVisible"> 
    324      <bool>true</bool> 
    325     </attribute> 
    326     <attribute name="horizontalHeaderShowSortIndicator" stdset="0"> 
    327      <bool>false</bool> 
    328     </attribute> 
    329     <attribute name="horizontalHeaderShowSortIndicator" stdset="0"> 
    330      <bool>false</bool> 
    331     </attribute> 
    332     <attribute name="horizontalHeaderVisible"> 
    333      <bool>true</bool> 
    334     </attribute> 
    335    </widget> 
    336    <widget class="QWidget" name="layoutWidget"> 
    337     <property name="geometry"> 
    338      <rect> 
    339       <x>590</x> 
    340       <y>30</y> 
    341       <width>81</width> 
    342       <height>95</height> 
    343      </rect> 
    344     </property> 
    345     <layout class="QVBoxLayout" name="verticalLayout"> 
    346      <item> 
    347       <widget class="QPushButton" name="m_contextAddButton"> 
    348        <property name="text"> 
    349         <string>Ajouter</string> 
    350        </property> 
    351        <property name="default"> 
    352         <bool>true</bool> 
    353        </property> 
    354       </widget> 
    355      </item> 
    356      <item> 
    357       <widget class="QPushButton" name="m_contextDelButton"> 
    358        <property name="text"> 
    359         <string>Supprimer</string> 
    360        </property> 
    361       </widget> 
    362      </item> 
    363      <item> 
    364       <widget class="QPushButton" name="m_contextQuitButton"> 
    365        <property name="text"> 
    366         <string>Quitter</string> 
    367        </property> 
    368        <property name="autoDefault"> 
    369         <bool>true</bool> 
    370        </property> 
    371       </widget> 
    372      </item> 
    373     </layout> 
    374    </widget> 
    375    <widget class="QPushButton" name="m_contextHelpButton"> 
    376     <property name="geometry"> 
    377      <rect> 
    378       <x>590</x> 
    379       <y>130</y> 
    380       <width>41</width> 
    381       <height>27</height> 
    382      </rect> 
    383     </property> 
    384     <property name="text"> 
    385      <string>Aide</string> 
    386     </property> 
    387     <property name="autoDefault"> 
    388      <bool>true</bool> 
    389     </property> 
    390    </widget> 
     303   <property name="text"> 
     304    <string>Aide</string> 
     305   </property> 
     306  </widget> 
     307  <widget class="QWidget" name="layoutWidget"> 
     308   <property name="geometry"> 
     309    <rect> 
     310     <x>470</x> 
     311     <y>140</y> 
     312     <width>81</width> 
     313     <height>95</height> 
     314    </rect> 
     315   </property> 
     316   <layout class="QVBoxLayout" name="verticalLayout_6"> 
     317    <item> 
     318     <widget class="QPushButton" name="m_contextSaveButton"> 
     319      <property name="text"> 
     320       <string>Enregistrer</string> 
     321      </property> 
     322     </widget> 
     323    </item> 
     324    <item> 
     325     <widget class="QPushButton" name="m_contextResetButton"> 
     326      <property name="text"> 
     327       <string>Initialiser</string> 
     328      </property> 
     329     </widget> 
     330    </item> 
     331    <item> 
     332     <widget class="QPushButton" name="m_contextQuitButton"> 
     333      <property name="text"> 
     334       <string>Quitter</string> 
     335      </property> 
     336     </widget> 
     337    </item> 
     338   </layout> 
    391339  </widget> 
    392340 </widget> 
     
    399347  <tabstop>m_addButtonO_EXTOBJ</tabstop> 
    400348  <tabstop>m_delButtonO_EXTOBJ</tabstop> 
    401   <tabstop>m_O_EXTOBJListView</tabstop> 
     349  <tabstop>m_contextO_EXTOBJListView</tabstop> 
    402350  <tabstop>m_checkBoxO_GRADTEST</tabstop> 
    403351  <tabstop>m_checkBoxO_VARINCR</tabstop> 
    404   <tabstop>m_groupO_DBG</tabstop> 
    405352  <tabstop>m_checkBoxO_DBG_NANF</tabstop> 
    406353  <tabstop>m_checkBoxO_DBG_BETA</tabstop> 
     
    410357  <tabstop>m_checkBoxO_DBG_TRC_LWARD</tabstop> 
    411358  <tabstop>m_checkBoxO_DBG_TRC_FWARD</tabstop> 
    412   <tabstop>m_contextAddButton</tabstop> 
    413   <tabstop>m_contextDelButton</tabstop> 
    414   <tabstop>m_contextQuitButton</tabstop> 
    415   <tabstop>m_contextTableView</tabstop> 
    416   <tabstop>m_contextHelpButton</tabstop> 
    417359 </tabstops> 
    418360 <resources/> 
  • trunk/yao/src/interface/src/ui_/modulwindow.ui

    r362 r367  
    1212  </property> 
    1313  <property name="windowTitle"> 
    14    <string>Directive Module.</string> 
     14   <string>Directive Modul.</string> 
    1515  </property> 
    1616  <widget class="QFrame" name="frame_4"> 
Note: See TracChangeset for help on using the changeset viewer.