Back to index

salome-paravis  6.5.0
Public Types | Public Member Functions | Public Attributes
PARAVIS::TSetStudyEvent Struct Reference
Collaboration diagram for PARAVIS::TSetStudyEvent:
Collaboration graph
[legend]

List of all members.

Public Types

typedef SalomeApp_Application * TResult

Public Member Functions

 TSetStudyEvent (const std::string theStudyName)
virtual void Execute ()

Public Attributes

std::string myStudyName
TResult myResult

Detailed Description

Definition at line 667 of file PARAVIS_Gen_i.cc.


Member Typedef Documentation

typedef SalomeApp_Application* PARAVIS::TSetStudyEvent::TResult

Definition at line 669 of file PARAVIS_Gen_i.cc.


Constructor & Destructor Documentation

PARAVIS::TSetStudyEvent::TSetStudyEvent ( const std::string  theStudyName) [inline]

Definition at line 672 of file PARAVIS_Gen_i.cc.

:myStudyName(theStudyName), myResult(0) {}

Member Function Documentation

virtual void PARAVIS::TSetStudyEvent::Execute ( ) [inline, virtual]

Definition at line 673 of file PARAVIS_Gen_i.cc.

    {
      bool isActive = false;
      SUIT_Session* aSession = SUIT_Session::session();
        QList<SUIT_Application*> anApplications = aSession->applications();
        QList<SUIT_Application*>::Iterator anIter = anApplications.begin();
        SUIT_Application* aFirstApp = *anIter;
        while (anIter != anApplications.end()) {
          SUIT_Application* anApp = *anIter;
          if (SUIT_Study* aSStudy = anApp->activeStudy()) {
            if (SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>(aSStudy)) {
              if (_PTR(Study) aCStudy = aStudy->studyDS()) {
                if(MYDEBUG) MESSAGE("There is an application with active study : StudyId = "
                                    << aCStudy->StudyId() << "; Name = '" << aCStudy->Name() << "'");
                if (myStudyName == aCStudy->Name()) {
                  isActive = true;
                  break;
                }
              }
            }
          }
          anIter++;
        }
        SalomeApp_Application* anApp = dynamic_cast<SalomeApp_Application*>(aFirstApp);
        if (!isActive) {
          MESSAGE("!!! anApp->onLoadDoc(myStudyName) !!!");
          // Has to be loaded in an empty or in a new application
          anApp->onLoadDoc(myStudyName.c_str());
        }
        myResult = anApp;
    }

Here is the call graph for this function:


Member Data Documentation

Definition at line 670 of file PARAVIS_Gen_i.cc.

Definition at line 668 of file PARAVIS_Gen_i.cc.


The documentation for this struct was generated from the following file: