From: asl Date: Thu, 27 Apr 2006 07:57:47 +0000 (+0000) Subject: doxygen comments X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=94c37196aee64272fa1cb1c2b8a8e30b81f54f0b;p=modules%2Fgui.git doxygen comments --- diff --git a/src/CAF/CAF_Application.cxx b/src/CAF/CAF_Application.cxx index 823d09355..7416f68de 100755 --- a/src/CAF/CAF_Application.cxx +++ b/src/CAF/CAF_Application.cxx @@ -45,31 +45,50 @@ extern "C" CAF_EXPORT SUIT_Application* createApplication() return new CAF_Application(); } +/*! + Default constructor +*/ CAF_Application::CAF_Application() : STD_Application() { } -CAF_Application::CAF_Application( const Handle(TDocStd_Application)& app ) +/*! + Constructor with OCAF application + \param app - OCAF application +*/ +CAF_Application::CAF_Application( const Handle( TDocStd_Application )& app ) : STD_Application(), myStdApp( app ) { } +/*! + Destructor +*/ CAF_Application::~CAF_Application() { } +/*! + \return application name +*/ QString CAF_Application::applicationName() const { return QString( "CAFApplication" ); } -Handle(TDocStd_Application) CAF_Application::stdApp() const +/*! + \return OCAF application +*/ +Handle( TDocStd_Application ) CAF_Application::stdApp() const { return myStdApp; } +/*! + \return file filters for open/save document +*/ QString CAF_Application::getFileFilter() const { if ( stdApp().IsNull() ) @@ -118,6 +137,9 @@ QString CAF_Application::getFileFilter() const return filters.join( ";;" ); } +/*! + Creates actions of application +*/ void CAF_Application::createActions() { STD_Application::createActions(); @@ -255,16 +277,25 @@ void CAF_Application::updateCommandsStatus() redo->setEnabled( cafStudy && cafStudy->canRedo() ); } +/*! + SLOT: called by clicking on Help->About in main menu +*/ void CAF_Application::onHelpAbout() { SUIT_MessageBox::info1( desktop(), tr( "About" ), tr( "ABOUT_INFO" ), "&OK" ); } +/*! + Creates new study +*/ SUIT_Study* CAF_Application::createNewStudy() { return new CAF_Study( this ); } +/*! + Sets OCAF application +*/ void CAF_Application::setStdApp( const Handle(TDocStd_Application)& app ) { myStdApp = app; diff --git a/src/CAF/CAF_Operation.cxx b/src/CAF/CAF_Operation.cxx index 24bc5ecd8..5292a0fbb 100755 --- a/src/CAF/CAF_Operation.cxx +++ b/src/CAF/CAF_Operation.cxx @@ -23,19 +23,24 @@ #include -////////////////////////////////////////////////////////////////////// -// Construction/Destruction -////////////////////////////////////////////////////////////////////// - +/*! + Default constructor +*/ CAF_Operation::CAF_Operation(SUIT_Application* theApp) :SUIT_Operation(theApp) { } +/*! + Destructor +*/ CAF_Operation::~CAF_Operation() { } +/*! + \return OCAF document +*/ Handle(TDocStd_Document) CAF_Operation::stdDoc() const { Handle(TDocStd_Document) doc; diff --git a/src/CAF/CAF_Study.cxx b/src/CAF/CAF_Study.cxx index 176023a1f..30362443d 100755 --- a/src/CAF/CAF_Study.cxx +++ b/src/CAF/CAF_Study.cxx @@ -33,16 +33,18 @@ #include -////////////////////////////////////////////////////////////////////// -// Construction/Destruction -////////////////////////////////////////////////////////////////////// - +/*! + Constructor +*/ CAF_Study::CAF_Study(SUIT_Application* theApp) : SUIT_Study( theApp ), myModifiedCnt( 0 ) { } +/*! + Constructor +*/ CAF_Study::CAF_Study(SUIT_Application* theApp, Handle (TDocStd_Document)& aStdDoc) : SUIT_Study( theApp ), myStdDoc( aStdDoc ), @@ -50,20 +52,33 @@ myModifiedCnt( 0 ) { } +/*! + Destructor +*/ CAF_Study::~CAF_Study() { } +/*! + \return OCAF document +*/ Handle(TDocStd_Document) CAF_Study::stdDoc() const { return myStdDoc; } +/*! + Sets new OCAF document + \param aStdDoc - new OCAF document +*/ void CAF_Study::setStdDoc( Handle(TDocStd_Document)& aStdDoc ) { myStdDoc = aStdDoc; } +/*! + Custom document initialization +*/ void CAF_Study::createDocument() { SUIT_Study::createDocument(); @@ -82,6 +97,9 @@ void CAF_Study::createDocument() } } +/*! + Close document +*/ void CAF_Study::closeDocument( bool permanent ) { Handle(TDocStd_Application) app = stdApp(); @@ -91,6 +109,10 @@ void CAF_Study::closeDocument( bool permanent ) SUIT_Study::closeDocument( permanent ); } +/*! + Open document + \param fname - name of file +*/ bool CAF_Study::openDocument( const QString& fname ) { Handle(TDocStd_Application) app = stdApp(); @@ -108,6 +130,10 @@ bool CAF_Study::openDocument( const QString& fname ) return status && SUIT_Study::openDocument( fname ); } +/*! + Save document with other name + \param fname - name of file +*/ bool CAF_Study::saveDocumentAs( const QString& fname ) { Handle(TDocStd_Application) app = stdApp(); @@ -149,9 +175,12 @@ bool CAF_Study::saveDocumentAs( const QString& fname ) return status; } +/*! + Open OCAF transaction +*/ bool CAF_Study::openTransaction() { - if ( myStdDoc.IsNull() ) + if ( myStdDoc.IsNull() ) return false; bool res = true; @@ -168,13 +197,16 @@ bool CAF_Study::openTransaction() return res; } +/*! + Abort OCAF transaction +*/ bool CAF_Study::abortTransaction() { - if ( myStdDoc.IsNull() ) + if ( myStdDoc.IsNull() ) return false; bool res = true; - try { + try { myStdDoc->AbortCommand(); update(); } @@ -184,13 +216,16 @@ bool CAF_Study::abortTransaction() return res; } +/*! + Commit OCAF transaction +*/ bool CAF_Study::commitTransaction( const QString& name ) { - if ( myStdDoc.IsNull() ) + if ( myStdDoc.IsNull() ) return false; bool res = true; - try { + try { myStdDoc->CommitCommand(); if ( canUndo() ) @@ -206,31 +241,34 @@ bool CAF_Study::commitTransaction( const QString& name ) return res; } +/*! + \return true, if there is opened OCAF transaction +*/ bool CAF_Study::hasTransaction() const { - if ( myStdDoc.IsNull() ) + if ( myStdDoc.IsNull() ) return false; return myStdDoc->HasOpenCommand(); } /*! - Returns whether the document was saved in file. [ public ] + \return whether the document was saved in file. [ public ] */ bool CAF_Study::isSaved() const { - if ( myStdDoc.IsNull() ) + if ( myStdDoc.IsNull() ) return false; return myStdDoc->IsSaved(); } /*! - Returns whether the document is modified. [ public ] + \return whether the document is modified. [ public ] */ bool CAF_Study::isModified() const { - if ( myStdDoc.IsNull() ) + if ( myStdDoc.IsNull() ) return false; // return myStdDoc->IsModified(); @@ -311,7 +349,7 @@ bool CAF_Study::redo() } /*! - Check if possible to perform 'undo' command. [ public ] + \return true if possible to perform 'undo' command. [ public ] */ bool CAF_Study::canUndo() const { @@ -322,7 +360,7 @@ bool CAF_Study::canUndo() const } /*! - Check if possible to perform 'redo' command. [ public ] + \return true if possible to perform 'redo' command. [ public ] */ bool CAF_Study::canRedo() const { @@ -333,7 +371,7 @@ bool CAF_Study::canRedo() const } /*! - Returns the list of names of 'undo' actions available. [ public ] + \return the list of names of 'undo' actions available. [ public ] */ QStringList CAF_Study::undoNames() const { @@ -347,7 +385,7 @@ QStringList CAF_Study::undoNames() const } /*! - Returns the list of names of 'redo' actions available. [ public ] + \return the list of names of 'redo' actions available. [ public ] */ QStringList CAF_Study::redoNames() const { @@ -361,7 +399,7 @@ QStringList CAF_Study::redoNames() const } /*! - Returns the standard OCAF application from owner application. [ protected ] + \return the standard OCAF application from owner application. [ protected ] */ Handle(TDocStd_Application) CAF_Study::stdApp() const { @@ -373,7 +411,7 @@ Handle(TDocStd_Application) CAF_Study::stdApp() const } /*! - Returns the application casted to type CAF_Application. [ protected ] + \return the application casted to type CAF_Application. [ protected ] */ CAF_Application* CAF_Study::cafApplication() const { diff --git a/src/CAF/CAF_Tools.cxx b/src/CAF/CAF_Tools.cxx index c32d4a27e..b73ffc7c9 100755 --- a/src/CAF/CAF_Tools.cxx +++ b/src/CAF/CAF_Tools.cxx @@ -62,6 +62,9 @@ TCollection_ExtendedString CAF_Tools::toExtString ( const QString& src ) return result; } +/*! + Converts Qt color to OCC color +*/ Quantity_Color CAF_Tools::color( const QColor& c ) { Quantity_Color aColor; @@ -71,6 +74,9 @@ Quantity_Color CAF_Tools::color( const QColor& c ) return aColor; } +/*! + Converts OCC color to Qt color +*/ QColor CAF_Tools::color( const Quantity_Color& c ) { return QColor ( int( c.Red() * 255 ), diff --git a/src/CAM/CAM_Application.cxx b/src/CAM/CAM_Application.cxx index 7bdf12a28..c6a8424c7 100755 --- a/src/CAM/CAM_Application.cxx +++ b/src/CAM/CAM_Application.cxx @@ -256,7 +256,7 @@ CAM_Module* CAM_Application::loadModule( const QString& modName ) return module; } -/**@name Activate module group.*/ +/*! @name Activate module group. */ //@{ /*!Activate module with name \a modName. *\param modName - module name. @@ -503,7 +503,6 @@ void CAM_Application::contextMenuPopup( const QString& type, QPopupMenu* thePopu /*!Create empty study.*/ void CAM_Application::createEmptyStudy() { - SUIT_Study* study = activeStudy(); - + /*SUIT_Study* study = */activeStudy(); STD_Application::createEmptyStudy(); } diff --git a/src/CAM/CAM_DataModel.cxx b/src/CAM/CAM_DataModel.cxx index 187ec6368..36f72afd9 100755 --- a/src/CAM/CAM_DataModel.cxx +++ b/src/CAM/CAM_DataModel.cxx @@ -33,10 +33,12 @@ CAM_DataModel::~CAM_DataModel() { } +/*! + Default implementation, does nothing. + Can be used for creation of root object. +*/ void CAM_DataModel::initialize() { - //! Default implementation, does nothing.\n - //! Can be used for creation of root object. } /*!Get root object. diff --git a/src/LightApp/LightApp_Application.cxx b/src/LightApp/LightApp_Application.cxx index f3d1ffb21..1c231df2a 100644 --- a/src/LightApp/LightApp_Application.cxx +++ b/src/LightApp/LightApp_Application.cxx @@ -138,6 +138,9 @@ static const char* imageEmptyIcon[] = { int LightApp_Application::lastStudyId = 0; +/*! + \return last global id of study +*/ int LightApp_Application::studyId() { return LightApp_Application::lastStudyId; @@ -149,11 +152,12 @@ extern "C" LIGHTAPP_EXPORT SUIT_Application* createApplication() return new LightApp_Application(); } +/*! \var global preferences of LightApp */ LightApp_Preferences* LightApp_Application::_prefs_ = 0; -/* - Class : LightApp_Application - Description : Application containing LightApp module +/*! + \class LightApp_Application + Application containing LightApp module */ /*!Constructor.*/ @@ -358,6 +362,10 @@ bool LightApp_Application::activateModule( const QString& modName ) return true; } +/*! + Opens other study into active Study. If Study is empty - creates it. + \param theName - name of study +*/ bool LightApp_Application::useStudy(const QString& theName) { createEmptyStudy(); @@ -658,10 +666,9 @@ void LightApp_Application::onNewWindow() createViewManager( type ); } -//======================================================================= -// name : onNewDoc -/*! Purpose : SLOT. Create new document*/ -//======================================================================= +/*! + SLOT: Creates new document +*/ void LightApp_Application::onNewDoc() { SUIT_Study* study = activeStudy(); @@ -677,10 +684,9 @@ void LightApp_Application::onNewDoc() } } -//======================================================================= -// name : onOpenDoc -/*! Purpose : SLOT. Open new document*/ -//======================================================================= +/*! + SLOT: Opens new document +*/ void LightApp_Application::onOpenDoc() { SUIT_Study* study = activeStudy(); @@ -696,7 +702,11 @@ void LightApp_Application::onOpenDoc() } #include "SUIT_MessageBox.h" -/*! Purpose : SLOT. Open new document with \a aName.*/ + +/*! + SLOT: Opens new document. + \param aName - name of file +*/ bool LightApp_Application::onOpenDoc( const QString& aName ) { bool isAlreadyOpen = false; @@ -763,10 +773,9 @@ bool LightApp_Application::onOpenDoc( const QString& aName ) return res; } -//======================================================================= -// name : onHelpAbout -/*! Purpose : SLOT. Display "About" message box*/ -//======================================================================= +/*! + SLOT: Displays "About" message box +*/ void LightApp_Application::onHelpAbout() { LightApp_AboutDlg* dlg = new LightApp_AboutDlg( applicationName(), applicationVersion(), desktop() ); @@ -774,7 +783,10 @@ void LightApp_Application::onHelpAbout() delete dlg; } -/*!SLOT. Load document with \a aName.*/ +/*! + SLOT: Loads document + \param aName - name of document +*/ bool LightApp_Application::onLoadDoc( const QString& aName ) { bool res = CAM_Application::onLoadDoc( aName ); @@ -791,7 +803,10 @@ bool LightApp_Application::onLoadDoc( const QString& aName ) return res; } -/*!Private SLOT. Selection.*/ +/*! + Private SLOT: Called on selection is changed + Dispatchs active module that selection is changed +*/ void LightApp_Application::onSelection() { onSelectionChanged(); @@ -800,9 +815,10 @@ void LightApp_Application::onSelection() ((LightApp_Module*)activeModule())->selectionChanged(); } -/*!Set active study. - *\param study - SUIT_Study. - */ +/*! + Sets active study. + \param study - SUIT_Study. +*/ void LightApp_Application::setActiveStudy( SUIT_Study* study ) { CAM_Application::setActiveStudy( study ); @@ -810,10 +826,9 @@ void LightApp_Application::setActiveStudy( SUIT_Study* study ) activateWindows(); } -//======================================================================= -// name : updateCommandsStatus -/*! Purpose : Enable/Disable menu items and toolbar buttons. Rebuild menu*/ -//======================================================================= +/*! + Enables/Disables menu items and toolbar buttons. Rebuild menu +*/ void LightApp_Application::updateCommandsStatus() { CAM_Application::updateCommandsStatus(); @@ -844,7 +859,10 @@ void LightApp_Application::updateCommandsStatus() #endif } -// Helps to execute command +/*! + \class RunBrowser + Runs system command in separate thread +*/ class RunBrowser: public QThread { public: @@ -886,10 +904,9 @@ private: LightApp_Application* myLApp; }; -//======================================================================= -// name : onHelpContentsModule -/*! Purpose : SLOT. Display help contents for choosen module*/ -//======================================================================= +/*! + SLOT: Displays help contents for choosen module +*/ void LightApp_Application::onHelpContentsModule() { const QAction* obj = (QAction*) sender(); @@ -917,10 +934,9 @@ void LightApp_Application::onHelpContentsModule() } } -//======================================================================= -// name : onHelpContextModule -/*! Purpose : SLOT. Display help contents for choosen dialog*/ -//======================================================================= +/*! + SLOT: Displays help contents for choosen dialog +*/ void LightApp_Application::onHelpContextModule(const QString& theComponentName, const QString& theFileName) { QCString dir = getenv( theComponentName + "_ROOT_DIR"); @@ -943,16 +959,19 @@ void LightApp_Application::onHelpContextModule(const QString& theComponentName, } } -/*!Sets enable or disable some actions on selection changed.*/ +/*! + Sets enable or disable some actions on selection changed. +*/ void LightApp_Application::onSelectionChanged() { } -/*!Return window. - *\param flag - key for window - *\param studyId - study id - * Flag used how identificator of window in windows list. - */ +/*! + \return window by key + \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; @@ -972,12 +991,13 @@ QWidget* LightApp_Application::window( const int flag, const int studyId ) const return wid; } -/*!Adds window to application. - *\param wid - QWidget - *\param flag - key wor window - *\param studyId - study id - * Flag used how identificator of window in windows list. - */ +/*! + Adds window to application. + \param wid - QWidget + \param flag - key for window + \param studyId - study id + Flag used how identificator of window in windows list. +*/ void LightApp_Application::addWindow( QWidget* wid, const int flag, const int studyId ) { if ( !wid ) @@ -1034,11 +1054,12 @@ void LightApp_Application::addWindow( QWidget* wid, const int flag, const int st setWindowShown( flag, !myWindows[flag]->isEmpty() ); } -/*!Remove window from application. - *\param flag - key wor window - *\param studyId - study id - * Flag used how identificator of window in windows list. - */ +/*! + Removes window from application. + \param flag - key for window + \param studyId - study id + Flag used how identificator of window in windows list. +*/ void LightApp_Application::removeWindow( const int flag, const int studyId ) { if ( !myWindows.contains( flag ) ) @@ -1060,11 +1081,12 @@ void LightApp_Application::removeWindow( const int flag, const int studyId ) setWindowShown( flag, !myWindows[flag]->isEmpty() ); } -/*!Gets window. - *\param flag - key wor window - *\param studyId - study id - * Flag used how identificator of window in windows list. - */ +/*! + Gets window. + \param flag - key for window + \param studyId - study id + Flag used how identificator of window in windows list. +*/ QWidget* LightApp_Application::getWindow( const int flag, const int studyId ) { QWidget* wid = window( flag, studyId ); @@ -1074,7 +1096,10 @@ QWidget* LightApp_Application::getWindow( const int flag, const int studyId ) return wid; } -/*!Check is window visible?(with identificator \a type)*/ +/*! + \return is window visible + \param type - flag of window +*/ bool LightApp_Application::isWindowVisible( const int type ) const { bool res = false; @@ -1086,10 +1111,11 @@ bool LightApp_Application::isWindowVisible( const int type ) const return res; } -/*!Sets window show or hide. - *\param type - window identificator. - *\param on - true/false (window show/hide) - */ +/*! + Sets window show or hide. + \param type - window identificator. + \param on - true/false (window show/hide) +*/ void LightApp_Application::setWindowShown( const int type, const bool on ) { if ( !desktop() || !myWindows.contains( type ) ) @@ -1106,7 +1132,9 @@ void LightApp_Application::setWindowShown( const int type, const bool on ) } } -/*!Gets "ObjectBrowser".*/ +/*! + \return Object Browser +*/ OB_Browser* LightApp_Application::objectBrowser() { OB_Browser* ob = 0; @@ -1116,7 +1144,9 @@ OB_Browser* LightApp_Application::objectBrowser() return ob; } -/*!Gets "LogWindow".*/ +/*! + \return Log Window +*/ LogWindow* LightApp_Application::logWindow() { LogWindow* lw = 0; @@ -1127,7 +1157,9 @@ LogWindow* LightApp_Application::logWindow() } #ifndef DISABLE_PYCONSOLE -/*!Get "PythonConsole"*/ +/*! + \return Python Console +*/ PythonConsole* LightApp_Application::pythonConsole() { PythonConsole* console = 0; @@ -1138,7 +1170,10 @@ PythonConsole* LightApp_Application::pythonConsole() } #endif -/*!Update obect browser*/ +/*! + Updates object browser and maybe data models + \param updateModels - if it is true, then data models are updated +*/ void LightApp_Application::updateObjectBrowser( const bool updateModels ) { // update existing data models @@ -1169,13 +1204,19 @@ void LightApp_Application::updateObjectBrowser( const bool updateModels ) } } -/*!Gets preferences.*/ +/*! + \return preferences +*/ LightApp_Preferences* LightApp_Application::preferences() const { return preferences( false ); } -/*!Gets view manager*/ +/*! + \return first view manager of some type + \param vmType - type of view manager + \param create - is it necessary to create view manager in case, when there is no manager of such type +*/ SUIT_ViewManager* LightApp_Application::getViewManager( const QString& vmType, const bool create ) { SUIT_ViewManager* aVM = viewManager( vmType ); @@ -1197,7 +1238,10 @@ SUIT_ViewManager* LightApp_Application::getViewManager( const QString& vmType, c return aVM; } -/*!Create view manager.*/ +/*! + Creates view manager of some type + \param vmType - type of view manager +*/ SUIT_ViewManager* LightApp_Application::createViewManager( const QString& vmType ) { SUIT_ResourceMgr* resMgr = resourceMgr(); @@ -1294,16 +1338,18 @@ SUIT_ViewManager* LightApp_Application::createViewManager( const QString& vmType return viewMgr; } -//======================================================================= -// name : onCloseView -/*! Purpose : SLOT. Remove view manager from application*/ -//======================================================================= +/*! + SLOT: Removes view manager from application +*/ void LightApp_Application::onCloseView( SUIT_ViewManager* theVM ) { removeViewManager( theVM ); } -/*!Protected SLOT. On study created.*/ +/*! + Protected SLOT: On study created. + \param theStudy - just created study +*/ void LightApp_Application::onStudyCreated( SUIT_Study* theStudy ) { SUIT_DataObject* aRoot = 0; @@ -1321,7 +1367,10 @@ void LightApp_Application::onStudyCreated( SUIT_Study* theStudy ) activateWindows(); } -/*!Protected SLOT. On study opened.*/ +/*! + Protected SLOT: On study opened. + \param theStudy - just opened study +*/ void LightApp_Application::onStudyOpened( SUIT_Study* theStudy ) { SUIT_DataObject* aRoot = 0; @@ -1380,7 +1429,9 @@ QString LightApp_Application::getFileFilter() const return "(*.hdf)"; } -/*! Gets file name*/ +/*! + Shows file dialog and return user selected file name +*/ QString LightApp_Application::getFileName( bool open, const QString& initial, const QString& filters, const QString& caption, QWidget* parent ) { @@ -1470,10 +1521,9 @@ void LightApp_Application::updateActions() updateCommandsStatus(); } -//======================================================================= -// name : createNewStudy -/*! Purpose : Create new study*/ -//======================================================================= +/*! + Creates new study +*/ SUIT_Study* LightApp_Application::createNewStudy() { LightApp_Application::lastStudyId++; @@ -1489,7 +1539,10 @@ SUIT_Study* LightApp_Application::createNewStudy() return aStudy; } -/*!Create window.*/ +/*! + Creates window by flag. + \param flag - identificator of window type +*/ QWidget* LightApp_Application::createWindow( const int flag ) { QWidget* wid = 0; @@ -1533,8 +1586,9 @@ QWidget* LightApp_Application::createWindow( const int flag ) return wid; } -/*!Default windows(Object Browser, Python Console). - * Adds to map \a aMap. +/*! + \return default windows( Object Browser, Python Console ) + Adds to map \a aMap. */ void LightApp_Application::defaultWindows( QMap& aMap ) const { @@ -1545,15 +1599,16 @@ void LightApp_Application::defaultWindows( QMap& aMap ) const // aMap.insert( WT_LogWindow, Qt::DockBottom ); } -/*!Default view manager.*/ +/*!Default view managers*/ void LightApp_Application::defaultViewManagers( QStringList& ) const { /*!Do nothing.*/ } -/*!Gets preferences. - * Create preferences, if \a crt = true. - */ +/*! + \return preferences. + Create preferences, if \a crt = true. +*/ LightApp_Preferences* LightApp_Application::preferences( const bool crt ) const { if ( myPrefs ) @@ -1610,7 +1665,9 @@ LightApp_Preferences* LightApp_Application::preferences( const bool crt ) const return myPrefs; } -/*!Add new module to application.*/ +/*! + Adds new module to application +*/ void LightApp_Application::moduleAdded( CAM_Module* mod ) { CAM_Application::moduleAdded( mod ); @@ -1627,7 +1684,9 @@ void LightApp_Application::moduleAdded( CAM_Module* mod ) } } -/*!Create preferences.*/ +/*! + Create preferences +*/ void LightApp_Application::createPreferences( LightApp_Preferences* pref ) { if ( !pref ) @@ -1783,7 +1842,11 @@ void LightApp_Application::createPreferences( LightApp_Preferences* pref ) "ObjectBrowser", "auto_size" ); } -/*!Changed preferences */ +/*! + Changes appearance of application according to changed preferences + \param sec - section + \param param - name of changed parameter +*/ void LightApp_Application::preferencesChanged( const QString& sec, const QString& param ) { SUIT_ResourceMgr* resMgr = resourceMgr(); @@ -1886,7 +1949,9 @@ void LightApp_Application::preferencesChanged( const QString& sec, const QString #endif } -/*!Save preferences */ +/*! + Saves preferences +*/ void LightApp_Application::savePreferences() { saveWindowsGeometry(); @@ -1899,7 +1964,9 @@ void LightApp_Application::savePreferences() } } -/*!Update desktop title.*/ +/*! + Updates desktop title +*/ void LightApp_Application::updateDesktopTitle() { QString aTitle = applicationName(); QString aVer = applicationVersion(); @@ -1914,7 +1981,9 @@ void LightApp_Application::updateDesktopTitle() { desktop()->setCaption( aTitle ); } -/*!Update windows after close document.*/ +/*! + Updates windows after close document +*/ void LightApp_Application::afterCloseDoc() { updateWindows(); @@ -1922,7 +1991,9 @@ void LightApp_Application::afterCloseDoc() CAM_Application::afterCloseDoc(); } -/*!Update module action.*/ +/*! + Updates actions of active module +*/ void LightApp_Application::updateModuleActions() { QString modName; @@ -1933,9 +2004,10 @@ void LightApp_Application::updateModuleActions() myActions[modName]->setOn( true ); } -/*!Gets current windows. - *\param winMap - output current windows map. - */ +/*! + Gets current windows. + \param winMap - output current windows map. +*/ void LightApp_Application::currentWindows( QMap& winMap ) const { winMap.clear(); @@ -1948,9 +2020,10 @@ void LightApp_Application::currentWindows( QMap& winMap ) const defaultWindows( winMap ); } -/*!Gets current view managers. - *\param lst - output current view managers list. - */ +/*! + Gets current view managers. + \param lst - output current view managers list. +*/ void LightApp_Application::currentViewManagers( QStringList& lst ) const { lst.clear(); @@ -1963,7 +2036,9 @@ void LightApp_Application::currentViewManagers( QStringList& lst ) const defaultViewManagers( lst ); } -/*!Update windows.*/ +/*! + Updates windows +*/ void LightApp_Application::updateWindows() { QMap winMap; @@ -1988,7 +2063,9 @@ void LightApp_Application::updateWindows() } } -/*!Update view managers.*/ +/*! + Updates view managers +*/ void LightApp_Application::updateViewManagers() { QStringList lst; @@ -1998,7 +2075,9 @@ void LightApp_Application::updateViewManagers() getViewManager( *it, true ); } -/*!Load windows geometry.*/ +/*! + Loads windows geometry +*/ void LightApp_Application::loadWindowsGeometry() { bool store = resourceMgr()->booleanValue( "Study", "store_positions", true ); @@ -2026,7 +2105,9 @@ void LightApp_Application::loadWindowsGeometry() dockMgr->restoreGeometry(); } -/*!Save windows geometry.*/ +/*! + Saves windows geometry +*/ void LightApp_Application::saveWindowsGeometry() { bool store = resourceMgr()->booleanValue( "Study", "store_positions", true ); @@ -2054,7 +2135,9 @@ void LightApp_Application::saveWindowsGeometry() dockMgr->saveGeometry( resourceMgr(), section, false ); } -/*!Activate windows.*/ +/*! + Activates windows +*/ void LightApp_Application::activateWindows() { if ( activeStudy() ) @@ -2064,7 +2147,9 @@ void LightApp_Application::activateWindows() } } -/*!Adds icon names for modules.*/ +/*! + Adds icon names for modules +*/ void LightApp_Application::moduleIconNames( QMap& iconMap ) const { iconMap.clear(); @@ -2092,7 +2177,9 @@ void LightApp_Application::moduleIconNames( QMap& iconMap ) co } } -/*!Insert items in popup, which necessary for current application*/ +/*! + Inserts 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 ); @@ -2105,7 +2192,9 @@ void LightApp_Application::contextMenuPopup( const QString& type, QPopupMenu* th thePopup->insertItem( tr( "MEN_REFRESH" ), this, SLOT( onRefresh() ) ); } -/*!Create empty study.*/ +/*! + Create empty study +*/ void LightApp_Application::createEmptyStudy() { CAM_Application::createEmptyStudy(); @@ -2113,7 +2202,10 @@ void LightApp_Application::createEmptyStudy() objectBrowser()->updateTree(); } -/*!Activate module \a mod.*/ +/*! + Activates module + \param mod - module to be activated +*/ bool LightApp_Application::activateModule( CAM_Module* mod ) { bool res = CAM_Application::activateModule( mod ); @@ -2122,13 +2214,17 @@ bool LightApp_Application::activateModule( CAM_Module* mod ) return res; } -/*!return keyborad accelerators manager object */ +/*! + \return keyborad accelerators manager object +*/ SUIT_Accel* LightApp_Application::accel() const { return myAccel; } -/*! remove dead widget container from map */ +/*! + Removes dead widget container from map +*/ void LightApp_Application::onWCDestroyed( QObject* ob ) { // remove destroyed widget container from windows map @@ -2143,7 +2239,9 @@ void LightApp_Application::onWCDestroyed( QObject* ob ) } } -/*! redefined to connect */ +/*! + Connects just added view manager +*/ void LightApp_Application::addViewManager( SUIT_ViewManager* vm ) { connect( vm, SIGNAL( lastViewClosed( SUIT_ViewManager* ) ), @@ -2151,7 +2249,9 @@ void LightApp_Application::addViewManager( SUIT_ViewManager* vm ) STD_Application::addViewManager( vm ); } -/*! redefined to remove view manager from memory */ +/*! + Remove view manager from memory +*/ void LightApp_Application::removeViewManager( SUIT_ViewManager* vm ) { disconnect( vm, SIGNAL( lastViewClosed( SUIT_ViewManager* ) ), @@ -2160,7 +2260,9 @@ void LightApp_Application::removeViewManager( SUIT_ViewManager* vm ) delete vm; } -/*! rename active window of desktop */ +/*! + Renames active window of desktop +*/ void LightApp_Application::onRenameWindow() { if( !desktop() ) @@ -2176,6 +2278,10 @@ void LightApp_Application::onRenameWindow() w->setCaption( name ); } +/*! + \return if the library of module exists + \param moduleTitle - title of module +*/ bool LightApp_Application::isLibExists( const QString& moduleTitle ) const { if( moduleTitle.isEmpty() ) @@ -2199,7 +2305,9 @@ bool LightApp_Application::isLibExists( const QString& moduleTitle ) const return false; } -/*! default name for an active study */ +/*! + \return default name for an active study +*/ void LightApp_Application::setDefaultStudyName( const QString& theName ) { QStringList anInfoList; @@ -2227,6 +2335,9 @@ void LightApp_Application::onVisibilityChanged( bool visible ) } } +/*! + Custom event handler +*/ bool LightApp_Application::event( QEvent* e ) { if( e && e->type()==2000 ) diff --git a/src/LightApp/LightApp_DataModel.cxx b/src/LightApp/LightApp_DataModel.cxx index 3eee894b6..6de670118 100644 --- a/src/LightApp/LightApp_DataModel.cxx +++ b/src/LightApp/LightApp_DataModel.cxx @@ -17,76 +17,67 @@ #include #include -//======================================================================= -// name : LightApp_DataModel::LightApp_DataModel -/*!Purpose : Constructor*/ -//======================================================================= +/*! + Constructor +*/ LightApp_DataModel::LightApp_DataModel( CAM_Module* theModule ) : CAM_DataModel( theModule ) { } -//======================================================================= -// name : LightApp_DataModel::~LightApp_DataModel -/*! Purpose : Destructor*/ -//======================================================================= +/*! + Destructor +*/ LightApp_DataModel::~LightApp_DataModel() { } -//================================================================ -// Function : open -/*! Purpose : Emit opened()*/ -//================================================================ +/*! + Emit opened() +*/ 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()*/ -//================================================================ +/*! + Emit saved() +*/ bool LightApp_DataModel::save( QStringList& ) { emit saved(); return true; } -//================================================================ -// Function : saveAs -/*! Purpose : Emit saved()*/ -//================================================================ +/*! + Emit saved() +*/ bool LightApp_DataModel::saveAs( const QString&, CAM_Study*, QStringList& ) { emit saved(); return true; } -//================================================================ -// Function : close -/*! Purpose : Emit closed()*/ -//================================================================ +/*! + Emit closed() +*/ bool LightApp_DataModel::close() { emit closed(); return true; } -//================================================================ -// Function : build -/*! Purpose : Build whole data model tree */ -//================================================================ +/*! + Build whole data model tree +*/ void LightApp_DataModel::build() { } -//================================================================ -// Function : updateWidgets -/*! Purpose : Update data model presentation in some widgets - * (for example, in object browser*/ -//================================================================ +/*! + Updates data model presentation in some widgets (for example, in object browser +*/ void LightApp_DataModel::updateWidgets() { LightApp_Application* app = dynamic_cast( module()->application() ); @@ -94,10 +85,9 @@ void LightApp_DataModel::updateWidgets() app->objectBrowser()->updateTree( 0, false ); } -//================================================================ -// Function : update -/*! Purpose : Update application (empty virtual function).*/ -//================================================================ +/*! + Default behaviour of data model update for light modules +*/ void LightApp_DataModel::update( LightApp_DataObject*, LightApp_Study* ) { LightApp_ModuleObject* modelRoot = dynamic_cast( root() ); @@ -114,20 +104,17 @@ void LightApp_DataModel::update( LightApp_DataObject*, LightApp_Study* ) delete it.current(); } -//================================================================ -// Function : getModule -/*! Purpose : gets module*/ -//================================================================ - +/*! + \return corresponding module +*/ LightApp_Module* LightApp_DataModel::getModule() const { return dynamic_cast( module() ); } -//================================================================ -// Function : getStudy -/*! Purpose : gets study */ -//================================================================ +/*! + \return corresponding study +*/ LightApp_Study* LightApp_DataModel::getStudy() const { LightApp_RootObject* aRoot = dynamic_cast( root()->root() ); @@ -136,19 +123,17 @@ LightApp_Study* LightApp_DataModel::getStudy() const return aRoot->study(); } -//================================================================ -// Function : isModified -/*! Purpose : default implementation, always returns false so as not to mask study's isModified()*/ -//================================================================ +/*! + default implementation, always returns false so as not to mask study's isModified() +*/ bool LightApp_DataModel::isModified() const { return false; } -//================================================================ -// Function : isSaved -/*! Purpose : default implementation, always returns true so as not to mask study's isSaved()*/ -//================================================================ +/*! + default implementation, always returns true so as not to mask study's isSaved() +*/ bool LightApp_DataModel::isSaved() const { return true; diff --git a/src/LightApp/LightApp_DataObject.cxx b/src/LightApp/LightApp_DataObject.cxx index 831385908..f0e9de6a5 100644 --- a/src/LightApp/LightApp_DataObject.cxx +++ b/src/LightApp/LightApp_DataObject.cxx @@ -73,10 +73,6 @@ bool LightApp_DataObject::Key::isEqual( const SUIT_DataObjectKey* other ) const return myEntry == that->myEntry; } -/* - Class: LightApp_DataObject - Level: Public -*/ /*!Constructor. Initialize by \a parent*/ LightApp_DataObject::LightApp_DataObject( SUIT_DataObject* parent ) : CAM_DataObject( parent ), myCompObject( 0 ), myCompDataType( "" ) @@ -142,10 +138,7 @@ QString LightApp_DataObject::componentDataType() const return myCompDataType; } -/* - Class: LightApp_ModuleObject - Level: Public -*/ + /*!Constructor.Initialize by \a parent.*/ LightApp_ModuleObject::LightApp_ModuleObject( SUIT_DataObject* parent ) diff --git a/src/LightApp/LightApp_Dialog.cxx b/src/LightApp/LightApp_Dialog.cxx index b77f62f01..51d751096 100644 --- a/src/LightApp/LightApp_Dialog.cxx +++ b/src/LightApp/LightApp_Dialog.cxx @@ -26,15 +26,9 @@ #include #include -/* - Class : LightApp_Dialog - Description : Base class for all dialogs +/*! + Constructor */ - -//======================================================================= -// name : LightApp_Dialog -// Purpose : Constructor -//======================================================================= LightApp_Dialog::LightApp_Dialog( QWidget* parent, const char* name, bool modal, bool allowResize, const int f, WFlags wf ) : QtxDialog( parent, name, modal, allowResize, f, wf ), @@ -44,36 +38,33 @@ LightApp_Dialog::LightApp_Dialog( QWidget* parent, const char* name, bool modal, setObjectPixmap( "LightApp", tr( "ICON_SELECT" ) ); } -//======================================================================= -// name : ~LightApp_Dialog -// Purpose : Destructor -//======================================================================= +/*! + Destructor +*/ LightApp_Dialog::~LightApp_Dialog() { } -//======================================================================= -// name : show -// Purpose : -//======================================================================= +/*! + Show dialog +*/ void LightApp_Dialog::show() { QtxDialog::show(); } -//======================================================================= -// name : isExclusive -// Purpose : -//======================================================================= +/*! + \return isExclusive status of selection buttons +*/ bool LightApp_Dialog::isExclusive() const { return myIsExclusive; } -//======================================================================= -// name : updateButtons -// Purpose : -//======================================================================= +/*! + Updates "on" state of buttons according to special button + \param _id - id of special button (if it is -1, then first selected button will be treated as special) +*/ void LightApp_Dialog::updateButtons( const int _id ) { if( !myIsExclusive ) @@ -97,38 +88,39 @@ void LightApp_Dialog::updateButtons( const int _id ) } } -//======================================================================= -// name : setExclusive -// Purpose : -//======================================================================= +/*! + Sets isExclusive status of selection buttons + \param ex - new value of isExclusive status +*/ void LightApp_Dialog::setExclusive( const bool ex ) { myIsExclusive = ex; updateButtons(); } -//======================================================================= -// name : showObject -// Purpose : -//======================================================================= +/*! + Shows object selection widget + \param id - identificator of object selection widget +*/ void LightApp_Dialog::showObject( const int id ) { setObjectShown( id, true ); } -//======================================================================= -// name : hideObject -// Purpose : -//======================================================================= +/*! + Hides object selection widget + \param id - identificator of object selection widget +*/ void LightApp_Dialog::hideObject( const int id ) { setObjectShown( id, false ); } -//======================================================================= -// name : setObjectShown -// Purpose : -//======================================================================= +/*! + Shows/hides object selection widget + \param id - identificator of object selection widget + \param shown - if it is true, widget will be shown +*/ void LightApp_Dialog::setObjectShown( const int id, const bool shown ) { if( myObjects.contains( id ) && isObjectShown( id )!=shown ) @@ -142,19 +134,20 @@ void LightApp_Dialog::setObjectShown( const int id, const bool shown ) } } -//======================================================================= -// name : isObjectShown -// Purpose : -//======================================================================= +/*! + \return isShown state of object selection widget + \param id - identificator of object selection widget +*/ bool LightApp_Dialog::isObjectShown( const int id ) const { return myObjects.contains( id ) && myObjects[ id ].myEdit->isShown(); } -//======================================================================= -// name : setObjectEnabled -// Purpose : -//======================================================================= +/*! + Change enable state of object selection widget + \param id - identificator of object selection widget + \param en - new value of enable state +*/ void LightApp_Dialog::setObjectEnabled( const int id, const bool en ) { if( myObjects.contains( id ) && isObjectEnabled( id )!=en ) @@ -168,19 +161,22 @@ void LightApp_Dialog::setObjectEnabled( const int id, const bool en ) } } -//======================================================================= -// name : isObjectEnabled -// Purpose : -//======================================================================= +/*! + \return enable state of object selection widget + \param id - identificator of object selection widget +*/ bool LightApp_Dialog::isObjectEnabled( const int id ) const { return myObjects.contains( id ) && myObjects[ id ].myEdit->isEnabled(); } -//======================================================================= -// name : selectObject -// Purpose : -//======================================================================= +/*! + Passes to all active widgets name, type and id of selected object + \param name - name of selected object + \param type - type of selected object + \param id - id of selected object + \param update - is need to update selection description string +*/ void LightApp_Dialog::selectObject( const QString& name, const int type, const QString& id, const bool update ) { QStringList names; names.append( name ); @@ -189,10 +185,13 @@ void LightApp_Dialog::selectObject( const QString& name, const int type, const Q selectObject( names, types, ids, update ); } -//======================================================================= -// name : selectObject -// Purpose : -//======================================================================= +/*! + Passes to all active widgets names, types and ids of selected objects + \param _names - names of selected objects + \param _types - types of selected objects + \param _ids - ids of selected objects + \param update - is need to update selection description string +*/ void LightApp_Dialog::selectObject( const QStringList& _names, const TypesList& _types, const QStringList& _ids, @@ -205,19 +204,19 @@ void LightApp_Dialog::selectObject( const QStringList& _names, selectObject( anIt.key(), _names, _types, _ids, update ); } -//======================================================================= -// name : hasSelection -// Purpose : -//======================================================================= +/*! + \return true if widget has selection + \param id - identificator of object selection widget +*/ bool LightApp_Dialog::hasSelection( const int id ) const { return myObjects.contains( id ) && !myObjects[ id ].myIds.isEmpty(); } -//======================================================================= -// name : clearSelection -// Purpose : -//======================================================================= +/*! + Clears selection of widget + \param id - identificator of object selection widget +*/ void LightApp_Dialog::clearSelection( const int id ) { if( id==-1 ) @@ -239,10 +238,11 @@ void LightApp_Dialog::clearSelection( const int id ) } } -//======================================================================= -// name : objectWg -// Purpose : -//======================================================================= +/*! + \return object selection widget + \param theId - identificator of object selection widget + \param theWgId may be "Label", "Btn" or "Control" +*/ QWidget* LightApp_Dialog::objectWg( const int theId, const int theWgId ) const { QWidget* aResWg = 0; @@ -258,39 +258,41 @@ QWidget* LightApp_Dialog::objectWg( const int theId, const int theWgId ) const return aResWg; } -//======================================================================= -// name : objectText -// Purpose : -//======================================================================= +/*! + \return object selection widget text + \param theId - identificator of object selection widget +*/ QString LightApp_Dialog::objectText( const int theId ) const { return myObjects.contains( theId ) ? myObjects[ theId ].myEdit->text() : ""; } -//======================================================================= -// name : setObjectText -// Purpose : -//======================================================================= +/*! + Sets object selection widget text + \param theId - identificator of object selection widget + \param theText - new text +*/ void LightApp_Dialog::setObjectText( const int theId, const QString& theText ) { if ( myObjects.contains( theId ) ) myObjects[ theId ].myEdit->setText( theText ); } -//======================================================================= -// name : selectedObject -// Purpose : -//======================================================================= +/*! + \return objects selected by widget + \param id - identificator of object selection widget + \param list - list to be filled by selected objects +*/ void LightApp_Dialog::selectedObject( const int id, QStringList& list ) const { if( myObjects.contains( id ) ) list = myObjects[ id ].myIds; } -//======================================================================= -// name : selectedObject -// Purpose : -//======================================================================= +/*! + \return selected object id + \param id - identificator of object selection widget +*/ QString LightApp_Dialog::selectedObject( const int id ) const { if ( myObjects.contains( id ) && myObjects[ id ].myIds.count() > 0 ) @@ -299,10 +301,10 @@ QString LightApp_Dialog::selectedObject( const int id ) const return ""; } -//======================================================================= -// name : objectSelection -// Purpose : -//======================================================================= +/*! + \return all selected objects + \param objs - map: widget id -> string id to be filled with selected objects +*/ void LightApp_Dialog::objectSelection( SelectedObjects& objs ) const { //objs.clear(); @@ -317,10 +319,13 @@ void LightApp_Dialog::objectSelection( SelectedObjects& objs ) const } } -//======================================================================= -// name : createObject -// Purpose : -//======================================================================= +/*! + Creates object selection widget + \return id + \label - label text + \parent - parent object + \id - proposed id for widget (if it is less than 0, the free id will be used) +*/ int LightApp_Dialog::createObject( const QString& label, QWidget* parent, const int id ) { int nid = id; @@ -351,20 +356,22 @@ int LightApp_Dialog::createObject( const QString& label, QWidget* parent, const return nid; } -//======================================================================= -// name : renameObject -// Purpose : -//======================================================================= +/*! + Changes label of object selection widget + \param id - identificator of object selection widget + \param label - new text of label +*/ void LightApp_Dialog::renameObject( const int id, const QString& label ) { if( myObjects.contains( id ) ) myObjects[ id ].myLabel->setText( label ); } -//======================================================================= -// name : setObjectType -// Purpose : -//======================================================================= +/*! + Sets possible types for widget + \param id - identificator of object selection widget + \param type1,... - type +*/ void LightApp_Dialog::setObjectType( const int id, const int type1, ... ) { TypesList types; @@ -379,10 +386,11 @@ void LightApp_Dialog::setObjectType( const int id, const int type1, ... ) setObjectType( id, types ); } -//======================================================================= -// name : setObjectType -// Purpose : -//======================================================================= +/*! + Sets possible types for widget + \param id - identificator of object selection widget + \param list - list of possible types +*/ void LightApp_Dialog::setObjectType( const int id, const TypesList& list ) { if( !myObjects.contains( id ) ) @@ -406,10 +414,11 @@ void LightApp_Dialog::setObjectType( const int id, const TypesList& list ) updateObject( id ); } -//======================================================================= -// name : addObjectType -// Purpose : -//======================================================================= +/*! + Adds new possible types to object selection widget + \param id - identificator of object selection widget + \param type1, ... - new types +*/ void LightApp_Dialog::addObjectType( const int id, const int type1, const int, ... ) { TypesList types; objectTypes( id, types ); @@ -424,20 +433,22 @@ void LightApp_Dialog::addObjectType( const int id, const int type1, const int, . setObjectType( id, types ); } -//======================================================================= -// name : addObjectType -// Purpose : -//======================================================================= +/*! + Adds new possible types to object selection widget + \param id - identificator of object selection widget + \param list - new types +*/ void LightApp_Dialog::addObjectType( const int id, const TypesList& list ) { TypesList types = list; objectTypes( id, types ); setObjectType( id, types ); } -//======================================================================= -// name : addObjectType -// Purpose : -//======================================================================= +/*! + Adds new possible type to object selection widget + \param id - identificator of object selection widget + \param type - new type +*/ void LightApp_Dialog::addObjectType( const int id, const int type ) { TypesList types; objectTypes( id, types ); @@ -445,20 +456,21 @@ void LightApp_Dialog::addObjectType( const int id, const int type ) setObjectType( id, types ); } -//======================================================================= -// name : removeObjectType -// Purpose : -//======================================================================= +/*! + Clears list of possibles types for object selection widget + \param id - identificator of object selection widget +*/ void LightApp_Dialog::removeObjectType( const int id ) { TypesList types; setObjectType( id, types ); } -//======================================================================= -// name : removeObjectType -// Purpose : -//======================================================================= +/*! + Removes types from list of possibles for object selection widget + \param id - identificator of object selection widget + \param list - list of types to be removed +*/ void LightApp_Dialog::removeObjectType( const int id, const TypesList& list ) { if( !myObjects.contains( id ) ) @@ -485,20 +497,22 @@ void LightApp_Dialog::removeObjectType( const int id, const TypesList& list ) updateObject( id ); } -//======================================================================= -// name : removeObjectType -// Purpose : -//======================================================================= +/*! + Removes type from list of possibles for object selection widget + \param id - identificator of object selection widget + \param type - type to be removed +*/ void LightApp_Dialog::removeObjectType( const int id, const int type ) { TypesList list; list.append( type ); removeObjectType( id, list ); } -//======================================================================= -// name : hasObjectType -// Purpose : -//======================================================================= +/*! + \return true if widget has such type + \param id - identificator of object selection widget + \param type - type to be checked +*/ bool LightApp_Dialog::hasObjectType( const int id, const int type ) const { if( myObjects.contains( id ) ) @@ -507,10 +521,11 @@ bool LightApp_Dialog::hasObjectType( const int id, const int type ) const return false; } -//======================================================================= -// name : objectTypes -// Purpose : -//======================================================================= +/*! + Returns list of possible types for widget + \param id - identificator of object selection widget + \param list - list to be filled with possible types +*/ void LightApp_Dialog::objectTypes( const int id, TypesList& list ) const { if( myObjects.contains( id ) ) @@ -522,10 +537,9 @@ void LightApp_Dialog::objectTypes( const int id, TypesList& list ) const } } -//======================================================================= -// name : onToggled -// Purpose : -//======================================================================= +/*! + SLOT: called if selection button is clicked +*/ void LightApp_Dialog::onToggled( bool on ) { QButton* but = ( QButton* )sender(); @@ -550,10 +564,11 @@ void LightApp_Dialog::onToggled( bool on ) emit objectDeactivated( id ); } -//======================================================================= -// name : updateObject -// Purpose : -//======================================================================= +/*! + Updates selection description of widget + \param id - identificator of object selection widget + \param emit_signal - if it is true, the signal "selection changed" is emitted +*/ void LightApp_Dialog::updateObject( const int id, bool emit_signal ) { if( hasSelection( id ) ) @@ -566,10 +581,13 @@ void LightApp_Dialog::updateObject( const int id, bool emit_signal ) } } -//======================================================================= -// name : filterTypes -// Purpose : -//======================================================================= +/*! + Finds in list possible types + \param id - identificator of object selection widget + \param names - list of selected objects names + \param types - list of selected objects types + \param ids - list of selected objects ids +*/ void LightApp_Dialog::filterTypes( const int id, QStringList& names, TypesList& types, QStringList& ids ) const { if( !myObjects.contains( id ) ) @@ -601,19 +619,18 @@ void LightApp_Dialog::filterTypes( const int id, QStringList& names, TypesList& ids = new_ids; } -//======================================================================= -// name : resMgr -// Purpose : -//======================================================================= +/*! + \return global resource manager +*/ SUIT_ResourceMgr* LightApp_Dialog::resMgr() const { return SUIT_Session::session()->resourceMgr(); } -//======================================================================= -// name : setObjectPixmap -// Purpose : -//======================================================================= +/*! + Sets pixmap for all object selection button + \param p - image +*/ void LightApp_Dialog::setObjectPixmap( const QPixmap& p ) { myPixmap = p; @@ -623,10 +640,11 @@ void LightApp_Dialog::setObjectPixmap( const QPixmap& p ) ( ( QToolButton* )anIt.data().myBtn )->setIconSet( p ); } -//======================================================================= -// name : setObjectPixmap -// Purpose : -//======================================================================= +/*! + Sets pixmap all for object selection button + \param section - name of section of resource manager + \param file - name of file +*/ void LightApp_Dialog::setObjectPixmap( const QString& section, const QString& file ) { SUIT_ResourceMgr* mgr = resMgr(); @@ -634,19 +652,19 @@ void LightApp_Dialog::setObjectPixmap( const QString& section, const QString& fi setObjectPixmap( mgr->loadPixmap( section, file ) ); } -//======================================================================= -// name : multipleSelection -// Purpose : -//======================================================================= +/*! + \return true, if it is enable multiple selection + \param id - identificator of object selection widget +*/ bool LightApp_Dialog::multipleSelection( const int id ) const { return nameIndication( id )!=OneName; } -//======================================================================= -// name : nameIndication -// Purpose : -//======================================================================= +/*! + \return type of name indication + \param id - identificator of object selection widget +*/ LightApp_Dialog::NameIndication LightApp_Dialog::nameIndication( const int id ) const { if( myObjects.contains( id ) ) @@ -655,10 +673,11 @@ LightApp_Dialog::NameIndication LightApp_Dialog::nameIndication( const int id ) return OneNameOrCount; } -//======================================================================= -// name : setNameIndication -// Purpose : -//======================================================================= +/*! + Sets type of name indication + \param id - identificator of object selection widget + \param ni - new type of name indication +*/ void LightApp_Dialog::setNameIndication( const int id, const NameIndication ni ) { if( id==-1 ) @@ -682,10 +701,12 @@ void LightApp_Dialog::setNameIndication( const int id, const NameIndication ni ) } } -//======================================================================= -// name : selectionDescription -// Purpose : -//======================================================================= +/*! + \return string representation of selection by selection data + \param names - list of selected objects names + \param types - list of selected objects types + \param ni - type of name indication +*/ QString LightApp_Dialog::selectionDescription( const QStringList& names, const TypesList& types, const NameIndication ni ) const { if( names.count()!=types.count() ) @@ -718,10 +739,10 @@ QString LightApp_Dialog::selectionDescription( const QStringList& names, const T return QString::null; } -//======================================================================= -// name : countOfTypes -// Purpose : -//======================================================================= +/*! + \return string representation of count of types + \param types - list of types +*/ QString LightApp_Dialog::countOfTypes( const TypesList& types ) const { QMap typesCount; @@ -743,39 +764,38 @@ QString LightApp_Dialog::countOfTypes( const TypesList& types ) const return typeCount.join( ", " ); } -//======================================================================= -// name : typeName -// Purpose : -//======================================================================= +/*! + \return reference to type name + \param type - integer id of type +*/ QString& LightApp_Dialog::typeName( const int type ) { return myTypeNames[ type ]; } -//======================================================================= -// name : typeName -// Purpose : -//======================================================================= +/*! + \return const reference to type name + \param type - integer id of type +*/ const QString& LightApp_Dialog::typeName( const int type ) const { return myTypeNames[ type ]; } -//======================================================================= -// name : activateObject -// Purpose : -//======================================================================= +/*! + Activates object selection widget + \param id - identificator of object selection widget +*/ void LightApp_Dialog::activateObject( const int theId ) { if ( myObjects.contains( theId ) && !myObjects[ theId ].myBtn->isOn() ) myObjects[ theId ].myBtn->toggle(); } -//======================================================================= -// name : deactivateAll -// Purpose : -//======================================================================= +/*! + Deactivates all object selection widgets +*/ void LightApp_Dialog::deactivateAll() { ObjectMap::iterator anIt = myObjects.begin(), @@ -787,10 +807,14 @@ void LightApp_Dialog::deactivateAll() } } -//======================================================================= -// name : selectObject -// Purpose : -//======================================================================= +/*! + Passes to widget name, type and id of selected object + \param id - identificator of object selection widget + \param name - name of selected object + \param type - type of selected object + \param selid - id of selected object + \param update - is need to update selection description string +*/ void LightApp_Dialog::selectObject( const int id, const QString& name, const int type, const QString& selid, const bool update ) { QStringList names; names.append( name ); @@ -799,10 +823,14 @@ void LightApp_Dialog::selectObject( const int id, const QString& name, const int selectObject( id, names, types, ids, update ); } -//======================================================================= -// name : selectObject -// Purpose : -//======================================================================= +/*! + Passes to widget names, types and ids of selected objects + \param id - identificator of object selection widget + \param _names - names of selected object + \param _types - types of selected object + \param _ids - ids of selected object + \param update - is need to update selection description string +*/ void LightApp_Dialog::selectObject( const int id, const QStringList& _names, const TypesList& _types, const QStringList& _ids, const bool update ) { @@ -824,20 +852,21 @@ void LightApp_Dialog::selectObject( const int id, const QStringList& _names, con emit selectionChanged( id ); } -//======================================================================= -// name : setReadOnly -// Purpose : -//======================================================================= +/*! + Sets read only state of object selection line edit + \param id - identificator of object selection widget + \param ro - new read only state +*/ void LightApp_Dialog::setReadOnly( const int id, const bool ro ) { if( myObjects.contains( id ) ) myObjects[ id ].myEdit->setReadOnly( nameIndication( id )==ListOfNames || nameIndication( id )==OneName ? ro : true ); } -//======================================================================= -// name : isReadOnly -// Purpose : -//======================================================================= +/*! + \return read only state of object selection line edit + \param id - identificator of object selection widget +*/ bool LightApp_Dialog::isReadOnly( const int id ) const { if( myObjects.contains( id ) ) @@ -845,11 +874,10 @@ bool LightApp_Dialog::isReadOnly( const int id ) const else return true; } - -//======================================================================= -// name : onTextChanged -// Purpose : -//======================================================================= + +/*! + SLOT: called if text of object selection line edit is changed +*/ void LightApp_Dialog::onTextChanged( const QString& text ) { if( myIsBusy ) diff --git a/src/LightApp/LightApp_Dialog.h b/src/LightApp/LightApp_Dialog.h index 12fd50154..51acdc5d0 100644 --- a/src/LightApp/LightApp_Dialog.h +++ b/src/LightApp/LightApp_Dialog.h @@ -35,9 +35,13 @@ class QLabel; class SUIT_ResourceMgr; -/* - Class : LightApp_Dialog - Description : Base class for all LightApp dialogs +/*! + \class LightApp_Dialog + Base class for all LightApp dialogs. + Provides standard widget for object selection: line edit, button; + it is necessary to call corresponding methods on selection change. + Standard dialog provides filtering, selection string representation, + possibility to indicate necessary selection by text with list of ids. */ class LIGHTAPP_EXPORT LightApp_Dialog : public QtxDialog { diff --git a/src/LightApp/LightApp_Displayer.cxx b/src/LightApp/LightApp_Displayer.cxx index f06c8c10b..49a792dc0 100644 --- a/src/LightApp/LightApp_Displayer.cxx +++ b/src/LightApp/LightApp_Displayer.cxx @@ -34,14 +34,26 @@ #include "SALOME_InteractiveObject.hxx" #endif +/*! + Default constructor +*/ LightApp_Displayer::LightApp_Displayer() { } +/*! + Destructor +*/ LightApp_Displayer::~LightApp_Displayer() { } +/*! + Displays object in view + \param entry - object entry + \param updateViewer - is it necessary to update viewer + \param theViewFrame - view +*/ void LightApp_Displayer::Display( const QString& entry, const bool updateViewer, SALOME_View* theViewFrame ) { SALOME_View* vf = theViewFrame ? theViewFrame : GetActiveView(); @@ -63,6 +75,11 @@ void LightApp_Displayer::Display( const QString& entry, const bool updateViewer, } } +/*! + Redisplays object in view + \param entry - object entry + \param updateViewer - is it necessary to update viewer +*/ void LightApp_Displayer::Redisplay( const QString& entry, const bool updateViewer ) { // Remove the object permanently ( == true) @@ -93,6 +110,13 @@ void LightApp_Displayer::Redisplay( const QString& entry, const bool updateViewe } } +/*! + Erases object in view + \param entry - object entry + \param forced - deletes object from viewer (otherwise it will be erased, but cached) + \param updateViewer - is it necessary to update viewer + \param theViewFrame - view +*/ void LightApp_Displayer::Erase( const QString& entry, const bool forced, const bool updateViewer, SALOME_View* theViewFrame ) { @@ -109,6 +133,12 @@ void LightApp_Displayer::Erase( const QString& entry, const bool forced, } } +/*! + Erases all objects in view + \param forced - deletes objects from viewer + \param updateViewer - is it necessary to update viewer + \param theViewFrame - view +*/ void LightApp_Displayer::EraseAll( const bool forced, const bool updateViewer, SALOME_View* theViewFrame ) const { SALOME_View* vf = theViewFrame ? theViewFrame : GetActiveView(); @@ -120,6 +150,11 @@ void LightApp_Displayer::EraseAll( const bool forced, const bool updateViewer, S } } +/*! + \return true if object is displayed in viewer + \param entry - object entry + \param theViewFrame - view +*/ bool LightApp_Displayer::IsDisplayed( const QString& entry, SALOME_View* theViewFrame ) const { SALOME_View* vf = theViewFrame ? theViewFrame : GetActiveView(); @@ -135,6 +170,9 @@ bool LightApp_Displayer::IsDisplayed( const QString& entry, SALOME_View* theView return res; } +/*! + Updates active view +*/ void LightApp_Displayer::UpdateViewer() const { SALOME_View* vf = GetActiveView(); @@ -142,6 +180,12 @@ void LightApp_Displayer::UpdateViewer() const vf->Repaint(); } +/*! + \return presentation of object, built with help of CreatePrs method + \param entry - object entry + \param theViewFrame - view + \sa CreatePrs() +*/ SALOME_Prs* LightApp_Displayer::buildPresentation( const QString& entry, SALOME_View* theViewFrame ) { SALOME_Prs* prs = 0; @@ -154,6 +198,9 @@ SALOME_Prs* LightApp_Displayer::buildPresentation( const QString& entry, SALOME_ return prs; } +/*! + \return active view +*/ SALOME_View* LightApp_Displayer::GetActiveView() { SUIT_Session* session = SUIT_Session::session(); @@ -168,11 +215,20 @@ SALOME_View* LightApp_Displayer::GetActiveView() return 0; } -bool LightApp_Displayer::canBeDisplayed( const QString&, const QString& ) const +/*! + \return true, if object can be displayed in this type of viewer + \param entry - object entry + \param viewer_type - type of viewer +*/ +bool LightApp_Displayer::canBeDisplayed( const QString& /*entry*/, const QString& /*viewer_type*/ ) const { return true; } +/*! + \return true, if object can be displayed in any type of viewer + \param entry - object entry +*/ bool LightApp_Displayer::canBeDisplayed( const QString& entry ) const { QString viewerType; @@ -185,6 +241,11 @@ bool LightApp_Displayer::canBeDisplayed( const QString& entry ) const return !viewerType.isNull() && canBeDisplayed( entry, viewerType ); } +/*! + \return displayer, corresponding to module + \param mod_name - name of module + \param load - is module has to be forced loaded +*/ LightApp_Displayer* LightApp_Displayer::FindDisplayer( const QString& mod_name, const bool load ) { SUIT_Session* session = SUIT_Session::session(); diff --git a/src/LightApp/LightApp_Driver.cxx b/src/LightApp/LightApp_Driver.cxx index 122890390..087f39168 100644 --- a/src/LightApp/LightApp_Driver.cxx +++ b/src/LightApp/LightApp_Driver.cxx @@ -49,10 +49,9 @@ LightApp_Driver::~LightApp_Driver() using namespace std; -//================================================================ -// Function : SaveDatasInFile -/*! Purpose : save in file 'theFileName' datas from this driver*/ -//================================================================ +/*! + Save in file 'theFileName' datas from this driver +*/ bool LightApp_Driver::SaveDatasInFile( const char* theFileName, bool isMultiFile ) { int aNbModules = 0; @@ -133,10 +132,9 @@ bool LightApp_Driver::SaveDatasInFile( const char* theFileName, bool isMultiFile return true; } -//======================================================================= -// name : ReaDatasFromFile -/*! Purpose : filling current driver from file 'theFileName'*/ -//======================================================================= +/*! + Filling current driver from file 'theFileName' +*/ bool LightApp_Driver::ReadDatasFromFile( const char* theFileName, bool isMultiFile ) { #ifdef WNT @@ -193,10 +191,9 @@ bool LightApp_Driver::ReadDatasFromFile( const char* theFileName, bool isMultiFi return true; } -//================================================================ -// Function : GetTmpDir -/*! Purpose : returns temp directory for path 'theURL'*/ -//================================================================ +/*! + \return temp directory for path 'theURL' +*/ std::string LightApp_Driver::GetTmpDir (const char* theURL, const bool isMultiFile) { std::string anURLDir = GetDirFromPath(theURL); @@ -205,10 +202,9 @@ std::string LightApp_Driver::GetTmpDir (const char* theURL, const bool isMultiF return aTmpDir; } -//================================================================ -// Function : GetListOfFiles -/*! Purpose : returns list of files for module with name 'theModuleName'*/ -//================================================================ +/*! + \return list of files for module with name 'theModuleName' +*/ LightApp_Driver::ListOfFiles LightApp_Driver::GetListOfFiles( const char* theModuleName ) { ListOfFiles aListOfFiles; @@ -220,20 +216,18 @@ LightApp_Driver::ListOfFiles LightApp_Driver::GetListOfFiles( const char* theMod return aListOfFiles; } -//================================================================ -// Function : SetListOfFiles -/*! Purpose : sets list of files for module with name 'theModuleName'*/ -//================================================================ +/*! + Sets list of files for module with name 'theModuleName' +*/ void LightApp_Driver::SetListOfFiles( const char* theModuleName, const ListOfFiles theListOfFiles ) { std::string aName (theModuleName); myMap[aName] = theListOfFiles; } -//============================================================================ -// function : PutFilesToStream -/*! Purpose : converts files which was created from module into a byte sequence unsigned char*/ -//============================================================================ +/*! + Converts files which was created from module into a byte sequence unsigned char +*/ void LightApp_Driver::PutFilesToStream( const std::string& theModuleName, unsigned char*& theBuffer, long& theBufferSize, bool theNamesOnly ) { @@ -342,10 +336,9 @@ void LightApp_Driver::PutFilesToStream( const std::string& theModuleName, unsign theBufferSize = aBufferSize; } -//============================================================================ -// function : PutStreamToFile -/*! Purpose : converts a byte sequence to files and return list of them*/ -//============================================================================ +/*! + Converts a byte sequence to files and return list of them +*/ LightApp_Driver::ListOfFiles LightApp_Driver::PutStreamToFiles( const unsigned char* theBuffer, const long theBufferSize, bool theNamesOnly ) { @@ -406,13 +399,11 @@ LightApp_Driver::ListOfFiles LightApp_Driver::PutStreamToFiles( const unsigned c return aFiles; } -//============================================================================ -// function : RemoveFiles -/*! Purpose : Remove files. First item in is a directory with slash at the end. - Other items are names of files. If is true, - then the directory is also deleted. +/*! + Remove files. First item in is a directory with slash at the end. + Other items are names of files. If is true, + then the directory is also deleted. */ -//============================================================================ void LightApp_Driver::RemoveFiles( const ListOfFiles& theFiles, const bool IsDirDeleted) { int i, aLength = theFiles.size() - 1; @@ -449,11 +440,10 @@ void LightApp_Driver::RemoveFiles( const ListOfFiles& theFiles, const bool IsDir } } -//============================================================================ -// function : RemoveTemporaryFiles -/*! Purpose : removes files which was created from module theModuleName if - is true tmp directory is also deleted if it is empty*/ -//============================================================================ +/*! + Removes files which was created from module theModuleName if + is true tmp directory is also deleted if it is empty +*/ void LightApp_Driver::RemoveTemporaryFiles( const char* theModuleName, const bool IsDirDeleted ) { std::string aModuleName(theModuleName); @@ -464,10 +454,9 @@ void LightApp_Driver::RemoveTemporaryFiles( const char* theModuleName, const boo } -//============================================================================ -// function : ClearDriverContents -/*! Purpose : clear map of list files*/ -//============================================================================ +/*! + Clears map of list files +*/ void LightApp_Driver::ClearDriverContents() { std::map::iterator it; @@ -483,10 +472,9 @@ void LightApp_Driver::ClearDriverContents() SetIsTemporary( false ); } -//============================================================================ -// function : GetTempDir -/*! Purpose : return a temp directory to store created files like "/tmp/sub_dir/" */ -//============================================================================ +/*! + \return a temp directory to store created files like "/tmp/sub_dir/" +*/ std::string LightApp_Driver::GetTmpDir() { if ( myTmpDir.length() != 0 ) @@ -553,10 +541,9 @@ std::string LightApp_Driver::GetTmpDir() return aTmpDir.ToCString(); } -//============================================================================ -// function : GetDirFromPath -/*! Purpose : returns the dir by the path*/ -//============================================================================ +/*! + \return the dir by the path +*/ std::string LightApp_Driver::GetDirFromPath( const std::string& thePath ) { if(thePath == "") return ""; diff --git a/src/LightApp/LightApp_GLSelector.cxx b/src/LightApp/LightApp_GLSelector.cxx index c9415eb41..03da41efc 100644 --- a/src/LightApp/LightApp_GLSelector.cxx +++ b/src/LightApp/LightApp_GLSelector.cxx @@ -115,21 +115,35 @@ void LightApp_GLSelector::setSelection( const SUIT_DataOwnerPtrList& aList ) } +/*! + Constructor + \param entry - entry of object +*/ LightApp_GLOwner::LightApp_GLOwner( const char* entry ) : GLViewer_Owner() { setEntry( entry ); } +/*! + Destructor +*/ LightApp_GLOwner::~LightApp_GLOwner() { } +/*! + \return entry +*/ const char* LightApp_GLOwner::entry() const { return myEntry.c_str(); } +/*! + Sets new entry + \param entry - entry of object +*/ void LightApp_GLOwner::setEntry( const char* entry ) { myEntry = entry; diff --git a/src/LightApp/LightApp_HDFDriver.cxx b/src/LightApp/LightApp_HDFDriver.cxx index bf003ae44..7ceca3a62 100644 --- a/src/LightApp/LightApp_HDFDriver.cxx +++ b/src/LightApp/LightApp_HDFDriver.cxx @@ -36,10 +36,9 @@ LightApp_HDFDriver::~LightApp_HDFDriver() using namespace std; -//================================================================ -// Function : SaveDatasInFile -/*! Purpose : save in file 'theFileName' datas from this driver*/ -//================================================================ +/*! + Saves in file 'theFileName' datas from this driver +*/ bool LightApp_HDFDriver::SaveDatasInFile( const char* theFileName, bool isMultiFile ) { bool isASCII = false; @@ -163,10 +162,9 @@ bool LightApp_HDFDriver::SaveDatasInFile( const char* theFileName, bool isMultiF return !isError; } -//======================================================================= -// Function : ReadDatasFromFile -/*! Purpose : filling current driver from file 'theFileName'*/ -//======================================================================= +/*! + Filling current driver from file 'theFileName' +*/ bool LightApp_HDFDriver::ReadDatasFromFile( const char* theFileName, bool isMultiFile ) { bool isASCII = false; diff --git a/src/LightApp/LightApp_Module.cxx b/src/LightApp/LightApp_Module.cxx index 66020ad44..65689deed 100644 --- a/src/LightApp/LightApp_Module.cxx +++ b/src/LightApp/LightApp_Module.cxx @@ -513,11 +513,18 @@ void LightApp_Module::onOperationDestroyed() } } +/*! + Must be redefined in order to use standard displayer mechanism + \return displayer of module +*/ LightApp_Displayer* LightApp_Module::displayer() { return 0; } +/*! + SLOT: called on activating of standard operations show/hide +*/ void LightApp_Module::onShowHide() { if( !sender()->inherits( "QAction" ) || !popupMgr() ) @@ -529,10 +536,16 @@ void LightApp_Module::onShowHide() startOperation( id ); } +/*! + virtual SLOT: called on view manager adding +*/ void LightApp_Module::onViewManagerAdded( SUIT_ViewManager* ) { } +/*! + virtual SLOT: called on view manager removing +*/ void LightApp_Module::onViewManagerRemoved( SUIT_ViewManager* ) { } diff --git a/src/LightApp/LightApp_Module.h b/src/LightApp/LightApp_Module.h index afe552d12..ca6a6d852 100644 --- a/src/LightApp/LightApp_Module.h +++ b/src/LightApp/LightApp_Module.h @@ -28,9 +28,9 @@ class QtxPopupMgr; class QString; class QVariant; -/* - Class : LightApp_Module - Description : Base class for all light modules +/*! + \class LightApp_Module + Base class for all light modules */ class LIGHTAPP_EXPORT LightApp_Module : public CAM_Module diff --git a/src/LightApp/LightApp_NameDlg.cxx b/src/LightApp/LightApp_NameDlg.cxx index 609927305..f6eb0543e 100644 --- a/src/LightApp/LightApp_NameDlg.cxx +++ b/src/LightApp/LightApp_NameDlg.cxx @@ -123,6 +123,9 @@ QString LightApp_NameDlg::name() return myLineEdit->text(); } +/*! + Accepts if name isn't empty +*/ void LightApp_NameDlg::accept() { if ( name().stripWhiteSpace().isEmpty() ) diff --git a/src/LightApp/LightApp_NameDlg.h b/src/LightApp/LightApp_NameDlg.h index c0309c0f2..6bc61b9d5 100644 --- a/src/LightApp/LightApp_NameDlg.h +++ b/src/LightApp/LightApp_NameDlg.h @@ -18,10 +18,10 @@ class QLineEdit; class QPushButton; -//================================================================================= -// class : LightApp_NameDlg -/*! purpose : Common dialog box class*/ -//================================================================================= +/*! + \class LightApp_NameDlg + Common dialog box class +*/ class LIGHTAPP_EXPORT LightApp_NameDlg : public QDialog { Q_OBJECT diff --git a/src/LightApp/LightApp_Operation.cxx b/src/LightApp/LightApp_Operation.cxx index 197eb93ee..f13019d6c 100755 --- a/src/LightApp/LightApp_Operation.cxx +++ b/src/LightApp/LightApp_Operation.cxx @@ -121,10 +121,6 @@ void LightApp_Operation::suspendOperation() setDialogActive( false ); } -//======================================================================= -// name : abortOperation -// Purpose : Hide dialog box (if it is exists) -//======================================================================= /*! * \brief Performs actions needed for aborting operation * diff --git a/src/LightApp/LightApp_Operation.h b/src/LightApp/LightApp_Operation.h index 4b07bd7b2..beac7042c 100755 --- a/src/LightApp/LightApp_Operation.h +++ b/src/LightApp/LightApp_Operation.h @@ -22,15 +22,10 @@ class LightApp_SelectionMgr; class LightApp_Dialog; class SUIT_Desktop; -/* - Class : LightApp_Operation - Description : Base class for all operations -*/ - /*! - * \brief Base class for all operations - * - * Base class for all operations (see SUIT_Operation for more description) + \class LightApp_Operation + \brief Base class for all operations + Base class for all operations (see SUIT_Operation for more description) */ class LIGHTAPP_EXPORT LightApp_Operation : public SUIT_Operation { diff --git a/src/LightApp/LightApp_Preferences.cxx b/src/LightApp/LightApp_Preferences.cxx index 96d6abcb2..36ba84c96 100644 --- a/src/LightApp/LightApp_Preferences.cxx +++ b/src/LightApp/LightApp_Preferences.cxx @@ -61,7 +61,7 @@ int LightApp_Preferences::addPreference( const QString& mod, const QString& labe return id; } -/* +/*! Checks: is preferences has module with name \a mod. */ bool LightApp_Preferences::hasModule( const QString& mod ) const diff --git a/src/LightApp/LightApp_ShowHideOp.cxx b/src/LightApp/LightApp_ShowHideOp.cxx index 76827c053..0d64875f7 100644 --- a/src/LightApp/LightApp_ShowHideOp.cxx +++ b/src/LightApp/LightApp_ShowHideOp.cxx @@ -33,16 +33,25 @@ #include #endif +/*! + Constructor +*/ LightApp_ShowHideOp::LightApp_ShowHideOp( ActionType type ) : LightApp_Operation(), myActionType( type ) { } +/*! + Destructor +*/ LightApp_ShowHideOp::~LightApp_ShowHideOp() { } +/*! + Makes show/hide operation +*/ void LightApp_ShowHideOp::startOperation() { LightApp_Application* app = dynamic_cast( application() ); diff --git a/src/LightApp/LightApp_Study.cxx b/src/LightApp/LightApp_Study.cxx index 0b8b9005e..09eb3c3a0 100644 --- a/src/LightApp/LightApp_Study.cxx +++ b/src/LightApp/LightApp_Study.cxx @@ -77,10 +77,9 @@ void LightApp_Study::createDocument() emit created( this ); } -//======================================================================= -// name : openDocument -/*! Purpose : Open document*/ -//======================================================================= +/*! + Opens document +*/ bool LightApp_Study::openDocument( const QString& theFileName ) { myDriver->ClearDriverContents(); @@ -106,10 +105,9 @@ bool LightApp_Study::openDocument( const QString& theFileName ) return res; } -//======================================================================= -// name : loadDocument -/*! Purpose : Load document */ -//======================================================================= +/*! + Loads document +*/ bool LightApp_Study::loadDocument( const QString& theStudyName ) { myDriver->ClearDriverContents(); @@ -138,10 +136,9 @@ bool LightApp_Study::loadDocument( const QString& theStudyName ) return res; } -//======================================================================= -// name : saveDocumentAs -/*! Purpose : Save document */ -//======================================================================= +/*! + Saves document +*/ bool LightApp_Study::saveDocumentAs( const QString& theFileName ) { SUIT_ResourceMgr* resMgr = application()->resourceMgr(); @@ -201,10 +198,9 @@ bool LightApp_Study::saveDocumentAs( const QString& theFileName ) return res; } -//======================================================================= -// name : saveDocument -/*! Purpose : Save document */ -//======================================================================= +/*! + Saves document +*/ bool LightApp_Study::saveDocument() { ModelList list; dataModels( list ); @@ -227,10 +223,9 @@ bool LightApp_Study::saveDocument() return res; } -//================================================================ -// Function : closeDocument -/*! Purpose : Close document */ -//================================================================ +/*! + Closes document +*/ void LightApp_Study::closeDocument(bool permanently) { // Inform everybody that this study is going to close when it's most safe to, @@ -243,27 +238,25 @@ void LightApp_Study::closeDocument(bool permanently) myDriver->ClearDriverContents(); } -//================================================================ -// Function : referencedToEntry -/*! Purpose : Return current entry*/ -//================================================================ +/*! + \return real entry by entry of reference + \param entry - entry of reference object +*/ QString LightApp_Study::referencedToEntry( const QString& entry ) const { return entry; } -//================================================================ -// Function : children -/*! Purpose : Return entries of children of object*/ -//================================================================ +/*! + \return entries of object children +*/ void LightApp_Study::children( const QString&, QStringList& ) const { } -//================================================================ -// Function : isComponent -/*! Purpose : Return true if entry corresponds to component*/ -//================================================================ +/*! + \return true if entry corresponds to component +*/ bool LightApp_Study::isComponent( const QString& entry ) const { if( !root() ) @@ -281,10 +274,9 @@ bool LightApp_Study::isComponent( const QString& entry ) const return false; } -//================================================================ -// Function : componentDataType -/*! Purpose : Return component data type from entry*/ -//================================================================ +/*! + \return component data type for entry +*/ QString LightApp_Study::componentDataType( const QString& entry ) const { LightApp_DataObject* aCurObj; @@ -297,10 +289,9 @@ QString LightApp_Study::componentDataType( const QString& entry ) const return ""; } -//================================================================ -// Function : isModified -// Purpose : -//================================================================ +/*! + \return true if study is modified +*/ bool LightApp_Study::isModified() const { bool isAnyChanged = CAM_Study::isModified(); @@ -315,27 +306,24 @@ bool LightApp_Study::isModified() const return isAnyChanged; } -//================================================================ -// Function : isSaved -/*! Purpose : Check: data model is saved?*/ -//================================================================ +/*! + \return true if data model is saved +*/ bool LightApp_Study::isSaved() const { return CAM_Study::isSaved(); } -//======================================================================= -// name : addComponent -/*! Purpose : Create SComponent for module, necessary for SalomeApp study */ -//======================================================================= +/*! + Creates SComponent for module, necessary for SalomeApp study +*/ void LightApp_Study::addComponent(const CAM_DataModel* dm) { } -//======================================================================= -// name : saveModuleData -/*! Purpose : save list file for module 'theModuleName' */ -//======================================================================= +/*! + Saves list file for module 'theModuleName' +*/ void LightApp_Study::saveModuleData(QString theModuleName, QStringList theListOfFiles) { int aNb = theListOfFiles.count(); @@ -353,10 +341,9 @@ void LightApp_Study::saveModuleData(QString theModuleName, QStringList theListOf myDriver->SetListOfFiles(theModuleName, aListOfFiles); } -//======================================================================= -// name : openModuleData -/*! Purpose : gets list of file for module 'theModuleNam' */ -//======================================================================= +/*! + Gets list of file for module 'theModuleNam' +*/ void LightApp_Study::openModuleData(QString theModuleName, QStringList& theListOfFiles) { std::vector aListOfFiles = myDriver->GetListOfFiles(theModuleName); @@ -370,10 +357,9 @@ void LightApp_Study::openModuleData(QString theModuleName, QStringList& theListO theListOfFiles.append(aListOfFiles[i+1].c_str()); } -//======================================================================= -// name : saveStudyData -/*! Purpose : save data from study */ -//======================================================================= +/*! + Saves data from study +*/ bool LightApp_Study::saveStudyData( const QString& theFileName ) { ModelList list; dataModels( list ); @@ -386,10 +372,9 @@ bool LightApp_Study::saveStudyData( const QString& theFileName ) return aRes; } -//======================================================================= -// name : openStudyData -/*! Purpose : open data for study */ -//======================================================================= +/*! + Opens data for study +*/ bool LightApp_Study::openStudyData( const QString& theFileName ) { SUIT_ResourceMgr* resMgr = application()->resourceMgr(); @@ -401,10 +386,9 @@ bool LightApp_Study::openStudyData( const QString& theFileName ) return aRes; } -//================================================================ -// Function : openDataModel -/*! Purpose : Open data model */ -//================================================================ +/*! + Opens data model +*/ bool LightApp_Study::openDataModel( const QString& studyName, CAM_DataModel* dm ) { if (!dm) @@ -422,20 +406,19 @@ bool LightApp_Study::openDataModel( const QString& studyName, CAM_DataModel* dm return false; } -//================================================================ -// Function : GetTmpDir -/*! Purpose : to be used by modules*/ -//================================================================ +/*! + \return temporary directory for saving files of modules +*/ std::string LightApp_Study::GetTmpDir (const char* theURL, const bool isMultiFile) { return myDriver->GetTmpDir(theURL, isMultiFile); } -//================================================================ -// Function : GetListOfFiles -/*! Purpose : to be used by modules*/ -//================================================================ +/*! + \return list of files necessary for module + \param theModuleName - name of module +*/ std::vector LightApp_Study::GetListOfFiles(const char* theModuleName) const { std::vector aListOfFiles; @@ -443,19 +426,19 @@ std::vector LightApp_Study::GetListOfFiles(const char* theModuleNam return aListOfFiles; } -//================================================================ -// Function : SetListOfFiles -/*! Purpose : to be used by modules*/ -//================================================================ +/*! + Sets list of files necessary for module + \param theModuleName - name of module + \param theListOfFiles - list of files +*/ void LightApp_Study::SetListOfFiles (const char* theModuleName, const std::vector theListOfFiles) { myDriver->SetListOfFiles(theModuleName, theListOfFiles); } -//================================================================ -// Function : RemoveTemporaryFiles -/*! Purpose : to be used by modules*/ -//================================================================ +/*! + Removes temporary files +*/ void LightApp_Study::RemoveTemporaryFiles (const char* theModuleName, const bool isMultiFile) const { if (isMultiFile) @@ -464,10 +447,10 @@ void LightApp_Study::RemoveTemporaryFiles (const char* theModuleName, const bool myDriver->RemoveTemporaryFiles(theModuleName, isDirDeleted); } -//================================================================ -// Function : components -/*! Purpose : to be used by modules*/ -//================================================================ +/*! + Fills list with components names + \param comp - list to be filled +*/ void LightApp_Study::components( QStringList& comp ) const { DataObjectList children = root()->children(); diff --git a/src/LightApp/LightApp_SwitchOp.cxx b/src/LightApp/LightApp_SwitchOp.cxx index 14feeaa6d..820bf1e5f 100755 --- a/src/LightApp/LightApp_SwitchOp.cxx +++ b/src/LightApp/LightApp_SwitchOp.cxx @@ -16,17 +16,6 @@ // // See http://www.salome-platform.org/ // -/** -* LIGHT LightApp -* -* Copyright (C) 2005 CEA/DEN, EDF R&D -* -* -* -* File : LightApp_SwitchOp.h -* Author : Sergey LITONIN -* Module : LIGHT -*/ #include "LightApp_SwitchOp.h" #include "LightApp_Module.h" diff --git a/src/LightApp/LightApp_SwitchOp.h b/src/LightApp/LightApp_SwitchOp.h index dad93261d..2fdb302e4 100755 --- a/src/LightApp/LightApp_SwitchOp.h +++ b/src/LightApp/LightApp_SwitchOp.h @@ -16,19 +16,6 @@ // // See http://www.salome-platform.org/ // -/** -* LIGHT LightApp -* -* Copyright (C) 2005 CEA/DEN, EDF R&D -* -* -* -* File : LightApp_SwitchOp.h -* Author : Sergey LITONIN -* Module : LIGHT -*/ - - #ifndef LightApp_SwitchOp_H #define LightApp_SwitchOp_H diff --git a/src/LightApp/LightApp_UpdateFlags.h b/src/LightApp/LightApp_UpdateFlags.h index 2fc7fa780..6dc90343a 100755 --- a/src/LightApp/LightApp_UpdateFlags.h +++ b/src/LightApp/LightApp_UpdateFlags.h @@ -12,11 +12,11 @@ #ifndef LightApp_UpdateFlags_H #define LightApp_UpdateFlags_H -/* - Enum : UpdateFlags - Description : Enumeration for update flags. First byte is reserved for LightApp_Module. - Modules derived from this model must use other 3 bytes to define their - own update flags +/*! + \enum UpdateFlags + Enumeration for update flags. First byte is reserved for LightApp_Module. + Modules derived from this model must use other 3 bytes to define their + own update flags */ typedef enum diff --git a/src/LightApp/LightApp_VTKSelector.cxx b/src/LightApp/LightApp_VTKSelector.cxx index 2e800fec1..bed74c357 100644 --- a/src/LightApp/LightApp_VTKSelector.cxx +++ b/src/LightApp/LightApp_VTKSelector.cxx @@ -57,6 +57,9 @@ LightApp_SVTKDataOwner { } +/*! + \return active SVTK view window +*/ SVTK_ViewWindow* LightApp_SVTKDataOwner ::GetActiveViewWindow() const diff --git a/src/SUIT/SUIT_Application.cxx b/src/SUIT/SUIT_Application.cxx index bf0daebe6..1d8da2124 100755 --- a/src/SUIT/SUIT_Application.cxx +++ b/src/SUIT/SUIT_Application.cxx @@ -30,6 +30,9 @@ #include #include +/*! + Default constructor +*/ SUIT_Application::SUIT_Application() : QObject( 0 ), myStudy( 0 ), @@ -38,6 +41,9 @@ myStatusLabel( 0 ) { } +/*! + Destructor +*/ SUIT_Application::~SUIT_Application() { delete myStudy; @@ -46,37 +52,61 @@ SUIT_Application::~SUIT_Application() setDesktop( 0 ); } +/*! + \return main window of application (desktop) +*/ SUIT_Desktop* SUIT_Application::desktop() { return myDesktop; } +/*! + \return FALSE if application can not be closed (because of non saved data for example). + This method called by SUIT_Session whin closing of application was requested. +*/ bool SUIT_Application::isPossibleToClose() { return true; } +/*! + Performs some finalization of life cycle of this application. + For instance, the application can force its documents(s) to close. +*/ void SUIT_Application::closeApplication() { emit applicationClosed( this ); } +/*! + \return active Study. If Application supports wirking with several studies this method should be redefined +*/ SUIT_Study* SUIT_Application::activeStudy() const { return myStudy; } +/*! + \return version of application +*/ QString SUIT_Application::applicationVersion() const { return QString::null; } +/*! + Shows the application's main widget. For non GUI application must be redefined. +*/ void SUIT_Application::start() { if ( desktop() ) desktop()->show(); } +/*! + Opens document into active Study. If Study is empty - creates it. + \param theFileName - name of document file +*/ bool SUIT_Application::useFile( const QString& theFileName ) { createEmptyStudy(); @@ -93,22 +123,36 @@ bool SUIT_Application::useFile( const QString& theFileName ) return status; } +/*! + Opens other study into active Study. If Study is empty - creates it. + \param theName - name of study +*/ bool SUIT_Application::useStudy( const QString& theName ) { return false; } +/*! + Creates new empty Study if active Study = 0 +*/ void SUIT_Application::createEmptyStudy() { if ( !activeStudy() ) setActiveStudy( createNewStudy() ); } +/*! + \return number of Studies. + Must be redefined in Applications which support several studies for one Application instance. +*/ int SUIT_Application::getNbStudies() const { return activeStudy() ? 1 : 0; } +/*! + \return global resource manager +*/ SUIT_ResourceMgr* SUIT_Application::resourceMgr() const { if ( !SUIT_Session::session() ) @@ -118,6 +162,12 @@ SUIT_ResourceMgr* SUIT_Application::resourceMgr() const } #define DEFAULT_MESSAGE_DELAY 3000 + +/*! + Puts the message to the status bar + \param msg - text of message + \param msec - time in milliseconds, after that the status label will be cleared +*/ void SUIT_Application::putInfo ( const QString& msg, const int msec ) { if ( !desktop() ) @@ -135,11 +185,22 @@ void SUIT_Application::putInfo ( const QString& msg, const int msec ) QTimer::singleShot( msec <= 0 ? DEFAULT_MESSAGE_DELAY : msec, myStatusLabel, SLOT( clear() ) ); } +/*! + Initialize with application arguments + \param argc - number of application arguments + \param argv - array of application arguments +*/ SUIT_Application* SUIT_Application::startApplication( int argc, char** argv ) const { return startApplication( name(), argc, argv ); } +/*! + Initialize with application name and arguments + \param name - name of application + \param argc - number of application arguments + \param argv - array of application arguments +*/ SUIT_Application* SUIT_Application::startApplication( const QString& name, int argc, char** argv ) const { SUIT_Session* session = SUIT_Session::session(); @@ -149,6 +210,10 @@ SUIT_Application* SUIT_Application::startApplication( const QString& name, int a return session->startApplication( name, argc, argv ); } +/*! + Sets the main window of application + \param desk - new main window (desktop) +*/ void SUIT_Application::setDesktop( SUIT_Desktop* desk ) { if ( myDesktop == desk ) @@ -160,11 +225,20 @@ void SUIT_Application::setDesktop( SUIT_Desktop* desk ) connect( myDesktop, SIGNAL( activated() ), this, SLOT( onDesktopActivated() ) ); } +/*! + Creates new instance of study. + By default, it is called from createEmptyStudy() + \sa createEmptyStudy() +*/ SUIT_Study* SUIT_Application::createNewStudy() { return new SUIT_Study( this ); } +/*! + Sets study as active + \param study - instance of study to be set as active +*/ void SUIT_Application::setActiveStudy( SUIT_Study* study ) { if ( myStudy == study ) @@ -173,6 +247,11 @@ void SUIT_Application::setActiveStudy( SUIT_Study* study ) myStudy = study; } +/*! + Creates new toolbar + \return identificator of new toolbar in tool manager + \param name - name of new toolbar +*/ int SUIT_Application::createTool( const QString& name ) { if ( !desktop() || !desktop()->toolMgr() ) @@ -181,6 +260,14 @@ int SUIT_Application::createTool( const QString& name ) return desktop()->toolMgr()->createToolBar( name ); } +/*! + Creates new toolbutton + \return SUIT identificator of new action + \param a - action + \param tBar - identificator of toolbar + \param id - proposed SUIT identificator of action (if it is -1, then must be use any free) + \param idx - index in toolbar +*/ int SUIT_Application::createTool( QAction* a, const int tBar, const int id, const int idx ) { if ( !desktop() || !desktop()->toolMgr() ) @@ -191,6 +278,14 @@ int SUIT_Application::createTool( QAction* a, const int tBar, const int id, cons return intId != -1 ? regId : -1; } +/*! + Creates new toolbutton + \return SUIT identificator of new action + \param a - action + \param tBar - name of toolbar + \param id - proposed SUIT identificator of action (if it is -1, then must be use any free) + \param idx - index in toolbar +*/ int SUIT_Application::createTool( QAction* a, const QString& tBar, const int id, const int idx ) { if ( !desktop() || !desktop()->toolMgr() ) @@ -201,6 +296,13 @@ int SUIT_Application::createTool( QAction* a, const QString& tBar, const int id, return intId != -1 ? regId : -1; } +/*! + Creates new toolbutton + \return "id" if all right or -1 otherwise + \param id - SUIT identificator of action + \param tBar - identificator of toolbar + \param idx - index in toolbar +*/ int SUIT_Application::createTool( const int id, const int tBar, const int idx ) { if ( !desktop() || !desktop()->toolMgr() ) @@ -210,6 +312,13 @@ int SUIT_Application::createTool( const int id, const int tBar, const int idx ) return intId != -1 ? id : -1; } +/*! + Creates new toolbutton + \return "id" if all right or -1 otherwise + \param id - SUIT identificator of action + \param tBar - name of toolbar + \param idx - index in toolbar +*/ int SUIT_Application::createTool( const int id, const QString& tBar, const int idx ) { if ( !desktop() || !desktop()->toolMgr() ) @@ -219,6 +328,15 @@ int SUIT_Application::createTool( const int id, const QString& tBar, const int i return intId != -1 ? id : -1; } +/*! + Creates new menu item + \return identificator of new action in menu manager + \param subMenu - menu text of new item + \param menu - identificator of parent menu item + \param id - proposed identificator of action + \param group - group in menu manager + \param index - index in menu +*/ int SUIT_Application::createMenu( const QString& subMenu, const int menu, const int id, const int group, const int index ) { @@ -228,6 +346,15 @@ int SUIT_Application::createMenu( const QString& subMenu, const int menu, return desktop()->menuMgr()->insert( subMenu, menu, group, id, index ); } +/*! + Creates new menu item + \return identificator of new action in menu manager + \param subMenu - menu text of new item + \param menu - menu text of parent menu item + \param id - proposed identificator of action + \param group - group in menu manager + \param index - index in menu +*/ int SUIT_Application::createMenu( const QString& subMenu, const QString& menu, const int id, const int group, const int index ) { @@ -237,6 +364,15 @@ int SUIT_Application::createMenu( const QString& subMenu, const QString& menu, return desktop()->menuMgr()->insert( subMenu, menu, group, id, index ); } +/*! + Creates new menu item + \return SUIT identificator of new action + \param a - action + \param menu - identificator of parent menu item + \param id - proposed SUIT identificator of action + \param group - group in menu manager + \param index - index in menu +*/ int SUIT_Application::createMenu( QAction* a, const int menu, const int id, const int group, const int index ) { if ( !a || !desktop() || !desktop()->menuMgr() ) @@ -247,6 +383,15 @@ int SUIT_Application::createMenu( QAction* a, const int menu, const int id, cons return intId != -1 ? regId : -1; } +/*! + Creates new menu item + \return SUIT identificator of new action + \param a - action + \param menu - menu text of parent menu item + \param id - proposed SUIT identificator of action + \param group - group in menu manager + \param index - index in menu +*/ int SUIT_Application::createMenu( QAction* a, const QString& menu, const int id, const int group, const int index ) { if ( !a || !desktop() || !desktop()->menuMgr() ) @@ -257,6 +402,14 @@ int SUIT_Application::createMenu( QAction* a, const QString& menu, const int id, return intId != -1 ? regId : -1; } +/*! + Creates new menu item + \return identificator of new action in menu manager + \param id - SUIT identificator of action + \param menu - menu text of parent menu item + \param group - group in menu manager + \param index - index in menu +*/ int SUIT_Application::createMenu( const int id, const int menu, const int group, const int index ) { if ( !desktop() || !desktop()->menuMgr() ) @@ -266,6 +419,14 @@ int SUIT_Application::createMenu( const int id, const int menu, const int group, return intId != -1 ? id : -1; } +/*! + Creates new menu item + \return identificator of new action in menu manager + \param id - SUIT identificator of action + \param menu - menu text of parent menu item + \param group - group in menu manager + \param index - index in menu +*/ int SUIT_Application::createMenu( const int id, const QString& menu, const int group, const int index ) { if ( !desktop() || !desktop()->menuMgr() ) @@ -275,40 +436,74 @@ int SUIT_Application::createMenu( const int id, const QString& menu, const int g return intId != -1 ? id : -1; } +/*! + Show/hide menu item corresponding to action + \param a - action + \param on - if it is true, the item will be shown, otherwise it will be hidden +*/ void SUIT_Application::setMenuShown( QAction* a, const bool on ) { setMenuShown( actionId( a ), on ); } +/*! + Show/hide menu item corresponding to action + \param id - identificator of action in menu manager + \param on - if it is true, the item will be shown, otherwise it will be hidden +*/ void SUIT_Application::setMenuShown( const int id, const bool on ) { if ( desktop() && desktop()->menuMgr() ) desktop()->menuMgr()->setShown( id, on ); } +/*! + Show/hide tool button corresponding to action + \param a - action + \param on - if it is true, the button will be shown, otherwise it will be hidden +*/ void SUIT_Application::setToolShown( QAction* a, const bool on ) { setToolShown( actionId( a ), on ); } +/*! + Show/hide menu item corresponding to action + \param id - identificator of action in tool manager + \param on - if it is true, the button will be shown, otherwise it will be hidden +*/ void SUIT_Application::setToolShown( const int id, const bool on ) { if ( desktop() && desktop()->toolMgr() ) desktop()->toolMgr()->setShown( id, on ); } +/*! + Show/hide both menu item and tool button corresponding to action + \param a - action + \param on - if it is true, the item will be shown, otherwise it will be hidden +*/ void SUIT_Application::setActionShown( QAction* a, const bool on ) { setMenuShown( a, on ); setToolShown( a, on ); } +/*! + Show/hide both menu item and tool button corresponding to action + \param id - identificator in both menu manager and tool manager + \param on - if it is true, the item will be shown, otherwise it will be hidden +*/ void SUIT_Application::setActionShown( const int id, const bool on ) { setMenuShown( id, on ); setToolShown( id, on ); } +/*! + \return action by it's SUIT identificator + \param id - SUIT identificator +*/ QAction* SUIT_Application::action( const int id ) const { QAction* a = 0; @@ -317,6 +512,10 @@ QAction* SUIT_Application::action( const int id ) const return a; } +/*! + \return SUIT identificator of action + \param a - action +*/ int SUIT_Application::actionId( const QAction* a ) const { int id = -1; @@ -329,6 +528,20 @@ int SUIT_Application::actionId( const QAction* a ) const return id; } +/*! + Creates action and registers it both in menu manager and tool manager + \return new instance of action + \param id - proposed SUIT identificator + \param text - description + \param icon - icon for toolbar + \param menu - menu text + \param tip - tool tip + \param key - shortcut + \param parent - parent object + \param toggle - if it is TRUE the action will be a toggle action, otherwise it will be a command action + \param reciever - object that contains slot + \param member - slot to be called when action is activated +*/ QAction* SUIT_Application::createAction( const int id, const QString& text, const QIconSet& icon, const QString& menu, const QString& tip, const int key, QObject* parent, const bool toggle, QObject* reciever, const char* member ) @@ -344,6 +557,11 @@ QAction* SUIT_Application::createAction( const int id, const QString& text, cons return a; } +/*! + Registers action both in menu manager and tool manager + \param id - proposed SUIT identificator (if it is -1, auto generated one is used) + \param a - action +*/ int SUIT_Application::registerAction( const int id, QAction* a ) { int ident = actionId( a ); @@ -367,11 +585,18 @@ int SUIT_Application::registerAction( const int id, QAction* a ) return ident; } +/*! + \return global action used as separator +*/ QAction* SUIT_Application::separator() { return QtxActionMgr::separator(); } +/*! + SLOT: it is called when desktop is activated +*/ + void SUIT_Application::onDesktopActivated() { emit activated( this ); diff --git a/src/SUIT/SUIT_DataObject.cxx b/src/SUIT/SUIT_DataObject.cxx index ddb393817..6240ed008 100755 --- a/src/SUIT/SUIT_DataObject.cxx +++ b/src/SUIT/SUIT_DataObject.cxx @@ -464,11 +464,17 @@ void SUIT_DataObject::setOn( const bool on ) myCheck = on; } +/*! + \return the opened state of the object (used in Object Browser). +*/ bool SUIT_DataObject::isOpen() const { return myOpen; } +/*! + Sets the opened state of the object (used in Object Browser). +*/ void SUIT_DataObject::setOpen( const bool on ) { myOpen = on; diff --git a/src/SUIT/SUIT_DataOwner.cxx b/src/SUIT/SUIT_DataOwner.cxx index 28ceb5153..a7f562515 100755 --- a/src/SUIT/SUIT_DataOwner.cxx +++ b/src/SUIT/SUIT_DataOwner.cxx @@ -26,11 +26,6 @@ #define _typeinfo type_info #endif -//******************************************************************** -// SUIT_DataOwner class -//******************************************************************** - - /*! Constructor*/ SUIT_DataOwner::SUIT_DataOwner() { @@ -49,43 +44,42 @@ bool operator==( const SUIT_DataOwnerPtr& p1, const SUIT_DataOwnerPtr& p2 ) return p1.isNull() && p2.isNull(); } -//******************************************************************** -/*! \class SUIT_DataOwnerPtrList - * implements value list with unique items (uniqueness is - * provided by operator==()) - */ -//******************************************************************** +/*! + \class SUIT_DataOwnerPtrList + implements value list with unique items (uniqueness is + provided by operator==()) +*/ -//==================================================================== -//! Constructor (default) -//==================================================================== +/*! + Constructor (default) +*/ SUIT_DataOwnerPtrList::SUIT_DataOwnerPtrList() : QValueList(), mySkipEqual( true ) { } -//==================================================================== -//! Constructor (default) -//==================================================================== +/*! + Constructor (default) +*/ SUIT_DataOwnerPtrList::SUIT_DataOwnerPtrList( const bool skipAllEqual ) : QValueList(), mySkipEqual( skipAllEqual ) { } -//==================================================================== -//! Constructor (copy) -//==================================================================== +/*! + Constructor (copy) +*/ SUIT_DataOwnerPtrList::SUIT_DataOwnerPtrList( const SUIT_DataOwnerPtrList& l ) : QValueList( l ), mySkipEqual( true ) { } -//==================================================================== -//! Constructor (copy) -//==================================================================== +/*! + Constructor (copy) +*/ SUIT_DataOwnerPtrList::SUIT_DataOwnerPtrList( const SUIT_DataOwnerPtrList& l, const bool skipAllEqual ) : QValueList(), mySkipEqual( skipAllEqual ) @@ -102,9 +96,9 @@ SUIT_DataOwnerPtrList::SUIT_DataOwnerPtrList( const SUIT_DataOwnerPtrList& l, co } #ifndef QT_NO_STL -//==================================================================== -//! Constructor (from stl) -//==================================================================== +/*! + Constructor (from stl) +*/ SUIT_DataOwnerPtrList::SUIT_DataOwnerPtrList( const std::list& l ) : QValueList( l ), mySkipEqual( true ) @@ -113,9 +107,9 @@ SUIT_DataOwnerPtrList::SUIT_DataOwnerPtrList( const std::list #endif #ifndef QT_NO_STL -//==================================================================== -//! Constructor (from stl) -//==================================================================== +/*! + Constructor (from stl) +*/ SUIT_DataOwnerPtrList::SUIT_DataOwnerPtrList( const std::list& l, const bool skipAllEqual ) : QValueList(), mySkipEqual( skipAllEqual ) @@ -127,9 +121,9 @@ SUIT_DataOwnerPtrList::SUIT_DataOwnerPtrList( const std::list } #endif -//==================================================================== -//! Appends an item to the list -//==================================================================== +/*! + Appends an item to the list +*/ SUIT_DataOwnerPtrList::iterator SUIT_DataOwnerPtrList::append( const SUIT_DataOwnerPtr& x ) { if( mySkipEqual && myMap.contains( x ) ) //contains uses SUIT_DataOwnerPtr::operator== @@ -143,9 +137,9 @@ SUIT_DataOwnerPtrList::iterator SUIT_DataOwnerPtrList::append( const SUIT_DataOw return it; } -//==================================================================== -//! Clear list -//==================================================================== +/*! + Clear list +*/ void SUIT_DataOwnerPtrList::clear() { if( mySkipEqual ) @@ -153,9 +147,9 @@ void SUIT_DataOwnerPtrList::clear() QValueList::clear(); } -//==================================================================== -//! Remove an item from the list -//==================================================================== +/*! + Remove an item from the list +*/ uint SUIT_DataOwnerPtrList::remove(const SUIT_DataOwnerPtr& x ) { if( mySkipEqual && myMap.contains(x) ) @@ -163,9 +157,9 @@ uint SUIT_DataOwnerPtrList::remove(const SUIT_DataOwnerPtr& x ) return QValueList::remove( x ); } -//==================================================================== -//! -//==================================================================== +/*! + Operator < allows to order suit data owners for map +*/ bool operator<( const SUIT_DataOwnerPtr& p1, const SUIT_DataOwnerPtr& p2 ) { return p1.get() /*! Returns the user file name for specified application */ diff --git a/src/SUIT/SUIT_Study.cxx b/src/SUIT/SUIT_Study.cxx index 995aede9e..ac8320b6c 100755 --- a/src/SUIT/SUIT_Study.cxx +++ b/src/SUIT/SUIT_Study.cxx @@ -117,11 +117,12 @@ void SUIT_Study::closeDocument(bool permanently) { } +/*! + Custom document initialization to be performed \n + within onNewDoc() handler can be put here +*/ void SUIT_Study::createDocument() { - /*! Custom document initialization to be performed \n - * within onNewDoc() handler can be put here - */ } /*! diff --git a/src/SUIT/SUIT_ViewManager.cxx b/src/SUIT/SUIT_ViewManager.cxx index 69288994b..3158025d4 100755 --- a/src/SUIT/SUIT_ViewManager.cxx +++ b/src/SUIT/SUIT_ViewManager.cxx @@ -254,9 +254,9 @@ void SUIT_ViewManager::onDeleteStudy() myStudy = NULL; } +/*! invoke method of SUIT_PopupClient, which notifies about popup*/ void SUIT_ViewManager::onContextMenuRequested( QContextMenuEvent* e ) { - /*! invoke method of SUIT_PopupClient, which notifies about popup*/ contextMenuRequest( e ); } diff --git a/src/SUIT/SUIT_ViewWindow.cxx b/src/SUIT/SUIT_ViewWindow.cxx index 3b013f679..d3803e300 100755 --- a/src/SUIT/SUIT_ViewWindow.cxx +++ b/src/SUIT/SUIT_ViewWindow.cxx @@ -54,21 +54,36 @@ SUIT_ViewWindow::~SUIT_ViewWindow() { } +/*! + Sets new view manager for window + \param theManager - new view manager +*/ void SUIT_ViewWindow::setViewManager( SUIT_ViewManager* theManager ) { myManager = theManager; } +/*! + \return view manager of window +*/ SUIT_ViewManager* SUIT_ViewWindow::getViewManager() const { return myManager; } +/*! + \return QImage, containing all scene rendering in window +*/ QImage SUIT_ViewWindow::dumpView() { return QImage(); } +/*! + Saves scene rendering in window to file + \param fileName - name of file + \param format - string contains name of format (for example, "BMP"(default) or "JPEG", "JPG") +*/ bool SUIT_ViewWindow::dumpViewToFormat( const QString& fileName, const QString& format ) { QImage img = dumpView(); @@ -111,6 +126,9 @@ void SUIT_ViewWindow::onDumpView() qApp->postEvent( this, new QCustomEvent( DUMP_EVENT ) ); } +/*! + \return filters for image files +*/ QString SUIT_ViewWindow::filter() const { return tr( "TLT_IMAGE_FILES" ); @@ -159,11 +177,18 @@ void SUIT_ViewWindow::action( const int ) { } +/*! + \return string containing visual parameters of window +*/ QString SUIT_ViewWindow::getVisualParameters() { return "empty"; } - + +/*! + Sets visual parameters of window by its string representation + \param parameters - string with visual parameters +*/ void SUIT_ViewWindow::setVisualParameters( const QString& parameters ) { } diff --git a/src/SUIT/utilities.h b/src/SUIT/utilities.h index cfc5ed0e5..fe27a2190 100755 --- a/src/SUIT/utilities.h +++ b/src/SUIT/utilities.h @@ -26,7 +26,7 @@ // Module : SALOME // $Header$ -/* --- Definition macros file to print informations if _DEBUG_ is defined --- */ +/*! --- Definition macros file to print informations if _DEBUG_ is defined --- */ #ifndef UTILITIES_H #define UTILITIES_H @@ -38,7 +38,7 @@ #include "LocalTraceBufferPool.hxx" -/** \file utilities.h +/*! \file utilities.h * For each message to put in the trace, a specific ostingstream object is \n * created and destroyed automatically at the end of the message macro. \n * The insert function of LocalTraceBufferPool class gets a buffer in a \n @@ -65,7 +65,7 @@ std::cerr << "ABORT return code= "<< code << std::endl; \ std::exit(code);} -/* --- To print date and time of compilation of current source --- */ +/*! --- To print date and time of compilation of current source --- */ #if defined ( __GNUC__ ) #define COMPILER "g++" @@ -90,7 +90,7 @@ << " at " << __TIME__ << MESS_END } #ifdef _DEBUG_ -/** @name the following MACROS are useful at debug time*/ +/*! @name the following MACROS are useful at debug time*/ //@{ #define MESSAGE(msg) {MESS_BEGIN("- Trace ") << msg << MESS_END} #define SCRUTE(var) {MESS_BEGIN("- Trace ") << #var << "=" << var <