Salome HOME
New item (FontItem), allowing to show information about font setting and to select...
[modules/gui.git] / src / SUIT / SUIT_Application.h
index 804c65f2af8cdf4f58607eb24f82cf82f6bcb809..127f2ed6d628ddcc92efddb5cef1d9f9a4dabbec 100755 (executable)
@@ -12,7 +12,9 @@ class SUIT_Desktop;
 class SUIT_Convertor;
 class SUIT_ViewModel;
 class SUIT_ResourceMgr;
-
+/*! \class QObject
+ * \brief For more information see <a href="http://doc.trolltech.com">QT documentation</a>.
+ */
 /*!
   An <b>Application</b> is a class which defines application configuration and behaviour.
   For example Application object defines what Viewers are used in this application, what auxilliary windows
@@ -50,8 +52,11 @@ public:
   //! Shows the application's main widget. For non GUI application must be redefined.
   virtual void          start();
 
-  //! Loads document <theFileName> into active Study. If Study is empty - creates it.
-  virtual bool          useFile( const QString& );
+  //! Opens document <theFileName> into active Study. If Study is empty - creates it.
+  virtual bool          useFile( const QString& theFileName);
+
+  //! Loads document <theName> into active Study. If Study is empty - creates it.
+  virtual bool          useStudy( const QString& theName);
 
   //! Creates new empty Study if active Study = 0
   virtual void          createEmptyStudy();
@@ -89,24 +94,28 @@ protected:
   //! Creates a new Study instance. Must be redefined in new application according to its Study type.
   virtual SUIT_Study*   createNewStudy();
   virtual void          setActiveStudy( SUIT_Study* );
-
+  
+  /** @name Create tool functions*/ //@{
   int                   createTool( const QString& );
   int                   createTool( const int, const int, const int = -1 );
   int                   createTool( const int, const QString&, const int = -1 );
   int                   createTool( QAction*, const int, const int = -1, const int = -1 );
-  int                   createTool( QAction*, const QString&, const int = -1, const int = -1 );
+  int                   createTool( QAction*, const QString&, const int = -1, const int = -1 );//@}
 
+  /** @name Create menu functions*/ //@{
   int                   createMenu( const QString&, const int, const int = -1, const int = -1, const int = -1 );
   int                   createMenu( const QString&, const QString&, const int = -1, const int = -1, const int = -1 );
   int                   createMenu( const int, const int, const int = -1, const int = -1 );
   int                   createMenu( const int, const QString&, const int = -1, const int = -1 );
   int                   createMenu( QAction*, const int, const int = -1, const int = -1, const int = -1 );
-  int                   createMenu( QAction*, const QString&, const int = -1, const int = -1, const int = -1 );
+  int                   createMenu( QAction*, const QString&, const int = -1, const int = -1, const int = -1 );//@}
 
+  /** @name Set menu shown functions*/ //@{
   void                  setMenuShown( QAction*, const bool );
-  void                  setMenuShown( const int, const bool );
+  void                  setMenuShown( const int, const bool );//@}
+  /** @name Set tool shown functions*/ //@{
   void                  setToolShown( QAction*, const bool );
-  void                  setToolShown( const int, const bool );
+  void                  setToolShown( const int, const bool );//@}
 
   static QAction*       separator();
   QAction*              action( const int ) const;
@@ -116,8 +125,8 @@ protected:
                                       const QString&, const int, QObject* = 0,
                                       const bool = false, QObject* = 0, const char* = 0 );
 
-private slots:
-  void                  onDesktopActivated();
+protected slots:
+  virtual void          onDesktopActivated();
 
 private:
   SUIT_Study*           myStudy;
@@ -127,7 +136,8 @@ private:
 //! This function must return a new application instance.
 extern "C"
 {
-  typedef SUIT_Application* (*APP_CREATE_FUNC)( int, char** );
+  //jfa 22.06.2005:typedef SUIT_Application* (*APP_CREATE_FUNC)( int, char** );
+  typedef SUIT_Application* (*APP_CREATE_FUNC)();
 }
 
 #define APP_CREATE_NAME "createApplication"