- Timestamp:
- 10/15/10 12:05:27 (14 years ago)
- Location:
- trunk/yao/src/interface/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/yao/src/interface/src/InstructionWindow.cpp
r444 r449 22 22 23 23 /*********************************************************************************************************************************/ 24 InstructionWindow::InstructionWindow(Table <Function> *aFunctionTable, QWidget *parent) : QWidget(parent) {24 InstructionWindow::InstructionWindow(Table <Function> *aFunctionTable, QWidget *parent) : QWidget(parent), savedData(" ") { 25 25 26 26 setupUi(this); … … 132 132 void InstructionWindow::addInstructionRow() { 133 133 134 try { 134 135 QString nom = m_fonctionNameLineEdit->text(); 135 136 QString val = m_fonctionParameterLineEdit->text(); … … 159 160 m_fonctionNameLineEdit->setText(""); 160 161 m_fonctionParameterLineEdit->setText(""); 162 163 //QString dataInOneLine = 164 165 //savedData.push_back(nom+" "+val); 166 savedData << nom+" "+val;//= (QStringList() << str1 << str2 << str3); 167 168 emit activeTheIAction(); 161 169 } 170 } 171 172 catch (...) { 173 174 QMessageBox::critical(this, "Erreur", "Erreur dans la méthode addInstructionRow()"); 175 } 176 162 177 163 178 } 179 /************************************ Implementation of getInstruction() method ************************************************************/ 180 QStringList InstructionWindow::getInstruction() { 164 181 182 return savedData; 183 184 } 165 185 /***********************************************************************************************************************/ 166 186 /***************************************************** End of file *****************************************************/ -
trunk/yao/src/interface/src/MainWindow.cpp
r445 r449 34 34 */ 35 35 36 MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), m_constantWindow(NULL), m_hatnameWindow(NULL), m_contextWindow(NULL), m_trajectoryWindow(NULL), m_spaceWindow(NULL), m_operaWindow(NULL), m_netwardWindow(NULL), m_modulWindow(NULL), m_ctinWindow(NULL), m_orderWindow(NULL), m_insertFCTWindow(NULL), m_newProjectWindow(NULL), m_newProjectName(""), theConstantTablePt(theConstantTable), contextTest(false) 36 MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), m_constantWindow(NULL), m_hatnameWindow(NULL), m_contextWindow(NULL), m_trajectoryWindow(NULL), m_spaceWindow(NULL), m_operaWindow(NULL), m_netwardWindow(NULL), m_modulWindow(NULL), m_ctinWindow(NULL), m_orderWindow(NULL), m_insertFCTWindow(NULL), m_newProjectWindow(NULL), m_newProjectName(""), theConstantTablePt(theConstantTable), contextTest(false), iw(NULL) 37 37 { 38 38 … … 122 122 menuExecution->addAction(actionCompilation); 123 123 menuExecution->addAction(actionExecution); 124 124 125 menuConfig = menuBar()->addMenu("&Configuration"); 125 126 menuConfig->addAction(actionEditeur); … … 219 220 220 221 actionGenerationI = new QAction(this); 221 //actionGenerationI->setEnabled(false);222 actionGenerationI->setEnabled(false); 222 223 actionGenerationI->setText("Générer le fichier .i"); 223 224 connect(actionGenerationI, SIGNAL(triggered()), this, SLOT(generateIFile())); … … 243 244 244 245 } 245 246 /*************************************************/ 247 void MainWindow::enableIAction() { 248 249 actionGenerationI->setEnabled(true); 250 251 } 246 252 /********************************* Implementation of the method Implémentation de la methode createToolBar() ****************************************/ 247 253 void MainWindow::createToolBar() { … … 935 941 instruction << "#---Fichier " + filename + ".i généré par visual Yao le " << date->date().toString().toStdString() << endl; 936 942 instruction << "#-------------------------------------------------------------------------------------------------" << endl; 937 943 944 if (!iw->getInstruction().isEmpty()) { 945 946 for (QStringList::iterator it = iw->getInstruction().begin(); it != iw->getInstruction().end(); it++) 947 948 instruction << it->toStdString() << endl; 949 950 instruction << endl; 951 952 //emit activeTheIAction(); 953 } 938 954 instruction.close(); 939 955 … … 954 970 955 971 956 InstructionWindow *iw = new InstructionWindow(&theFunctionTable) ;972 iw = new InstructionWindow(&theFunctionTable) ; 957 973 espace.addWindow(iw)->move(0, 0); 958 974 iw->show(); 959 975 976 connect(iw, SIGNAL(activeTheIAction()), this, SLOT(enableIAction())); 960 977 } 961 978 /********************************************* Implementation of the method initializeWindow(int anInt) *********************************************/ -
trunk/yao/src/interface/src/include/InstructionWindow.hpp
r443 r449 24 24 public : 25 25 InstructionWindow(yao::Table <yao::Function> *aFunctionTable, QWidget *parent=0); 26 QStringList getInstruction(); 26 27 27 28 private slots: … … 29 30 void selectedFunction(QModelIndex index); 30 31 31 //signals: 32 signals: 33 void activeTheIAction(); 32 34 //void orderWindowIsClosed(int ); 33 35 … … 45 47 QStandardItem *user_functions; 46 48 49 QStringList savedData; 50 47 51 yao::Table <yao::Function> *localFunctionTable; 48 52 //QStandardItemModel *m_orderModel; -
trunk/yao/src/interface/src/include/MainWindow.hpp
r444 r449 135 135 void saveAs(); 136 136 void save(); 137 void enableIAction(); 137 138 138 139 signals : … … 141 142 void newProjectIsCreated(QString chaine); 142 143 void WindowTitleChanged(); 144 //void activeTheIAction(); 143 145 144 146 private : 145 147 146 148 MainWindowController the_mwc; 149 InstructionWindow *iw; 147 150 // Les attributs des menus 148 151 QMenu *menuFichier;
Note: See TracChangeset
for help on using the changeset viewer.