Changeset 14


Ignore:
Timestamp:
10/27/09 19:39:24 (15 years ago)
Author:
mayombo
Message:

Update hatname generation Visual YAO.

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

Legend:

Unmodified
Added
Removed
  • trunk/yao/src/interface/src/Include/FenetrePrincipale.h

    r12 r14  
    3030#include <QWorkspace> 
    3131 
    32 class FenetrePrincipale : public QMainWindow, public  { 
     32class FenetrePrincipale : public QMainWindow  { 
    3333    Q_OBJECT 
    3434 
  • trunk/yao/src/interface/src/NouveauProjet.cpp

    r13 r14  
    4040        connect(m_creerRepertoireProjet, SIGNAL(clicked()), this, SLOT(creerRepertoireProjet())); 
    4141        connect(m_creerRepertoireProjet, SIGNAL(clicked()), this, SLOT(close())); 
    42         connect(m_creerRepertoireProjet, SIGNAL(clicked()), this, SLOT(CreatHatFile())); 
     42//      connect(m_creerRepertoireProjet, SIGNAL(clicked()), this, SLOT(CreatHatFile())); 
    4343 
    4444 
     
    5151void NouveauProjet::CreatHatFile() { 
    5252 
    53         //string filename = setNomProjet(ligneNomRep->text()); 
    54  
    55           //string filename = "hat.h";  // The hat file genereted automatically. 
    56           //string filename = getNomProjet() + ".h"; 
    57           string filename = getNomProjet().toStdString() + ".h"; 
    58           //creerFichier(getNomProjet(), ".h"); 
    59                   ofstream hat(filename.c_str(), ios::out | ios::binary); 
    60                           if(!hat.is_open()) 
    61                                                   throw ofstream::failure("couldn't create " + filename); 
    62  
    63 hat << "/*****************************************************************************************************" <<endl; 
    64  hat << "* Fichier chapeau généré automatiquement par Visual YAO." << endl; 
    65  hat << "* Le fichier chapeau permet à l'utilisateur d'intervenir pendant l'exécution de l'application YAO." << endl; 
     53 
     54          // The hat file genereted automatically. 
     55          string filename = "projects/" + getNomProjet().toStdString() + "/" + getNomProjet().toStdString() + ".h"; 
     56 
     57          ofstream hat(filename.c_str(), ios::out | ios::binary); 
     58                if(!hat.is_open()) 
     59                        throw ofstream::failure("couldn't create " + filename); 
     60 
     61hat << "/*****************************************************************************************************" << endl; 
     62hat << "* Fichier chapeau généré automatiquement par Visual YAO." << endl; 
     63hat << "* Le fichier chapeau permet à l'utilisateur d'intervenir pendant l'exécution de l'application YAO." << endl; 
    6664 hat << "* On peut déclarer des variables globales et des fonctions spécifiques de l'application définies     *" << endl; 
    6765 hat << "* par l'utilisateur dans le fichier description (dans ce cas là on ajoute aussi les prototypes.      *" << endl; 
     
    134132          { rep.mkdir(getNomProjet()); 
    135133            creerFichier(getNomProjet(), ".d"); 
    136             creerFichier(getNomProjet(), ".h"); 
     134                CreatHatFile(); 
     135//            creerFichier(getNomProjet(), ".h"); 
    137136            creerFichier(getNomProjet(), ".txt"); 
    138137 
Note: See TracChangeset for help on using the changeset viewer.