Changeset 184


Ignore:
Timestamp:
02/01/10 00:20:12 (14 years ago)
Author:
yerima
Message:

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

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

Legend:

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

    r178 r184  
    1818  
    1919        setWindowTitle("Directive Hatname."); // Titre de la fenetre. 
     20        compteur                        = 0; 
    2021         
    2122        m_labelNom1HatName      = new QLabel("Nom du fichier (.h): "); 
     
    6970                //m_layoutGHatName->addWidget(m_quitHatName, 7, 2, Qt::AlignHCenter); 
    7071 
    71         if (listeFichiers.isEmpty()) 
    72             m_supHatName->setDisabled(true); 
    73         else 
    74             m_supHatName->setEnabled(true); 
     72        //if (listeFichiers.isEmpty()) 
     73          //  m_supHatName->setDisabled(true); 
     74        //else 
     75            //m_supHatName->setEnabled(true); 
    7576         
    7677        connect(m_quitHatName, SIGNAL(clicked()), this, SLOT(close())); 
     
    134135 
    135136hatFile = getNomFichierHat(); 
     137compteur ++; 
     138testContenu(compteur); 
    136139 
    137140for(int i=0; i < hatFile.size(); i++) { 
     
    165168 
    166169            modeleFichiers->setStringList(listeFichiers); 
    167             testPresenceFichier(); 
     170            //testPresenceFichier(); 
    168171            initialiserChamps(); 
    169172        } 
     
    182185 
    183186modeleFichiers->setStringList(listeFichiers); 
    184 testPresenceFichier(); 
    185  
     187//testPresenceFichier(); 
    186188 
    187189initialiserChamps(); 
     
    198200     modeleFichiers->setStringList(listeFichiers); //On indique au modÚle la liste des éléments à afficher. 
    199201 
    200      testPresenceFichier(); 
     202        -- compteur; 
     203        testContenu(compteur); 
     204 
     205     //testPresenceFichier(); 
    201206  } 
    202207 
     
    260265 
    261266 } 
    262  
     267 /***************************************************************************************/ 
     268  
     269 bool HatNameWindow::testContenu(int anInt) { 
     270 
     271        if (anInt != 0) { 
     272                m_supHatName->setEnabled(true); 
     273                m_enregHatName->setEnabled(true); 
     274        } 
     275        else 
     276        { 
     277                m_supHatName->setDisabled(true); 
     278                m_enregHatName->setDisabled(true); 
     279        } 
     280} 
     281 
     282 
  • trunk/yao/src/interface/src/Include/HatNameWindow.hpp

    r171 r184  
    4848            std::string getNomFichierHat();                                         /*!< This function returns the fil's name */ 
    4949            void testPresenceFichier(); 
    50             QStringList getHatName(); 
     50                        QStringList getHatName(); 
    5151            void setLocalProjectName(std::string name); 
    5252            std::string getLocalProjectName(); 
     53             bool testContenu(int anInt); 
    5354 
    5455            /*! 
     
    125126                std::vector<std::string> hatHeaderList; 
    126127                std::string localProjectName; 
    127  
     128                                int compteur; 
    128129}; 
    129130#endif 
  • trunk/yao/src/interface/src/Include/OptionWindow.hpp

    r171 r184  
    2828    public : 
    2929                OptionWindow(QWidget *parent=0); 
    30                 QStringList getOptionData(); 
     30                                QStringList getOptionData(); 
     31                                bool testContenu(int anInt); 
     32 
    3133 
    3234    private slots: 
     
    3537                void ouvrirProjetExistant3(); 
    3638                void saveOptionData(); 
    37                 void addOptionRow(); 
    38                 void deleteOptionRow(); 
     39                                void addOptionRow(); 
     40                                void deleteOptionRow(); 
     41                int compteur; 
    3942 
    4043    private : 
    41                 QLabel *m_labelName;             
     44                                QLabel *m_labelName;             
     45                QComboBox  *m_comboNomOption; 
    4246 
    43                 QComboBox  *m_comboNomOption; 
    44              
    45                 QPushButton *m_optionAddButton; 
    46                 QPushButton *m_optionDeleteButton; 
     47                                QPushButton *m_optionAddButton; 
     48                                QPushButton *m_optionDeleteButton; 
    4749                QPushButton *m_enregOption; 
    48                 QPushButton *m_quitOption; 
    49                 QPushButton *m_optionHelpButton; 
    50                  
     50                        QPushButton *m_quitOption; 
     51                                QPushButton *m_optionHelpButton; 
    5152 
    5253 
    5354                QFormLayout *m_optionLayout; 
    5455                QHBoxLayout *m_optionLayoutH1; 
    55                 QHBoxLayout *m_optionLayoutH2; 
     56                                QHBoxLayout *m_optionLayoutH2; 
    5657                QVBoxLayout *m_optionLayoutV1; 
    57                 QGridLayout *m_layoutGOption; 
     58                                QGridLayout *m_layoutGOption; 
    5859 
    5960                QFileDialog *projetOption; 
    6061 
    61                 QString m_cheminProjetOption; 
     62                                QString m_cheminProjetOption; 
    6263                 
    63                 QStringList filesList;   
    64          
    65                 QStringListModel *filesListModele; 
    66                  
    67                 QListView *m_optionListView; 
     64                                QStringList filesList;   
     65                                QStringListModel *filesListModele; 
    6866 
    69                 yao::Context *m_theContext; 
    70                 std::vector<std::string> anVector; 
     67                                QListView *m_optionListView; 
     68 
     69                                yao::Context *m_theContext; 
     70                                std::vector<std::string> anVector; 
     71 
     72                                int compteur; 
    7173                 
    7274}; 
Note: See TracChangeset for help on using the changeset viewer.