- Timestamp:
- 10/22/10 19:45:23 (14 years ago)
- Location:
- trunk/yao/src/interface/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/yao/src/interface/src/ModinspaceWindow.cpp
r460 r464 65 65 m_axesModel = new QStandardItemModel(0, 1) ; 66 66 m_modulNameModel = new QStandardItemModel(0, 0) ; 67 m_outlineModel = new QStandardItemModel(0, 3) ;68 m_outlineModel->setHorizontalHeaderLabels(QStringList() << "" << "" << "" );67 m_outlineModel = new QStandardItemModel(0, 4) ; 68 m_outlineModel->setHorizontalHeaderLabels(QStringList() << "" << "" << "" << ""); 69 69 70 70 m_axesListView->setModel(m_axesModel); 71 71 m_modulNameListView->setModel(m_modulNameModel); 72 72 m_outlineTreeView1->setModel(m_outlineModel); 73 74 //connect(m_axesListView, SIGNAL(clicked(QModelIndex)), this, SLOT(deleteAxesRow(QModelIndex))); 75 //connect(m_modulNameListView, SIGNAL(clicked(QModelIndex)), this, SLOT(deleteModulRow(QModelIndex))); 76 77 connect(m_modinspaceDeleteButton, SIGNAL(clicked()), this, SLOT(deleteAxesRow())); 78 connect(m_modinspaceDeleteButton, SIGNAL(clicked()), this, SLOT(deleteModulRow())); 79 80 connect(m_rightAxesButton, SIGNAL(clicked()), this, SLOT(addTheAxesRow())); 81 connect(m_rightModulNameButton, SIGNAL(clicked()), this, SLOT(addTheModulRow())); 82 //connect(m_modinspaceDeleteButton, SIGNAL(clicked()), this, SLOT(deleteTheRow())); 83 84 } 85 /******************************** implementation of method ***********************************/ 86 /*void ModinspaceWindow::callClicked(const QModelIndex &index) { 87 88 QStandardItem *item = m_axesModel->itemFromIndex(index); 89 90 //cout << "Voici le text: " << item->text().toStdString() << endl; 91 92 }*/ 93 /********************************* Implementation of the selectedFunction(QModelIndex index) method ***********************************/ 94 void ModinspaceWindow::addTheAxesRow() { 95 96 if (m_spaceOrOperaNameComboBox->currentText().isEmpty()) { 97 98 QMessageBox::critical(this, "Avis", "Précisez d'abord l'espace ou l'opérateur avant de faire le choix des axes."); 99 return; 100 } 101 102 QString theAxe = m_axesComboBox->currentText(); 103 104 if (theAxe.isEmpty()) return; 105 106 m_axesModel->setItem(m_axesModel->rowCount(), 0, new QStandardItem(theAxe)); 107 m_axesComboBox->setCurrentIndex(0); 108 } 109 110 /********************************* Implementation of the addInstructionRow() method *************************************************/ 111 void ModinspaceWindow::addTheModulRow() { 112 113 QString theModul = m_modulNameComboBox->currentText(); 114 115 if (theModul.isEmpty()) return; 116 117 m_modulNameModel->setItem(m_modulNameModel->rowCount(), 0, new QStandardItem(theModul)); 118 m_modulNameComboBox->setCurrentIndex(0); 119 120 } 121 /******************************* Implementation of the deleteModulRow(const QModelIndex &index) method ****************************************/ 122 void ModinspaceWindow::deleteAxesRow() { 123 124 125 //QStandardItem *item = m_axesModel->itemFromIndex(index); 126 127 QItemSelectionModel *selectionFromAxes = m_axesListView->selectionModel(); 128 //QItemSelectionModel *selectionFromModul = m_modulNameListView->selectionModel(); 129 130 indexForAxes = selectionFromAxes->currentIndex(); 131 //indexForModul = selectionFromModul->currentIndex(); 132 133 QVariant axesElement = m_axesModel->data(indexForAxes, Qt::DisplayRole); 134 //QVariant modulElement = m_modulNameModel->data(indexForModul, Qt::DisplayRole); 135 136 if(axesElement.toString().isEmpty()) 137 return; 138 139 //if(!axesElement.toString().isEmpty()) 140 m_axesModel->removeRows(m_axesListView->currentIndex().row(), 1);// Le 2Úme parametre indique le nombre de ligne à supprimer 141 //else 142 // if(!modulElement.toString().isEmpty()) 143 // m_modulNameModel->removeRows(m_modulNameListView->currentIndex().row(), 1);// Le 2Úme parametre indique le nombre de ligne à supprimer 144 73 145 74 146 } 75 147 76 /********************************* Implementation of the selectedFunction(QModelIndex index) method ***********************************/ 77 /*void ModinspaceWindow::selectedFunction(QModelIndex index) { 148 /******************************* Implementation of the deleteModulRow(const QModelIndex &index) method ****************************************/ 149 void ModinspaceWindow::deleteModulRow() { 150 151 152 //QStandardItem *item = m_modulNameModel->itemFromIndex(index); 78 153 79 QItemSelectionModel *selection = m_proposedParametersListView->selectionModel(); 80 //index = selection->currentIndex(); 81 QVariant element = m_instructionLeftModel->data(index, Qt::DisplayRole); 82 QString chaine = element.toString();//.toStdString(); 83 m_fonctionNameLineEdit->setText(chaine); 84 //QMessageBox::about(this, "Avis", chaine); 85 //int r = index.row(); 154 //QItemSelectionModel *selectionFromAxes = m_axesListView->selectionModel(); 155 QItemSelectionModel *selectionFromModul = m_modulNameListView->selectionModel(); 156 157 //indexForAxes = selectionFromAxes->currentIndex(); 158 indexForModul = selectionFromModul->currentIndex(); 159 160 //QVariant axesElement = m_axesModel->data(indexForAxes, Qt::DisplayRole); 161 QVariant modulElement = m_modulNameModel->data(indexForModul, Qt::DisplayRole); 86 162 87 }*/ 163 if(modulElement.toString().isEmpty()) 164 return; 165 166 //if(!axesElement.toString().isEmpty()) 167 // m_axesModel->removeRows(m_axesListView->currentIndex().row(), 1);// Le 2Úme parametre indique le nombre de ligne à supprimer 168 //else 169 // if(!modulElement.toString().isEmpty()) 170 m_modulNameModel->removeRows(m_modulNameListView->currentIndex().row(), 1);// Le 2Úme parametre indique le nombre de ligne à supprimer 88 171 89 /********************************* Implementation of the addInstructionRow() method *************************************************/90 /*void ModinspaceWindow::addInstructionRow() {91 172 92 QString nom = m_fonctionNameLineEdit->text(); 93 QString val = m_fonctionParameterLineEdit->text(); 94 95 if (nom.isEmpty()){ 96 97 QMessageBox::critical(this, "Avertissement", "Le champ \"<I>Nom de la fonction<I>\" est obligatoire! Veuillez sélectionner une fonction parmi celles qui sont proposées dans la partie gauche de la fenêtre."); 98 return; // Arrêt de la méthode 99 } 100 101 else { 102 //if (!(m_ligneNom->text().isEmpty()) || (m_ligneValeur->text().isEmpty())) { 103 // m_delButton->setEnabled(true); 104 // Constant localConstant (Nom.toStdString(), Val.toStdString()); 105 // m_localConstantTable->push_back(localConstant); 106 m_instructionRightModel->setItem(m_instructionRightModel->rowCount(), 0, new QStandardItem(nom)); 107 m_instructionRightModel->setItem(m_instructionRightModel->rowCount()-1, 1, new QStandardItem(val)); 108 109 m_fonctionNameLineEdit->setText(""); 110 m_fonctionParameterLineEdit->setText(""); 111 } 112 113 }*/ 114 173 } 115 174 /***********************************************************************************************************************/ 116 175 /***************************************************** End of file *****************************************************/ -
trunk/yao/src/interface/src/include/ModinspaceWindow.hpp
r460 r464 28 28 //void addInstructionRow(); 29 29 //void selectedFunction(QModelIndex index); 30 void addTheAxesRow(); 31 void addTheModulRow(); 32 void deleteAxesRow(); 33 void deleteModulRow(); 30 34 31 35 signals: … … 43 47 QStandardItemModel *m_modulNameModel; 44 48 QStandardItemModel *m_outlineModel; 49 50 QModelIndex indexForAxes; 51 QModelIndex indexForModul; 45 52 /*QStandardItemModel *m_instructionLeftModel; 46 53 QStandardItemModel *m_instructionRightModel; -
trunk/yao/src/interface/src/ui_/modinspace.ui
r460 r464 8 8 <y>0</y> 9 9 <width>689</width> 10 <height>4 17</height>10 <height>440</height> 11 11 </rect> 12 12 </property> … … 20 20 <y>50</y> 21 21 <width>391</width> 22 <height>3 61</height>22 <height>381</height> 23 23 </rect> 24 24 </property> … … 105 105 <rect> 106 106 <x>20</x> 107 <y>3 30</y>107 <y>350</y> 108 108 <width>111</width> 109 109 <height>22</height> … … 145 145 </layout> 146 146 </widget> 147 <widget class="QWidget" name=" ">147 <widget class="QWidget" name="layoutWidget"> 148 148 <property name="geometry"> 149 149 <rect> 150 150 <x>300</x> 151 151 <y>160</y> 152 <width>8 1</width>152 <width>87</width> 153 153 <height>62</height> 154 154 </rect> … … 170 170 </item> 171 171 </layout> 172 </widget> 173 <widget class="QCheckBox" name="m_blocEndCheckBox"> 174 <property name="geometry"> 175 <rect> 176 <x>20</x> 177 <y>320</y> 178 <width>111</width> 179 <height>22</height> 180 </rect> 181 </property> 182 <property name="text"> 183 <string>Fin de bloc</string> 184 </property> 172 185 </widget> 173 186 </widget> … … 178 191 <y>10</y> 179 192 <width>271</width> 180 <height>4 01</height>193 <height>421</height> 181 194 </rect> 182 195 </property> … … 193 206 <y>40</y> 194 207 <width>251</width> 195 <height>3 51</height>208 <height>371</height> 196 209 </rect> 197 210 </property> -
trunk/yao/src/interface/src/ui_/orderwindow.ui
r460 r464 8 8 <y>0</y> 9 9 <width>709</width> 10 <height>5 23</height>10 <height>543</height> 11 11 </rect> 12 12 </property> … … 20 20 <y>60</y> 21 21 <width>691</width> 22 <height>4 21</height>22 <height>441</height> 23 23 </rect> 24 24 </property> … … 56 56 <rect> 57 57 <x>620</x> 58 <y> 490</y>58 <y>510</y> 59 59 <width>81</width> 60 60 <height>27</height> … … 69 69 <rect> 70 70 <x>10</x> 71 <y> 490</y>71 <y>510</y> 72 72 <width>51</width> 73 73 <height>21</height>
Note: See TracChangeset
for help on using the changeset viewer.