Salome HOME
0022802: EDF 9111 GUI: Regression: SIGSEV error when loading JOBMANGER after a python...
[modules/gui.git] / src / PyConsole / PyConsole_Console.h
index e7b02ad196792021cc146992b8adcde53a2d5964..b32b078e40f0eeb789ceda5da7cc3e975e20093b 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 // License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -34,7 +34,6 @@
 
 class PyConsole_Interp;
 class PyConsole_Editor;
-class PyConsole_EnhInterp;
 
 class PYCONSOLE_EXPORT PyConsole_Console : public QWidget, public SUIT_PopupClient
 {
@@ -44,12 +43,14 @@ public:
   //! Context popup menu actions flags
   enum
   {
-    CopyId         = 0x01,                                           //!< "Copy" menu action
-    PasteId        = 0x02,                                           //!< "Paste" menu action
-    ClearId        = 0x04,                                           //!< "Clear" menu action
-    SelectAllId    = 0x08,                                           //!< "Select All" menu action
-    DumpCommandsId = 0x16,                                           //!< "DumpCommands" menu action
-    All = CopyId | PasteId | ClearId | SelectAllId | DumpCommandsId  //!< all menu actions
+    CopyId         = 0x01,  //!< "Copy" menu action
+    PasteId        = 0x02,  //!< "Paste" menu action
+    ClearId        = 0x04,  //!< "Clear" menu action
+    SelectAllId    = 0x08,  //!< "Select All" menu action
+    DumpCommandsId = 0x10,  //!< "DumpCommands" menu action
+    StartLogId     = 0x20,  //!< "Start log" menu action
+    StopLogId      = 0x40,  //!< "Stop log" menu action
+    All            = 0xFF,  //!< all menu actions 
   };
 
 public:
@@ -57,7 +58,7 @@ public:
   virtual ~PyConsole_Console();
 
   //! \brief Get python interperter
-  PyConsole_Interp*   getInterp() { return myInterp; } 
+  PyConsole_Interp*   getInterp() const;
   QFont               font() const;
   virtual void        setFont( const QFont& );
 
@@ -82,14 +83,15 @@ public:
   void                setMenuActions( const int );
   int                 menuActions() const;
 
+  void                startLog( const QString& );
+  void                stopLog();
+
 protected:
   void                createActions();
   void                updateActions();
 
   PyConsole_Console( QWidget* parent, PyConsole_Interp*,  PyConsole_Editor*);
 
-
-  PyConsole_Interp*   myInterp;    //!< python interpreter
   PyConsole_Editor*   myEditor;    //!< python console editor widget
   QMap<int, QAction*> myActions;   //!< menu actions list
 };
@@ -104,7 +106,7 @@ class PYCONSOLE_EXPORT PyConsole_EnhConsole: public PyConsole_Console
   Q_OBJECT
 
 public:
-  PyConsole_EnhConsole( QWidget* parent, PyConsole_EnhInterp* interp = 0);
+  PyConsole_EnhConsole( QWidget* parent, PyConsole_Interp* interp = 0 );
   virtual ~PyConsole_EnhConsole() {}
 };