Changeset 400


Ignore:
Timestamp:
08/05/10 10:59:05 (14 years ago)
Author:
yerima
Message:

In OrderWindow?'s class: theTrajectoryTable, theSpaceTable/theOperaTable and theModulTable are passed as parameters. Visual Yao.

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

Legend:

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

    r399 r400  
    264264 
    265265        m_constantButton    = new QPushButton(tr("Defval"), this); 
    266                 m_constantButton->setToolTip("Bouton désactivé. Vous devez d'abord creer un nouveau projet ou en ouvrir un."); 
     266                //m_constantButton->setToolTip("Bouton désactivé. Vous devez d'abord creer un nouveau projet ou en ouvrir un."); 
    267267 
    268268                connect(m_constantButton, SIGNAL(clicked()), this, SLOT(createDefvalWindow())); 
     
    433433 
    434434        if (m_orderWindow == NULL) { //to test if the object is already created. 
    435                 m_orderWindow = new OrderWindow; //mwc.getOrder(); 
     435                m_orderWindow = new OrderWindow(&theTrajectoryTable, &theSpaceTable, &theOperaTable, &theModulTable); //mwc.getOrder(); 
    436436                espace.addWindow(m_orderWindow)->move(2, 0); 
    437437                m_orderWindow->show(); 
     
    806806                        if (!theModulTable.empty()){ 
    807807                        description << "#MODUL name parent ( modulAttribute )* --------------------------------------------------------" << endl; 
    808                                 for (Table<Modul>::iterator it = theModulTable.begin(); it != theModulTable.end(); it++) 
    809                                         description << "modul " << it->getName() << " " << it->getSpaceOrOperator() << " " << "input "<< it->getInput() << " " << "output "<< it->getOutput() << " " << "target " << it->getTarget()<< endl; 
     808                                for (Table<Modul>::iterator it = theModulTable.begin(); it != theModulTable.end(); it++) { 
     809                                        string parentType = it->isSpaceOrOperator()? "space " : "operator "; 
     810                                        description << "modul " << it->getName() << " " << parentType << it->getSpaceOrOperator() << " " << "input "<< it->getInput() << " " << "output "<< it->getOutput() << " " << "target " << it->getTarget()<< endl; 
     811                                } 
    810812                                        description << endl; 
    811813                        } 
  • trunk/yao/src/interface/src/MainWindowController.cpp

    r374 r400  
    210210OrderWindow *MainWindowController::getOrder() { 
    211211 
    212     return m_order = new OrderWindow; 
     212    //return m_order = new OrderWindow; 
    213213} 
    214214/**************************************************************** getInsertFCT() ********************************************************/ 
  • trunk/yao/src/interface/src/OrderWindow.cpp

    r357 r400  
    1414#include "include/OrderWindow.hpp" 
    1515 
     16using namespace std; 
     17using namespace yao; 
    1618//! \class OrderWindow(QWidget *parent) : QWidget(parent) 
    1719//! \brief Implementation of the Order window for visual_YAO. 
    1820 
    19 /***********************************************************************/ 
    20 OrderWindow::OrderWindow(QWidget *parent) : QWidget(parent) { 
     21/***************************************** Implementation of the Construtor OrderWindow() *************************************************/ 
     22OrderWindow::OrderWindow(Table <Trajectory> *aTrajectoryTable, Table <Space> *aSpaceTable, Table <Operator> *anOperatorTable, Table <Modul> *aModulTable, QWidget *parent) : QWidget(parent) { 
    2123 
    2224        setupUi(this); 
     25 
     26        m_trajectoryTable       = aTrajectoryTable; 
     27        m_spaceTable            = aSpaceTable; 
     28        m_operatorTable         = anOperatorTable; 
     29        m_modulTable            = aModulTable; 
    2330 
    2431        setFixedWidth(baseSize().width() + 765); 
     
    2734} 
    2835 
    29 /***********************************************************************/ 
     36/**************************************************** Implementation of cloveEvent() method. ***********************************************/ 
    3037void OrderWindow::closeEvent(QCloseEvent *event) { 
    3138 
  • trunk/yao/src/interface/src/include/OrderWindow.hpp

    r386 r400  
    1313#include "../../ui_orderwindow.h" 
    1414#include "../../../YAOObjects/Table.hpp" 
     15#include "../../../YAOObjects/Operator.hpp" 
     16#include "../../../YAOObjects/Trajectory.hpp" 
    1517#include "../../../YAOObjects/Order.hpp" 
    1618#include <QStandardItemModel> 
     
    2123 
    2224        public : 
    23             OrderWindow(QWidget *parent=0); 
     25            OrderWindow(yao::Table <yao::Trajectory> *aTrajectoryTable, yao::Table <yao::Space> *aSpaceTable, yao::Table <yao::Operator> *anOperatorTable, yao::Table <yao::Modul> *aModulTable, QWidget *parent=0); 
    2426 
    2527        private slots: 
     
    3234 
    3335        private : 
    34                  QStandardItemModel *m_orderModel; 
     36                QStandardItemModel *m_orderModel; 
     37                yao::Table <yao::Trajectory> *m_trajectoryTable; 
     38                yao::Table <yao::Space> *m_spaceTable; 
     39                yao::Table <yao::Operator> *m_operatorTable; 
     40                yao::Table <yao::Modul> *m_modulTable; 
     41 
    3542}; 
    3643#endif // ORDERWINDOW_HPP 
  • trunk/yao/src/interface/src/ui_/orderwindow.ui

    r362 r400  
    260260      </item> 
    261261      <item> 
    262        <widget class="QComboBox" name="comboBox_2"/> 
     262       <widget class="QComboBox" name="comboBox_2"> 
     263        <item> 
     264         <property name="text"> 
     265          <string/> 
     266         </property> 
     267        </item> 
     268        <item> 
     269         <property name="text"> 
     270          <string>YA1</string> 
     271         </property> 
     272        </item> 
     273        <item> 
     274         <property name="text"> 
     275          <string>YA2</string> 
     276         </property> 
     277        </item> 
     278        <item> 
     279         <property name="text"> 
     280          <string>YA3</string> 
     281         </property> 
     282        </item> 
     283        <item> 
     284         <property name="text"> 
     285          <string>YB1</string> 
     286         </property> 
     287        </item> 
     288        <item> 
     289         <property name="text"> 
     290          <string>YB2</string> 
     291         </property> 
     292        </item> 
     293        <item> 
     294         <property name="text"> 
     295          <string>YB3</string> 
     296         </property> 
     297        </item> 
     298       </widget> 
    263299      </item> 
    264300      <item> 
Note: See TracChangeset for help on using the changeset viewer.