Back to index

salome-paravis  6.5.0
Public Types | Public Member Functions | Public Attributes
PARAVIS::TGetGUIApplication Struct Reference

Event which returns SalomeApp_Application instance which corresponds to th given study ID. More...

#include <PV_Events.h>

List of all members.

Public Types

typedef SalomeApp_Application * TResult

Public Member Functions

 TGetGUIApplication (const int theStudyId)
virtual void Execute ()

Public Attributes

int myStudyId
TResult myResult

Detailed Description

Event which returns SalomeApp_Application instance which corresponds to th given study ID.

Definition at line 42 of file PV_Events.h.


Member Typedef Documentation

typedef SalomeApp_Application* PARAVIS::TGetGUIApplication::TResult

Definition at line 45 of file PV_Events.h.


Constructor & Destructor Documentation

PARAVIS::TGetGUIApplication::TGetGUIApplication ( const int  theStudyId) [inline]

Definition at line 48 of file PV_Events.h.

:myStudyId(theStudyId), myResult(0) {}

Member Function Documentation

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

Definition at line 50 of file PV_Events.h.

    {
      MESSAGE("Find application for study with id = : " << myStudyId);
      SUIT_Session* aSession = SUIT_Session::session();
      QList<SUIT_Application*> anApplications = aSession->applications();
      for (int i = 0; i < anApplications.count() && !myResult; i++ ){
        if ( anApplications[i]->activeStudy() && anApplications[i]->activeStudy()->id() == myStudyId )
          myResult = dynamic_cast<SalomeApp_Application*>( anApplications[i] );
      }
      if ( !myResult ) {
        MESSAGE("Error: application is not found for study with id = : " << myStudyId);
      }
    }

Member Data Documentation

Definition at line 46 of file PV_Events.h.

Definition at line 44 of file PV_Events.h.


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