Changeset 300 for trunk/yao


Ignore:
Timestamp:
03/31/10 17:48:54 (14 years ago)
Author:
yerima
Message:

Au niveau de la vue, le QTableView est en cours d'implementation.

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

Legend:

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

    r296 r300  
    2121 
    2222/*************************************************************** The constructor **********************************************************************/ 
    23 ConstantWindow::ConstantWindow(Table <Constant> *aConstantTable, HatNameWindow *aHatWindow, QWidget *parent): QWidget(parent) { /*!< The constructor. */ 
     23ConstantWindow::ConstantWindow(Table <Constant> *aConstantTable, QWidget *parent): QWidget(parent) { /*!< The constructor. */ 
    2424         
    2525        setWindowTitle("Directive Constant.");     /*!< To set the window's title. */ 
    2626        m_localConstantTable = aConstantTable; 
    2727        //localConstantController = aConstantController; 
    28         localHatWindow = aHatWindow; 
    29  
     28        //localHatWindow = aHatWindow; 
    3029                 
    3130        m_nameLabel             = new QLabel("Nom constante: ", this);    /*!< QLabel for Nom de la constante . */ 
     
    4443        QStringList horizontalHeaders; 
    4544              horizontalHeaders << "Constante(s)"  << "Valeur(s)" << " ";  /*!< added Nom Netward Entrees and sorties in table */ 
    46  
    47         m_tableView                     = new QTableWidget(0, 2);  /*!< QTableWidget's in whitch the objects are listed for thue view. */ 
     45         
     46        modele = new  QStandardItemModel(0, 2);//Nombre de lignes et colonnes du modÚle. 
     47                modele->setHorizontalHeaderLabels(QStringList() << "Constante(s)" << "Valeur(s)"); /*!< displays the QTableWidget */ 
     48 
     49        m_tableView                     = new QTableView;  /*!< QTableWidget's in whitch the objects are listed for thue view. */ 
     50                m_tableView->setModel(modele); 
    4851                m_tableView->setEditTriggers(QAbstractItemView::NoEditTriggers); /*!< this ligne give no edit mode*/ 
    4952                m_tableView->setShowGrid(false);  /*!< this ligne cover the grille in table */ 
    5053                m_tableView->setSelectionBehavior(QAbstractItemView::SelectRows);  /*!< this ligne give a section of the ligne */ 
    51                 m_tableView->setHorizontalHeaderLabels(horizontalHeaders); /*!< displays the QTableWidget */ 
     54        //QHeaderView *horiz = new QHeaderView(Qt::Horizontal); 
    5255 
    5356        m_layoutGrid            = new QGridLayout;  /*!< set QGridLayout m-layoutG  */ 
     
    6467        setLayout(m_layoutGrid); //Activation du gestionnaire principal. 
    6568 
     69 
    6670        connect(m_helpButton, SIGNAL(clicked()), this, SLOT(callConstantHelp())); 
    6771        connect(m_quitButton, SIGNAL(clicked()), this, SLOT(close()));  /*!< slot for the close this windows*/ 
     
    7478 
    7579/*******************************************************************************************************************************************************/ 
    76 void ConstantWindow::toUpdate() { 
    77  
    78         cout << "Pour la mise à jour!" << endl; 
    79 } 
     80//void ConstantWindow::toUpdate() { 
     81 
     82//      cout << "Pour la mise à jour!" << endl; 
     83//} 
    8084 
    8185/*******************************************************************************************************************************************************/ 
     
    8589         QTableWidgetItem *cell2 = new QTableWidgetItem; 
    8690  
    87          for (int i = 0; i < m_tableView->rowCount() ; i++) { 
    88   
    89                          cell1 = m_tableView->item(i, 0); 
    90                          cell2 = m_tableView->item(i, 1); 
    91   
    92          } 
     91         //for (int i = 0; i < m_tableView->rowCount() ; i++) { 
     92  
     93           //              cell1 = m_tableView->item(i, 0); 
     94             //            cell2 = m_tableView->item(i, 1); 
     95  
     96         //} 
    9397 
    9498         m_quitButton->setEnabled(true); 
     
    105109 
    106110        //int last;  
     111 
     112        //index  
    107113 
    108114        for(int i1 = 0; i1 < Nom.size(); i1++) {  
     
    140146        else { 
    141147                if (!(m_ligneNom->text().isEmpty()) || (m_ligneValeur->text().isEmpty())) { 
    142                  
     148                 // for (Table<Constant>::iterator it = m_localConstantTable->begin(); it != m_localConstantTable->end(); it++)  
     149                        //if ( QString(it->getName().c_str()) != Nom) { 
     150                        static int i = 0;        
    143151                        m_delButton->setEnabled(true);                      
    144152                        Constant localConstant (Nom.toStdString(), Val.toStdString());   
    145153                        m_localConstantTable->push_back(localConstant); 
    146154                        addRow();                           // Permet de créer une nouvelle dans le tableau d'affichage. 
    147  
    148                         int anInt = m_tableView->rowCount(); 
    149                         m_tableView->setItem(anInt - 1, 0, new QTableWidgetItem(m_ligneNom->text())); 
    150                         m_tableView->setItem(anInt -1 , 1, new QTableWidgetItem(m_ligneValeur->text())); 
    151  
    152                         } 
     155                         
     156                        QStandardItem *item1 = new QStandardItem(m_ligneNom->text());    
     157                        QStandardItem *item2 = new QStandardItem(m_ligneNom->text()); 
     158                        //modele->appendRow(item1); 
     159                        //modele->appendColumn(item2); 
     160                        modele->setItem(i, 0, new QStandardItem(m_ligneNom->text())); 
     161                        modele->setItem(i, 1, new QStandardItem(m_ligneValeur->text())); 
     162                //      int anInt = m_tableView->rowCount(); 
     163                //      m_tableView->setItem(anInt - 1, 0, new QTableWidgetItem(m_ligneNom->text())); 
     164                //      m_tableView->setItem(anInt -1 , 1, new QTableWidgetItem(m_ligneValeur->text())); 
     165                                 
     166                        i++; 
     167                        //int r = m_tableView->currentIndex().row(); 
     168                        //QItemSelectionModel *selection = m_tableView->selectionModel(); 
     169                        //QModelIndex index = selection->currentIndex(); 
     170                        //QVariant element = modele->data(index, Qt::DisplayRole); 
     171                        //QMessageBox::information(this, "Selection", element.toString()); 
     172                         
     173                        //cout << "emis" << endl; 
     174                        emit rowIsAdded(); // signal emis lorsqu'une a été correctement rajoutée dans le tableau.  
     175                                           // Il sera recupéré dans le mainwidow. 
     176                        //} 
     177                } 
    153178        } 
    154179 
    155180        initialiserChamps(); 
    156181        //localHatWindow->toUpdate();  
    157         emit dataAdded(); 
     182        //emit dataAdded(); 
    158183 } 
    159184  
     
    161186void ConstantWindow::addRow() { 
    162187  
    163         int row = m_tableView->rowCount(); // Renvoie le nombre de ligne du tableau d'affichage. 
    164                 m_tableView->insertRow(row); 
     188//cout << "Je passe ici" << endl; 
     189//cout << "m_tableView->currentRow()= " << m_tableView->currentRow() << endl; 
     190//cout << "Visual Row: " << m_tableView->visualRow(m_tableView->currentRow()) << endl 
     191//      int row = m_tableView->rowCount(); // Renvoie le nombre de ligne du tableau d'affichage. 
     192//              m_tableView->insertRow(row);//Permet d'inserer une nouvelle vierge dans le tableau à une position donnée. 
    165193 } 
    166194 
     
    175203void ConstantWindow::deleteRow() { 
    176204 
    177         if (m_tableView->selectedItems().count() > 0) //Permet au bouton supprimer lorsqu'une ligne n'est pas selectionnée. 
    178  
    179                 m_tableView->removeRow(m_tableView->currentRow());       
    180  } 
     205        int c = m_tableView->currentIndex().row(); 
     206        QItemSelectionModel *selection = m_tableView->selectionModel(); 
     207        index = selection->currentIndex(); 
     208        int r = index.row(); 
     209        if ((r >= 0) && (c != -1)) 
     210         { 
     211                modele->removeRow(r); 
     212                m_localConstantTable->erase(m_localConstantTable->begin() + r); 
     213                m_tableView->resizeRowToContents(c - 1); // columnCountChanged(c , c-1); 
     214                //cout << "Ligne retirée: " << r << endl; 
     215                //cout << "Nombre de lignes: " << modele->rowCount() << endl; 
     216        } 
     217 
     218         
     219                        emit rowIsDeleted(); // signal emis lorsqu'une ligne retirée du tableau.  
     220        //QVariant element = modele->data(index, Qt::DisplayRole); 
     221                         
     222/*      if (m_tableView->selectedItems().count() > 0) //Permet au bouton supprimer lorsqu'une ligne n'est pas selectionnée. 
     223 
     224                { 
     225                        m_tableView->removeRow(m_tableView->currentRow());       
     226cout << "Je passe ici" << endl; 
     227cout << "m_tableView->currentRow()= " << m_tableView->currentRow() << endl; 
     228cut << "m_tableView->selecteditem()= " << m_tableView->selectedItems().count() << endl; 
     229                        m_localConstantTable->erase(m_localConstantTable->begin() + m_tableView->currentRow()); 
     230cout << "end erase---------------" << endl; 
     231        }*/ 
     232         
     233 
     234                        //m_tableView->removeRow(index.row());   
     235        //cout << "RemoveRow:  " << index.row() << endl; 
     236} 
    181237  
    182238/******************************************************** callConstantHelp() ***************************************************************************/ 
     
    232288/**************************************************************** enregDataConstant(bool tar) **********************************************************/ 
    233289/*******************************************************************************************************************************************************/ 
    234 /*******************************************************************************************************************************************************/ 
    235  
    236 /*******************************************************************************************************************************************************/ 
    237  
    238  
    239 /*******************************************************************************************************************************************************/ 
    240  
    241  
    242  
    243  
    244  
     290//bool ConstantWindow::event(QEvent *event) { 
     291 
     292//      if (isActiveWindow()) 
     293//              cout << "C'est une fenêtre active!" << endl; 
     294//      else { 
     295//              activateWindow();//cout << "Ce n'est pas la fenêtre active!" << endl;   
     296 //             this->show(); 
     297// } 
     298//} 
     299/*******************************************************************************************************************************************************/ 
     300 
     301/*******************************************************************************************************************************************************/ 
     302 
     303 
     304/*******************************************************************************************************************************************************/ 
     305 
     306 
     307 
     308 
     309 
  • trunk/yao/src/interface/src/FilesViewer.cpp

    r258 r300  
    1818        setWindowTitle(tr("Arborescence des fichiers")); 
    1919 
    20     modeleFichiers = new QDirModel; 
    21         modeleFichiers->setReadOnly(false); 
    22         modeleFichiers->setSorting(QDir::DirsFirst | QDir::IgnoreCase | QDir::Name); 
     20    modeleFichiers = new QDirModel;//Choix du modÚle. 
     21        modeleFichiers->setReadOnly(false);//AccÚs en lecture. 
     22        //modeleFichiers->setSorting(QDir::DirsFirst | QDir::IgnoreCase | QDir::Name); 
    2323 
    24     vueFichiers = new QTreeView; 
    25         vueFichiers->setModel(modeleFichiers); 
     24    vueFichiers = new QTreeView;//La vue en arbre. 
     25        vueFichiers->setModel(modeleFichiers); //La vue prend en compte son modÚle. 
    2626        vueFichiers->setRootIndex(modeleFichiers->index("projects/")); 
    2727        vueFichiers->header()->setStretchLastSection(true); 
  • trunk/yao/src/interface/src/HatNameWindow.cpp

    r297 r300  
    2929                m_comboHatName->insertItem(0, ""); 
    3030 
    31                 for (Table<Constant>::iterator it = localConstantTable->begin(); it != localConstantTable->end(); it++) { 
     31        //QAbstractItemModel * model; 
     32                for (Table<Constant>::reverse_iterator it = localConstantTable->rbegin(); it != localConstantTable->rend(); it++) { 
    3233                        m_comboHatName->insertItem(1, QString(it->getName().c_str())); 
    3334                         
     
    3940        m_boutonAjouter         = new QPushButton("Ajouter", this);    //Déclaration du bouton "ajouter" 
    4041        m_supHatName            = new QPushButton("Supprimer", this) ; //Déclaration du bouton "supprimmer" 
    41                 m_supHatName->setDisabled(true); 
     42                //m_supHatName->setDisabled(true); 
    4243        m_quitHatName           = new QPushButton("Quitter", this); 
    4344        m_hatnameHelpButton     = new QPushButton("Aide", this); 
     
    113114} 
    114115 
    115 /****************************************************************************************/ 
     116/******************************************************************************************************************************************************/ 
    116117void HatNameWindow::callHatHelp() { 
    117118 
     
    119120 
    120121} 
    121 /****************************************************************************************/ 
     122/******************************************************************************************************************************************************/ 
    122123void HatNameWindow::addHatRow() { 
    123124 
    124125hatFile = getNomFichierHat(); 
    125 compteur ++; 
    126 testContenu(compteur); 
     126 
     127Constant *c; 
     128//string chaine = hatFile; 
     129 
     130c = localConstantTable->find(hatFile);  
     131 
     132if (c != NULL) { 
     133        string constantValue = localConstantTable->find(hatFile)->getText(); 
     134        //cout << constantValue << endl; 
     135 /* for(unsigned int i=0; i < constantValue.size(); i++)  
     136     // stringLiteral of the YAO grammar: 
     137     // (' ' | '\t')* ( 'a'..'z' | 'A'..'Z' | '/' | '_' | '-' | '.'| '0'..'9' )+ (' ' | '\t')* 
     138     if(!((constantValue[i] >= 'a' &&  constantValue[i]<= 'z') || (constantValue[i] >= 'A' && constantValue[i] <= 'Z') || 
     139         (constantValue[i] >= '0' && constantValue[i] <= '9') || (constantValue[i] == '/')  || 
     140        (constantValue[i] == '_')  || (constantValue[i] == '.')  || (constantValue[i] == ' ') )){ 
     141*/ 
     142         
     143        listeFichiers.append(hatFile.c_str()); 
     144        modeleFichiers->setStringList(listeFichiers); 
     145        hatHeaderList->push_back(hatFile); 
     146        initialiserChamps(); 
     147 
     148         
     149  
     150//             QMessageBox::about(this, tr("Erreur !"), 
     151  //                             tr("<p>Valeur incorrecte.")); 
     152    //          return; 
     153    }          
     154  
     155 
     156else { 
     157  
    127158 
    128159for(unsigned int i=0; i < hatFile.size(); i++) { 
     
    145176    { 
    146177        if (hatFile.length() != 0) { 
     178         //  string chaine = hatHeaderList.find(hatFile);//->getText(); 
     179                //if (chaine)  
     180                //{ 
     181                //      hatHeaderList->push_back(chaine); 
     182                        //return;  
     183                //} 
    147184            hatFile.append(".h"); 
    148185            QString fichier = hatFile.c_str(); 
    149186            //listeFichiers.removeFirst(); 
     187             
    150188            listeFichiers.append(fichier); 
    151189             
     
    164202             return; 
    165203      } 
    166  
    167         QString fichier = hatFile.c_str(); 
    168         listeFichiers.append(fichier); 
    169  
    170         modeleFichiers->setStringList(listeFichiers); 
    171  
    172         initialiserChamps(); 
    173 } 
    174  
     204else { 
     205         if (hatFile.length() < 2) { 
     206                initialiserChamps(); 
     207                return ; 
     208        } 
     209        else  
     210        if (hatFile.length() > 2)        
     211        { 
     212        QString fichier =  hatFile.c_str(); 
     213        listeFichiers.append(fichier); 
     214        hatHeaderList->push_back(hatFile); 
     215  
     216        modeleFichiers->setStringList(listeFichiers); 
     217          
     218        initialiserChamps(); 
     219        } 
     220} 
     221 
     222        //QString fichier = hatFile.c_str(); 
     223        //listeFichiers.append(fichier); 
     224 
     225        //modeleFichiers->setStringList(listeFichiers); 
     226 
     227        //initialiserChamps(); 
     228        } 
     229} 
    175230/****************************************************************************************/ 
    176231void HatNameWindow::deleteHatRow() { 
     
    182237     listeFichiers.removeOne(elementSelectionne.toString());//Retrait de l'élément sélectionné de l'objet QStringList 
    183238     modeleFichiers->setStringList(listeFichiers); //On indique au modÚle la liste des éléments à afficher. 
    184  
     239      
    185240        -- compteur; 
    186241        testContenu(compteur); 
     
    194249} 
    195250 
    196 /****************************************************************************************/ 
     251/***************************************************************************************/ 
    197252void HatNameWindow::toUpdate() { 
    198253 
     254        //cout << "Dans le hat" << endl; 
     255        //this->activateWindow(); 
     256        //modeleFichiers->refresh();  
     257        //modeleFichiers->reset(); 
     258        //vueFichiers->reset(); 
    199259        //~HatNameWindow(); 
    200260//      if (this->isActiveWindow()) 
     
    204264        //vueFichiers->setModel(modeleFichiers); 
    205265//      cout << "Salut!" << endl; 
    206  
     266//      HatNameWindow(hatHeaderList, localConstantTable); 
    207267        //vueFichiers->~QListView(); 
    208268        //vueFichiers = new QListView; 
     
    286346} 
    287347/******************************************************************************************************************************************************/ 
     348//void HatNameWindow::updateComb 
     349/******************************************************************************************************************************************************/ 
    288350HatNameWindow::~HatNameWindow() { 
    289351 
  • trunk/yao/src/interface/src/Include/ConstantWindow.hpp

    r298 r300  
    1111#include <QPushButton> 
    1212#include <QTableWidget> 
     13#include <QTableView> 
     14#include <QItemSelectionModel> 
     15#include <QtGui> 
     16//#include <QVariant> 
     17//#include <QModelIndex> 
    1318#include <QLineEdit> 
    1419#include <QLabel> 
     
    3944             */    
    4045          
    41                 ConstantWindow(yao::Table<yao::Constant> *aConstantTable, HatNameWindow *aHatWindow, QWidget *parent=0);   /*!< This function returns the constante's data. */ 
     46                ConstantWindow(yao::Table<yao::Constant> *aConstantTable, QWidget *parent=0);   /*!< This function returns the constante's data. */ 
    4247                void addRow(); 
    4348                void testContenu(int anInt);     
    4449                void initialiserChamps(); 
    45                 static void toUpdate(); 
     50                //static void toUpdate(); 
    4651        protected : 
    4752//                   void closeEvent(QCloseEvent *event);                 
     53                //bool event(QEvent *event); 
    4854         
    4955        public slots :        /*!< Functions called after a click. */ 
    5056                void callConstantHelp(); 
    5157                void addRowInTable(); 
    52                 void deleteRow(); 
     58                void deleteRow() ; 
    5359                void saveData(); 
    5460 
    5561        signals : 
    5662                 
    57                 void dataAdded(); 
     63                //void dataAdded(); 
     64                void rowIsAdded(); 
     65                void rowIsDeleted(); 
    5866 
    5967        private: 
     
    7987                QStringList m_savedData; 
    8088 
    81                 QTableWidget *m_tableView; 
     89                QStandardItemModel *modele; 
     90                QModelIndex index; 
     91                QTableView *m_tableView; 
    8292 
    8393                bool isSaved;                 
  • trunk/yao/src/interface/src/Include/MainWindow.hpp

    r291 r300  
    9696                        void createProjectDirectory();  
    9797                        void openPathWindow(); 
     98                        void setTitle(); 
     99                        void setWindowTitle(const QString &title); 
     100                        void hatUpdate(); 
     101 
    98102        signals : 
    99103 
    100104                        void newProjectIsCreated(); 
     105                        void newProjectIsCreated(QString chaine); 
     106                        void WindowTitleChanged(); 
    101107 
    102108        private : 
  • trunk/yao/src/interface/src/MainWindow.cpp

    r296 r300  
    2929 
    3030        setWindowTitle(" Visual YAO ");         //Donne un titre à la fenêtre principale 
    31  
    3231        espace = new QWorkspace;                                //Crée un espace de travail. Ici, ça serait notre zone centrale 
    3332 
     
    4948        barreEtat = statusBar();        //Affiche la barre d'état. 
    5049         
     50        connect(m_ConstantCopy, SIGNAL(rowIsAdded()), this, SLOT(hatUpdate())); 
     51        connect(m_ConstantCopy, SIGNAL(rowIsDeleted()), this, SLOT(hatUpdate())); 
    5152        QDockWidget *dock3            = new QDockWidget("Résultats", this);///////////////////////////////// 
    5253                dock3->setAllowedAreas(Qt::BottomDockWidgetArea | Qt::RightDockWidgetArea);  
     
    6061        tabWidget->addTab(page2, "                 Exécution          "); 
    6162 
    62         //connect(this, SIGNAL(newProjectIsCreated()), this, SLOT(quit())); 
     63        connect(this, SIGNAL(WindowTitleChanged()), this, SLOT(setTitle())); 
    6364        this->showMaximized(); // Maximise toujours la fenetre principale. 
     65 
     66} 
     67/***************************************************************************************************************************************************/ 
     68void MainWindow::setTitle() { 
     69 
     70        QWidget::setWindowTitle("Projet courant: " + QString(getProjectName().c_str()) ); 
     71        //QWidget::setWindowTitle(title); 
    6472 
    6573} 
     
    232240     m_constantButton    = new QPushButton(tr("Constant"), this); 
    233241        m_constantButton->setToolTip("Bouton désactivé. Vous devez d'abord creer un nouveau projet ou en ouvrir un."); 
    234         m_ConstantCopy = new ConstantWindow(&theConstantTable, m_hatCopy); 
     242         
     243        m_ConstantCopy = new ConstantWindow(&theConstantTable); 
    235244        espace->addWindow(m_ConstantCopy); 
    236245        m_ConstantCopy->hide(); 
    237246        connect(m_constantButton, SIGNAL(clicked()), m_ConstantCopy, SLOT(show())); 
    238247        connect(m_constantButton, SIGNAL(clicked()), this, SLOT(changeColorConstantButton())); 
    239         //connect(espace, SIGNAL(windowActivated(m_constantButton)), espace, SLOT(setActiveWindow(m_constantButton))); 
    240248        //connect(m_constantButton, SIGNAL(clicked()), espace, SLOT(activeWindow())); 
    241  
     249         
    242250    m_hatNameButton   = new QPushButton(tr("Hatname"), this); 
    243251        connect(m_hatNameButton, SIGNAL(clicked()), this, SLOT(changeColorHatButton())); 
     
    409417} 
    410418 
     419/*****************************************************************************************************************************************/ 
     420void MainWindow::hatUpdate() { 
     421 
     422        //if(!m_hatCopy->isActiveWindow()) 
     423//      { 
     424        //m_hatCopy->setUpdatesEnabled(true); 
     425        //m_hatCopy->activateWindow(); 
     426        //espace->addWindow(m_hatCopy); 
     427        //delete m_hatCopy; 
     428        //HatNameWindow *m_hatCopy2 = new HatNameWindow; 
     429        //espace->addWindow(m_hatCopy2); 
     430//      } 
     431        //m_hatCopy->setUpdatesEnabled(true); 
     432        //HatNameWindow *m_hatCopy2 = new HatNameWindow(&theHaderList, &theConstantTable);//getProjectName());//mwc.getHatName();; 
     433        //espace->setActiveWindow(m_hatCopy); 
     434        //espace->setActiveWindow(m_ConstantCopy); 
     435        if (m_hatCopy != NULL) //Teste si l'objet n'est pas déjà crée. 
     436                {  
     437 
     438                        //m_hatCopy->close(); //Ferme l'ancienne fenêtre. 
     439                        delete m_hatCopy; 
     440                        m_hatCopy = new HatNameWindow(&theHaderList, &theConstantTable); //Crée un autre objet. 
     441                        espace->addWindow(m_hatCopy); 
     442                        m_hatCopy->show(); 
     443                        espace->setActiveWindow(m_ConstantCopy); 
     444                } 
     445                        //m_hatCopy->activateWindow(); 
     446//cout << "appel reçu" << endl;         
     447 
     448         
     449} 
    411450/********************************************* helpMessage() *****************************************************************************/ 
    412451void MainWindow::helpMessage() { 
     
    470509/************************************ createProjectDirectory() ******************************************************/ 
    471510void MainWindow::createProjectDirectory() { 
    472          
     511                 
     512        theConstantTable.clear();        
     513        theHaderList.clear();    
     514                 
    473515        setProjectName(m_lineDirName->text().toStdString()); //Fonction permettant d'initialiser le nom du projet. 
    474516        setProjectPath(m_linePath->text().toStdString()); //Fonction permettant d'initialiser le chemin du projet. 
    475  
     517        if (!theConstantTable.empty()) { 
     518 
     519                theConstantTable.clear(); 
     520                //if (espace->getActiveWindow(m_ConstantCopy)) { 
     521                //      m_ConstantCopy->close(); 
     522                //      delete m_ConstantCopy;} 
     523        } 
     524        //this->setWindowTitle(" Visual YAO -" + getProjectName() + "-"); 
    476525        //directivesManager(); 
    477526        theHaderList.push_back(getProjectName() + ".h"); 
     
    563612 
    564613        emit newProjectIsCreated();  
     614        QString nouveauTitre = "Projet courant: " ;//+ QString(getProjectName().c_str()); 
     615        setWindowTitle(nouveauTitre); 
    565616 } 
    566  
     617/*******************************/ 
     618void MainWindow::setWindowTitle(const QString &title) { 
     619 
     620        QWidget::setWindowTitle(title); 
     621        emit WindowTitleChanged(); 
     622} 
    567623 /************************************** createFile(string data, string extension) **********************************************/ 
    568624void MainWindow::createFile(string data, string extension) { 
Note: See TracChangeset for help on using the changeset viewer.