Changeset 393 for trunk/yao


Ignore:
Timestamp:
08/02/10 10:15:06 (14 years ago)
Author:
yerima
Message:

dropping some unuseful comments from MainWindow?. Visual Yao.

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

Legend:

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

    r392 r393  
    1212 
    1313#include "include/MainWindow.hpp" 
    14  
    1514#include<iostream> 
    1615 
    1716//using namespace antlr; 
    1817using namespace std; 
     18//using namespace antlr; 
    1919using namespace yao; 
    2020 
     
    100100                //menuFichier->addAction(actionImporterProjet); 
    101101                menuFichier->addSeparator(); 
    102                 menuFichier->addAction(actionEnregistrerProjet); 
     102                menuFichier->addAction(actionSaveProject); 
    103103                menuFichier->addAction(actionEnregistrerSousProjet); 
    104104                menuFichier->addSeparator(); 
     
    162162 
    163163                //connect(runAction, SIGNAL(triggered()), this, SLOT()); 
    164         actionEnregistrerProjet = new QAction(tr("Enregi&strer"), this); 
    165                 actionEnregistrerProjet->setIcon(QIcon("Images/icons/save.png")); 
    166                 actionEnregistrerProjet->setEnabled(false); // Option désactivée par défaut. 
    167                 actionEnregistrerProjet->setStatusTip("Pour sauvegarder le projet en cours"); 
     164        actionSaveProject = new QAction(tr("Enregi&strer"), this); 
     165                actionSaveProject->setIcon(QIcon("Images/icons/save.png")); 
     166                actionSaveProject->setEnabled(false); // Option désactivée par défaut. 
     167                actionSaveProject->setStatusTip("Pour sauvegarder le projet en cours"); 
    168168        actionEnregistrerSousProjet = new QAction(tr("Enregistrer sous"), this); 
    169169                actionEnregistrerSousProjet->setIcon(QIcon("Images/icons/saveas.png")); 
     
    401401        connect(m_netwardWindow, SIGNAL(netwardWindowIsClosed(int )), this, SLOT(initializeWindow(int ))); 
    402402        //connect(m_netwardButton, SIGNAL(clicked()), this, SLOT(changeColorNetwardButton())); 
    403  
    404403} 
    405404 
     
    426425 
    427426        connect(m_ctinWindow, SIGNAL(ctinWindowIsClosed(int)), this, SLOT(initializeWindow(int))); 
    428        
    429427 
    430428} 
     
    453451 
    454452        connect(m_insertFCTWindow, SIGNAL(insertFCTWindowIsClosed(int)), this, SLOT(initializeWindow(int))); 
    455        
    456453 
    457454} 
     
    513510void MainWindow::openProject()  { // Affiche la fenetre nouveau projet lorsqu'elle est appelée. 
    514511 
    515  
    516         //FilePath filename="test_00.d"; 
    517    
    518     //try{ 
    519       // Check argument count. 
    520       //if(argc <= 1) 
    521         //throw runtime_error("No file specified"); 
    522    
    523       // Check if help menu is required. 
    524      // if(strcmp(argv[1], "-h") == 0){ 
    525        // Display::displayHelp(); 
    526        // exit(EXIT_SUCCESS); 
    527      // } 
    528    
    529       //filename = argv[1]; 
    530       //if(filename.getExtension().empty()) 
    531        // filename += ".d"; 
    532    
    533       // Initilization of the lexer and lexing (wrapped from the object tokenizer) 
    534       //Tokenizer tokenizer(filename); 
    535       // Initialization of the parser and parsing (wrapped from the object tokenizer) 
    536     //  Translator translator(tokenizer); 
    537       // Code generation of the files Y1ProjectName.h and Y2ProjectName.h 
    538       //translator.generateCode(); 
    539   //    translator.descriptionVisualYAO(); 
    540  //     exitStatus = EXIT_SUCCESS; 
    541       //cout << "End application" << endl; 
    542512        QFileDialog *dialogue = new QFileDialog(this); //Crée une boite de dialogue 
    543513 
    544514        QString cheminFichier = dialogue->getOpenFileName(this, tr("Ouverture d'un project existant."), QDir::homePath(), tr("*.d *.i *.txt")); //Retourne le chemin du fichier. 
    545   
    546 //      translator.theConstantTable; 
    547         //m_ConstantCopy = new ConstantWindow(&theConstantTable, &theHeaderList);  
    548  //for (Table<Constant>::iterator it = translator.theConstantTable.begin(); it != translator.theConstantTable.end(); it++) 
    549    //                     cout << it->getName() << " " << it->getText() << endl;         
    550  
    551           //QMessageBox msgBox; 
    552           //msgBox.setWindowTitle("Aide sur la création d'un nouveau projet."); 
    553    
    554          // translator.theConstantTable; 
    555515 
    556516        QProcess builder; 
     
    558518        builder.setProcessChannelMode(QProcess::MergedChannels); 
    559519        builder.start("Yao9Generator " + cheminFichier);//, QStringList() 
    560 // <<"-e" 
    561 // <<"/opt/drbl/sbin/drblpush -c /etc/drbl/drblpush.conf" 
    562  
    563 // ); 
    564 //char *test2[]; 
    565 //QDebug ( QString * string ) 
    566  if (!builder.waitForFinished()) 
    567      qDebug() << "Make failed:" << builder.errorString(); 
    568  else 
    569      //qDebug << "Make output:" << builder.readAll(); 
    570         { 
     520        if (!builder.waitForFinished()) 
     521                qDebug() << "Make failed:" << builder.errorString(); 
     522        else { 
    571523                QString test(builder.readAll()); 
    572                 //for (int i = 0; i <= test.size(); i++) 
    573                 //      { 
    574                 //              if (test.at(i) == ' ') 
    575                                          
    576                 //      } 
    577  
    578524                istringstream iss(test.toStdString()); 
    579                  
    580525                FilePath mot; 
    581526                FilePath name; 
    582527                while ( getline(iss, mot, '\n' ) ) 
    583528                        { 
    584                                  
    585529                                if (mot.getExtension() == ".def1") 
    586530                                {                        
     
    592536                                        Constant aConstant(name.getTitle(), mot.getTitle());     
    593537                                        theConstantTable.push_back(aConstant); 
    594                                          
    595538                                } 
    596539                                if (mot.getExtension() == ".h") 
     
    604547        activateToolBarButtons(); 
    605548         
    606                 //cout << "Voici le resulat: " << test.toStdString() << endl; 
    607         } 
    608          
    609         //Tokenizer tokenizer("test_00.d");//cheminFichier.toStdString()); 
    610         //Translator translator(tokenizer); 
    611         //translator.descriptionVisualYAO(); 
    612         //translator.theConstantTable; 
    613         //for (Table<Constant>::iterator it = translator.theConstantTable.begin(); it != translator.theConstantTable.end(); it++) 
    614         //      cout << it->getName() << " " << it->getText() << endl; 
    615         //string test << qDebug(); 
    616  
    617         /*QProcess process; 
    618          
    619         process.start( "sudo ", QStringList()  
    620         << "-S"  
    621         << "-p" << "password:\n"  
    622         << "gnome-terminal" ); 
    623 */ 
    624         //string test = "Yao9Generator " + cheminFichier.toStdString();  
    625         //system(test.c_str());// "Yao9Generator projects/test_04/test_04.d");   
    626  
    627          
    628          
    629  
    630         //QMessageBox::about(this, "test", "Ouverture un projet existant."); 
     549        } 
     550         
    631551} 
    632552 
     
    634554void MainWindow::hatUpdate() { 
    635555         
    636         //m_hatnameWindow->repaint();//update(); 
    637         //theConstantTable; 
    638556        if (m_hatnameWindow != NULL) //Teste si l'objet n'est pas déjà crée. S'il n'est pas  
    639557                {  
     
    988906                    delete actionOuvrirProjetsRecents; 
    989907                    //delete actionImporterProjet; 
    990                     delete actionEnregistrerProjet; 
     908                    delete actionSaveProject; 
    991909                    delete actionEnregistrerSousProjet; 
    992910                    delete actionImprimerProjet; 
  • trunk/yao/src/interface/src/include/MainWindow.hpp

    r392 r393  
    167167                        QAction *actionOuvrirProjetsRecents; 
    168168                        QAction *actionImporterProjet; 
    169                         QAction *actionEnregistrerProjet; 
     169                        QAction *actionSaveProject; 
    170170                        QAction *actionEnregistrerSousProjet; 
    171171                        QAction *actionImprimerProjet; 
Note: See TracChangeset for help on using the changeset viewer.