Changeset 185
- Timestamp:
- 02/01/10 00:38:56 (14 years ago)
- Location:
- trunk/yao/src/interface/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/yao/src/interface/src/DefvalWindow.cpp
r179 r185 46 46 QStringList horizontalHeaders; 47 47 horizontalHeaders << "Constante(s)" << "Valeur(s)" << " "; /*!< added Nom Netward Entrees and sorties in table */ 48 vueDefval = new QTableWidget(0, 2); /*!< QTableWidget's in whitch the objects are listed for thue view. */49 vueDefval->setEditTriggers(QAbstractItemView::NoEditTriggers); /*!< this ligne give no edit mode*/50 vueDefval->setShowGrid(false); /*!< this ligne cover the grille in table */51 vueDefval->setSelectionBehavior(QAbstractItemView::SelectRows); /*!< this ligne give a section of the ligne */52 vueDefval->setHorizontalHeaderLabels(horizontalHeaders); /*!< displays the QTableWidget */48 vueDefval = new QTableWidget(0, 2); /*!< QTableWidget's in whitch the objects are listed for thue view. */ 49 vueDefval->setEditTriggers(QAbstractItemView::NoEditTriggers); /*!< this ligne give no edit mode*/ 50 vueDefval->setShowGrid(false); /*!< this ligne cover the grille in table */ 51 vueDefval->setSelectionBehavior(QAbstractItemView::SelectRows); /*!< this ligne give a section of the ligne */ 52 vueDefval->setHorizontalHeaderLabels(horizontalHeaders); /*!< displays the QTableWidget */ 53 53 //--------- Les gestionnaires de positionnement. 54 m_layoutH1Defval = new QHBoxLayout;55 m_layoutH1Defval->addWidget(m_saveDefvalButton);56 m_layoutH1Defval->addWidget(m_quitDefval);//m_ajoutDefval);57 m_layoutGDefval = new QGridLayout; /*!< set QGridLayout m-layoutGDefval */54 m_layoutH1Defval = new QHBoxLayout; 55 m_layoutH1Defval->addWidget(m_saveDefvalButton); 56 m_layoutH1Defval->addWidget(m_quitDefval);//m_ajoutDefval); 57 m_layoutGDefval = new QGridLayout; /*!< set QGridLayout m-layoutGDefval */ 58 58 m_layoutGDefval->addWidget(m_labelNomDefval, 0, 2); 59 59 m_layoutGDefval->addWidget(m_ligneNomDefval, 0, 3, 1, 2); -
trunk/yao/src/interface/src/Include/OptionWindow.hpp
r184 r185 39 39 void addOptionRow(); 40 40 void deleteOptionRow(); 41 int compteur; 42 41 43 42 private : 44 43 QLabel *m_labelName; -
trunk/yao/src/interface/src/OptionWindow.cpp
r178 r185 21 21 this->setWindowTitle("Directive Option."); 22 22 23 compteur = 0; 24 23 25 m_optionLayout = new QFormLayout; 24 26 m_optionLayoutH1 = new QHBoxLayout; 25 m_optionLayoutH2 = new QHBoxLayout;26 m_optionLayoutV1 = new QVBoxLayout;27 m_layoutGOption= new QGridLayout;28 29 m_labelName= new QLabel("Nom de l'option: ");30 m_comboNomOption = new QComboBox;31 32 33 m_optionAddButton= new QPushButton("Ajouter", this);34 m_optionDeleteButton = new QPushButton("Supprimer", this);27 m_optionLayoutH2 = new QHBoxLayout; 28 m_optionLayoutV1 = new QVBoxLayout; 29 m_layoutGOption = new QGridLayout; 30 31 m_labelName = new QLabel("Nom de l'option: "); 32 m_comboNomOption = new QComboBox; 33 34 35 m_optionAddButton = new QPushButton("Ajouter", this); 36 m_optionDeleteButton = new QPushButton("Supprimer", this); 35 37 m_optionDeleteButton->setDisabled(true); 36 m_enregOption = new QPushButton("Enregistrer" , this);38 m_enregOption = new QPushButton("Enregistrer" , this); 37 39 m_enregOption->setDisabled(true); 38 m_optionHelpButton= new QPushButton("De l'aide ?" , this);40 m_optionHelpButton = new QPushButton("De l'aide ?" , this); 39 41 m_quitOption = new QPushButton("Quitter", this); 40 42 … … 113 115 void OptionWindow::addOptionRow() { 114 116 117 compteur ++; 118 115 119 filesList.append(m_comboNomOption->currentText()); 116 120 filesListModele->setStringList(filesList); 121 testContenu(compteur); 117 122 118 123 } … … 128 133 filesListModele->setStringList(filesList); //On indique au modÚle la liste des éléments à afficher. 129 134 135 compteur --; 136 testContenu(compteur); 137 130 138 131 139 } … … 178 186 return filesList; 179 187 } 188 189 /****************************************************************************************************************************/ 190 191 bool OptionWindow::testContenu(int anInt) { 192 193 if (anInt != 0) { 194 m_optionDeleteButton->setEnabled(true); 195 m_enregOption->setEnabled(true); 196 } 197 else 198 { 199 m_optionDeleteButton->setDisabled(true); 200 m_enregOption->setDisabled(true); 201 } 202 }
Note: See TracChangeset
for help on using the changeset viewer.