Changeset 188 for trunk


Ignore:
Timestamp:
02/02/10 13:08:41 (14 years ago)
Author:
yerima
Message:

Deleting and saving buttons are ready in space window. Visual yao.

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

Legend:

Unmodified
Added
Removed
  • trunk/yao/src/interface/src/Include/DefvalWindow.hpp

    r178 r188  
    3939          
    4040                DefvalWindow(QWidget *parent=0);   /*!< This function returns the constante's data. */ 
    41                                 void addNameInTable(int ligne, int colonne, QString nomDefval); 
     41                void addNameInTable(int ligne, int colonne, QString nomDefval); 
    4242                void addValueInTable(int ligne, int colonne, QString valeurDefval); 
    43                                 void addRow(); 
    44                                 bool testContenu(int anInt); 
    45                 QStringList getDataDefval();  
     43                void addRow(); 
     44                bool testContenu(int anInt); 
     45               QStringList getDataDefval();  
    4646                 
    47  
    48  
    49  
    5047        public slots :        /*!< Functions called after a click. */ 
    5148 
    52                                 void addDefvalRow();    /*!< This function is called to add row in the visual window model. */ 
     49                void addDefvalRow();    /*!< This function is called to add row in the visual window model. */ 
    5350                void deleteDefvalRow(); /*!< This function is called to delete row from the Yao model. */  
    54                                 void initialiserChamps();  
     51                void initialiserChamps();  
    5552                void callDefvalHelp(); 
    5653                void ouvrirProjetExistant(); 
    57                                 void saveDefvalData();  /*!< This function is called to add data in the Yao model. */ 
     54                void saveDefvalData();  /*!< This function is called to add data in the Yao model. */ 
    5855                //void fermerEnrDef(); 
    5956 
     
    6259 
    6360                QLabel  *m_labelNomDefval;   /*!< QLabel for the Constante Name. */ 
    64                                 QLabel  *m_labelValeurDefval;  /*!< QLabel for the Constante value.  */                  
     61                QLabel  *m_labelValeurDefval;  /*!< QLabel for the Constante value.  */                  
    6562 
    66                                 QLineEdit *m_ligneNomDefval;   /*!< QLineEdit for the Constante Name. */ 
     63                QLineEdit *m_ligneNomDefval;   /*!< QLineEdit for the Constante Name. */ 
    6764                QLineEdit *m_ligneValeurDefval;  /*!< QLineEdit for the Constante Name. */ 
    6865 
    6966                QPushButton *m_ajoutDefval;    /*!< The button "add". */ 
    7067                QPushButton *m_supDefval;     /*!< The button "delete". */ 
    71                                 QPushButton *m_saveDefvalButton;  /*!< The button "save". */ 
    72                                 QPushButton *m_quitDefval;    /*!< The button "close window". */ 
     68                QPushButton *m_saveDefvalButton;  /*!< The button "save". */ 
     69                QPushButton *m_quitDefval;    /*!< The button "close window". */ 
    7370                QPushButton *m_DefvalHelpButton;  /*!< The button "Help". */ 
    7471 
    7572                QGridLayout *m_layoutGDefval;  //!< QGridLayout for m_layoutGDefval              
    76                                 QHBoxLayout *m_layoutH1Defval;   //!< QHBoxLayout m_layoutH1Defval 
     73                QHBoxLayout *m_layoutH1Defval;   //!< QHBoxLayout m_layoutH1Defval 
    7774                 
    78                                 QStandardItemModel *modeleDefval; 
     75                QStandardItemModel *modeleDefval; 
    7976                QTableWidget *vueDefval;  /*!< Name of the QTableWidget's object in whitch the objects are listed for the viewer. */ 
    8077 
  • trunk/yao/src/interface/src/Include/SpaceWindow.hpp

    r171 r188  
    99#ifndef SPACEWINDOW_HPP 
    1010#define SPACEWINDOW_HPP 
     11 
    1112#include "src/Include/Entete.hpp" 
    1213#include "TrajWindow.hpp" 
     
    4849                void addRow();                      /*!< This function is called to add row in the visual window model. */ 
    4950                void testPresenceLigne(); 
    50              
     51                bool testContenu(int anInt); 
     52                             
    5153 
    5254    public slots:                               /*!< Functions called after a click. */ 
     
    8486            QHBoxLayout *m_spaceLayout2H;       /*!< The 2nd horizontal Layout's name. */ 
    8587            QVBoxLayout *m_spaceLayout1V; 
    86                         QGridLayout *m_spaceLayoutG; 
     88            QGridLayout *m_spaceLayoutG; 
    8789 
    8890 
     
    9597            //SpaceController m_spc; 
    9698            bool isCalled; 
     99        int compteur; 
     100 
    97101}; 
    98102#endif // SPACEWINDOW_HPP 
  • trunk/yao/src/interface/src/SpaceWindow.cpp

    r178 r188  
    2626    isCalled = false; 
    2727        //QStringList localTrajData = trajData; 
    28          
     28        compteur                                = 0;     
    2929        m_spaceNameLabel                        = new QLabel("Nom de l'espace: ");           /*!< Label of the QLineEdit. */ 
    3030        m_spaceTypeLabel                = new QLabel("Type de l'espace: ");           /*!< The QComboBox's type label. */ 
     
    111111 
    112112        addRow(); 
     113        testContenu(compteur);   
    113114 
    114115        //static int i = 1; 
     
    180181        int row = m_spaceTableView->rowCount(); 
    181182        m_spaceTableView->insertRow(row); 
    182  
     183        compteur ++; 
    183184 
    184185} 
     
    189190        m_spaceTableView->removeRow(m_spaceTableView->currentRow()); 
    190191        //testPresenceLigne(); 
     192         
    191193    isCalled = true; 
    192  
     194    -- compteur; 
     195    testContenu(compteur); 
    193196} 
    194197 
     
    271274        } 
    272275} 
     276/**************************************************************************/ 
     277 bool SpaceWindow::testContenu(int anInt) { 
     278 
     279        if (anInt != 0) { 
     280                m_spaceEnregButton->setEnabled(true); 
     281                m_spaceDeleteButton->setEnabled(true); 
     282        } 
     283        else 
     284        { 
     285                m_spaceEnregButton->setDisabled(true); 
     286                m_spaceDeleteButton->setDisabled(true); 
     287        } 
     288} 
     289 
Note: See TracChangeset for help on using the changeset viewer.