- Timestamp:
- 10/08/10 13:48:30 (14 years ago)
- Location:
- trunk/yao/src/interface
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/yao/src/interface/src/InsertFCTWindow.cpp
r419 r443 16 16 localFunctionTable = aFunctionTable; 17 17 18 18 19 QRegExp regExp("[A-Za-z_][A-Za-z0-9_]*"); 19 20 m_insertFCTNameLine->setValidator(new QRegExpValidator(regExp, this)); … … 28 29 m_insertFCTTableView->resizeColumnsToContents(); 29 30 30 31 for (Table<Function>::iterator it = localFunctionTable->begin(); it != localFunctionTable->end(); it++) { 32 m_insertFCTModel->setItem(m_insertFCTModel->rowCount(), 0, new QStandardItem(QString(it->getName().c_str()))); 33 it->isParameterized()? m_insertFCTModel->setItem(m_insertFCTModel->rowCount()-1, 1, new QStandardItem(QString("oui"))) : m_insertFCTModel->setItem(m_insertFCTModel->rowCount()-1, 1, new QStandardItem(QString("non"))); 34 } 35 36 37 31 38 connect(m_insertFCTAddButton, SIGNAL(clicked()), this, SLOT(addInsertRow())); /*!< To add rows in the tableview after clicking on the button "Add"*/ 32 39 connect(m_insertFCTDelButton, SIGNAL(clicked()), this, SLOT(deleteRowFCT())); /*!< This slot delete a row after a click on the button "Supprimer" */ -
trunk/yao/src/interface/src/InstructionWindow.cpp
r442 r443 15 15 16 16 using namespace std; 17 //using namespace yao;17 using namespace yao; 18 18 19 19 … … 22 22 23 23 /*********************************************************************************************************************************/ 24 InstructionWindow::InstructionWindow( /*yao::Table <yao::Function> *aFunctionTable,*/QWidget *parent) : QWidget(parent) {24 InstructionWindow::InstructionWindow(Table <Function> *aFunctionTable, QWidget *parent) : QWidget(parent) { 25 25 26 26 setupUi(this); 27 28 localFunctionTable = aFunctionTable; 29 27 30 m_rightButton->setIcon(QIcon("Images/icons/rightarrow2.png")); 28 31 m_instructionLeftModel = new QStandardItemModel(0, 1);//Model in one column whitch contained the possibles functions used in the process of generation of the instruction file. … … 81 84 user_functions = new QStandardItem("Fonction(s) de l'utilisateur."); 82 85 m_instructionLeftModel->appendRow(user_functions); 83 for (int i = 0; i< 4; i++) 84 user_functions->appendRow(new QStandardItem("Par défaut")); 86 for (Table<Function>::iterator it = localFunctionTable->begin(); it != localFunctionTable->end(); it++) { 87 user_functions->appendRow(new QStandardItem(QString(it->getName().c_str()))); 88 } 89 85 90 86 91 m_instructionLeftModel->setHorizontalHeaderLabels(QStringList() << "Fonctions proposées"); … … 91 96 m_choosedParametersTableView->setModel(m_instructionRightModel); 92 97 m_choosedParametersTableView->resizeColumnsToContents(); 98 93 99 connect(m_proposedParametersListView, SIGNAL(clicked(QModelIndex )), this, SLOT(selectedFunction(QModelIndex ))); 94 100 connect(m_rightButton, SIGNAL(clicked()), this, SLOT(addInstructionRow())); … … 97 103 /********************************* Implementation of the selectedFunction(QModelIndex index) method ***********************************/ 98 104 void InstructionWindow::selectedFunction(QModelIndex index) { 105 106 QString tampon; 99 107 100 108 QItemSelectionModel *selection = m_proposedParametersListView->selectionModel(); … … 102 110 QVariant element = m_instructionLeftModel->data(index, Qt::DisplayRole); 103 111 QString chaine = element.toString();//.toStdString(); 104 m_fonctionNameLineEdit->setText(chaine); 112 113 for (int i = 0; i < 8 ; i++) { 114 115 tampon.append(chaine.at(i));// To extract the nine first characteres from the string (which will be compared with "Fonctions"). 116 117 } 118 119 if (tampon.compare("Fonction", Qt::CaseSensitive) == 0) 120 return; 121 else { 122 123 m_fonctionNameLineEdit->setText(chaine); 124 } 125 126 105 127 //QMessageBox::about(this, "Avis", chaine); 106 128 //int r = index.row(); … … 114 136 QString val = m_fonctionParameterLineEdit->text(); 115 137 138 /*QString tampon; 139 140 for (int i = 0; i < 8 ; i++) { 141 142 tampon.append(nom.at(i));// To extract the nine first characteres from the string (which will be compared with "Fonctions"). 143 144 }*/ 116 145 if (nom.isEmpty()){ 117 146 … … 125 154 // Constant localConstant (Nom.toStdString(), Val.toStdString()); 126 155 // m_localConstantTable->push_back(localConstant); 127 m_instructionRightModel->setItem(m_instructionRightModel->rowCount(), 0, new QStandardItem(nom)); 128 m_instructionRightModel->setItem(m_instructionRightModel->rowCount()-1, 1, new QStandardItem(val)); 156 157 m_instructionRightModel->setItem(m_instructionRightModel->rowCount(), 0, new QStandardItem(nom)); 158 m_instructionRightModel->setItem(m_instructionRightModel->rowCount()-1, 1, new QStandardItem(val)); 129 159 130 m_fonctionNameLineEdit->setText("");131 m_fonctionParameterLineEdit->setText("");160 m_fonctionNameLineEdit->setText(""); 161 m_fonctionParameterLineEdit->setText(""); 132 162 } 133 163 -
trunk/yao/src/interface/src/MainWindow.cpp
r442 r443 928 928 929 929 930 InstructionWindow *iw = new InstructionWindow( /*&theFunctionTable*/) ;930 InstructionWindow *iw = new InstructionWindow(&theFunctionTable) ; 931 931 espace.addWindow(iw)->move(0, 0); 932 932 iw->show(); -
trunk/yao/src/interface/src/include/InstructionWindow.hpp
r442 r443 13 13 #include <QMessageBox> 14 14 #include "../../ui_instructionwindow.h" 15 #include "../../../YAOObjects/Table.hpp" 15 16 #include "../../../YAOObjects/Function.hpp" 16 17 … … 22 23 23 24 public : 24 InstructionWindow( /*yao::Table <yao::Function> *aFunctionTable,*/QWidget *parent=0);25 InstructionWindow(yao::Table <yao::Function> *aFunctionTable, QWidget *parent=0); 25 26 26 27 private slots: … … 43 44 QStandardItem *execution; 44 45 QStandardItem *user_functions; 46 47 yao::Table <yao::Function> *localFunctionTable; 45 48 //QStandardItemModel *m_orderModel; 46 49 }; -
trunk/yao/src/interface/src/ui_/modinspace.ui
r441 r443 8 8 <y>0</y> 9 9 <width>620</width> 10 <height>4 58</height>10 <height>419</height> 11 11 </rect> 12 12 </property> … … 20 20 <y>50</y> 21 21 <width>321</width> 22 <height> 401</height>22 <height>361</height> 23 23 </rect> 24 24 </property> … … 47 47 <x>20</x> 48 48 <y>90</y> 49 <width> 78</width>49 <width>91</width> 50 50 <height>27</height> 51 51 </rect> … … 69 69 <rect> 70 70 <x>20</x> 71 <y> 200</y>71 <y>190</y> 72 72 <width>59</width> 73 73 <height>17</height> … … 82 82 <rect> 83 83 <x>20</x> 84 <y>2 90</y>85 <width> 78</width>84 <y>260</y> 85 <width>91</width> 86 86 <height>27</height> 87 87 </rect> … … 91 91 <property name="geometry"> 92 92 <rect> 93 <x>1 20</x>94 <y>2 90</y>93 <x>130</x> 94 <y>260</y> 95 95 <width>26</width> 96 96 <height>25</height> … … 120 120 <y>30</y> 121 121 <width>131</width> 122 <height>3 61</height>122 <height>321</height> 123 123 </rect> 124 124 </property> … … 152 152 <y>10</y> 153 153 <width>271</width> 154 <height>4 41</height>154 <height>401</height> 155 155 </rect> 156 156 </property> … … 167 167 <y>40</y> 168 168 <width>251</width> 169 <height>3 91</height>169 <height>351</height> 170 170 </rect> 171 171 </property> -
trunk/yao/src/interface/src/ui_/orderwindow.ui
r441 r443 7 7 <x>0</x> 8 8 <y>0</y> 9 <width>6 49</width>10 <height>5 78</height>9 <width>639</width> 10 <height>536</height> 11 11 </rect> 12 12 </property> … … 19 19 <x>10</x> 20 20 <y>60</y> 21 <width>6 31</width>22 <height>4 61</height>21 <width>621</width> 22 <height>431</height> 23 23 </rect> 24 24 </property> … … 56 56 <rect> 57 57 <x>10</x> 58 <y>5 30</y>59 <width>6 31</width>58 <y>500</y> 59 <width>621</width> 60 60 <height>29</height> 61 61 </rect> -
trunk/yao/src/interface/src/ui_/spaceintraj.ui
r441 r443 8 8 <y>0</y> 9 9 <width>618</width> 10 <height>4 60</height>10 <height>417</height> 11 11 </rect> 12 12 </property> … … 20 20 <y>80</y> 21 21 <width>301</width> 22 <height>3 71</height>22 <height>331</height> 23 23 </rect> 24 24 </property> … … 33 33 <rect> 34 34 <x>10</x> 35 <y>1 70</y>36 <width> 91</width>35 <y>160</y> 36 <width>101</width> 37 37 <height>27</height> 38 38 </rect> … … 43 43 <rect> 44 44 <x>120</x> 45 <y>1 70</y>45 <y>160</y> 46 46 <width>26</width> 47 47 <height>25</height> … … 56 56 <rect> 57 57 <x>160</x> 58 <y> 10</y>58 <y>90</y> 59 59 <width>131</width> 60 <height> 341</height>60 <height>171</height> 61 61 </rect> 62 62 </property> … … 69 69 <y>10</y> 70 70 <width>291</width> 71 <height>4 41</height>71 <height>401</height> 72 72 </rect> 73 73 </property> … … 84 84 <y>40</y> 85 85 <width>271</width> 86 <height>3 91</height>86 <height>351</height> 87 87 </rect> 88 88 </property> -
trunk/yao/src/interface/ui_newprojectwindow.h
r442 r443 2 2 ** Form generated from reading UI file 'newprojectwindow.ui' 3 3 ** 4 ** Created: Thu Oct 7 1 4:11:5320104 ** Created: Thu Oct 7 18:17:25 2010 5 5 ** by: Qt User Interface Compiler version 4.6.3 6 6 **
Note: See TracChangeset
for help on using the changeset viewer.