}
/*!Set active study.
- *\param stupa - SUIT_Study.
+ *\param study - SUIT_Study.
*/
void SalomeApp_Application::setActiveStudy( SUIT_Study* study )
{
return wid;
}
-/*!Check*/
+/*!Check is window visible?(with identificator \a type)*/
bool SalomeApp_Application::isWindowVisible( const int type ) const
{
bool res = false;
return res;
}
+/*!Sets window show or hide.
+ *\param type - window identificator.
+ *\param on - true/false (window show/hide)
+ */
void SalomeApp_Application::setWindowShown( const int type, const bool on )
{
if ( !desktop() || !myWindows.contains( type ) )
return ob;
}
+/*!Gets "LogWindow".*/
LogWindow* SalomeApp_Application::logWindow()
{
LogWindow* lw = 0;
return lw;
}
+/*!Get "PythonConsole"*/
PythonConsole* SalomeApp_Application::pythonConsole()
{
PythonConsole* console = 0;
return console;
}
+/*!Gets preferences.*/
SalomeApp_Preferences* SalomeApp_Application::preferences() const
{
return preferences( false );
}
+/*!Gets view manager*/
SUIT_ViewManager* SalomeApp_Application::getViewManager( const QString& vmType, const bool create )
{
SUIT_ViewManager* aVM = viewManager( vmType );
return aVM;
}
+/*!Create view manager.*/
SUIT_ViewManager* SalomeApp_Application::createViewManager( const QString& vmType )
{
SUIT_ResourceMgr* resMgr = resourceMgr();
removeViewManager( theVM );
}
+/*!Private SLOT. On study created.*/
void SalomeApp_Application::onStudyCreated( SUIT_Study* theStudy )
{
SUIT_DataObject* aRoot = 0;
activateWindows();
}
+/*!Private SLOT. On study opened.*/
void SalomeApp_Application::onStudyOpened( SUIT_Study* theStudy )
{
SUIT_DataObject* aRoot = 0;
emit studySaved();
}
+/*!Private SLOT. On study closed.*/
void SalomeApp_Application::onStudyClosed( SUIT_Study* )
{
emit studyClosed();
saveWindowsGeometry();
}
+/*!Private SLOT. On dump study.*/
void SalomeApp_Application::onDumpStudy( )
{
SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( activeStudy() );
}
}
+/*!Private SLOT. On load script.*/
void SalomeApp_Application::onLoadScript( )
{
SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( activeStudy() );
}
}
+/*!Private SLOT. On preferences.*/
void SalomeApp_Application::onPreferences()
{
QApplication::setOverrideCursor( Qt::waitCursor );
delete prefDlg;
}
+/*!Private SLOT. On open document with name \a aName.*/
void SalomeApp_Application::onMRUActivated( QString aName )
{
onOpenDoc( aName );
}
+/*!Private SLOT. On preferences changed.*/
void SalomeApp_Application::onPreferenceChanged( QString& modName, QString& section, QString& param )
{
SalomeApp_Module* sMod = 0;
preferencesChanged( section, param );
}
+/*!Gets file filter.
+ *\retval QString "(*.hdf)"
+ */
QString SalomeApp_Application::getFileFilter() const
{
return "(*.hdf)";
}
+/*!Remove all windows from study.*/
void SalomeApp_Application::beforeCloseDoc( SUIT_Study* s )
{
CAM_Application::beforeCloseDoc( s );
removeWindow( itr.key(), s->id() );
}
+/*!Update actions.*/
void SalomeApp_Application::updateActions()
{
updateCommandsStatus();
}
+/*!Create window.*/
QWidget* SalomeApp_Application::createWindow( const int flag )
{
QWidget* wid = 0;
return wid;
}
+/*!Default windows(Object Browser, Python Console).
+ * Adds to map \a aMap.
+ */
void SalomeApp_Application::defaultWindows( QMap<int, int>& aMap ) const
{
aMap.insert( WT_ObjectBrowser, Qt::DockLeft );
// aMap.insert( WT_LogWindow, Qt::DockBottom );
}
+/*!Default view manager.*/
void SalomeApp_Application::defaultViewManagers( QStringList& ) const
{
+ /*!Do nothing.*/
}
+/*!Gets preferences.
+ * Create preferences, if \a crt = true.
+ */
SalomeApp_Preferences* SalomeApp_Application::preferences( const bool crt ) const
{
if ( myPrefs )
return myPrefs;
}
+/*!Add new module to application.*/
void SalomeApp_Application::moduleAdded( CAM_Module* mod )
{
CAM_Application::moduleAdded( mod );
}
}
+/*!Create preferences.*/
void SalomeApp_Application::createPreferences( SalomeApp_Preferences* pref )
{
if ( !pref )
}
}
+/*!Update desktop title.*/
void SalomeApp_Application::updateDesktopTitle() {
QString aTitle = applicationName();
QString aVer = applicationVersion();
desktop()->setCaption( aTitle );
}
+/*!Update windows after close document.*/
void SalomeApp_Application::afterCloseDoc()
{
updateWindows();
CAM_Application::afterCloseDoc();
}
+/*!Gets CORBA::ORB_var*/
CORBA::ORB_var SalomeApp_Application::orb()
{
ORB_INIT& init = *SINGLETON_<ORB_INIT>::Instance();
return _orb;
}
+/*!Create and return SALOMEDS_StudyManager.*/
SALOMEDSClient_StudyManager* SalomeApp_Application::studyMgr()
{
static SALOMEDSClient_StudyManager* _sm = new SALOMEDS_StudyManager();
return _sm;
}
+/*!Create and return SALOME_NamingService.*/
SALOME_NamingService* SalomeApp_Application::namingService()
{
static SALOME_NamingService* _ns = new SALOME_NamingService( orb() );
return _ns;
}
+/*!Create and return SALOME_LifeCycleCORBA.*/
SALOME_LifeCycleCORBA* SalomeApp_Application::lcc()
{
static SALOME_LifeCycleCORBA* _lcc = new SALOME_LifeCycleCORBA( namingService() );
QString SalomeApp_Application::defaultEngineIOR()
{
- // Look for a default module engine (needed for CORBAless modules to use SALOMEDS persistence)
+ /// Look for a default module engine (needed for CORBAless modules to use SALOMEDS persistence)
QString anIOR( "" );
CORBA::Object_ptr anEngine = namingService()->Resolve( "/SalomeAppEngine" );
if ( !CORBA::is_nil( anEngine ) )
return anIOR;
}
+/*!Adds icon names for modules.*/
void SalomeApp_Application::moduleIconNames( QMap<QString, QString>& iconMap ) const
{
iconMap.clear();
}
}
+/*!Update module action.*/
void SalomeApp_Application::updateModuleActions()
{
QString modName;
myActions[modName]->setOn( true );
}
+/*!Gets current windows.
+ *\param winMap - output current windows map.
+ */
void SalomeApp_Application::currentWindows( QMap<int, int>& winMap ) const
{
winMap.clear();
defaultWindows( winMap );
}
+/*!Gets current view managers.
+ *\param lst - output current view managers list.
+ */
void SalomeApp_Application::currentViewManagers( QStringList& lst ) const
{
lst.clear();
defaultViewManagers( lst );
}
+/*!Update windows.*/
void SalomeApp_Application::updateWindows()
{
QMap<int, int> winMap;
setWindowShown( itr.key(), !itr.data()->isEmpty() && winMap.contains( itr.key() ) );
}
+/*!Update view managers.*/
void SalomeApp_Application::updateViewManagers()
{
QStringList lst;
getViewManager( *it, true );
}
+/*!Load windows geometry.*/
void SalomeApp_Application::loadWindowsGeometry()
{
QtxDockAction* dockMgr = 0;
dockMgr->restoreGeometry();
}
+/*!Save windows geometry.*/
void SalomeApp_Application::saveWindowsGeometry()
{
QtxDockAction* dockMgr = 0;
dockMgr->saveGeometry( resourceMgr(), section, false );
}
+/*!Activate windows.*/
void SalomeApp_Application::activateWindows()
{
if ( activeStudy() )
}
}
+/*!Private SLOT. On preferences.*/
void SalomeApp_Application::onProperties()
{
SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*>( activeStudy() );
updateDesktopTitle();
}
+/*!*/
QString SalomeApp_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 );
}
+/*!*/
QString SalomeApp_Application::getDirectory( const QString& initial, const QString& caption, QWidget* parent )
{
if ( !parent )
return SUIT_FileDlg::getExistingDirectory( parent, initial, caption, true );
}
+/*!*/
QStringList SalomeApp_Application::getOpenFileNames( const QString& initial, const QString& filters,
const QString& caption, QWidget* parent )
{
return SUIT_FileDlg::getOpenFileNames( parent, initial, fls, caption, true );
}
+/*!*/
void SalomeApp_Application::contextMenuPopup( const QString& type, QPopupMenu* thePopup, QString& title )
{
CAM_Application::contextMenuPopup( type, thePopup, title );
thePopup->insertItem( tr( "MEN_OPENWITH" ), this, SLOT( onOpenWith() ) );
}
+/*!Update obect browser*/
void SalomeApp_Application::updateObjectBrowser( const bool updateModels )
{
// update existing data models (already loaded SComponents)
}
}
-
-//************************************************************
+/*!Protected SLOT.On desktop activated.*/
void SalomeApp_Application::onDesktopActivated()
{
CAM_Application::onDesktopActivated();
aModule->studyActivated();
}
+/*!Create empty study.*/
void SalomeApp_Application::createEmptyStudy()
{
CAM_Application::createEmptyStudy();
objectBrowser()->updateTree();
}
+/*!Activate module \a mod.*/
bool SalomeApp_Application::activateModule( CAM_Module* mod )
{
bool res = CAM_Application::activateModule( mod );
}
+/*!Sets checked.*/
void SalomeApp_CheckFileDlg::SetChecked( bool check )
{
myCheckBox->setChecked(check);
}
+/*!Is checked?
+ *\retval boolean - true, check box is checked, else false.
+ */
bool SalomeApp_CheckFileDlg::IsChecked() const
{
return myCheckBox->isChecked();
//=======================================================================
// name : BuildTree
-// Purpose : static method used by SalomeApp_Study and SalomeApp_DataModel classes
-// to create default SALOMEDS-based data object tree
+/*!Purpose : static method used by SalomeApp_Study and SalomeApp_DataModel classes
+ * to create default SALOMEDS-based data object tree
+ */
//=======================================================================
SUIT_DataObject* SalomeApp_DataModel::BuildTree( const _PTR(SObject)& obj,
SUIT_DataObject* parent,
//=======================================================================
// name : SalomeApp_DataModel::SalomeApp_DataModel
-// Purpose : Constructor
+/*!Purpose : Constructor*/
//=======================================================================
SalomeApp_DataModel::SalomeApp_DataModel( CAM_Module* theModule )
: CAM_DataModel( theModule )
//=======================================================================
// name : SalomeApp_DataModel::~SalomeApp_DataModel
-// Purpose : Destructor
+/*! Purpose : Destructor*/
//=======================================================================
SalomeApp_DataModel::~SalomeApp_DataModel()
{
//================================================================
// Function : open
-// Purpose :
+/*! Purpose : Open data model*/
//================================================================
bool SalomeApp_DataModel::open( const QString&, CAM_Study* study )
{
//================================================================
// Function : save
-// Purpose :
+/*! Purpose : Emit saved()*/
//================================================================
bool SalomeApp_DataModel::save()
{
//================================================================
// Function : saveAs
-// Purpose :
+/*! Purpose : Emit saved() */
//================================================================
bool SalomeApp_DataModel::saveAs( const QString&, CAM_Study* )
{
//================================================================
// Function : close
-// Purpose :
+/*! Purpose : Emit closed()*/
//================================================================
bool SalomeApp_DataModel::close()
{
//================================================================
// Function : update
-// Purpose :
+/*! Purpose : Update application.*/
//================================================================
void SalomeApp_DataModel::update( SalomeApp_DataObject*, SalomeApp_Study* study )
{
//================================================================
// Function : buildTree
-// Purpose : private method
+/*! Purpose : private method, build tree.*/
//================================================================
void SalomeApp_DataModel::buildTree( const _PTR(SObject)& obj,
SUIT_DataObject* parent,
//================================================================
// Function : getModule
-// Purpose :
+/*! Purpose : gets module*/
//================================================================
SalomeApp_Module* SalomeApp_DataModel::getModule() const
//================================================================
// Function : getStudy
-// Purpose :
+/*! Purpose : gets study */
//================================================================
SalomeApp_Study* SalomeApp_DataModel::getStudy() const
{
//================================================================
// Function : getRootEntry
-// Purpose : returns study entry corresponding to this data model
+/*! Purpose : returns study entry corresponding to this data model*/
//================================================================
QString SalomeApp_DataModel::getRootEntry( SalomeApp_Study* study ) const
{
//================================================================
// Function : isModified
-// Purpose : default implementation, always returns false so as not to mask study's isModified()
+/*! Purpose : default implementation, always returns false so as not to mask study's isModified()*/
//================================================================
bool SalomeApp_DataModel::isModified() const
{
//================================================================
// Function : isSaved
-// Purpose : default implementation, always returns true so as not to mask study's isSaved()
+/*! Purpose : default implementation, always returns true so as not to mask study's isSaved()*/
//================================================================
bool SalomeApp_DataModel::isSaved() const
{
//================================================================
// Function : GetListOfFiles
-// Purpose : to be used by CORBAless modules
+/*! Purpose : to be used by CORBAless modules*/
//================================================================
std::vector<std::string> SalomeApp_DataModel::GetListOfFiles() const
//(const int theStudyId, const char* theComponentName) const
//================================================================
// Function : SetListOfFiles
-// Purpose : to be used by CORBAless modules
+/*! Purpose : to be used by CORBAless modules*/
//================================================================
void SalomeApp_DataModel::SetListOfFiles (const std::vector<std::string> theListOfFiles)
//(const std::vector<std::string> theListOfFiles,
//================================================================
// Function : GetTmpDir
-// Purpose : Static method. To be used by CORBAless modules
+/*! Purpose : Static method. To be used by CORBAless modules*/
//================================================================
std::string SalomeApp_DataModel::GetTmpDir (const char* theURL,
const bool isMultiFile)
//================================================================
// Function : RemoveTemporaryFiles
-// Purpose : to be used by CORBAless modules
+/*! Purpose : to be used by CORBAless modules*/
//================================================================
void SalomeApp_DataModel::RemoveTemporaryFiles (const bool isMultiFile) const
{
#include "SALOMEDSClient.hxx"
-/*
- Class : SalomeApp_DataModel
- Description : Base class of data model
-*/
-
class SalomeApp_Module;
class SalomeApp_Study;
class SalomeApp_DataObject;
class SalomeApp_SelectionMgr;
+// Class : SalomeApp_DataModel
+/// Description : Base class of data model
class SALOMEAPP_EXPORT SalomeApp_DataModel : public CAM_DataModel
{
Q_OBJECT
SalomeApp_DataModel ( CAM_Module* theModule );
virtual ~SalomeApp_DataModel();
- // These methods should be redefined in successors.
+ /** @name These methods should be redefined in successors.*/
+ //@{
virtual bool open( const QString&, CAM_Study* );
virtual bool save();
virtual bool saveAs( const QString&, CAM_Study* );
virtual bool isModified() const;
virtual bool isSaved() const;
+ //@}
signals:
void opened();
virtual void buildTree(const _PTR(SObject)&, SUIT_DataObject*, SalomeApp_Study* );
- // BEGIN: methods to be used by CORBAless modules
+ /** @name methods to be used by CORBAless modules*/
+ //@{
std::vector<std::string> GetListOfFiles () const;
void SetListOfFiles (const std::vector<std::string> theListOfFiles);
const bool isMultiFile);
void RemoveTemporaryFiles (const bool isMultiFile) const;
+ //@}
// END: methods to be used by CORBAless modules
private:
Class: SalomeApp_DataObject::Key
Level: Internal
*/
-
class SalomeApp_DataObject::Key : public SUIT_DataObjectKey
{
public:
QString myEntry;
};
+/*!Constructor. Initialize by \a entry.*/
SalomeApp_DataObject::Key::Key( const QString& entry )
: SUIT_DataObjectKey(),
myEntry( entry )
{
}
+/*!Destructor. Do nothing.*/
SalomeApp_DataObject::Key::~Key()
{
}
+/*!Checks: Is current key less than \a other.*/
bool SalomeApp_DataObject::Key::isLess( const SUIT_DataObjectKey* other ) const
{
Key* that = (Key*)other;
return myEntry < that->myEntry;
}
+/*!Checks: Is current key equal with \a other.*/
bool SalomeApp_DataObject::Key::isEqual( const SUIT_DataObjectKey* other ) const
{
Key* that = (Key*)other;
return myEntry == that->myEntry;
}
-/*!
+/*
Class: SalomeApp_DataObject
Level: Public
*/
-
+/*!Constructor. Initialize by \a parent*/
SalomeApp_DataObject::SalomeApp_DataObject( SUIT_DataObject* parent )
: CAM_DataObject( parent )
{
}
+/*!Constructor. Initialize by \a parent and SObject*/
SalomeApp_DataObject::SalomeApp_DataObject( const _PTR(SObject)& sobj, SUIT_DataObject* parent )
: CAM_DataObject( parent )
{
myObject = sobj;
}
+/*!Destructor. Do nothing.*/
SalomeApp_DataObject::~SalomeApp_DataObject()
{
}
+/*!Gets object ID.
+ *\retval QString
+ */
QString SalomeApp_DataObject::entry() const
{
if ( myObject )
return QString::null;
}
+/*!Create and return new key object.*/
SUIT_DataObjectKey* SalomeApp_DataObject::key() const
{
QString str = entry();
return new Key( str );
}
+/*!Gets name of object.*/
QString SalomeApp_DataObject::name() const
{
QString str;
return str;
}
+/*!Gets icon picture of object.*/
QPixmap SalomeApp_DataObject::icon() const
{
_PTR(GenericAttribute) anAttr;
return QPixmap();
}
+/*!Gets text value for one of entity:
+ *\li Value (id = SalomeApp_DataObject::CT_Value)
+ *\li Entry (id = SalomeApp_DataObject::CT_Entry)
+ *\li IOR (id = SalomeApp_DataObject::CT_IOR)
+ *\li Reference entry (id = SalomeApp_DataObject::CT_RefEntry)
+ */
QString SalomeApp_DataObject::text( const int id ) const
{
QString txt;
return txt;
}
+/*!Get color value for one of entity:
+ *\li Text color
+ *\li Highlight color
+ *\li Higlighted text color
+ */
QColor SalomeApp_DataObject::color( const ColorRole cr ) const
{
QColor clr;
return clr;
}
+/*!Gets tooltip.*/
QString SalomeApp_DataObject::toolTip() const
{
//return object()->Name();
return QString( "Object \'%1\', module \'%2\', ID=%3" ).arg( name() ).arg( componentDataType() ).arg( entry() );
}
+/*!Gets component object.
+ *\retval SUIT_DataObject.
+ */
SUIT_DataObject* SalomeApp_DataObject::componentObject() const
{
SUIT_DataObject* compObj = 0; // for root object (invisible SALOME_ROOT_OBJECT)
return compObj;
}
+/*!Get component type.*/
QString SalomeApp_DataObject::componentDataType() const
{
const SalomeApp_DataObject* compObj = dynamic_cast<SalomeApp_DataObject*>( componentObject() );
return "";
}
+/*!Gets object.*/
_PTR(SObject) SalomeApp_DataObject::object() const
{
return myObject;
}
+/*!Checks: Is object reference.*/
bool SalomeApp_DataObject::isReference() const
{
bool isRef = false;
return isRef;
}
+/*!Gets reference object.*/
_PTR(SObject) SalomeApp_DataObject::referencedObject() const
{
_PTR(SObject) refObj;
return obj;
}
+/*!Gets IOR*/
QString SalomeApp_DataObject::ior( const _PTR(SObject)& obj ) const
{
QString txt;
return txt;
}
+/*!Gets Entry*/
QString SalomeApp_DataObject::entry( const _PTR(SObject)& obj ) const
{
QString txt;
return txt;
}
+/*!Value*/
QString SalomeApp_DataObject::value( const _PTR(SObject)& obj ) const
{
if ( !obj )
return val;
}
-/*!
+/*
Class: SalomeApp_ModuleObject
Level: Public
*/
+/*!Constructor.Initialize by \a parent.*/
SalomeApp_ModuleObject::SalomeApp_ModuleObject( SUIT_DataObject* parent )
: SalomeApp_DataObject( parent ),
CAM_RootObject( parent ),
{
}
+/*!Constructor.Initialize by \a parent and SObject.*/
SalomeApp_ModuleObject::SalomeApp_ModuleObject( const _PTR(SObject)& sobj, SUIT_DataObject* parent )
: SalomeApp_DataObject( sobj, parent ),
CAM_RootObject( 0, parent ),
{
}
+/*!Constructor.Initialize by \a parent and CAM_DataModel.*/
SalomeApp_ModuleObject::SalomeApp_ModuleObject( CAM_DataModel* dm, const _PTR(SObject)& sobj, SUIT_DataObject* parent )
: SalomeApp_DataObject( sobj, parent ),
CAM_RootObject( dm, parent ),
{
}
+/*!Destructor. Do nothing.*/
SalomeApp_ModuleObject::~SalomeApp_ModuleObject()
{
}
virtual SUIT_DataObjectKey* key() const;
virtual QString entry() const;
- virtual _PTR(SObject) object() const; // location of corresponding SALOMEDS::SObject
+ /*! location of corresponding SALOMEDS::SObject */
+ virtual _PTR(SObject) object() const;
bool isReference() const;
_PTR(SObject) referencedObject() const;
SUIT_DataObject* componentObject() const;
- QString componentDataType() const; // GEOM, SMESH, VISU, etc.
+ /*! GEOM, SMESH, VISU, etc.*/
+ QString componentDataType() const;
private:
QString ior( const _PTR(SObject)& ) const;
#include <iostream.h>
+/*!Constructor. Initialize by \a theEntry.*/
SalomeApp_DataOwner
::SalomeApp_DataOwner( const QString& theEntry ):
myEntry( theEntry )
{
}
+/*!Constructor. Initialize by \a SALOME_InteractiveObject.*/
SalomeApp_DataOwner
::SalomeApp_DataOwner( const Handle(SALOME_InteractiveObject)& theIO ):
myEntry(!theIO.IsNull()? theIO->getEntry(): ""),
{
}
+/*!Destructor. Do nothing.*/
SalomeApp_DataOwner
::~SalomeApp_DataOwner()
{
}
+/*!Checks: Is current data owner equal \a obj.*/
bool
SalomeApp_DataOwner
::isEqual( const SUIT_DataOwner& obj ) const
return other && entry() == other->entry();
}
+/*!Gets entry.*/
QString
SalomeApp_DataOwner
::entry() const
return myEntry;
}
+/*!Gets SALOME_InteractiveObject.*/
const Handle(SALOME_InteractiveObject)&
SalomeApp_DataOwner
::IO() const
#include "SUIT_DataOwner.h"
#include "SALOME_InteractiveObject.hxx"
+/*!
+ This class provide data owner objects.
+*/
class SalomeApp_DataOwner : public SUIT_DataOwner
{
public:
#include <typeinfo.h>
#endif
+/*!Constructor.Initialize by \a entry and \a index*/
SalomeApp_DataSubOwner::SalomeApp_DataSubOwner( const QString& entry, const int index )
: SalomeApp_DataOwner( entry ),
myIndex( index )
{
}
+/*!Destructor. Do nothing.*/
SalomeApp_DataSubOwner::~SalomeApp_DataSubOwner()
{
}
+/*!Checks: Is current data sub owner equal \a obj.*/
bool SalomeApp_DataSubOwner::isEqual( const SUIT_DataOwner& obj ) const
{
const SalomeApp_DataSubOwner* other = dynamic_cast<const SalomeApp_DataSubOwner*>( &obj );
return other && entry() == other->entry() && index() == other->index();
}
+/*!Gets index.*/
int SalomeApp_DataSubOwner::index() const
{
return myIndex;
#include <SalomeApp_DataOwner.h>
+/*!
+ Class provide sub owner.
+ */
class SalomeApp_DataSubOwner : public SalomeApp_DataOwner
{
public:
SalomeApp_EventFilter* SalomeApp_EventFilter::myFilter = NULL;
+/*!Constructor.*/
SalomeApp_EventFilter::SalomeApp_EventFilter()
: QObject()
{
qApp->installEventFilter( this );
}
+/*!Destructor.*/
SalomeApp_EventFilter::~SalomeApp_EventFilter()
{
qApp->removeEventFilter( this );
return QObject::eventFilter( o, e );
}
+/*!Process event.*/
void SalomeApp_EventFilter::processEvent( SALOME_Event* theEvent )
{
if(theEvent){
}
}
+/*!Create new instance of SalomeApp_EventFilter*/
void SalomeApp_EventFilter::Init()
{
if( myFilter==NULL )
myFilter = new SalomeApp_EventFilter();
}
+/*!Destroy filter.*/
void SalomeApp_EventFilter::Destroy()
{
if( myFilter )
class SALOME_Event;
+/*!
+ Class provide event filter.
+*/
class SALOMEAPP_EXPORT SalomeApp_EventFilter: public QObject
{
public:
virtual ~SalomeApp_EventFilter();
private:
- /* global event filter for qapplication */
+ /*! global event filter for qapplication */
virtual bool eventFilter( QObject* o, QEvent* e );
void processEvent( SALOME_Event* );
#include <qstring.h>
+/*!Constructor. Initialize by \a floatSignal.*/
SalomeApp_ExceptionHandler::SalomeApp_ExceptionHandler( const bool floatSignal )
: SUIT_ExceptionHandler()
{
OSD::SetSignal( floatSignal );
}
+/*!Try to call SUIT_ExceptionHandler::internalHandle(o, e), catch if failure.*/
bool SalomeApp_ExceptionHandler::handleSignals( QObject* o, QEvent* e )
{
try {
#undef catch
#endif
+/*!Try to call handleSignals( o, e ), catch and show error message.*/
bool SalomeApp_ExceptionHandler::handle( QObject* o, QEvent* e )
{
bool res = false;
return res;
}
+/*!Create new SUIT_ExceptionHandler*/
extern "C" SALOMEAPP_EXPORT SUIT_ExceptionHandler* getExceptionHandler()
{
return new SalomeApp_ExceptionHandler( true );
#include "SalomeApp_Filter.h"
+/*!Constructor.Initialize by study.*/
SalomeApp_Filter::SalomeApp_Filter( SalomeApp_Study* study )
{
myStudy = study;
}
+/*!Destructor. Do nothing.*/
SalomeApp_Filter::~SalomeApp_Filter()
{
}
+/*!Gets study.*/
SalomeApp_Study* SalomeApp_Filter::getStudy() const
{
return myStudy;
#include <GLViewer_Context.h>
+/*!Constructor. Initialize by GLViewer_Viewer2d and SUIT_SelectionMgr.*/
SalomeApp_GLSelector::SalomeApp_GLSelector( GLViewer_Viewer2d* viewer, SUIT_SelectionMgr* mgr )
: SUIT_Selector( mgr, viewer ),
myViewer( viewer )
connect( myViewer, SIGNAL( selectionChanged() ), this, SLOT( onSelectionChanged() ) );
}
+/*!Destructor. Do nothing.*/
SalomeApp_GLSelector::~SalomeApp_GLSelector()
{
}
+/*!Gets viewer*/
GLViewer_Viewer2d* SalomeApp_GLSelector::viewer() const
{
return myViewer;
}
+/*!On selection changed event.*/
void SalomeApp_GLSelector::onSelectionChanged()
{
selectionChanged();
}
+/*!Gets list of selected Data Owner objects.*/
void SalomeApp_GLSelector::getSelection( SUIT_DataOwnerPtrList& aList ) const
{
if ( !myViewer )
}
}
+/*!Sets to selected list of Data Owner objects.*/
void SalomeApp_GLSelector::setSelection( const SUIT_DataOwnerPtrList& aList )
{
if ( !myViewer )
using namespace std;
+/*!Constructor. Do nothing.*/
SalomeApp_ImportOperation::SalomeApp_ImportOperation( SUIT_Application* app ) :
SUIT_Operation( app )
{
//================================================================
// Function : computeEditGeometry
-// Purpose : static function - used for resizing editing widget
+/*! Purpose : static function - used for resizing editing widget*/
//================================================================
void computeEditGeometry(SalomeApp_ListViewItem* theItem,
SalomeApp_EntityEdit* theWidget)
//================================================================
// Function : SalomeApp_ListView::SalomeApp_ListView
-// Purpose : constructor
+/*! Purpose : constructor*/
//================================================================
SalomeApp_ListView::SalomeApp_ListView( QWidget* parent )
: QtxListView( parent )
//================================================================
// Function : SalomeApp_ListView::~SalomeApp_ListView
-// Purpose : destructor
+/*! Purpose : destructor*/
//================================================================
SalomeApp_ListView::~SalomeApp_ListView()
{
//================================================================
// Function : SalomeApp_ListView::updateViewer
-// Purpose : updates all data viewer
+/*! Purpose : updates all data viewer*/
//================================================================
void SalomeApp_ListView::updateViewer()
{
//================================================================
// Function : SalomeApp_ListView::updateSelected
-// Purpose : updates currently selected item(s)
+/*! Purpose : updates currently selected item(s)*/
//================================================================
void SalomeApp_ListView::updateSelected()
{
//================================================================
// Function : SalomeApp_ListView::popupClientType
-// Purpose : returns popup client type
+/*! Purpose : returns popup client type*/
//================================================================
QString SalomeApp_ListView::popupClientType() const
{
//================================================================
// Function : SalomeApp_ListView::contextMenuPopup
-// Purpose : fills popup menu with items
+/*! Purpose : fills popup menu with items*/
//================================================================
void SalomeApp_ListView::contextMenuPopup( QPopupMenu* aPopup )
{
//================================================================
// Function : SalomeApp_ListView::clear
-// Purpose : clears view
+/*! Purpose : clears view*/
//================================================================
void SalomeApp_ListView::clear()
{
//================================================================
// Function : SalomeApp_ListView::isMouseEnabled
-// Purpose : returms true if mouse events are enabled
+/*! Purpose : returms true if mouse events are enabled*/
//================================================================
bool SalomeApp_ListView::isMouseEnabled()
{
//================================================================
// Function : SalomeApp_ListView::eventFilter
-// Purpose : event filter
+/*! Purpose : event filter*/
//================================================================
bool SalomeApp_ListView::eventFilter(QObject* object, QEvent* event)
{
//================================================================
// Function : SalomeApp_ListView::enableEditing
-// Purpose : setting editing of items availbale/not available
+/*! Purpose : setting editing of items availbale/not available*/
//================================================================
void SalomeApp_ListView::enableEditing(bool theFlag)
{
//================================================================
// Function : SalomeApp_ListView::isEnableEditing
-// Purpose : says if editing is enabled
+/*! Purpose : says if editing is enabled*/
//================================================================
bool SalomeApp_ListView::isEnableEditing()
{
//================================================================
// Function : SalomeApp_ListView::accept
-// Purpose : calls finishEditing(true)...
+/*! Purpose : calls finishEditing(true)...*/
//================================================================
void SalomeApp_ListView::accept()
{
//================================================================
// Function : QAD_ListView::onSelectionChanged
-// Purpose : slot, called when selection changed in List Viewer
+/*! Purpose : slot, called when selection changed in List Viewer*/
//================================================================
void SalomeApp_ListView::onSelectionChanged()
{
//================================================================
// Function : SalomeApp_ListView::resizeEvent
-// Purpose : called when Data Viewer is resized
+/*! Purpose : called when Data Viewer is resized*/
//================================================================
void SalomeApp_ListView::resizeEvent( QResizeEvent * e)
{
//================================================================
// Function : SalomeApp_ListView::onHeaderSizeChange
-// Purpose : slot, called when columns sizes are changed
+/*! Purpose : slot, called when columns sizes are changed*/
//================================================================
void SalomeApp_ListView::onHeaderSizeChange(int, int, int)
{
//================================================================
// Function : SalomeApp_ListView::viewportPaintEvent
-// Purpose : handler for paint event
+/*! Purpose : handler for paint event*/
//================================================================
void SalomeApp_ListView::viewportPaintEvent(QPaintEvent* e)
{
//================================================================
// Function : SalomeApp_ListView::onEditOk
-// Purpose : called when user finishes in editing of item
+/*! Purpose : called when user finishes in editing of item*/
//================================================================
void SalomeApp_ListView::onEditOk()
{
//================================================================
// Function : SalomeApp_ListView::onEditCancel
-// Purpose : called when user cancels item editing
+/*! Purpose : called when user cancels item editing*/
//================================================================
void SalomeApp_ListView::onEditCancel()
{
//================================================================
// Function : SalomeApp_ListView::finishEditing
-// Purpose : finishes editing of entity
+/*! Purpose : finishes editing of entity*/
//================================================================
UpdateType SalomeApp_ListView::finishEditing(bool ok)
{
//================================================================
// Function : SalomeApp_ListView::tip
-// Purpose : gets current tooltip for list view
-// returns valid rect in success
+/*! Purpose : gets current tooltip for list view
+ * \retval valid rect in success
+ */
//================================================================
QRect SalomeApp_ListView::tip(QPoint aPos,
QString& aText,
//================================================================
// Function : SalomeApp_ListViewItem::SalomeApp_ListViewItem
-// Purpose : constructor
+/*! Purpose : constructor*/
//================================================================
SalomeApp_ListViewItem::SalomeApp_ListViewItem(SalomeApp_ListView* parent) :
QListViewItem( parent )
//================================================================
// Function : SalomeApp_ListViewItem::SalomeApp_ListViewItem
-// Purpose : constructor
+/*! Purpose : constructor*/
//================================================================
SalomeApp_ListViewItem::SalomeApp_ListViewItem(SalomeApp_ListView* parent,
SalomeApp_ListViewItem* after) :
//================================================================
// Function : SalomeApp_ListViewItem::SalomeApp_ListViewItem
-// Purpose : constructor
+/*! Purpose : constructor*/
//================================================================
SalomeApp_ListViewItem::SalomeApp_ListViewItem(SalomeApp_ListView* parent,
const QString& theName,
//================================================================
// Function : SalomeApp_ListViewItem::SalomeApp_ListViewItem
-// Purpose : constructor
+/*! Purpose : constructor*/
//================================================================
SalomeApp_ListViewItem::SalomeApp_ListViewItem(SalomeApp_ListView* parent,
const QString& theName,
//================================================================
// Function : SalomeApp_ListViewItem::SalomeApp_ListViewItem
-// Purpose : constructor
+/*! Purpose : constructor*/
//================================================================
SalomeApp_ListViewItem::SalomeApp_ListViewItem(SalomeApp_ListViewItem* parent,
const QString& theName,
//================================================================
// Function : SalomeApp_ListViewItem::SalomeApp_ListViewItem
-// Purpose : constructor
+/*! Purpose : constructor*/
//================================================================
SalomeApp_ListViewItem::SalomeApp_ListViewItem(SalomeApp_ListViewItem* parent,
SalomeApp_ListViewItem* after,
//================================================================
// Function : SalomeApp_ListViewItem::SalomeApp_ListViewItem
-// Purpose : constructor
+/*! Purpose : constructor*/
//================================================================
SalomeApp_ListViewItem::SalomeApp_ListViewItem(SalomeApp_ListView* parent,
SalomeApp_ListViewItem* after,
//================================================================
// Function : SalomeApp_ListViewItem::SalomeApp_ListViewItem
-// Purpose : constructor
+/*! Purpose : constructor*/
//================================================================
SalomeApp_ListViewItem::SalomeApp_ListViewItem(SalomeApp_ListViewItem* parent,
const QString& theName,
//================================================================
// Function : SalomeApp_ListViewItem::SalomeApp_ListViewItem
-// Purpose : constructor
+/*! Purpose : constructor*/
//================================================================
SalomeApp_ListViewItem::SalomeApp_ListViewItem(SalomeApp_ListViewItem* parent,
SalomeApp_ListViewItem* after,
//================================================================
// Function : SalomeApp_ListViewItem::SalomeApp_ListViewItem
-// Purpose : constructor
+/*! Purpose : constructor*/
//================================================================
SalomeApp_ListViewItem::SalomeApp_ListViewItem(SalomeApp_ListView* parent,
SalomeApp_ListViewItem* after,
//================================================================
// Function : SalomeApp_ListViewItem::~SalomeApp_ListViewItem
-// Purpose : destructor
+/*! Purpose : destructor*/
//================================================================
SalomeApp_ListViewItem::~SalomeApp_ListViewItem()
{
//================================================================
// Function : SalomeApp_ListViewItem::init
-// Purpose : initialization
+/*! Purpose : initialization*/
//================================================================
void SalomeApp_ListViewItem::init()
{
//================================================================
// Function : SalomeApp_ListViewItem::getName
-// Purpose : as default returns text in the first column
+/*! Purpose : as default returns text in the first column*/
//================================================================
QString SalomeApp_ListViewItem::getName() const
{
//================================================================
// Function : SalomeApp_ListViewItem::setName
-// Purpose : as default sets text in the first column
+/*! Purpose : as default sets text in the first column*/
//================================================================
UpdateType SalomeApp_ListViewItem::setName(const QString& theName)
{
//================================================================
// Function : SalomeApp_ListViewItem::getValue
-// Purpose : as default returns text in the second column
+/*! Purpose : as default returns text in the second column*/
//================================================================
QString SalomeApp_ListViewItem::getValue() const
{
//================================================================
// Function : SalomeApp_ListViewItem::setValue
-// Purpose : as default sets text in the second column
+/*! Purpose : as default sets text in the second column*/
//================================================================
UpdateType SalomeApp_ListViewItem::setValue(const QString& theValue)
{
//================================================================
// Function : SalomeApp_ListViewItem::fullName
-// Purpose : returns full path to the entity from the root
+/*! Purpose : returns full path to the entity from the root*/
//================================================================
QString SalomeApp_ListViewItem::fullName()
{
//================================================================
// Function : SalomeApp_ListViewItem::openAllLevels
-// Purpose : expands all entities beginning from this level
+/*! Purpose : expands all entities beginning from this level*/
//================================================================
void SalomeApp_ListViewItem::openAllLevels()
{
//================================================================
// Function : SalomeApp_ListViewItem::updateAllLevels
-// Purpose : update all entites beginning from this level
+/*! Purpose : update all entites beginning from this level*/
//================================================================
void SalomeApp_ListViewItem::updateAllLevels()
{
//================================================================
// Function : SalomeApp_EditBox::isEditable
-// Purpose : return true if entity is editable
+/*! Purpose : return true if entity is editable*/
//================================================================
bool SalomeApp_ListViewItem::isEditable() const
{
//================================================================
// Function : SalomeApp_ListViewItem::setEditable
-// Purpose : sets editable flag fo the entity
+/*! Purpose : sets editable flag fo the entity*/
//================================================================
void SalomeApp_ListViewItem::setEditable(bool theEditable)
{
//================================================================
// Function : SalomeApp_ListViewItem::isAccepted
-// Purpose : returns true if entitiy is accepted after editing
+/*! Purpose : returns true if entitiy is accepted after editing*/
//================================================================
bool SalomeApp_ListViewItem::isAccepted() const
{
//================================================================
// Function : SalomeApp_ListViewItem::setAccepted
-// Purpose : set entitiy accepted or not after editing
+/*! Purpose : set entitiy accepted or not after editing*/
//================================================================
void SalomeApp_ListViewItem::setAccepted(bool theAccepted)
{
//================================================================
// Function : SalomeApp_ListViewItem::getEditingType
-// Purpose : returns type of edit control (0 - edit box, 1 - combo box,
-// 2 - editable combo box), default is edit box
+/*! Purpose :
+ * \retval type of edit control (default is edit box)
+ * \li 0 - edit box
+ * \li 1 - combo box
+ * \li 2 - editable combo box
+ */
//================================================================
int SalomeApp_ListViewItem::getEditingType()
{
//================================================================
// Function : SalomeApp_ListViewItem::setEditingType
-// Purpose : sets type of edit control (0 - edit box, 1 - combo box,
-// 2 - editable combo box), negative value means none
+/*! Purpose :
+ * \retval type of edit control (negative value means none)
+ * \li 0 - edit box
+ * \li 1 - combo box
+ * \li 2 - editable combo box
+ */
//================================================================
void SalomeApp_ListViewItem::setEditingType(const int type)
{
//================================================================
// Function : SalomeApp_ListViewItem::getEditedColumn
-// Purpose : returns edited column, default is last column
-// negative value means there are no editable columns
+// Purpose :
+/*! \retval edited column, default is last column
+ * negative value means there are no editable columns
+ */
//================================================================
int SalomeApp_ListViewItem::getEditedColumn()
{
//================================================================
// Function : SalomeApp_ListViewItem::getValueType
-// Purpose : returns type of edited value (string, int, double)
-// default is string
+// Purpose :
+/*!\retval type of edited value (string, int, double)
+ * default is string
+ */
//================================================================
int SalomeApp_ListViewItem::getValueType()
{
//================================================================
// Function : SalomeApp_ListViewItem::setValueType
-// Purpose : sets type of edited value
+/*! Purpose : sets type of edited value*/
//================================================================
void SalomeApp_ListViewItem::setValueType(const int valueType)
{
//================================================================
// Function : SalomeApp_ListViewItem::getUserType
-// Purpose : sets type of edited value
+/*! Purpose : sets type of edited value*/
//================================================================
int SalomeApp_ListViewItem::getUserType()
{
//================================================================
// Function : SalomeApp_ListViewItem::setUserType
-// Purpose : sets type of edited value
+/*! Purpose : sets type of edited value*/
//================================================================
void SalomeApp_ListViewItem::setUserType(const int userType)
{
//================================================================
// Function : SalomeApp_ListViewItem::getButtons
-// Purpose : returns buttons for editing widget (Apply (V), Cancel (X))
-// default is both buttons
+/*! Purpose : returns buttons for editing widget (Apply (V), Cancel (X))
+ * default is both buttons
+ */
//================================================================
int SalomeApp_ListViewItem::getButtons()
{
//================================================================
// Function : SalomeApp_ListViewItem::getButtons
-// Purpose : sets buttons for editing widget (Apply (V), Cancel (X))
+/*! Purpose : sets buttons for editing widget (Apply (V), Cancel (X))*/
//================================================================
void SalomeApp_ListViewItem::setButtons(const int buttons)
{
//================================================================
// Function : SalomeApp_ListViewItem::startEditing
-// Purpose : creates control for editing and fills it with values
+/*! Purpose : creates control for editing and fills it with values*/
//================================================================
SalomeApp_EntityEdit* SalomeApp_ListViewItem::startEditing()
{
//================================================================
// Function : SalomeApp_ListViewItem::fillWidgetWithValues
-// Purpose : fills widget with initial values (list or single value)
+/*! Purpose : fills widget with initial values (list or single value)*/
//================================================================
void SalomeApp_ListViewItem::fillWidgetWithValues(SalomeApp_EntityEdit* theWidget)
{
//================================================================
// Function : SalomeApp_ListViewItem::finishEditing
-// Purpose : finishes editing of entity
+/*! Purpose : finishes editing of entity*/
//================================================================
UpdateType SalomeApp_ListViewItem::finishEditing(SalomeApp_EntityEdit* theWidget)
{
//================================================================
// Function : SalomeApp_ListViewItem::tipRect
-// Purpose : calculates rectangle which should contain item's tip
+/*! Purpose : calculates rectangle which should contain item's tip*/
//================================================================
QRect SalomeApp_ListViewItem::tipRect()
{
//================================================================
// Function : SalomeApp_ListViewItem::tipText
-// Purpose : returns text for tooltip
+/*! Purpose : returns text for tooltip*/
//================================================================
QString SalomeApp_ListViewItem::tipText()
{
//================================================================
// Function : SalomeApp_ListViewItem::textRect
-// Purpose : calculates rect of item text in viewport coordinates
+/*! Purpose : calculates rect of item text in viewport coordinates*/
//================================================================
QRect SalomeApp_ListViewItem::textRect(const int column) const
{
//================================================================
// Function : SalomeApp_ListViewItem::itemRect
-// Purpose : calculates rect of item data in viewport coordinates
+/*! Purpose : calculates rect of item data in viewport coordinates*/
//================================================================
QRect SalomeApp_ListViewItem::itemRect(const int column) const
{
//================================================================
// Function : SalomeApp_EditBox::SalomeApp_EditBox
-// Purpose : constructor
+/*! Purpose : constructor*/
//================================================================
SalomeApp_EditBox::SalomeApp_EditBox(QWidget* parent) :
QLineEdit(parent)
//================================================================
// Function : SalomeApp_EditBox::keyPressEvent
-// Purpose : event filter for key pressing
+/*! Purpose : event filter for key pressing*/
//================================================================
void SalomeApp_EditBox::keyPressEvent( QKeyEvent *e )
{
//================================================================
// Function : SalomeApp_ComboBox::SalomeApp_ComboBox
-// Purpose : constructor
+/*! Purpose : constructor*/
//================================================================
SalomeApp_ComboBox::SalomeApp_ComboBox(bool rw, QWidget* parent, const char* name) :
QComboBox(rw, parent, name)
//================================================================
// Function : SalomeApp_ComboBox::findItem
-// Purpose : searches item in list and returns its index
+/*! Purpose : searches item in list and returns its index*/
//================================================================
int SalomeApp_ComboBox::findItem(const QString& theText)
{
//================================================================
// Function : SalomeApp_ComboBox::insertItem
-// Purpose : adds item in combo box
+/*! Purpose : adds item in combo box*/
//================================================================
void SalomeApp_ComboBox::insertItem(const QString& theValue,
int theIndex)
//================================================================
// Function : SalomeApp_ComboBox::insertList
-// Purpose : adds list of items in combo box
+/*! Purpose : adds list of items in combo box*/
//================================================================
void SalomeApp_ComboBox::insertList(const QStringList& theList)
{
//================================================================
// Function : SalomeApp_ComboBox::insertItem
-// Purpose : adds item in combo box
+/*! Purpose : adds item in combo box*/
//================================================================
void SalomeApp_ComboBox::insertItem(const int theValue)
{
//================================================================
// Function : SalomeApp_ComboBox::insertList
-// Purpose : adds list of items in combo box
+/*! Purpose : adds list of items in combo box*/
//================================================================
void SalomeApp_ComboBox::insertList(const TColStd_ListOfInteger& theList)
{
//================================================================
// Function : SalomeApp_ComboBox::insertItem
-// Purpose : adds item in combo box
+/*! Purpose : adds item in combo box*/
//================================================================
void SalomeApp_ComboBox::insertItem(const double theValue)
{
//================================================================
// Function : SalomeApp_ComboBox::insertList
-// Purpose : adds list of items in combo box
+/*! Purpose : adds list of items in combo box*/
//================================================================
void SalomeApp_ComboBox::insertList(const TColStd_ListOfReal& theList)
{
//================================================================
// Function : SalomeApp_EntityEdit::SalomeApp_EntityEdit
-// Purpose : constructor
+/*! Purpose : constructor*/
//================================================================
SalomeApp_EntityEdit::SalomeApp_EntityEdit(QWidget* parent,
int controlType,
//================================================================
// Function : SalomeApp_EntityEdit::~SalomeApp_EntityEdit
-// Purpose : destructor
+/*! Purpose : destructor*/
//================================================================
SalomeApp_EntityEdit::~SalomeApp_EntityEdit()
{
//================================================================
// Function : SalomeApp_EntityEdit::clear
-// Purpose : clears edit/combo box
+/*! Purpose : clears edit/combo box*/
//================================================================
void SalomeApp_EntityEdit::clear()
{
//================================================================
// Function : SalomeApp_EntityEdit::getText
-// Purpose : returns current text in edit box or combo box
+/*! Purpose : returns current text in edit box or combo box*/
//================================================================
QString SalomeApp_EntityEdit::getText()
{
//================================================================
// Function : SalomeApp_EntityEdit::setText
-// Purpose : sets text
+/*! Purpose : sets text*/
//================================================================
void SalomeApp_EntityEdit::setText(const QString& theText)
{
//================================================================
// Function : SalomeApp_EntityEdit::insertItem
-// Purpose : adds item in combo box,
-// sets it current if theSetCurrent is true
+/*! Purpose : adds item in combo box,
+ * sets it current if theSetCurrent is true
+ */
//================================================================
void SalomeApp_EntityEdit::insertItem(const QString& theValue,
bool theSetCurrent,
//================================================================
// Function : SalomeApp_EntityEdit::insertList
-// Purpose : adds items in combo box,
-// sets item theCurrent as current
+/*! Purpose : adds items in combo box,
+ * sets item theCurrent as current
+ */
//================================================================
void SalomeApp_EntityEdit::insertList(const QStringList& theList,
const int theCurrent)
//================================================================
// Function : SalomeApp_EntityEdit::insertItem
-// Purpose : adds item in combo box,
-// sets it current if theSetCurrent is true
+/*! Purpose : adds item in combo box,
+ * sets it current if theSetCurrent is true
+ */
//================================================================
void SalomeApp_EntityEdit::insertItem(const int theValue,
bool theSetCurrent)
//================================================================
// Function : SalomeApp_EntityEdit::insertList
-// Purpose : adds items in combo box,
-// sets item theCurrent as current
+/*! Purpose : adds items in combo box,
+ * sets item theCurrent as current
+ */
//================================================================
void SalomeApp_EntityEdit::insertList(const TColStd_ListOfInteger& theList,
const int theCurrent)
//================================================================
// Function : SalomeApp_EntityEdit::insertList
-// Purpose : adds items in combo box,
-// sets item theCurrent as current
+/*! Purpose : adds items in combo box,
+ * sets item theCurrent as current
+ */
//================================================================
void SalomeApp_EntityEdit::insertList(const TColStd_ListOfReal& theList,
const int theCurrent)
//================================================================
// Function : SalomeApp_EntityEdit::getControl
-// Purpose : gets actual widget
+/*! Purpose : gets actual widget*/
//================================================================
QWidget* SalomeApp_EntityEdit::getControl()
{
//================================================================
// Function : SalomeApp_EntityEdit::setFocus
-// Purpose : redirect focus to corresponding widget
+/*! Purpose : redirect focus to corresponding widget*/
//================================================================
void SalomeApp_EntityEdit::setFocus()
{
//================================================================
// Function : SalomeApp_EntityEdit::setValidator
-// Purpose : sets validator for the control
+/*! Purpose : sets validator for the control*/
//================================================================
void SalomeApp_EntityEdit::setValidator(const QValidator* theValidator)
{
//================================================================
// Function : SalomeApp_EntityEdit::keyPressEvent
-// Purpose : event filter for KeyPress event
+/*! Purpose : event filter for KeyPress event*/
//================================================================
void SalomeApp_EntityEdit::keyPressEvent( QKeyEvent * e)
{
//================================================================
// Function : SalomeApp_EntityEdit::onComboActivated
-// Purpose : called when item activated in combo box
+/*! Purpose : called when item activated in combo box*/
//================================================================
void SalomeApp_EntityEdit::onComboActivated(const QString& theText)
{
//================================================================
// Function : SalomeApp_EntityEdit::onTextChanged
-// Purpose : slot, called when text changed in line edit
+/*! Purpose : slot, called when text changed in line edit*/
//================================================================
void SalomeApp_EntityEdit::onTextChanged(const QString& theText)
{
//================================================================
// Function : SalomeApp_EntityEdit::onCancel
-// Purpose : slot, called when user presses Cancel button
+/*! Purpose : slot, called when user presses Cancel button*/
//================================================================
void SalomeApp_EntityEdit::onCancel()
{
//================================================================
// Function : SalomeApp_EntityEdit::onApply
-// Purpose : slot, called when user presses Apply button
+/*! Purpose : slot, called when user presses Apply button*/
//================================================================
void SalomeApp_EntityEdit::onApply()
{
//================================================================
// Function : SalomeApp_EntityEdit::showButtons
-// Purpose : shows/hides buttons
+/*! Purpose : shows/hides buttons*/
//================================================================
void SalomeApp_EntityEdit::showButtons(bool show)
{
//================================================================
// Function : SalomeApp_EntityEdit::setDuplicatesEnabled
-// Purpose : enables/disables data duplication (for combo box)
+/*! Purpose : enables/disables data duplication (for combo box)*/
//================================================================
void SalomeApp_EntityEdit::setDuplicatesEnabled(bool enabled)
{
#include <QtxPopupMgr.h>
+/*!Constructor.*/
SalomeApp_Module::SalomeApp_Module( const QString& name )
: CAM_Module( name ),
myPopupMgr( 0 )
{
}
+/*!Destructor.*/
SalomeApp_Module::~SalomeApp_Module()
{
}
+/*!Initialize module.*/
void SalomeApp_Module::initialize( CAM_Application* app )
{
CAM_Module::initialize( app );
resMgr->raiseTranslators( name() );
}
+/*!Activate module.*/
bool SalomeApp_Module::activateModule( SUIT_Study* study )
{
bool res = CAM_Module::activateModule( study );
return res;
}
+/*!Deactivate module.*/
bool SalomeApp_Module::deactivateModule( SUIT_Study* )
{
return true;
}
+/*!NOT IMPLEMENTED*/
void SalomeApp_Module::selectionChanged()
{
}
+/*!NOT IMPLEMENTED*/
void SalomeApp_Module::MenuItem()
{
}
+/*!NOT IMPLEMENTED*/
void SalomeApp_Module::windows( QMap<int, int>& ) const
{
}
+/*!NOT IMPLEMENTED*/
void SalomeApp_Module::viewManagers( QStringList& ) const
{
}
+/*!NOT IMPLEMENTED*/
void SalomeApp_Module::createPreferences()
{
}
+/*!NOT IMPLEMENTED*/
void SalomeApp_Module::preferencesChanged( const QString&, const QString& )
{
}
+/*!Gets application.*/
SalomeApp_Application* SalomeApp_Module::getApp() const
{
return (SalomeApp_Application*)application();
}
+/*!NOT IMPLEMENTED*/
void SalomeApp_Module::onModelOpened()
{
}
+/*!NOT IMPLEMENTED*/
void SalomeApp_Module::onModelSaved()
{
}
+/*!NOT IMPLEMENTED*/
void SalomeApp_Module::onModelClosed()
{
}
+/*!Gets popup manager.(create if not exist)*/
QtxPopupMgr* SalomeApp_Module::popupMgr()
{
if ( !myPopupMgr )
return myPopupMgr;
}
+/*!Gets preferences.*/
SalomeApp_Preferences* SalomeApp_Module::preferences() const
{
SalomeApp_Preferences* pref = 0;
return pref;
}
+/*!Create new instance of data model and return it.*/
CAM_DataModel* SalomeApp_Module::createDataModel()
{
return new SalomeApp_DataModel(this);
}
+/*!Update object browser.*/
void SalomeApp_Module::updateObjBrowser( bool updateDataModel, SUIT_DataObject* root )
{
if( updateDataModel )
getApp()->objectBrowser()->updateTree( root );
}
+/*!Context menu popup.*/
void SalomeApp_Module::contextMenuPopup( const QString& client, QPopupMenu* menu, QString& /*title*/ )
{
SalomeApp_Selection* sel = createSelection();
delete sel;
}
+/*!Create and return instance of SalomeApp_Selection.*/
SalomeApp_Selection* SalomeApp_Module::createSelection() const
{
return new SalomeApp_Selection();
}
+/*!Add preference to preferences.*/
int SalomeApp_Module::addPreference( const QString& label )
{
SalomeApp_Preferences* pref = preferences();
return pref->addPreference( label, catId );
}
+/*!Add preference to preferences.*/
int SalomeApp_Module::addPreference( const QString& label, const int pId, const int type,
const QString& section, const QString& param )
{
return pref->addPreference( moduleName(), label, pId, type, section, param );
}
+/*!Gets property of preferences.*/
QVariant SalomeApp_Module::preferenceProperty( const int id, const QString& prop ) const
{
QVariant var;
return var;
}
+
+/*!Set property of preferences.*/
void SalomeApp_Module::setPreferenceProperty( const int id, const QString& prop, const QVariant& var )
{
SalomeApp_Preferences* pref = preferences();
class SalomeApp_Preferences;
class SalomeApp_SelectionManager;
-/*
- Class : SalomeApp_Module
+/*!
Description : Base class for all salome modules
*/
virtual void windows( QMap<int, int>& ) const;
virtual void viewManagers( QStringList& ) const;
- // engineIOR() should be a pure virtual method, to avoid logical errors!
- //
- // Implementation in derived classes can return the following values:
- // "" (empty string) - means that this is a light module, default engine should be used for interaction with SALOMEDS persistence
- // "-1" - means that this is a light module, SALOMEDS persistence is not used at all
- // module`s engine IOR - means that this is a standard SALOME module with a CORBA engine
- //
+ /*! engineIOR() should be a pure virtual method, to avoid logical errors!\n
+ * Implementation in derived classes can return the following values:\n
+ * module`s engine IOR - means that this is a standard SALOME module with a CORBA engine
+ * \li "" (empty string) - means that this is a light module, default engine should be used for interaction with SALOMEDS persistence
+ * \li "-1" - means that this is a light module, SALOMEDS persistence is not used at all\n
+ */
virtual QString engineIOR() const = 0;
virtual void contextMenuPopup( const QString&, QPopupMenu*, QString& );
virtual void createPreferences();
- // Convenient shortcuts
+ /*! Convenient shortcuts*/
SalomeApp_Application* getApp() const;
void updateObjBrowser( bool = true, SUIT_DataObject* = 0 );
#include <qpixmap.h>
using namespace std;
+/*!Default icon*/
static const char* const default_icon[] = {
"48 48 17 1",
". c None",
//==============================================================================================================================
/*!
- * SalomeApp_ModuleDlg::SalomeApp_ModuleDlg
+ * SalomeApp_ModuleDlg::SalomeApp_ModuleDlg \n
*
- * Constructor
+ * Constructor.
*/
//==============================================================================================================================
SalomeApp_ModuleDlg::SalomeApp_ModuleDlg ( QWidget * parent, const QString& component, const QPixmap icon )
//=================================================================================
// class : SalomeApp_NameDlg
-// purpose : Common <Rename> dialog box class
+/*! purpose : Common <Rename> dialog box class*/
//=================================================================================
class SalomeApp_NameDlg : public QDialog
{
#include "SalomeApp_DataObject.h"
#include "SalomeApp_DataOwner.h"
+/*!
+ Constructor.
+*/
SalomeApp_OBFilter::SalomeApp_OBFilter( SalomeApp_SelectionMgr* theSelMgr )
{
mySelMgr = theSelMgr;
}
+/*!Destructor.*/
SalomeApp_OBFilter::~SalomeApp_OBFilter()
{
}
+/*!Checks: data object is ok?*/
bool SalomeApp_OBFilter::isOk( const SUIT_DataObject* theDataObj ) const
{
const SalomeApp_DataObject* obj = dynamic_cast<const SalomeApp_DataObject*>( theDataObj );
#include <SUIT_DataObjectIterator.h>
+/*!
+ Constructor
+*/
SalomeApp_OBSelector::SalomeApp_OBSelector( OB_Browser* ob, SUIT_SelectionMgr* mgr )
: SUIT_Selector( mgr, ob ),
myBrowser( ob )
}
}
+/*!
+ Destructor
+*/
SalomeApp_OBSelector::~SalomeApp_OBSelector()
{
}
+/*!
+ Gets browser.
+*/
OB_Browser* SalomeApp_OBSelector::browser() const
{
return myBrowser;
}
-
+/*!
+ Gets selection.
+*/
void SalomeApp_OBSelector::getSelection( SUIT_DataOwnerPtrList& list ) const
{
if ( !myBrowser )
}
}
+/*!Sets selection.*/
void SalomeApp_OBSelector::setSelection( const SUIT_DataOwnerPtrList& list )
{
if ( !myBrowser )
myBrowser->setSelected( objList );
}
+/*!On selection changed.*/
void SalomeApp_OBSelector::onSelectionChanged()
{
selectionChanged();
}
+/*!Fill entries.*/
void SalomeApp_OBSelector::fillEntries( QMap<QString, SalomeApp_DataObject*>& entires )
{
entires.clear();
OB_Browser* browser() const;
+ /*!Return "ObjectBrowser"*/
virtual QString type() const { return "ObjectBrowser"; }
private slots:
#include <AIS_ListOfInteractive.hxx>
#include <AIS_ListIteratorOfListOfInteractive.hxx>
-
+/*!
+ Constructor
+*/
SalomeApp_OCCSelector::SalomeApp_OCCSelector( OCCViewer_Viewer* viewer, SUIT_SelectionMgr* mgr )
: SUIT_Selector( mgr, viewer ),
myViewer( viewer )
connect( myViewer, SIGNAL( selectionChanged() ), this, SLOT( onSelectionChanged() ) );
}
+/*!
+ Destructor.
+*/
SalomeApp_OCCSelector::~SalomeApp_OCCSelector()
{
}
+/*!
+ Gets viewer.
+*/
OCCViewer_Viewer* SalomeApp_OCCSelector::viewer() const
{
return myViewer;
}
+/*!On selection changed.*/
void SalomeApp_OCCSelector::onSelectionChanged()
{
selectionChanged();
}
+/*!Gets selection list.*/
void SalomeApp_OCCSelector::getSelection( SUIT_DataOwnerPtrList& aList ) const
{
if ( !myViewer )
}
}
+/*!Sets selection list.*/
void SalomeApp_OCCSelector::setSelection( const SUIT_DataOwnerPtrList& aList )
{
if ( !myViewer )
myViewer->setObjectsSelected( aSelList );
}
+/*!Gets entry ob object.*/
QString SalomeApp_OCCSelector::entry( const Handle(AIS_InteractiveObject)& anAIS ) const
{
if ( anAIS.IsNull() || !anAIS->HasOwner() )
#include <qlayout.h>
+/*!
+ Constructor.Initialize by resource manager and parent QWidget.
+*/
SalomeApp_Preferences::SalomeApp_Preferences( QtxResourceMgr* resMgr, QWidget* parent )
: QtxListResourceEdit( resMgr, parent )
{
}
+/*!
+ Destructor.
+*/
SalomeApp_Preferences::~SalomeApp_Preferences()
{
}
+/*!
+ Adds preference.
+*/
int SalomeApp_Preferences::addPreference( const QString& label, const int pId, const int type,
const QString& section, const QString& param )
{
return addItem( label, pId, type, section, param );
}
+/*!
+ Adds preference.
+*/
int SalomeApp_Preferences::addPreference( const QString& mod, const QString& label, const int pId,
const int type, const QString& section, const QString& param )
{
return id;
}
+/*!
+ Checks: is preferences has module with name \a mod.
+*/
bool SalomeApp_Preferences::hasModule( const QString& mod ) const
{
bool res = false;
return res;
}
+/*!Do nothing.*/
void SalomeApp_Preferences::onHelp()
{
}
+/*!Store preferences on apply.*/
void SalomeApp_Preferences::onApply()
{
store();
}
+/*!Emit preference changed.*/
void SalomeApp_Preferences::changedResources( const QMap<Item*, QString>& map )
{
for ( QMap<Item*, QString>::ConstIterator it = map.begin(); it != map.end(); ++it )
}
}
+/*!Gets module name by \a id, if exist.*/
QString SalomeApp_Preferences::module( const int id ) const
{
QString mod;
#include <qvbox.h>
#include <qlayout.h>
+/*!
+ Constructor.
+*/
SalomeApp_PreferencesDlg::SalomeApp_PreferencesDlg( SalomeApp_Preferences* prefs, QWidget* parent )
: QtxDialog( parent, 0, true, false, OK | Cancel | Apply ),
myPrefs( prefs )
connect( this, SIGNAL( dlgApply() ), this, SLOT( onApply() ) );
}
+/*!
+ Destructor.
+*/
SalomeApp_PreferencesDlg::~SalomeApp_PreferencesDlg()
{
if ( !myPrefs )
myPrefs = 0;
}
+/*!Show dialog.*/
void SalomeApp_PreferencesDlg::show()
{
myPrefs->retrieve();
QtxDialog::show();
}
+/*!Store preferences on accept.*/
void SalomeApp_PreferencesDlg::accept()
{
QtxDialog::accept();
myPrefs->store();
}
+/*!Reject. Restore preferences from backup.*/
void SalomeApp_PreferencesDlg::reject()
{
QtxDialog::reject();
myPrefs->fromBackup();
}
+/*!Do nothing.*/
void SalomeApp_PreferencesDlg::onHelp()
{
}
+/*!Store preferences on apply.*/
void SalomeApp_PreferencesDlg::onApply()
{
myPrefs->store();
class SalomeApp_Preferences;
+/*!Preferences dialog.*/
class SALOMEAPP_EXPORT SalomeApp_PreferencesDlg : public QtxDialog
{
Q_OBJECT
{
}
+/*!
+ * Destructor.
+ */
SalomeApp_PyInterp::~SalomeApp_PyInterp()
{
}
-/*!
+/*!\class SalomeApp_PyInterp
* EDF-CCAR
- * When SALOME uses multi Python interpreter feature,
+ * Wasashen SALOME uses multi Python interpreter feature,
* Every study has its own interpreter and thread state (_tstate = Py_NewInterpreter())
* This is fine because every study has its own modules (sys.modules) stdout and stderr
* BUT some Python modules must be imported only once. In multi interpreter context Python
bool SalomeApp_PyInterp::initContext()
{
- /*
+ /*!
* The GIL is assumed to be held
* It is the caller responsability caller to acquire the GIL
* It will still be held on initContext output
#include "SUIT_Session.h"
#include "SUIT_ViewWindow.h"
+/*!
+ Constructor
+*/
SalomeApp_Selection::SalomeApp_Selection()
: myStudy( 0 )
{
}
+/*!
+ Destructor.
+*/
SalomeApp_Selection::~SalomeApp_Selection()
{
}
+/*!
+ Initializetion.
+*/
void SalomeApp_Selection::init( const QString& client, SalomeApp_SelectionMgr* mgr)
{
myPopupClient = client;
}
}
+/*!
+ Gets count of entries.
+*/
int SalomeApp_Selection::count() const
{
return myEntries.count();
}
+/*!
+ Gets QtxValue();
+*/
QtxValue SalomeApp_Selection::param( const int, const QString& p ) const
{
return QtxValue();
}
+/*!
+ Gets global parameters. client, isActiveView, activeView etc.
+*/
QtxValue SalomeApp_Selection::globalParam( const QString& p ) const
{
if ( p == "client" ) return QtxValue( myPopupClient );
else return QtxPopupMgr::Selection::globalParam( p );
}
+/*!
+ Do nothing.
+*/
void SalomeApp_Selection::processOwner( const SalomeApp_DataOwner* )
{
}
+/*!
+ Gets entry with index \a index.
+*/
QString SalomeApp_Selection::entry( const int index ) const
{
if ( index >= 0 && index < count() )
return QString();
}
+/*!
+ Gets type of active view manager.
+*/
QString SalomeApp_Selection::activeViewType() const
{
SUIT_ViewWindow* win = activeVW();
return QString::null;
}
+/*!
+ Gets active view window.
+*/
SUIT_ViewWindow* SalomeApp_Selection::activeVW() const
{
SUIT_Session* session = SUIT_Session::session();
protected:
QString entry( const int ) const;
+ /*!Gets study.*/
SalomeApp_Study* study() const { return myStudy; }
QString activeViewType() const;
SUIT_ViewWindow* activeVW() const;
#include "SALOMEDSClient.hxx"
+/*!
+ Constructor.
+*/
SalomeApp_SelectionMgr::SalomeApp_SelectionMgr( SalomeApp_Application* app, const bool fb )
: SUIT_SelectionMgr( fb ),
myApp( app )
{
}
+/*!
+ Destructor.
+*/
SalomeApp_SelectionMgr::~SalomeApp_SelectionMgr()
{
}
+/*!
+ Gets application.
+*/
SalomeApp_Application* SalomeApp_SelectionMgr::application() const
{
return myApp;
}
-/*
- get all selected objects from selection manager
-
+/*!
+ Get all selected objects from selection manager
*/
void SalomeApp_SelectionMgr::selectedObjects( SALOME_ListIO& theList, const QString& theType ) const
{
}
}
+/*!
+ Append selected objects.
+*/
void SalomeApp_SelectionMgr::setSelectedObjects( const SALOME_ListIO& lst, const bool append )
{
SUIT_DataOwnerPtrList owners;
setSelected( owners, append );
}
+/*!
+ Emit current selection changed.
+*/
void SalomeApp_SelectionMgr::selectionChanged( SUIT_Selector* theSel )
{
SUIT_SelectionMgr::selectionChanged( theSel );
emit currentSelectionChanged();
}
-/*
+/*!
get map of indexes for the given SALOME_InteractiveObject
-
*/
void SalomeApp_SelectionMgr::GetIndexes( const Handle(SALOME_InteractiveObject)& IObject,
TColStd_IndexedMapOfInteger& theIndex)
}
-/*
+/*!
get map of indexes for the given entry of SALOME_InteractiveObject
-
*/
void SalomeApp_SelectionMgr::GetIndexes( const QString& theEntry, TColStd_IndexedMapOfInteger& theIndex )
{
}
+/*!
+ Add or remove interactive objects from selection manager.
+*/
bool SalomeApp_SelectionMgr::AddOrRemoveIndex( const Handle(SALOME_InteractiveObject)& IObject,
const TColStd_MapOfInteger& theIndexes,
bool modeShift)
}
-/*
+/*!
select 'subobjects' with given indexes
-
*/
void SalomeApp_SelectionMgr::selectObjects( const Handle(SALOME_InteractiveObject)& IObject,
TColStd_IndexedMapOfInteger theIndex, bool append )
}
-/*
+/*!
select 'subobjects' with given indexes
-
*/
void SalomeApp_SelectionMgr::selectObjects( MapIOOfMapOfInteger theMapIO, bool append )
{
}
-/*
+/*!
get map of selected subowners : object's entry <-> map of indexes
-
*/
void SalomeApp_SelectionMgr::selectedSubOwners( MapEntryOfMapOfInteger& theMap )
{
#include "utilities.h"
+/*!
+ Constructor.
+*/
SalomeApp_Study::SalomeApp_Study( SUIT_Application* app )
: CAM_Study( app )
{
}
+/*!
+ Destructor.
+*/
SalomeApp_Study::~SalomeApp_Study()
{
}
+/*!
+ Gets study id.
+*/
int SalomeApp_Study::id() const
{
int id = -1;
return id;
}
+/*!
+ Gets studyDS pointer.
+*/
_PTR(Study) SalomeApp_Study::studyDS() const
{
return myStudyDS;
}
+/*!
+ Create document.
+*/
void SalomeApp_Study::createDocument()
{
MESSAGE( "openDocument" );
//=======================================================================
// name : openDocument
-// Purpose : Open document
+/*! Purpose : Open document*/
//=======================================================================
bool SalomeApp_Study::openDocument( const QString& theFileName )
{
//=======================================================================
// name : loadDocument
-// Purpose : Connects GUI study to SALOMEDS one already loaded into StudyManager
+/*! Purpose : Connects GUI study to SALOMEDS one already loaded into StudyManager*/
//=======================================================================
bool SalomeApp_Study::loadDocument( const QString& theStudyName )
{
//=======================================================================
// name : saveDocumentAs
-// Purpose : Save document
+/*! Purpose : Save document */
//=======================================================================
bool SalomeApp_Study::saveDocumentAs( const QString& theFileName )
{
//=======================================================================
// name : saveDocument
-// Purpose : Save document
+/*! Purpose : Save document */
//=======================================================================
void SalomeApp_Study::saveDocument()
{
//================================================================
// Function : closeDocument
-// Purpose :
+/*! Purpose : Close document */
//================================================================
void SalomeApp_Study::closeDocument(bool permanently)
{
//================================================================
// Function : isModified
-// Purpose :
+/*! Purpose : Check data model on modifications.*/
//================================================================
bool SalomeApp_Study::isModified() const
{
//================================================================
// Function : isSaved
-// Purpose :
+/*! Purpose : Check: data model is saved?*/
//================================================================
bool SalomeApp_Study::isSaved() const
{
return isAllSaved;
}
+/*!
+ Set studyDS.
+*/
void SalomeApp_Study::setStudyDS( const _PTR(Study)& s )
{
myStudyDS = s;
}
+/*!
+ Insert data model.
+*/
void SalomeApp_Study::dataModelInserted (const CAM_DataModel* dm)
{
MESSAGE("SalomeApp_Study::dataModelInserted() : module name() = " << dm->module()->name());
}
}
+/*!
+ Open data model
+*/
bool SalomeApp_Study::openDataModel( const QString& studyName, CAM_DataModel* dm )
{
if (!dm)
return false;
}
+/*!
+ Create new study name.
+*/
QString SalomeApp_Study::newStudyName() const
{
std::vector<std::string> studies = SalomeApp_Application::studyMgr()->GetOpenStudies();
class SalomeApp_PropItem : public SalomeApp_ListViewItem
{
public:
-// constructor
+ /*! constructor */
SalomeApp_PropItem(SalomeApp_ListView* parent,
const QString theName,
const bool theEditable,
{
setUserType(theUserType);
}
-// constructor
+ /*! constructor */
SalomeApp_PropItem(SalomeApp_ListView* parent,
SalomeApp_ListViewItem* after,
const QString theName,
{
setUserType(theUserType);
}
-// fills widget with initial values (list or single value)
+ /*! fills widget with initial values (list or single value)*/
void fillWidgetWithValues( SalomeApp_EntityEdit* theWidget )
{
QStringList list;
}
}
}
-// finishes editing of entity
+ /*! finishes editing of entity */
virtual UpdateType finishEditing( SalomeApp_EntityEdit* theWidget ) {
if ( getUserType() == SalomeApp_StudyPropertiesDlg::prpModificationsId )
return utCancel;
}
};
+/*!Constructor. Initialize study properties dialog.*/
SalomeApp_StudyPropertiesDlg::SalomeApp_StudyPropertiesDlg(QWidget* parent)
: QDialog(parent, "", TRUE, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu ),
myChanged( false )
connect(myCancelBtn, SIGNAL(clicked()), this, SLOT(reject()));
}
+/*!
+ Destructor.
+*/
SalomeApp_StudyPropertiesDlg::~SalomeApp_StudyPropertiesDlg()
{
}
+/*!
+ Data initializetion for dialog.(Study author's name, date of creation etc.)
+*/
void SalomeApp_StudyPropertiesDlg::initData()
{
bool hasData = myStudyDoc;
myOKBtn->setEnabled(hasData);
}
+/*!
+ accept data. Return true.
+*/
bool SalomeApp_StudyPropertiesDlg::acceptData()
{
return TRUE;
}
+/*!
+ Fill properties attributes.
+*/
void SalomeApp_StudyPropertiesDlg::onOK()
{
myPropList->accept();
}
}
+/*!
+ Check is properties chenged?
+*/
bool SalomeApp_StudyPropertiesDlg::propChanged() {
_PTR(AttributeStudyProperties) propAttr = myStudyDoc->GetProperties();
if ( propAttr ) {
#include <utilities.h>
+/*!
+ Convert QColor to Quantity_Color, if QColor is valid.
+*/
Quantity_Color SalomeApp_Tools::color( const QColor& c )
{
Quantity_Color aColor;
return aColor;
}
+/*!
+ Convert Quantity_Color to QColor.
+*/
QColor SalomeApp_Tools::color( const Quantity_Color& c )
{
return QColor( (int)( c.Red() * 255 ), (int)( c.Green() * 255 ), (int)( c.Blue() * 255 ) );
}
+/*!
+ Gets message on exception \a S_ex.
+*/
QString SalomeApp_Tools::ExceptionToString( const SALOME::SALOME_Exception& S_ex )
{
QString message;
return message;
}
+/*!
+ Gets message box on exception \a S_ex.
+*/
void SalomeApp_Tools::QtCatchCorbaException( const SALOME::SALOME_Exception& S_ex )
{
QString message = ExceptionToString( S_ex );
#include <SALOMEconfig.h>
#include CORBA_CLIENT_HEADER(SALOME_Exception)
+/*!
+ Class which provide color converter and exception message box.
+*/
class SALOMEAPP_EXPORT SalomeApp_Tools : public SUIT_Tools
{
public:
#include <SALOMEDS_SObject.hxx>
+/*!
+ Constructor.
+*/
SalomeApp_TypeFilter::SalomeApp_TypeFilter( SalomeApp_Study* study, const QString& kind )
: SalomeApp_Filter( study )
{
myKind = kind;
}
+/*!
+ Destructor.
+*/
SalomeApp_TypeFilter::~SalomeApp_TypeFilter()
{
}
+/*!
+ Check: data owner is valid?
+*/
bool SalomeApp_TypeFilter::isOk( const SUIT_DataOwner* sOwner ) const
{
const SalomeApp_DataOwner* owner = dynamic_cast<const SalomeApp_DataOwner*> ( sOwner );
#include "SalomeApp_Filter.h"
+/*!
+ Class which provide data owner validation.
+*/
class SALOMEAPP_EXPORT SalomeApp_TypeFilter: public SalomeApp_Filter
{
public:
static int MYDEBUG = 0;
#endif
+/*!
+ Constructor.
+*/
SalomeApp_SVTKDataOwner
::SalomeApp_SVTKDataOwner( const Handle(SALOME_InteractiveObject)& theIO,
const TColStd_IndexedMapOfInteger& theIds,
myIds = theIds; // workaround - there is no constructor copy for the container
}
+/*!
+ Destuctor.
+*/
SalomeApp_SVTKDataOwner
::~SalomeApp_SVTKDataOwner()
{
}
+/*!
+ Gets actor pointer.
+*/
SALOME_Actor*
SalomeApp_SVTKDataOwner
::GetActor() const
return myActor.GetPointer();
}
-
+/*!
+ Constructor.
+*/
SalomeApp_VTKSelector
::SalomeApp_VTKSelector( SVTK_Viewer* viewer,
SUIT_SelectionMgr* mgr ):
connect( myViewer, SIGNAL( selectionChanged() ), this, SLOT( onSelectionChanged() ) );
}
+/*!
+ Destructor.
+*/
SalomeApp_VTKSelector
::~SalomeApp_VTKSelector()
{
}
+/*!
+ Gets viewer.
+*/
SVTK_Viewer*
SalomeApp_VTKSelector
::viewer() const
return myViewer;
}
+/*!
+ Gets type of salome vtk viewer.
+*/
QString
SalomeApp_VTKSelector
::type() const
return SVTK_Viewer::Type();
}
+/*!
+ On selection changed.
+*/
void
SalomeApp_VTKSelector
::onSelectionChanged()
selectionChanged();
}
+/*!
+ Gets list of selected data owners.(output \a aList).
+*/
void
SalomeApp_VTKSelector
::getSelection( SUIT_DataOwnerPtrList& aList ) const
}
}
+/*!
+ Sets selection to selector from data owner list \a theList.
+*/
void
SalomeApp_VTKSelector
::setSelection( const SUIT_DataOwnerPtrList& theList )
class SALOME_Actor;
class SVTK_Viewer;
+/*!
+ Provide salome vtk data owner list.
+*/
class SalomeApp_SVTKDataOwner : public SalomeApp_DataOwner
{
public:
SALOME_Actor* theActor = NULL);
virtual ~SalomeApp_SVTKDataOwner();
+ /*!Gets dataowners ids list.*/
const TColStd_IndexedMapOfInteger& GetIds() const
{
return myIds;
}
+ /*!Gets selection mode.*/
Selection_Mode GetMode() const
{
return mySelectionMode;
};
+/*!
+ Provide salome vtk selection of data owners.
+*/
class SALOMEAPP_EXPORT SalomeApp_VTKSelector : public SUIT_Selector
{
Q_OBJECT;
#include <qobjectlist.h>
#include <qwidgetstack.h>
+/*!
+ Constructor.
+*/
SalomeApp_WidgetContainer::SalomeApp_WidgetContainer( const int type, QWidget* parent )
: QDockWindow( QDockWindow::InDock, parent ),
myType( type )
myStack->show();
}
+/*!
+ Destructor.
+*/
SalomeApp_WidgetContainer::~SalomeApp_WidgetContainer()
{
}
+/*!
+ Checks: is widget container is empty?
+*/
bool SalomeApp_WidgetContainer::isEmpty() const
{
const QObjectList* lst = myStack->children();
return res;
}
+/*!
+ Gets type of widget container.
+*/
int SalomeApp_WidgetContainer::type() const
{
return myType;
}
+/*!
+ Checks: is container contains widget with id \a id.
+*/
bool SalomeApp_WidgetContainer::contains( const int id ) const
{
return myStack->widget( id ) != 0;
}
+/*!
+ * Insert widget(\a wid with id \a id) to container.And return id of widget in stack.
+ *\warning remove widget with id = \a id , if it was in container.
+ */
int SalomeApp_WidgetContainer::insert( const int id, QWidget* wid )
{
if ( id == -1 || !wid )
return stackId;
}
+/*!
+ Remove widget from stack by widget \a id.
+*/
void SalomeApp_WidgetContainer::remove( const int id )
{
remove( myStack->widget( id ) );
setCaption( myStack->visibleWidget() ? myStack->visibleWidget()->caption() : QString::null );
}
+/*!
+ Remove widget(\a wid) from stack.
+*/
void SalomeApp_WidgetContainer::remove( QWidget* wid )
{
myStack->removeWidget( wid );
setCaption( myStack->visibleWidget() ? myStack->visibleWidget()->caption() : QString::null );
}
+/*!
+ Raise widget with id = \a id.
+*/
void SalomeApp_WidgetContainer::activate( const int id )
{
myStack->raiseWidget( id );
setCaption( myStack->visibleWidget() ? myStack->visibleWidget()->caption() : QString::null );
}
+/*!
+ Raise widget (\a wid).
+*/
void SalomeApp_WidgetContainer::activate( QWidget* wid )
{
myStack->raiseWidget( wid );
setCaption( myStack->visibleWidget() ? myStack->visibleWidget()->caption() : QString::null );
}
+/*!
+ Gets widget from container list(stack) by id = \a id.
+*/
QWidget* SalomeApp_WidgetContainer::widget( const int id ) const
{
return myStack->widget( id );
}
+/*!
+ Gets visible widget.
+*/
QWidget* SalomeApp_WidgetContainer::active() const
{
return myStack->visibleWidget();
class QWidget;
class QWidgetStack;
+/*!
+ Class which privade widget container.
+*/
class SALOMEAPP_EXPORT SalomeApp_WidgetContainer : public QDockWindow
{
Q_OBJECT