Changeset 437 for trunk/yao


Ignore:
Timestamp:
10/03/10 17:56:16 (14 years ago)
Author:
yerima
Message:

After editing the file from the graphical window, the user can generates the instruction file like the description file. We are now going to synchronized data in the instruction graphical window.

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

Legend:

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

    r436 r437  
    3636MainWindow::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)     
    3737{ 
     38 
    3839        setWindowTitle(" Visual YAO ");         //Gives a title to the mainwindow. 
    3940        pt_espace = new QWorkspace;                             //Crée un espace de travail. Ici, ça serait notre zone centrale 
     
    118119        menuExecution = menuBar()->addMenu("&Exécution"); 
    119120                menuExecution->addAction(actionGenerationD); 
     121                menuExecution->addAction(actionGenerationI); 
    120122                menuExecution->addAction(actionCompilation); 
    121123                menuExecution->addAction(actionExecution); 
     
    131133void MainWindow::createActions()  { 
    132134 
     135         
     136        QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8")); 
    133137        // Les actions du menu fichier 
    134138        actionNouveauProjet = new QAction(tr("&Nouveau projet"), this); 
     
    187191        //actionFichierHat = new QAction(tr("Fichier  (.h)"), this); 
    188192                //actionModule = new QAction(tr("Modul"), this); 
    189         actionFichierInstruction = new QAction(tr("Fichier instruction (.i)"), this); 
     193        actionFichierInstruction = new QAction(tr("Fichier d'instruction (.i)"), this); 
    190194                connect(actionFichierInstruction, SIGNAL(triggered()), this, SLOT(instructionFileManager())); 
    191195        actionGrapheModulaire = new QAction(tr("Graphe modulaire"), this); 
     
    207211 
    208212     // Les actions du menu Execution 
    209         actionGenerationD = new QAction(tr("Generer le fichier .d"), this); 
     213        actionGenerationD = new QAction(this); 
    210214                actionGenerationD->setEnabled(false); 
     215                actionGenerationD->setText("Générer le fichier .d"); 
    211216 
    212217                connect(actionGenerationD, SIGNAL(triggered()), this, SLOT(generateDFile())); 
    213218                //connect(actionGenerationD, SIGNAL(triggered()), this, SLOT(information())); 
    214219 
     220        actionGenerationI = new QAction(this); 
     221                //actionGenerationI->setEnabled(false); 
     222                actionGenerationI->setText("Générer le fichier .i");  
     223                connect(actionGenerationI, SIGNAL(triggered()), this, SLOT(generateIFile())); 
     224 
     225 
    215226        actionCompilation = new QAction(tr("Compilation"), this); 
    216227                actionCompilation->setEnabled(false); 
    217         actionExecution = new QAction(tr("Execution"), this); 
     228        actionExecution = new QAction(this); 
    218229                actionExecution->setEnabled(false); 
     230                actionExecution->setText("Exécution"); 
    219231 
    220232     // Les actions du menu Configuration 
     
    903915} 
    904916 
     917/**************************************** Implementation of the method generateIFile() (SLOT) ****************************************************/ 
     918void MainWindow::generateIFile(string destination) { 
     919         
     920        date = new QDateEdit; 
     921                 date->setDate(QDate::currentDate()); 
     922 
     923                        QMessageBox::about(this, "Avis", "Le fichier d'instruction vient d'être généré."); 
     924 
     925} 
    905926/********************************************* Implementation of the method instructionFileManager() *********************************************/ 
    906927void MainWindow::instructionFileManager() { 
  • trunk/yao/src/interface/src/include/MainWindow.hpp

    r436 r437  
    77#include <sstream> 
    88#include <QDateEdit> 
     9#include <QTextCodec> 
    910 
    1011#include <iostream> 
     
    107108                        void desactivateToolBarButtons(); 
    108109                        void generateDFile(std::string destination = "projects/"); 
     110                        void generateIFile(std::string destination = "projects/"); 
    109111                        void instructionFileManager(); 
    110112                        void montrerActionCompilation(); 
     
    197199                    // Les actions du menu Execution 
    198200                        QAction *actionGenerationD; 
     201                        QAction *actionGenerationI; 
    199202                        QAction *actionCompilation; 
    200203                        QAction *actionExecution; 
Note: See TracChangeset for help on using the changeset viewer.