#include <CAM_Module.h>
#include <CAM_DataModel.h>
+#include <CAM_Study.h>
#include <STD_TabDesktop.h>
#include <SUIT_Session.h>
Description : Application containing LightApp module
*/
+/*!Constructor.*/
LightApp_Application::LightApp_Application()
: CAM_Application( false ),
myPrefs( 0 )
setDesktop( desk );
SUIT_ResourceMgr* aResMgr = SUIT_Session::session()->resourceMgr();
- QPixmap aLogo = aResMgr->loadPixmap( "SalomeApp", tr( "APP_DEFAULT_ICO" ), false );
+ QPixmap aLogo = aResMgr->loadPixmap( "LightApp", tr( "APP_DEFAULT_ICO" ), false );
desktop()->setIcon( aLogo );
desktop()->setDockableMenuBar( true );
{
}
+/*!Return window.
+ *\param flag - key for window
+ *\param studyId - study id
+ * Flag used how identificator of window in windows list.
+ */
QWidget* LightApp_Application::window( const int flag, const int studyId ) const
{
QWidget* wid = 0;
/*!Update obect browser*/
void LightApp_Application::updateObjectBrowser( const bool updateModels )
{
- // update existing data models (already loaded SComponents)
+ // update existing data models
if ( updateModels )
{
- for ( ModuleListIterator it = modules(); it.current(); ++it )
- {
- CAM_DataModel* camDM = it.current()->dataModel();
- if ( camDM && camDM->inherits( "LightApp_DataModel" ) )
- ((LightApp_DataModel*)camDM)->update();
+ LightApp_Study* study = dynamic_cast<LightApp_Study*>(activeStudy());
+ if ( study ) {
+ CAM_Study::ModelList dm_list;
+ study->dataModels( dm_list );
+ for ( CAM_Study::ModelListIterator it( dm_list ); it.current(); ++it ) {
+ CAM_DataModel* camDM = it.current();
+ if ( camDM && camDM->inherits( "LightApp_DataModel" ) )
+ ((LightApp_DataModel*)camDM)->update();
+ }
}
}
-
if ( objectBrowser() )
{
objectBrowser()->updateGeometry();
return viewMgr;
}
+//=======================================================================
+// name : onCloseView
+/*! Purpose : SLOT. Remove view manager from application*/
+//=======================================================================
void LightApp_Application::onCloseView( SUIT_ViewManager* theVM )
{
removeViewManager( theVM );
}
/*!Gets file filter.
- *\retval QString "(*.hdf)"
+ *\retval QString "(*.bin)"
*/
QString LightApp_Application::getFileFilter() const
{
- return "(*.hdf)";
+ return "(*.bin)";
}
-/*!*/
+/*! Gets file name*/
QString LightApp_Application::getFileName( bool open, const QString& initial, const QString& filters,
const QString& caption, QWidget* parent )
{
return SUIT_FileDlg::getFileName( parent, initial, fls, caption, open, true );
}
-/*!*/
+/*! Gets directory*/
QString LightApp_Application::getDirectory( const QString& initial, const QString& caption, QWidget* parent )
{
if ( !parent )
return SUIT_FileDlg::getExistingDirectory( parent, initial, caption, true );
}
-/*!*/
+/*! Get open file names*/
QStringList LightApp_Application::getOpenFileNames( const QString& initial, const QString& filters,
const QString& caption, QWidget* parent )
{
}
}
+/*!Create preferences.*/
void LightApp_Application::createPreferences( LightApp_Preferences* pref )
{
if ( !pref )
}
+/*!Changed preferences */
void LightApp_Application::preferencesChanged( const QString& sec, const QString& param )
{
SUIT_ResourceMgr* resMgr = resourceMgr();
}
}
+/*!Insert items in popup, which necessary for current application*/
void LightApp_Application::contextMenuPopup( const QString& type, QPopupMenu* thePopup, QString& title )
{
CAM_Application::contextMenuPopup( type, thePopup, title );
#endif
/*!
- Description : Application containing LightApp module
+ Description : Application containing only LightApp module
*/
class LIGHTAPP_EXPORT LightApp_Application : public CAM_Application
//================================================================
// Function : open
-/*! Purpose : Open data model*/
+/*! Purpose : Emit opened()*/
//================================================================
-bool LightApp_DataModel::open( const QString&, CAM_Study* study )
+bool LightApp_DataModel::open( const QString&, CAM_Study* study, QStringList )
{
emit opened(); //TODO: is it really needed? to be removed maybe...
return true;
// Function : save
/*! Purpose : Emit saved()*/
//================================================================
-bool LightApp_DataModel::save()
+bool LightApp_DataModel::save( QStringList& )
{
emit saved();
return true;
//================================================================
// Function : saveAs
-/*! Purpose : Emit saved() */
+/*! Purpose : Emit saved()*/
//================================================================
-bool LightApp_DataModel::saveAs( const QString&, CAM_Study* )
+bool LightApp_DataModel::saveAs( const QString&, CAM_Study*, QStringList& )
{
emit saved();
return true;
//================================================================
// Function : update
-/*! Purpose : Update application.*/
+/*! Purpose : Update application (empty virtual function).*/
//================================================================
void LightApp_DataModel::update( LightApp_DataObject*, LightApp_Study* study )
{
class LightApp_Study;
class LightApp_DataObject;
-// Class : LightApp_DataModel
-/// Description : Base class of data model
+/*!
+ Description : Base class of data model
+*/
class LIGHTAPP_EXPORT LightApp_DataModel : public CAM_DataModel
{
Q_OBJECT
LightApp_DataModel ( CAM_Module* theModule );
virtual ~LightApp_DataModel();
- virtual bool open( const QString&, CAM_Study* );
- virtual bool save();
- virtual bool saveAs( const QString&, CAM_Study* );
+ virtual bool open( const QString&, CAM_Study*, QStringList );
+ virtual bool save( QStringList& );
+ virtual bool saveAs( const QString&, CAM_Study*, QStringList& );
virtual bool close();
virtual void update( LightApp_DataObject* = 0, LightApp_Study* = 0 );
*/
SUIT_DataObject* LightApp_DataObject::componentObject() const
{
- SUIT_DataObject* compObj = 0; // for root object (invisible SALOME_ROOT_OBJECT)
+ SUIT_DataObject* compObj = 0; // for root object
if ( parent() && parent() == root() )
compObj = (SUIT_DataObject*)this; // for component-level objects
return "";
}
+/*
+ Class: LightApp_ModuleObject
+ Level: Public
+*/
+
+/*!Constructor.Initialize by \a parent.*/
+LightApp_ModuleObject::LightApp_ModuleObject( SUIT_DataObject* parent )
+: CAM_RootObject( parent ),
+ CAM_DataObject( parent )
+{
+}
+
+/*!Constructor.Initialize by \a module and parent.*/
+LightApp_ModuleObject::LightApp_ModuleObject( CAM_DataModel* dm, SUIT_DataObject* parent )
+: CAM_RootObject( dm, parent ),
+ CAM_DataObject( parent )
+{
+}
+
+/*!Destructor. Do nothing.*/
+LightApp_ModuleObject::~LightApp_ModuleObject()
+{
+}
+
+/*!Returns module name */
+QString LightApp_ModuleObject::name() const
+{
+ return CAM_RootObject::name();
+}
+
+/*!Insert new child object to the children list at specified position
+ *\add component in Study for this module object if it necessary*/
+void LightApp_ModuleObject::insertChild( SUIT_DataObject* theObj, int thePosition )
+{
+ CAM_RootObject::insertChild(theObj, thePosition);
+
+ CAM_DataModel* aModel = dataModel();
+
+ LightApp_RootObject* aRoot = dynamic_cast<LightApp_RootObject*>(parent());
+
+ if (aRoot)
+ aRoot->study()->addComponent(aModel);
+
+
+}
#include "LightApp.h"
#include "CAM_DataObject.h"
+#include "CAM_DataModel.h"
#include "CAM_RootObject.h"
class LightApp_Study;
+/*!Description : Data Object has empty entry so it's children must redefine metod entry() and return some unique string*/
+
class LIGHTAPP_EXPORT LightApp_DataObject : public virtual CAM_DataObject
{
class Key;
virtual QString entry() const;
SUIT_DataObject* componentObject() const;
- /*! GEOM, SMESH, VISU, etc.*/
QString componentDataType() const;
};
+/*!
+ * LightApp_ModuleObject - class for optimized access to DataModel from
+ * CAM_RootObject.h.
+ * In modules which will be redefine LightApp_DataObject, LightApp_ModuleObject must be children from rederined DataObject for having necessary properties and children from LightApp_ModuleObject.
+ */
+
+class LIGHTAPP_EXPORT LightApp_ModuleObject : public CAM_RootObject
+{
+public:
+ LightApp_ModuleObject( SUIT_DataObject* = 0 );
+ LightApp_ModuleObject ( CAM_DataModel*, SUIT_DataObject* = 0 );
+
+ virtual ~LightApp_ModuleObject();
+
+ virtual QString name() const;
+ virtual void insertChild( SUIT_DataObject*, int thePosition );
+};
+
#endif
/*
Class : LightApp_Dialog
- Description : Base class for all SALOME dialogs
+ Description : Base class for all dialogs
*/
//=======================================================================
/*
Class : LightApp_Dialog
- Description : Base class for all SALOME dialogs
+ Description : Base class for all LightApp dialogs
*/
class LightApp_Dialog : public QtxDialog
{
delete sel;
}
-/*!Update object browser.*/
+/*!Update object browser.
+ * For updating model or whole object browser use update() method can be used.
+*/
void LightApp_Module::updateObjBrowser( bool updateDataModel, SUIT_DataObject* root )
{
if( updateDataModel )
/*!
* \brief Update something in accordance with update flags
- * \param theFlags - update flags
+ * \param theFlags - update flags
*
* Update viewer or/and object browser etc. in accordance with update flags ( see
* LightApp_UpdateFlags enumeration ). Derived modules can redefine this method for their
/*!
* \brief Starts operation with given identifier
- * \param id - identifier of operation to be started
+ * \param id - identifier of operation to be started
*
* Module stores operations in map. This method starts operation by id.
* If operation isn't in map, then it will be created by createOperation method
* Creates operation with given id. You should not call this method, it will be called
* automatically from startOperation. You may redefine this method in concrete module to
* create operations.
+
*/
LightApp_Operation* LightApp_Module::createOperation( const int /*id*/ ) const
{
/*!
* \brief Virtual protected slot called when operation stopped
- * \param theOp - stopped operation
+ * \param theOp - stopped operation
*
* Virtual protected slot called when operation stopped. Redefine this slot if you want to
* perform actions after stopping operation
/*
Class : LightApp_Module
- Description : Base class for all salome modules
+ Description : Base class for all light modules
*/
class LIGHTAPP_EXPORT LightApp_Module : public CAM_Module
LightApp_Application* getApp() const;
virtual void update( const int );
- // Update viewer or/and object browser etc. in accordance with update flags
- // ( see LightApp_UpdateFlags enumeration ). Derived modules can redefine this method
- // for their own purposes
virtual void updateObjBrowser( bool = true, SUIT_DataObject* = 0 );
- // Update object bropwser ( for updating model or whole object browser use update() method
- // can be used )
+
virtual void selectionChanged();
virtual void preferencesChanged( const QString&, const QString& );
const QString& param = QString::null );
QVariant preferenceProperty( const int, const QString& ) const;
void setPreferenceProperty( const int, const QString&, const QVariant& );
- /*! Module stores operations in map. This method starts operation by id.
- * If operation isn't in map, then it will be created by createOperation method
- * and will be inserted to map
- */
- void startOperation( const int );
- /*! Create operation by its id. You must not call this method, it will be called automatically
- * by startOperation. Please redefine this method in current module
- */
- virtual LightApp_Operation* createOperation( const int ) const;
+ void startOperation( const int );
+ virtual LightApp_Operation* createOperation( const int ) const;
virtual void updateControls();
-// SALOME LightApp
+// LIGHT LightApp
//
// Copyright (C) 2005 CEA/DEN, EDF R&D
//
//
// File : LightApp_Operation.h
// Author : Sergey LITONIN
-// Module : SALOME
+// Module : LIGHT
#include <LightApp_Operation.h>
#include <LightApp_Module.h>
-// SALOME LightApp
+// LIGHT LightApp
//
// Copyright (C) 2005 CEA/DEN, EDF R&D
//
//
// File : LightApp_Operation.h
// Author : Sergey LITONIN
-// Module : SALOME
+// Module : LIGHT
#ifndef LightApp_Operation_H
*/
/*!
- * \brief Base class for all salome operations
+ * \brief Base class for all operations
*
- * Base class for all salome operations (see SUIT_Operation for more description)
+ * Base class for all operations (see SUIT_Operation for more description)
*/
class LightApp_Operation : public SUIT_Operation
{
#include "LightApp_Application.h"
#include "LightApp_DataModel.h"
#include "LightApp_RootObject.h"
+#include "LightApp_Driver.h"
+
+#include "SUIT_ResourceMgr.h"
#include <OB_Browser.h>
+#include <TCollection_AsciiString.hxx>
+
+#include <OSD_Path.hxx>
+#include <OSD_File.hxx>
+#include <OSD_Directory.hxx>
+#include <OSD_Process.hxx>
+#include <OSD_Directory.hxx>
+#include <OSD_Protection.hxx>
+#include <OSD_SingleProtection.hxx>
+#include <OSD_FileIterator.hxx>
+
#include <qstring.h>
/*!
LightApp_Study::LightApp_Study( SUIT_Application* app )
: CAM_Study( app )
{
+ myDriver = new LightApp_Driver();
}
/*!
//=======================================================================
bool LightApp_Study::openDocument( const QString& theFileName )
{
+ myDriver->ClearDriverContents();
+ // create files for models from theFileName
+ if( !openStudyData(theFileName))
+ return false;
+
setRoot( new LightApp_RootObject( this ) ); // create myRoot
// update loaded data models: call open() and update() on them.
dataModels( dm_s );
for ( ModelListIterator it( dm_s ); it.current(); ++it )
openDataModel( studyName(), it.current() );
-
// this will build a SUIT_DataObject-s tree under myRoot member field
// passing "false" in order NOT to rebuild existing data models' trees - it was done in previous step
// but tree that corresponds to not-loaded data models will be updated any way.
bool res = CAM_Study::openDocument( theFileName );
emit opened( this );
-
- return res;
-}
-
-//=======================================================================
-// name : saveDocumentAs
-/*! Purpose : Save document */
-//=======================================================================
-bool LightApp_Study::saveDocumentAs( const QString& theFileName )
-{
- ModelList list; dataModels( list );
-
- LightApp_DataModel* aModel = (LightApp_DataModel*)list.first();
- for ( ; aModel; aModel = (LightApp_DataModel*)list.next() )
- aModel->saveAs( theFileName, this );
-
- bool res = CAM_Study::saveDocumentAs( theFileName );//SRN: BugID IPAL9377, removed usage of uninitialized variable <res>
-
- if ( res )
- emit saved( this );
-
return res;
}
//=======================================================================
bool LightApp_Study::loadDocument( const QString& theStudyName )
{
+ myDriver->ClearDriverContents();
+ if( !openStudyData(theStudyName))
+ return false;
+
setRoot( new LightApp_RootObject( this ) ); // create myRoot
//SRN: BugID IPAL9021, put there the same code as in a method openDocument
// update loaded data models: call open() and update() on them.
ModelList dm_s;
dataModels( dm_s );
+
for ( ModelListIterator it( dm_s ); it.current(); ++it )
openDataModel( studyName(), it.current() );
return res;
}
+//=======================================================================
+// name : saveDocumentAs
+/*! Purpose : Save document */
+//=======================================================================
+bool LightApp_Study::saveDocumentAs( const QString& theFileName )
+{
+ ModelList list; dataModels( list );
+
+ LightApp_DataModel* aModel = (LightApp_DataModel*)list.first();
+
+ myDriver->ClearDriverContents();
+ QStringList listOfFiles;
+ for ( ; aModel; aModel = (LightApp_DataModel*)list.next() ) {
+ listOfFiles.clear();
+ aModel->saveAs( theFileName, this, listOfFiles );
+ if ( !listOfFiles.isEmpty() )
+ saveModuleData(aModel->module()->name(), listOfFiles);
+ }
+
+ bool res = saveStudyData(theFileName);
+ res = res && CAM_Study::saveDocumentAs( theFileName );
+ //SRN: BugID IPAL9377, removed usage of uninitialized variable <res>
+ if ( res )
+ emit saved( this );
+
+ return res;
+}
+
//=======================================================================
// name : saveDocument
/*! Purpose : Save document */
//=======================================================================
-void LightApp_Study::saveDocument()
+bool LightApp_Study::saveDocument()
{
ModelList list; dataModels( list );
LightApp_DataModel* aModel = (LightApp_DataModel*)list.first();
- for ( ; aModel; aModel = (LightApp_DataModel*)list.next() )
- aModel->save();
- CAM_Study::saveDocument();
+ myDriver->ClearDriverContents();
+ QStringList listOfFiles;
+ for ( ; aModel; aModel = (LightApp_DataModel*)list.next() ) {
+ listOfFiles.clear();
+ aModel->save( listOfFiles );
+ saveModuleData(aModel->module()->name(), listOfFiles);
+ }
+
+ bool res = saveStudyData(studyName());
+ res = res && CAM_Study::saveDocument();
+ if (res)
+ emit saved( this );
- emit saved( this );
+ return res;
}
//================================================================
//================================================================
bool LightApp_Study::isModified() const
{
- bool isAnyChanged = false;
+ bool isAnyChanged = CAM_Study::isModified();
ModelList list; dataModels( list );
LightApp_DataModel* aModel = 0;
//================================================================
bool LightApp_Study::isSaved() const
{
- bool isAllSaved = false;
+ bool isAllSaved = CAM_Study::isSaved();
ModelList list; dataModels( list );
LightApp_DataModel* aModel = 0;
return isAllSaved;
}
+//=======================================================================
+// name : saveModuleData
+/*! Purpose : Create SComponent for module, necessary for SalomeApp study */
+//=======================================================================
+void LightApp_Study::addComponent(const CAM_DataModel* dm)
+{
+}
+
+//=======================================================================
+// name : saveModuleData
+/*! Purpose : save list file for module 'theModuleName' */
+//=======================================================================
+void LightApp_Study::saveModuleData(QString theModuleName, QStringList theListOfFiles)
+{
+ int aNb = theListOfFiles.count();
+ if ( aNb == 0 )
+ return;
+
+ std::vector<std::string> aListOfFiles ( aNb );
+ int anIndex = 0;
+ for ( QStringList::Iterator it = theListOfFiles.begin(); it != theListOfFiles.end(); ++it ) {
+ if ( (*it).isEmpty() )
+ continue;
+ aListOfFiles[anIndex] = (*it).latin1();
+ anIndex++;
+ }
+ myDriver->SetListOfFiles(theModuleName, aListOfFiles);
+}
+
+//=======================================================================
+// name : openModuleData
+/*! Purpose : gets list of file for module 'theModuleNam' */
+//=======================================================================
+void LightApp_Study::openModuleData(QString theModuleName, QStringList& theListOfFiles)
+{
+ std::vector<std::string> aListOfFiles = myDriver->GetListOfFiles(theModuleName);
+ int i, aLength = aListOfFiles.size() - 1;
+ if (aLength < 0)
+ return;
+
+ //Get a temporary directory for saved a file
+ theListOfFiles.append(aListOfFiles[0].c_str());
+ for(i = 0; i < aLength; i++)
+ theListOfFiles.append(aListOfFiles[i+1].c_str());
+}
+
+//=======================================================================
+// name : saveStudyData
+/*! Purpose : save data from study */
+//=======================================================================
+bool LightApp_Study::saveStudyData( const QString& theFileName )
+{
+ ModelList list; dataModels( list );
+ SUIT_ResourceMgr* resMgr = application()->resourceMgr();
+ if( !resMgr )
+ return false;
+ bool isMultiFile = resMgr->booleanValue( "Study", "multi_file", false );
+
+ bool aRes = myDriver->SaveDatasInFile(theFileName.latin1(), isMultiFile);
+ // clear map
+ std::vector<std::string> aList(0);
+ for ( ModelListIterator it( list ); it.current(); ++it )
+ myDriver->SetListOfFiles(it.current()->module()->name(), aList);
+
+ return aRes;
+}
+
+//=======================================================================
+// name : openStudyData
+/*! Purpose : open data for study */
+//=======================================================================
+bool LightApp_Study::openStudyData( const QString& theFileName )
+{
+ SUIT_ResourceMgr* resMgr = application()->resourceMgr();
+ if( !resMgr )
+ return false;
+ bool isMultiFile = resMgr->booleanValue( "Study", "multi_file", false );
+
+ bool aRes = myDriver->ReadDatasFromFile(theFileName.latin1(), isMultiFile);
+ return aRes;
+}
+
//================================================================
-// Function : GetListOfFiles
+// Function : openDataModel
+/*! Purpose : Open data model */
+//================================================================
+bool LightApp_Study::openDataModel( const QString& studyName, CAM_DataModel* dm )
+{
+ if (!dm)
+ return false;
+
+ QStringList listOfFiles;
+ openModuleData(dm->module()->name(), listOfFiles);
+ if (dm && dm->open(studyName, this, listOfFiles)) {
+ // Remove the files and temporary directory, created
+ // for this module by LightApp_Driver::OpenStudyData()
+ bool isMultiFile = false; // TODO: decide, how to access this parameter
+ RemoveTemporaryFiles( dm->module()->name(), isMultiFile );
+
+ // Something has been read -> create data model tree
+ LightApp_DataModel* aDM = dynamic_cast<LightApp_DataModel*>( dm );
+ if ( aDM )
+ aDM->update(NULL, this);
+ return true;
+ }
+ return false;
+}
+
+//================================================================
+// Function : GetTmpDir
/*! Purpose : to be used by modules*/
//================================================================
-std::vector<std::string> LightApp_Study::GetListOfFiles() const
+std::string LightApp_Study::GetTmpDir (const char* theURL,
+ const bool isMultiFile)
{
- std::vector<std::string> aListOfFiles;
- return aListOfFiles;
+ return myDriver->GetTmpDir(theURL, isMultiFile);
}
//================================================================
-// Function : SetListOfFiles
+// Function : GetListOfFiles
/*! Purpose : to be used by modules*/
//================================================================
-void LightApp_Study::SetListOfFiles (const std::vector<std::string> theListOfFiles)
+std::vector<std::string> LightApp_Study::GetListOfFiles(const char* theModuleName) const
{
+ std::vector<std::string> aListOfFiles;
+ aListOfFiles = myDriver->GetListOfFiles(theModuleName);
+ return aListOfFiles;
}
//================================================================
-// Function : GetTmpDir
+// Function : SetListOfFiles
/*! Purpose : to be used by modules*/
//================================================================
-std::string LightApp_Study::GetTmpDir (const char* theURL,
- const bool isMultiFile)
+void LightApp_Study::SetListOfFiles (const char* theModuleName, const std::vector<std::string> theListOfFiles)
{
- std::string aTmpDir = "";
- return aTmpDir;
+ myDriver->SetListOfFiles(theModuleName, theListOfFiles);
}
//================================================================
// Function : RemoveTemporaryFiles
-/*! Purpose : to be used by CORBAless modules*/
+/*! Purpose : to be used by modules*/
//================================================================
-void LightApp_Study::RemoveTemporaryFiles (const bool isMultiFile) const
+void LightApp_Study::RemoveTemporaryFiles (const char* theModuleName, const bool isMultiFile) const
{
if (isMultiFile)
return;
+ bool isDirDeleted = true;
+ myDriver->RemoveTemporaryFiles(theModuleName, isDirDeleted);
}
#define LIGHTAPP_STUDY_H
#include "LightApp.h"
+#include "LightApp_Driver.h"
#include "CAM_Study.h"
+#include "CAM_DataModel.h"
#include "SUIT_Study.h"
#include "string.h"
virtual void createDocument();
virtual bool openDocument( const QString& );
+ virtual bool loadDocument( const QString& );
- virtual void saveDocument();
+ virtual bool saveDocument();
virtual bool saveDocumentAs( const QString& );
- virtual bool loadDocument( const QString& );
virtual void closeDocument(bool permanently = true);
virtual bool isSaved() const;
virtual bool isModified() const;
- /** @name methods to be used by modules*/
- //@{
- virtual std::vector<std::string> GetListOfFiles () const;
- virtual void SetListOfFiles (const std::vector<std::string> theListOfFiles);
+ virtual void addComponent ( const CAM_DataModel* dm);
+
+ virtual std::string GetTmpDir ( const char* theURL, const bool isMultiFile );
+
+protected:
+ virtual void saveModuleData ( QString theModuleName, QStringList theListOfFiles );
+ virtual void openModuleData ( QString theModuleName, QStringList& theListOfFiles );
+ virtual bool saveStudyData ( const QString& theFileName );
+ virtual bool openStudyData ( const QString& theFileName );
- virtual std::string GetTmpDir (const char* theURL,
- const bool isMultiFile);
+ virtual std::vector<std::string> GetListOfFiles ( const char* theModuleName ) const;
+ virtual void SetListOfFiles ( const char* theModuleName,
+ const std::vector<std::string> theListOfFiles );
- virtual void RemoveTemporaryFiles (const bool isMultiFile) const;
- //@}
- // END: methods to be used by modules
+ virtual void RemoveTemporaryFiles ( const char* theModuleName, const bool isMultiFile ) const;
+
+protected:
+ virtual bool openDataModel ( const QString&, CAM_DataModel* );
signals:
- void saved( SUIT_Study* );
- void opened( SUIT_Study* );
- void closed( SUIT_Study* );
+ void saved ( SUIT_Study* );
+ void opened ( SUIT_Study* );
+ void closed ( SUIT_Study* );
void created( SUIT_Study* );
+
+
+private:
+ LightApp_Driver* myDriver;
};
#endif
/**
-* SALOME LightApp
+* LIGHT LightApp
*
* Copyright (C) 2005 CEA/DEN, EDF R&D
*
*
* File : LightApp_SwitchOp.h
* Author : Sergey LITONIN
-* Module : SALOME
+* Module : LIGHT
*/
#include "LightApp_SwitchOp.h"
/**
-* SALOME SalomeApp
+* LIGHT LightApp
*
* Copyright (C) 2005 CEA/DEN, EDF R&D
*
*
* File : LightApp_SwitchOp.h
* Author : Sergey LITONIN
-* Module : SALOME
+* Module : LIGHT
*/
-// SALOME LightApp
+// LIGHT LightApp
//
// Copyright (C) 2005 CEA/DEN, EDF R&D
//
//
// File : LightApp_UpdateFlags.h
// Author : Sergey LITONIN
-// Module : SALOME
+// Module : LIGHT
#ifndef LightApp_UpdateFlags_H
}
/*!
- Gets type of salome vtk viewer.
+ Gets type of vtk viewer.
*/
QString
LightApp_VTKSelector
/*!
- Provide salome vtk selection of data owners.
+ Provide vtk selection of data owners.
*/
class LIGHTAPP_EXPORT LightApp_VTKSelector : public SUIT_Selector
{
LightApp_DataOwner.h \
LightApp_DataSubOwner.h \
LightApp_Dialog.h \
+ LightApp_Driver.h \
LightApp_GLSelector.h \
LightApp_Module.h \
LightApp_ModuleDlg.h \
LightApp_DataOwner.cxx \
LightApp_DataSubOwner.cxx \
LightApp_Dialog.cxx \
+ LightApp_Driver.cxx \
LightApp_GLSelector.cxx \
LightApp_Module.cxx \
LightApp_ModuleDlg.cxx \
LightApp_Application.h \
LightApp_DataModel.h \
LightApp_Dialog.h \
+ LightApp_Driver.h \
LightApp_GLSelector.h \
LightApp_OBSelector.h \
LightApp_OCCSelector.h \