Changeset 466 for trunk/yao


Ignore:
Timestamp:
10/25/10 12:48:40 (14 years ago)
Author:
yerima
Message:

ContextWindow? is updated

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

Legend:

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

    r460 r466  
    1919//! \brief Implementation of the Context window for visual_YAO. 
    2020/******************************************************************************************************************************************************/ 
    21 ContextWindow::ContextWindow(Context *aContext, Table <Constant> *aConstantTable, QWidget *parent) : QWidget(parent), localConstantTable(NULL) { 
     21ContextWindow::ContextWindow(Context *aContext, Table <Constant> *aConstantTable, string *contextData, QWidget *parent) : QWidget(parent), localConstantTable(NULL) { 
    2222 
    2323        setupUi(this); 
    2424        localConstantTable       = aConstantTable; 
    2525        m_localContext           = aContext; 
     26        m_contextParameters      = contextData; 
     27 
    2628        if (isContextListEmpty()) m_delButtonO_EXTOBJ->setDisabled(true);   
    2729                m_comboContextO_REAL->insertItem(0, "");  
     
    4042                m_comboContextO_PARALLEL->setEditable(true); 
    4143 
     44        //m_contextSaveButton->setDisabled(true); 
     45 
    4246        for (Table<Constant>::reverse_iterator it = localConstantTable->rbegin(); it != localConstantTable->rend(); it++)  
    4347                {       //To full the some comboboxs. 
     
    7882                 
    7983                        */                       
    80                         m_contextParameters.clear(); 
     84                        m_contextParameters->clear(); 
    8185 
    8286                        string option = "option "; 
     
    151155                                { 
    152156                                        string test = "option "; 
    153                                         m_contextParameters.append(test.append(it->c_str()));// << endl; 
    154                                         m_contextParameters.append("\n"); 
     157                                        m_contextParameters->append(test.append(it->c_str()));// << endl; 
     158                                        m_contextParameters->append("\n"); 
    155159 
    156160                                } 
    157  
     161         
    158162                        if (!o_real2.empty()) 
    159                                 m_contextParameters = "\n" + o_real2 ;  
     163                                m_contextParameters->append("\n" + o_real2) ;  
    160164                        if (!o_mqn2.empty()) 
    161                                 m_contextParameters += "\n" + o_mqn2 ;  
     165                                m_contextParameters->append("\n" + o_mqn2) ;  
    162166                        if (!o_parallel2.empty()) 
    163                                 m_contextParameters +=  "\n" + o_parallel2 ; 
     167                                m_contextParameters->append("\n" + o_parallel2) ; 
    164168                        if (!o_netward2.empty())  
    165                                 m_contextParameters += "\n" + o_netward2 ; 
     169                                m_contextParameters->append("\n" + o_netward2) ; 
    166170                        if (m_checkBoxO_GRADTEST->isChecked())   
    167                                 m_contextParameters += "\noption O_GRADTEST "; 
     171                                m_contextParameters->append("\noption O_GRADTEST "); 
    168172                        if (m_checkBoxO_VARINCR->isChecked())   
    169                                 m_contextParameters += "\noption O_VARINCR "; 
     173                                m_contextParameters->append("\noption O_VARINCR "); 
    170174                        if (m_checkBoxO_DBG_NANF->isChecked())   
    171                                 m_contextParameters += "\noption O_DBG_NANF "; 
     175                                m_contextParameters->append("\noption O_DBG_NANF "); 
    172176                        if (m_checkBoxO_DBG_TING->isChecked())   
    173                                 m_contextParameters += "\noption O_DBG_TING "; 
     177                                m_contextParameters->append("\noption O_DBG_TING "); 
    174178                        if (m_checkBoxO_DBG_BETA->isChecked())   
    175                                 m_contextParameters += "\noption O_DBG_BETA "; 
     179                                m_contextParameters->append("\noption O_DBG_BETA "); 
    176180                        if (m_checkBoxO_DBG_TRC_FWARD->isChecked())   
    177                                 m_contextParameters += "\noption O_DBG_TRC_FWARD "; 
     181                                m_contextParameters->append("\noption O_DBG_TRC_FWARD "); 
    178182                        if (m_checkBoxO_DBG_TRC_BWARD->isChecked())   
    179                                 m_contextParameters += "\noption O_DBG_TRC_BWARD "; 
     183                                m_contextParameters->append("\noption O_DBG_TRC_BWARD "); 
    180184                        if (m_checkBoxO_DBG_TRC_LWARD->isChecked())   
    181                                 m_contextParameters += "\noption O_DBG_TRC_LWARD "; 
     185                                m_contextParameters->append("\noption O_DBG_TRC_LWARD "); 
    182186                        if (m_checkBoxO_DBG_TRC_AWARD->isChecked())   
    183                                 m_contextParameters += "\noption O_DBG_TRC_AWARD "; 
     187                                m_contextParameters->append("\noption O_DBG_TRC_AWARD "); 
    184188 
    185189                        m_localContext->addExternal(m_fileList); 
    186                         //cout << "voici les parametres: " << endl << m_contextParameters << endl;  
    187                          
    188                         eraseDataFromLineEdit();         
     190                        //string *test; 
     191                        //cout << "voici les parametres: " << *m_contextParameters << endl;  
     192                        //eraseDataFromLineEdit();       
     193                        m_contextSaveButton->setDisabled(true); 
    189194                } 
    190195                catch(...)  
     
    231236 
    232237/********************************** Implementation of the method getContextParameters() ************************************************************/ 
    233 string ContextWindow::getContextParameters() { 
     238/*string ContextWindow::getContextParameters() { 
    234239 
    235240        //if (!m_contextParameters.empty()) 
    236241                return m_contextParameters; 
    237242        //else 
    238 } 
     243}*/ 
    239244/******************************** Implementation of the method isEmpty() *************************************************************************/ 
    240245bool ContextWindow::isEmpty() { 
    241246         
    242         if (m_contextParameters.empty()) 
     247        if (m_contextParameters->empty()) 
    243248                return true; 
    244249        else 
  • trunk/yao/src/interface/src/MainWindow.cpp

    r460 r466  
    363363        if (m_contextWindow == NULL) { //to test if the object is already created. 
    364364 
    365                 m_contextWindow = new ContextWindow(&theContext, &theConstantTable); //mwc.getContext(); 
     365                m_contextWindow = new ContextWindow(&theContext, &theConstantTable, &theContextData); //mwc.getContext(); 
    366366                espace.addWindow(m_contextWindow)->move(5, 0); 
    367367                m_contextWindow->show(); 
     
    900900                                        description << endl; 
    901901                        } 
    902                         /*if (contextTest) { 
     902                        if (!theContextData.empty()) { 
    903903                        description << "#OPTION (optionAttribute)+ ---------------------------------------------------------------------" << endl; 
    904                         description << m_contextWindow->getContextParameters() << endl; //"option " << it->toStdString() << endl; 
     904                        description << /*m_contextWindow->getContextParameters()*/ theContextData << endl; //"option " << it->toStdString() << endl; 
    905905                //      cout << m_contextWindow->getContextParameters() << endl; //"option " << it->toStdString() << endl; 
    906906                                        description << endl; 
    907                         }*/ 
     907                        } 
    908908                        if (!theTrajectoryTable.empty()) { 
    909909                        description << "#TRAJ name type uptime offtime dtime steptime ------------------------------------------" << endl; 
     
    941941                        description << "#CONNECTIONS name range[0] FROM! name range[1] range_i ( range_jkt )? -------------------------" << endl; 
    942942                                 for (Table<Connection>::iterator it = theConnectionTable.begin(); it != theConnectionTable.end(); it++) 
    943                                         description << "ctin " << it->getInModule() << " " << it->getIn() << " from" << it->getOutModule() << " " << it->getOut() /*<< it->getI() */<< endl;  
     943                                        description << "ctin " << it->getInModule() << " " << it->getIn() << " from " << it->getOutModule() << " " << it->getOut() /*<< it->getI() */<< endl;  
    944944 
    945945                                        description << endl; 
  • trunk/yao/src/interface/src/include/ContextWindow.hpp

    r428 r466  
    3030 
    3131        public : 
    32                 ContextWindow(yao::Context *aContext, yao::Table <yao::Constant> *aConstantTable, QWidget *parent=0); 
     32                ContextWindow(yao::Context *aContext, yao::Table <yao::Constant> *aConstantTable, string *contextData, QWidget *parent=0); 
    3333                //QStringList getContextData(); 
    3434                void eraseDataFromLineEdit();  
    35                 std::string getContextParameters(); 
     35                //std::string getContextParameters(); 
    3636                bool isEmpty(); 
    3737 
     
    7373                yao::Context *m_localContext; 
    7474                std::vector <std::string> m_fileList; 
    75                 std::string m_contextParameters; 
     75                std::string *m_contextParameters; 
    7676                yao::Table <yao::Constant> *localConstantTable; 
    77                 MainWindowController *localMwc; 
     77                //MainWindowController *localMwc; 
    7878                bool test; 
    7979                int compteur; 
  • trunk/yao/src/interface/src/include/MainWindow.hpp

    r459 r466  
    268268                        //yao::Table <yao::Order> theOrderTable; 
    269269                        yao::Table <yao::Function> theFunctionTable;     
    270  
     270                         
     271                        std::string theContextData; 
     272                         
    271273                        std::vector <std::string> theInstructionData; 
    272274 
Note: See TracChangeset for help on using the changeset viewer.