Changeset 471 for trunk/yao


Ignore:
Timestamp:
10/28/10 23:56:02 (14 years ago)
Author:
yerima
Message:

After working on the visual Yao script (called "configure"), some updates are made in the modinspace class (data are added in the Yao structures depending on the space or the operator.) Visual Yao.

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

Legend:

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

    r470 r471  
    457457 
    458458        if (m_orderWindow == NULL) { //to test if the object is already created. 
    459                 m_orderWindow = new OrderWindow(&theTrajectoryTable, &theSpaceTable, &theOperaTable, &theModulTable); //mwc.getOrder(); 
     459                m_orderWindow = new OrderWindow(&theTrajectoryTable, &theSpaceTable, &theOperaTable, &theModulTable, &theOrderTable); //mwc.getOrder(); 
    460460                espace.addWindow(m_orderWindow)->move(2, 0); 
    461461                m_orderWindow->show(); 
  • trunk/yao/src/interface/src/ModinspaceWindow.cpp

    r469 r471  
    2222 
    2323/*********************************************************************************************************************************/ 
    24 ModinspaceWindow::ModinspaceWindow(Table <Modul> *aModulTable, Table <Space> *aSpaceTable, Table <Operator> *anOperatorTable, QWidget *parent) : QWidget(parent), m_theLocalAxesTable(NULL), m_theLocalModulTable(NULL) { 
     24ModinspaceWindow::ModinspaceWindow(Table <Modul> *aModulTable, Table <Space> *aSpaceTable, Table <Operator> *anOperatorTable, Table <Order> *anOrderTable, QWidget *parent) : QWidget(parent), m_theLocalAxesTable(NULL), m_theLocalModulTable(NULL) { 
    2525 
    2626        setupUi(this); 
    2727         
    28         m_modulTable            = aModulTable; 
    29         m_spaceTable            = aSpaceTable; 
    30         m_operatorTable         = anOperatorTable; 
     28        m_localModulTable               = aModulTable; 
     29        m_localSpaceTable            = aSpaceTable; 
     30        m_localOperaTable         = anOperatorTable; 
     31        m_localOrderTable       = anOrderTable; 
    3132         
    3233        m_rightAxesButton->setIcon(QIcon("Images/icons/rightarrow2.png")); 
     
    4546 
    4647        //For adding operaname in the combobox 
    47         if (!m_operatorTable->empty())   
    48         for (Table<Operator>::reverse_iterator it = m_operatorTable->rbegin(); it != m_operatorTable->rend(); it++) { 
     48        if (!m_localOperaTable->empty())         
     49        for (Table<Operator>::reverse_iterator it = m_localOperaTable->rbegin(); it != m_localOperaTable->rend(); it++) { 
    4950                   
    5051                  m_spaceOrOperaNameComboBox->insertItem(1, QString(it->getName().c_str()));  
    5152          } 
    5253        //For adding space name in the combobox  
    53         if (!m_spaceTable->empty())      
    54         for (Table<Space>::reverse_iterator it = m_spaceTable->rbegin(); it != m_spaceTable->rend(); it++) { 
     54        if (!m_localSpaceTable->empty())         
     55        for (Table<Space>::reverse_iterator it = m_localSpaceTable->rbegin(); it != m_localSpaceTable->rend(); it++) { 
    5556                   
    5657                  m_spaceOrOperaNameComboBox->insertItem(1, QString(it->getName().c_str()));  
    5758          } 
    5859        //For adding modul names in the combobox 
    59         if (!m_modulTable->empty())      
    60         for (Table<Modul>::reverse_iterator it = m_modulTable->rbegin(); it != m_modulTable->rend(); it++) { 
     60        if (!m_localModulTable->empty())         
     61        for (Table<Modul>::reverse_iterator it = m_localModulTable->rbegin(); it != m_localModulTable->rend(); it++) { 
    6162                   
    6263                  m_modulNameComboBox->insertItem(1, QString(it->getName().c_str()));  
     
    141142                 
    142143        QString theAxe = m_axesComboBox->currentText(); // 
     144        string commonName; 
    143145        int row0 = m_outlineModel->rowCount(); 
    144146        int row1 = m_outlineModel->rowCount() + 1; 
     
    158160 
    159161        if (!cpt) { 
    160          
     162                 
     163                //Order ord(&m_localModulTable) 
     164                         
    161165                m_outlineModel->setItem(row0, 0, new QStandardItem("order"));  
    162166                m_outlineModel->setItem(row0, 1, new QStandardItem("modinpace"));  
    163167                m_outlineModel->setItem(row0, 2, new QStandardItem(spaceOrOpera));  
    164168                m_outlineModel->setItem(row1, 1, new QStandardItem("order"));  
     169         
     170                if(m_localSpaceTable->find(commonName)) 
     171                        m_localSpaceTable->find(commonName)->setCounterOrderHeader(true); 
     172                else 
     173                        m_localOperaTable->find(commonName)->setCounterOrderHeader(true); 
     174                 
    165175                cpt++; 
    166176 
  • trunk/yao/src/interface/src/OrderWindow.cpp

    r469 r471  
    2020 
    2121/***************************************** Implementation of the Construtor OrderWindow() *************************************************/ 
    22 OrderWindow::OrderWindow(Table <Trajectory> *aTrajectoryTable, Table <Space> *aSpaceTable, Table <Operator> *anOperatorTable, Table <Modul> *aModulTable,  QWidget *parent) : stateOfSpaceintrajEndCheckBox(false), QWidget(parent) { 
     22OrderWindow::OrderWindow(Table <Trajectory> *aTrajectoryTable, Table <Space> *aSpaceTable, Table <Operator> *anOperatorTable, Table <Modul> *aModulTable,  Table <Order> *anOrderTable, QWidget *parent) : stateOfSpaceintrajEndCheckBox(false), QWidget(parent) { 
    2323 
    2424        setupUi(this); 
    2525         
    26         m_trajectoryTable       = aTrajectoryTable; 
    27         m_spaceTable            = aSpaceTable; 
    28         m_operatorTable         = anOperatorTable; 
    29         m_modulTable            = aModulTable; 
     26        m_localTrajectoryTable          = aTrajectoryTable; 
     27        m_localSpaceTable               = aSpaceTable; 
     28        m_localOperaTable               = anOperatorTable; 
     29        m_localModulTable               = aModulTable; 
     30        m_localOrderTable               = anOrderTable; 
    3031        /* 
    3132        setFixedWidth(baseSize().width() + 765); 
    3233        m_comboTrajName->insertItem(0, ""); 
    3334         
    34         for (Table<Trajectory>::iterator it = m_trajectoryTable->begin(); it != m_trajectoryTable->end(); it++) { 
     35        for (Table<Trajectory>::iterator it = m_localTrajectoryTable->begin(); it != m_localTrajectoryTable->end(); it++) { 
    3536                m_comboTrajName->insertItem(1, QString(it->getName().c_str()));  
    3637        }        
    3738 
    38         for (Table<Space>::iterator it = m_spaceTable->begin(); it != m_spaceTable->end(); it++) { 
     39        for (Table<Space>::iterator it = m_localSpaceTable->begin(); it != m_localSpaceTable->end(); it++) { 
    3940                 
    4041                m_comboSpaceOrOperaName->insertItem(1, QString(it->getName().c_str()));  
     
    5051        //m_modinspaceRadioButton               = new QRadioButton("modinspace"); 
    5152        //m_spaceintrajRadioButton      = new QRadioButton("spaceintraj");       
    52         ModinspaceWindow *misw          = new ModinspaceWindow(m_modulTable, m_spaceTable, m_operatorTable);  
    53         SpaceintrajWindow *sitw         = new SpaceintrajWindow(m_trajectoryTable, m_spaceTable, m_operatorTable); 
     53        ModinspaceWindow *misw          = new ModinspaceWindow(m_localModulTable, m_localSpaceTable, m_localOperaTable, m_localOrderTable);  
     54        SpaceintrajWindow *sitw         = new SpaceintrajWindow(m_localTrajectoryTable, m_localSpaceTable, m_localOperaTable); 
    5455                //sitw->show();  
    5556         
  • trunk/yao/src/interface/src/include/MainWindow.hpp

    r470 r471  
    267267                        yao::Table <yao::Modul> theModulTable; 
    268268                        yao::Table <yao::Connection> theConnectionTable; 
    269                         //yao::Table <yao::Order> theOrderTable; 
     269                        yao::Table <yao::Order> theOrderTable; 
    270270                        yao::Table <yao::Function> theFunctionTable;     
    271271                         
  • trunk/yao/src/interface/src/include/ModinspaceWindow.hpp

    r469 r471  
    1616#include "../../../YAOObjects/Operator.hpp" 
    1717#include "../../../YAOObjects/Modul.hpp" 
     18#include "../../../YAOObjects/Order.hpp" 
    1819 
    1920 
     
    2324 
    2425        public : 
    25                 ModinspaceWindow(yao::Table <yao::Modul> *aModulTable, yao::Table <yao::Space> *aSpaceTable, yao::Table <yao::Operator> *anOperatorTable, QWidget *parent=0); 
     26                ModinspaceWindow(yao::Table <yao::Modul> *aModulTable, yao::Table <yao::Space> *aSpaceTable, yao::Table <yao::Operator> *anOperatorTable, yao::Table <yao::Order> *anOrderTable, QWidget *parent=0); 
    2627 
    2728        private slots: 
     
    4243 
    4344        private : 
    44                 yao::Table <yao::Modul> *m_modulTable; 
    45                 yao::Table <yao::Space> *m_spaceTable; 
    46                 yao::Table <yao::Operator> *m_operatorTable; 
     45                yao::Table <yao::Modul> *m_localModulTable; 
     46                yao::Table <yao::Space> *m_localSpaceTable; 
     47                yao::Table <yao::Operator> *m_localOperaTable; 
     48                yao::Table <yao::Order> *m_localOrderTable; 
    4749                 
    4850                QStandardItemModel *m_axesModel; 
  • trunk/yao/src/interface/src/include/OrderWindow.hpp

    r459 r471  
    3030 
    3131        public : 
    32             OrderWindow(yao::Table <yao::Trajectory> *aTrajectoryTable, yao::Table <yao::Space> *aSpaceTable, yao::Table <yao::Operator> *anOperatorTable, yao::Table <yao::Modul> *aModulTable, QWidget *parent=0); 
     32            OrderWindow(yao::Table <yao::Trajectory> *aTrajectoryTable, yao::Table <yao::Space> *aSpaceTable, yao::Table <yao::Operator> *anOperatorTable, yao::Table <yao::Modul> *aModulTable, yao::Table <yao::Order> *anOrderTable, QWidget *parent=0); 
    3333 
    3434        private slots: 
     
    5454                //QComboBox     *m_choiceComboBox;               
    5555                bool stateOfSpaceintrajEndCheckBox;      
    56                 yao::Table <yao::Trajectory> *m_trajectoryTable; 
    57                 yao::Table <yao::Space> *m_spaceTable; 
    58                 yao::Table <yao::Operator> *m_operatorTable; 
    59                 yao::Table <yao::Modul> *m_modulTable; 
    60  
     56                yao::Table <yao::Trajectory> *m_localTrajectoryTable; 
     57                yao::Table <yao::Space> *m_localSpaceTable; 
     58                yao::Table <yao::Operator> *m_localOperaTable; 
     59                yao::Table <yao::Modul> *m_localModulTable; 
     60                yao::Table <yao::Order> *m_localOrderTable; 
    6161}; 
    6262#endif // ORDERWINDOW_HPP 
Note: See TracChangeset for help on using the changeset viewer.