+/*! called on loading the existent study */
+void STD_Application::onLoadDoc()
+{
+}
+
+/*! \retval true, if document was loaded successful, else false.*/
+bool STD_Application::onLoadDoc( const QString& aName )
+{
+ bool res = true;
+ if ( !activeStudy() )
+ {
+ // if no study - load in current desktop
+ res = useStudy( aName );
+ }
+ else
+ {
+ // if study exists - load in new desktop. Check: is the same file is loaded?
+ SUIT_Session* aSession = SUIT_Session::session();
+ QPtrList<SUIT_Application> aAppList = aSession->applications();
+ bool isAlreadyOpen = false;
+ SUIT_Application* aApp = 0;
+ for ( QPtrListIterator<SUIT_Application> it( aAppList ); it.current() && !isAlreadyOpen; ++it )
+ {
+ aApp = it.current();
+ if ( aApp->activeStudy()->studyName() == aName )
+ isAlreadyOpen = true;
+ }
+ if ( !isAlreadyOpen )
+ {
+ aApp = startApplication( 0, 0 );
+ if ( aApp )
+ res = aApp->useStudy( aName );
+ }
+ else
+ aApp->desktop()->setActiveWindow();
+ }
+ return res;
+}
+
+/*!Virtual function. Not implemented here.*/