Changeset 351 for trunk/yao


Ignore:
Timestamp:
06/18/10 18:39:07 (14 years ago)
Author:
yerima
Message:

The instance of Connection, Order and InsertFCT's windows are controlled.

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

Legend:

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

    r350 r351  
    164164 
    165165/****************************************************************************************/ 
     166void ConnectionWindow::closeEvent(QCloseEvent *event) { 
     167 
     168        emit ctinWindowIsClosed(9); 
     169} 
  • trunk/yao/src/interface/src/InsertFCTWindow.cpp

    r350 r351  
    146146         
    147147}*/ 
     148/*********************************************************************/ 
     149void InsertFCTWindow::closeEvent(QCloseEvent *event) { 
     150 
     151        emit insertFCTWindowIsClosed(11); 
     152 
     153} 
     154/******************************* End of file. ****************************************/ 
  • trunk/yao/src/interface/src/MainWindow.cpp

    r350 r351  
    274274       connect(m_modulButton, SIGNAL(clicked()), this, SLOT(changeColorModulButton())); 
    275275     m_ctinButton      = new QPushButton(tr("Connection"), this); 
    276         m_ctinWindow = new ConnectionWindow; //mwc.getCtin(); 
    277         espace->addWindow(m_ctinWindow); 
    278         m_ctinWindow->hide(); 
    279         connect(m_ctinButton, SIGNAL(clicked()), m_ctinWindow, SLOT(show())); 
     276        connect(m_ctinButton, SIGNAL(clicked()), this, SLOT(createCtinWindow())); 
    280277        connect(m_ctinButton, SIGNAL(clicked()), this, SLOT(changeColorCtinButton())); 
    281278     m_orderButton     = new QPushButton(tr("Order"), this); 
    282         m_orderWindow = new OrderWindow; //mwc.getOrder(); 
    283         espace->addWindow(m_orderWindow); 
    284         m_orderWindow->hide(); 
    285         connect(m_orderButton, SIGNAL(clicked()), m_orderWindow, SLOT(show())); 
     279        connect(m_orderButton, SIGNAL(clicked()), this, SLOT(createOrderWindow())); 
    286280        connect(m_orderButton, SIGNAL(clicked()), this, SLOT(changeColorOrderButton())); 
    287281 
    288282     m_insertFCTButton = new QPushButton(tr("Insert_fct"), this); 
    289        m_insertFCTWindow = new InsertFCTWindow; //mwc.getInsertFCT(); 
    290         espace->addWindow(m_insertFCTWindow); 
    291         m_insertFCTWindow->hide(); 
    292         connect(m_insertFCTButton, SIGNAL(clicked()), m_insertFCTWindow, SLOT(show())); 
     283        connect(m_insertFCTButton, SIGNAL(clicked()), this, SLOT(createInsertFCTWindow())); 
    293284        connect(m_insertFCTButton, SIGNAL(clicked()), this, SLOT(changeColorInsertFCTButton())); 
    294285 
     
    389380 
    390381        if (m_modulWindow == NULL) { //to test if the object is already created. 
    391         //ModulWindow::ModulWindow(Table <Modul> *aModulTable, Table <Space> *aSpaceTable, Table <Operator> *anOperatorTable, QWidget *parent) 
    392         //connect(m_modulButton, SIGNAL(clicked()), m_modulWindow, SLOT(show())); 
    393    
    394         m_modulWindow = new ModulWindow(&theModulTable, &theSpaceTable, &theOperaTable, &theConstantTable, &the_mwc); //mwc.getModul(); 
    395         espace->addWindow(m_modulWindow); 
    396         espace->addWindow(m_modulWindow)->move(30, 20); 
    397         m_modulWindow->show();  
     382                m_modulWindow = new ModulWindow(&theModulTable, &theSpaceTable, &theOperaTable, &theConstantTable, &the_mwc); //mwc.getModul(); 
     383                espace->addWindow(m_modulWindow); 
     384                espace->addWindow(m_modulWindow)->move(30, 15); 
     385                m_modulWindow->show();  
    398386        } 
    399387 
    400388        connect(m_modulWindow, SIGNAL(modulWindowIsClosed(int)), this, SLOT(initializeWindow(int))); 
     389 
     390} 
     391 
     392/********************************************* Implementation of the method createCtinWindow() ************************************************/ 
     393void MainWindow::createCtinWindow() { 
     394 
     395        if (m_ctinWindow == NULL) { //to test if the object is already created. 
     396                m_ctinWindow = new ConnectionWindow; //mwc.getCtin(); 
     397                espace->addWindow(m_ctinWindow)->move(0, 0); 
     398                m_ctinWindow->show(); 
     399        } 
     400 
     401        connect(m_ctinWindow, SIGNAL(ctinWindowIsClosed(int)), this, SLOT(initializeWindow(int))); 
     402       
     403 
     404} 
     405/********************************************* Implementation of the method createOrderWindow() ************************************************/ 
     406void MainWindow::createOrderWindow() { 
     407 
     408        if (m_orderWindow == NULL) { //to test if the object is already created. 
     409                m_orderWindow = new OrderWindow; //mwc.getOrder(); 
     410                espace->addWindow(m_orderWindow)->move(2, 0); 
     411                m_orderWindow->show(); 
     412        } 
     413 
     414        connect(m_orderWindow, SIGNAL(orderWindowIsClosed(int)), this, SLOT(initializeWindow(int))); 
     415 
     416} 
     417/********************************************* Implementation of the method createInsertFCTWindow() ************************************************/ 
     418void MainWindow::createInsertFCTWindow() { 
     419 
     420        if (m_insertFCTWindow == NULL) { //to test if the object is already created. 
     421                m_insertFCTWindow = new InsertFCTWindow; //mwc.getInsertFCT(); 
     422                espace->addWindow(m_insertFCTWindow)->move(30, 20); 
     423                m_insertFCTWindow->show(); 
     424        } 
     425 
     426        connect(m_insertFCTWindow, SIGNAL(insertFCTWindowIsClosed(int)), this, SLOT(initializeWindow(int))); 
     427       
    401428 
    402429} 
  • trunk/yao/src/interface/src/OrderWindow.cpp

    r350 r351  
    2222        setFixedWidth(baseSize().width() + 765); 
    2323} 
     24/***********************************************************************/ 
     25void OrderWindow::closeEvent(QCloseEvent *event) { 
     26 
     27        emit orderWindowIsClosed(10); 
     28} 
  • trunk/yao/src/interface/src/include/ConnectionWindow.hpp

    r341 r351  
    55 * \author  MAYAKI Abdouramane. 
    66 */ 
    7  
    87 
    98#ifndef CTIN_HPP 
     
    3635   /*! 
    3736        *  \brief Constructor 
    38         * 
    3937        *  Constructor of the class ConnectionWindow 
    40         * 
    4138        *  \param parent : initialized at zero. 
    4239        */ 
    4340            ConnectionWindow(QWidget *parent=0); 
    44             //void writefileCtin(); 
    4541             QStringList getDataCtin(); /*!< This function returns the connexion's data. */ 
    4642             void initialiseCtin();   
     
    4844    private slots:       /*!< Functions called after a click. */ 
    4945            
    50             //void appelAjoutCtin();   /*!< This function is called to add row in the visual window model. */ 
    51             //void appelSupp();  /*!< This function is called to delete row from the Yao model. */ 
    52             //void callCtinHelp(); 
    5346 
    54     private : 
     47        signals: 
     48                void ctinWindowIsClosed(int anInt);              
    5549 
    56                     
    57                   /*  QPushButton *m_quitButtonCtin; 
    58                     QPushButton *pushButtonctin2; 
    59                         QPushButton *pushButtonctin3; 
    60                     QPushButton *m_AjoutCtin; 
    61                     QPushButton *m_AideCtin; 
    62                 */       
    63                   //  QComboBox *comboBoxctin1;              /*!< ComboBox for the Modul of entred */ 
    64                    // QComboBox *comboBoxctin2;  /*!< Input */ 
    65                     /*QComboBox *comboBoxctin3; 
    66                     QComboBox *comboBoxctin4; 
    67                     QComboBox *comboNbOutCtin; 
    68                     QComboBox *comboIntCtin; 
    69                     QComboBox *fontComboBoxctin1; 
    70                     QComboBox *fontComboBoxctin2; 
    71                     QComboBox *comboBoxFrom;  
    72                     QComboBox *comboBoxctin_i; 
    73                     QComboBox *comboBoxctin_j;  
    74                     QComboBox *comboBoxctin_k; 
    75                     QComboBox *comboBoxctin_t;  
     50        protected: 
     51                void closeEvent(QCloseEvent *event); 
    7652 
    77                     QRadioButton *radioButtonctin1; 
    78                     QRadioButton *radioButtonctin2; 
    79                     QRadioButton *radioButtonctin3; 
    80                     QRadioButton *radioButtonctin4;  
    81                         */ 
     53        private : 
     54 
    8255                    QStringList CtinData; 
    8356                    
    84                 //    QTableWidget *tableWidgetctin1; 
    85                      
    86                 //      QGridLayout *formLayoutGctin; 
    87                 //    QHBoxLayout *horizontalLayoutctin1; 
    8857                     
    8958}; 
  • trunk/yao/src/interface/src/include/InsertFCTWindow.hpp

    r350 r351  
    1414 
    1515class InsertFCTWindow : public QWidget, public Ui::InsertFCTWindow { 
     16 
    1617    Q_OBJECT 
    1718 
    18     public : 
     19        public : 
    1920            InsertFCTWindow(QWidget *parent=0); /*!< Constructeur */ 
    20             //QStringList getDataFCT();   /*!< This function returns the function's data. */ 
    2121            //void initialiserChampsfct(); 
    2222             
    2323 
    24     public slots:         /*!< Functions called after a click. */ 
    25              //void addInsertRow(); 
    26     private : 
     24        public slots:         /*!< Functions called after a click. */ 
     25         
     26 
     27        signals: 
     28                void insertFCTWindowIsClosed(int ); 
     29 
     30        private : 
    2731             
     32         
     33        protected: 
     34                void closeEvent(QCloseEvent *event); 
    2835             
    29             //int compteur; 
    3036 
    3137}; 
  • trunk/yao/src/interface/src/include/MainWindow.hpp

    r349 r351  
    111111                        void createNetwardWindow(); 
    112112                        void createModulWindow(); 
     113                        void createCtinWindow(); 
     114                        void createOrderWindow(); 
     115                        void createInsertFCTWindow(); 
    113116                        void initializeWindow(int anInt); 
    114117                        void changeButtonColor(QPushButton *aButton);  
  • trunk/yao/src/interface/src/include/OrderWindow.hpp

    r341 r351  
    1515class OrderWindow : public QWidget, public Ui::OrderWindow { 
    1616 
    17     public : 
     17        Q_OBJECT 
     18 
     19        public : 
    1820            OrderWindow(QWidget *parent=0); 
    1921 
    20     private : 
     22        private : 
     23         
     24        private slots: 
     25 
     26        signals: 
     27                void orderWindowIsClosed(int ); 
     28 
     29        protected: 
     30                void closeEvent(QCloseEvent *event); 
    2131 
    2232}; 
Note: See TracChangeset for help on using the changeset viewer.