]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Implement a method to clear log messages window : clearMessages()
authorvsr <vsr@opencascade.com>
Tue, 24 Oct 2006 13:36:48 +0000 (13:36 +0000)
committervsr <vsr@opencascade.com>
Tue, 24 Oct 2006 13:36:48 +0000 (13:36 +0000)
src/SALOME_PYQT/SalomePyQt/SalomePyQt.cxx
src/SALOME_PYQT/SalomePyQt/SalomePyQt.h
src/SALOME_PYQT/SalomePyQt/SalomePyQt.sip
src/SALOME_PYQT/SalomePyQt/SalomePyQt_v4.sip

index 820f12a530d8d421dbe555943a4753971bac1fe2..a67c6748429e50df95307eef386891d02e2879bd 100644 (file)
@@ -1566,3 +1566,23 @@ void SalomePyQt::message( const QString& msg, bool addSeparator )
   };
   ProcessVoidEvent( new TEvent( msg, addSeparator ) );
 }
+
+/*!
+  SalomePyQt::clearMessages
+  Removes all the messages from the Log output window
+ */
+void SalomePyQt::clearMessages()
+{
+  class TEvent: public SALOME_Event {
+  public:
+    TEvent() {}
+    virtual void Execute() {
+      if ( SalomeApp_Application* anApp = getApplication() ) {
+       LogWindow* lw = anApp->logWindow();
+       if ( lw )
+         lw->clear();
+      }
+    }
+  };
+  ProcessVoidEvent( new TEvent() );
+}
index 03e988dcd7cd5beeefa4de7cb8ca20ec46453860..6a6a0e8afd5db48c4016a9c3d62c11187453d7f5 100644 (file)
@@ -177,6 +177,7 @@ public:
                                                  const QVariant& );
 
   static void              message( const QString&, bool = true );
+  static void              clearMessages();
 };
 
 #endif // SALOME_PYQT_H
index a8d6fdd6e608ca679587de30f88a846adb1d4f54..ecd8886b50126ba60211a295b9666c923dcfd13a 100644 (file)
@@ -163,4 +163,5 @@ public:
                                                  const QVariant& );
 
   static void              message( const QString&, bool = true );
+  static void              clearMessages();
 };
index 77b7837464711a3b744fc7141d6af0d0b68e1c41..5bf15f159762720003ec455637cef0b4fb49c3dd 100644 (file)
@@ -163,4 +163,5 @@ public:
                                                  const QVariant& ) /ReleaseGIL/ ;
 
   static void              message( const QString&, bool = true ) /ReleaseGIL/ ;
+  static void              clearMessages() /ReleaseGIL/ ;
 };