Changeset 419 for trunk/yao


Ignore:
Timestamp:
09/01/10 17:34:35 (14 years ago)
Author:
yerima
Message:

update of all class in visual Yao.

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

Legend:

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

    r391 r419  
    11//! \file    ConnectionWindow.cpp 
    22//! \brief   Implementation of the Ctin window. 
    3 //! \version 2010/07/06 (yyyy/mm/dd) 
     3//! \version 2010/09/01 (yyyy/mm/dd) 
    44//! \author  MAYAKI Abdouramane. 
    55 
     
    4848                         
    4949                        m_ctinModulInCombo->insertItem(1, QString(it->getName().c_str())); 
    50                         //m_ctinModulOutCombo->insertItem(1, QString(it->getName().c_str()));  
     50                        m_ctinModulOutCombo->insertItem(1, QString(it->getName().c_str()));  
    5151                        //m_ctinModel->setItem(row, 0, new QStandardItem(QString(it->getName().c_str()))); /*!< Gets the name.*/ 
    5252                        //m_ctinModel->setItem(row, 1, new QStandardItem(QString(it->getSpaceOrOperator().c_str())));  
  • trunk/yao/src/interface/src/ConstantWindow.cpp

    r391 r419  
    11//! \file    ConstantWindow.cpp 
    22//! \brief   Implementation of the Constant window for visual_YAO. 
    3 //! \version 2010/07/30 (yyyy/mm/dd) 
     3//! \version 2010/09/01 (yyyy/mm/dd) 
    44//! \author  MAYAKI Abdouramane & MAYOMBO Alexis. 
    55 
  • trunk/yao/src/interface/src/ContextWindow.cpp

    r382 r419  
    11//! \file    ContextWindow.cpp 
    22//! \brief   Implementation of the Context window for visual_YAO. 
    3 //! \version 2010/06/30 (yyyy/mm/dd) 
     3//! \version 2010/09/01 (yyyy/mm/dd) 
    44//! \author  MAYAKI Abdouramane. 
    55 
  • trunk/yao/src/interface/src/HatNameWindow.cpp

    r389 r419  
    11//! \brief   Implementation of the HatName window for visual_YAO. 
    2 //! \version 2009/11/09 (yyyy/mm/dd) 
     2//! \version 2010/09/01 (yyyy/mm/dd) 
    33//! \author  MAYAKI Abdouramane & MAYOMBO Alexis. 
    44 
  • trunk/yao/src/interface/src/InsertFCTWindow.cpp

    r370 r419  
    11//! \file    InsertFCTWindow.cpp 
    22//! \brief   Implementation of the Defval window for visual_YAO. 
    3 //! \version 2010/06/30 (yyyy/mm/dd) 
     3//! \version 2010/09/01 (yyyy/mm/dd) 
    44//! \author  MAYAKI Abdouramane. 
    55 
  • trunk/yao/src/interface/src/MainWindow.cpp

    r400 r419  
    7575} 
    7676 
    77 /******************************************* Implementation of the method setTitle() *****************************************************************/ 
     77/*************************************** Implementation of the contructor MainWindow(Table <Constant> aConstant) *********************************/ 
    7878MainWindow::MainWindow(Table <Constant> aConstantTable): theConstantTablePt(aConstantTable) 
    7979{ 
     
    165165                actionSaveProject->setEnabled(false); // Option désactivée par défaut. 
    166166                actionSaveProject->setStatusTip("Pour sauvegarder le projet en cours"); 
     167                connect(actionSaveProject, SIGNAL(triggered()), this, SLOT(save())); 
    167168 
    168169        actionSaveAsProject = new QAction(tr("Enregistrer sous"), this); 
     
    210211 
    211212                connect(actionGenerationD, SIGNAL(triggered()), this, SLOT(generateDFile())); 
     213                //connect(actionGenerationD, SIGNAL(triggered()), this, SLOT(information())); 
    212214 
    213215        actionCompilation = new QAction(tr("Compilation"), this); 
     
    516518 
    517519} 
    518  
     520/**************************************** Implementation of the method save() (SLOT) *******************************************************/ 
     521void MainWindow::save() { 
     522         
     523        generateDFile(); 
     524        setWindowModified(false); 
     525 
     526} 
    519527/**************************************** Implementation of the method saveAs() (SLOT) *******************************************************/ 
    520528void MainWindow::saveAs() { 
     
    522530         
    523531        m_newProjectWindow = new  NewProjectWindow ; 
    524         m_newProjectWindow->setWindowTitle("testhj"); 
     532        //m_newProjectWindow->setWindowTitle("testhj"); 
    525533        m_newProjectName = m_newProjectWindow->getProjectName(); 
    526534        m_projectPath = m_newProjectWindow->getProjectPath(); 
     
    536544        //QString cheminFichier = dialog->getExistingDirectory(this, tr("Enregistrement d'un projet."), ".");  
    537545        //m_newProjectName = cheminFichier.toStdString(); 
    538         //generateDFile(cheminFichier.toStdString()+ "/"); 
     546        generateDFile(m_projectPath + "/"); 
    539547        //cout << cheminFichier.toStdString() << endl; 
    540548 
     
    546554 
    547555        QString cheminFichier = dialogue->getOpenFileName(this, tr("Ouverture d'un project existant."), QDir::homePath(), tr("*.d *.i *.txt")); //Retourne le chemin du fichier. 
    548  
    549         QProcess builder; 
     556        FilePath localName(cheminFichier.toStdString()); 
     557        setProjectName(localName.getTitle()); 
     558        setProjectPath(localName.getLocation()); 
     559        setTitle(); 
     560        QProcess builder;//To lanch an external command. Example: "ls -l" 
    550561        QString test(""); 
    551562        builder.setProcessChannelMode(QProcess::MergedChannels); 
    552         builder.start("Yao9Generator " + cheminFichier);//, QStringList() 
     563        builder.start("Yao9Generator " + cheminFichier);//Will execute the linux command  
    553564        if (!builder.waitForFinished()) 
    554565                qDebug() << "Make failed:" << builder.errorString(); 
    555566        else { 
    556                 test = builder.readAll(); 
    557                 istringstream iss(test.toStdString()); 
     567                test = builder.readAll();//the results are saved in a string format. 
     568                istringstream iss(test.toStdString()); //To have each word that compose the string. 
    558569                FilePath aString, theShape, name, parent, aType, boot, offset, step, size; 
    559570                vector <int> theShapeVector; 
    560571 
    561                 while ( getline(iss, aString, '\n' ) ) 
     572                while ( getline(iss, aString, '\n' ) ) // Here we notified that the words in the string are separated by "\n" 
    562573                        { 
    563                                 if (aString.getExtension() == ".def1") 
     574                                if (aString.getExtension() == ".def1")// 
    564575                                {                        
    565576                                        //cout << aString.getTitle() << endl; 
     
    782793                        //} 
    783794                        if (!theTrajectoryTable.empty()) { 
    784                         description << "#TRAJECTOIRES name type uptime offtime dtime steptime ------------------------------------------" << endl; 
     795                        description << "#TRAJ name type uptime offtime dtime steptime ------------------------------------------" << endl; 
    785796                                for (Table<Trajectory>::iterator it = theTrajectoryTable.begin(); it != theTrajectoryTable.end(); it++) 
    786797                                        description << "traj " << it->getName() << " " << it->getType() << " " << it->getBoot() << " "  << it->getOffset() << " " << it->getStep() << " " << it->getSize()<< " " << endl; 
     
    790801                        description << "#SPACE name type dim1 [[dim2]---[dim3]] traj ---------------------------------------------------" << endl;  
    791802                                for (Table<Space>::iterator it = theSpaceTable.begin(); it != theSpaceTable.end(); it++) 
    792                                         description << "space " << it->getProperty(0) << " " << it->getProperty(1) << " " << it->getProperty(2) << endl; 
     803                                        description << "space " << it->getProperty(0) << " M " << it->getProperty(1) << " " << it->getProperty(2) << endl; 
    793804                                        description << endl; 
    794805                        } 
     
    830841 
    831842                        description.close(); 
    832                         QMessageBox::about(this, "Avis", "Un fichier de description portant le nom du projet en cours vient d'être généré."); 
     843                        //QMessageBox::about(this, "Avis", "Un fichier de description portant le nom du projet en cours vient d'être généré."); 
    833844                } 
    834845 
  • trunk/yao/src/interface/src/ModulWindow.cpp

    r391 r419  
    11//! \file    ModulWindow.cpp 
    22//! \brief   Implementation of the Modul window for visual_YAO. 
    3 //! \version 2010/07/30 (yyyy/mm/dd) 
     3//! \version 2010/09/01 (yyyy/mm/dd) 
    44//! \author  MAYAKI Abdouramane. 
    55 
  • trunk/yao/src/interface/src/NetwardWindow.cpp

    r370 r419  
    11//! \file    NetwardWindow.cpp 
    22//! \brief   Implementation of the Netward window for visual_YAO. 
    3 //! \version 2010/06/30 (yyyy/mm/dd) 
     3//! \version 2010/09/01 (yyyy/mm/dd) 
    44//! \author  MAYAKI Abdouramane. 
    55 
  • trunk/yao/src/interface/src/OperaWindow.cpp

    r381 r419  
    11//! \file    OperaWindow.cpp 
    22//! \brief   Implementation of the Operator window. 
    3 //! \version 2010/06/24 (yyyy/mm/dd) 
     3//! \version 2010/09/01 (yyyy/mm/dd) 
    44//! \author  MAYAKI Abdouramane. 
    55/* 
  • trunk/yao/src/interface/src/OrderWindow.cpp

    r400 r419  
    11//! \file    OrderWindow.cpp 
    22//! \brief   Implementation of the OrderWindow window for visual_YAO. 
    3 //! \version 2010/06/22 (yyyy/mm/dd) 
     3//! \version 2010/09/01 (yyyy/mm/dd) 
    44//! \author  MAYAKI Abdouramane. 
    55 
     
    3030 
    3131        setFixedWidth(baseSize().width() + 765); 
     32        m_comboTrajName->insertItem(0, ""); 
    3233         
     34        for (Table<Trajectory>::iterator it = m_trajectoryTable->begin(); it != m_trajectoryTable->end(); it++) { 
     35                m_comboTrajName->insertItem(1, QString(it->getName().c_str()));  
     36        }        
     37 
     38        for (Table<Space>::iterator it = m_spaceTable->begin(); it != m_spaceTable->end(); it++) { 
     39                 
     40                m_comboSpaceOrOperaName->insertItem(1, QString(it->getName().c_str()));  
     41                m_comboSpaceName->insertItem(1, QString(it->getName().c_str()));         
     42        } 
    3343        m_orderModel    = new QStandardItemModel(0, 5); 
     44         
     45         
    3446} 
    3547 
  • trunk/yao/src/interface/src/SpaceWindow.cpp

    r399 r419  
    11//! \file    SpaceWindow.cpp 
    22//! \brief   Implementation of the Ctin window. 
    3 //! \version 2010/06/23 (yyyy/mm/dd) 
     3//! \version 2010/09/01 (yyyy/mm/dd) 
    44//! \author  MAYAKI Abdouramane. 
    55/* 
  • trunk/yao/src/interface/src/TrajectoryWindow.cpp

    r397 r419  
    22 * \file    TrajectoryWindow.cpp 
    33 * \brief   Traj class for visual_YAO. 
    4  * \version 2010/06/18 (yyyy/mm/dd) 
     4 * \version 2010/09/01 (yyyy/mm/dd) 
    55 * \author  MAYAKI Abdouramane. 
    66 */ 
  • trunk/yao/src/interface/src/include/MainWindow.hpp

    r397 r419  
    141141                        void mainWindowIsModified(); 
    142142                        void saveAs(); 
     143                        void save(); 
    143144 
    144145        signals : 
  • trunk/yao/src/interface/src/ui_/orderwindow.ui

    r400 r419  
    88    <y>0</y> 
    99    <width>757</width> 
    10     <height>537</height> 
     10    <height>547</height> 
    1111   </rect> 
    1212  </property> 
     
    2020     <y>310</y> 
    2121     <width>741</width> 
    22      <height>221</height> 
     22     <height>231</height> 
    2323    </rect> 
    2424   </property> 
     
    4747     <bool>false</bool> 
    4848    </property> 
    49     <widget class="QComboBox" name="comboBox_5"> 
     49    <widget class="QComboBox" name="m_comboSpaceName"> 
    5050     <property name="geometry"> 
    5151      <rect> 
    5252       <x>10</x> 
    5353       <y>70</y> 
    54        <width>78</width> 
     54       <width>101</width> 
    5555       <height>27</height> 
    5656      </rect> 
     
    154154     <property name="geometry"> 
    155155      <rect> 
    156        <x>20</x> 
     156       <x>3</x> 
    157157       <y>30</y> 
    158        <width>148</width> 
     158       <width>181</width> 
    159159       <height>29</height> 
    160160      </rect> 
     
    167167        </property> 
    168168       </widget> 
     169      </item> 
     170      <item> 
     171       <spacer name="horizontalSpacer_2"> 
     172        <property name="orientation"> 
     173         <enum>Qt::Horizontal</enum> 
     174        </property> 
     175        <property name="sizeHint" stdset="0"> 
     176         <size> 
     177          <width>40</width> 
     178          <height>20</height> 
     179         </size> 
     180        </property> 
     181       </spacer> 
    169182      </item> 
    170183      <item> 
     
    193206    <property name="geometry"> 
    194207     <rect> 
    195       <x>20</x> 
    196       <y>20</y> 
    197       <width>731</width> 
    198       <height>291</height> 
     208      <x>10</x> 
     209      <y>10</y> 
     210      <width>741</width> 
     211      <height>271</height> 
    199212     </rect> 
    200213    </property> 
     
    208221     <property name="geometry"> 
    209222      <rect> 
    210        <x>20</x> 
    211        <y>190</y> 
     223       <x>10</x> 
     224       <y>200</y> 
    212225       <width>151</width> 
    213226       <height>71</height> 
     
    228241     <property name="geometry"> 
    229242      <rect> 
    230        <x>200</x> 
     243       <x>210</x> 
    231244       <y>10</y> 
    232        <width>281</width> 
     245       <width>271</width> 
    233246       <height>141</height> 
    234247      </rect> 
     
    238251     <property name="geometry"> 
    239252      <rect> 
    240        <x>20</x> 
    241        <y>60</y> 
    242        <width>87</width> 
    243        <height>128</height> 
     253       <x>10</x> 
     254       <y>70</y> 
     255       <width>91</width> 
     256       <height>121</height> 
    244257      </rect> 
    245258     </property> 
     
    307320      <rect> 
    308321       <x>10</x> 
    309        <y>20</y> 
    310        <width>169</width> 
     322       <y>30</y> 
     323       <width>191</width> 
    311324       <height>29</height> 
    312325      </rect> 
     
    322335      <item> 
    323336       <widget class="QComboBox" name="m_comboSpaceOrOperaName"/> 
     337      </item> 
     338      <item> 
     339       <spacer name="horizontalSpacer"> 
     340        <property name="orientation"> 
     341         <enum>Qt::Horizontal</enum> 
     342        </property> 
     343        <property name="sizeHint" stdset="0"> 
     344         <size> 
     345          <width>20</width> 
     346          <height>20</height> 
     347         </size> 
     348        </property> 
     349       </spacer> 
    324350      </item> 
    325351     </layout> 
     
    408434  <tabstop>groupSpaceIntraj</tabstop> 
    409435  <tabstop>m_comboTrajName</tabstop> 
    410   <tabstop>comboBox_5</tabstop> 
     436  <tabstop>m_comboSpaceName</tabstop> 
    411437  <tabstop>listView</tabstop> 
    412438  <tabstop>pushButton_5</tabstop> 
Note: See TracChangeset for help on using the changeset viewer.