void logoInsert( const QString&, const QPixmap&, const int = -1 );
void emitActivated();
+ void emitMessage( const QString& );
signals:
void activated();
void deactivated();
void windowActivated( SUIT_ViewWindow* );
void closing( SUIT_Desktop*, QCloseEvent* );
+ void message( const QString& );
protected:
virtual bool event( QEvent* );
#include "SUIT_Session.h"
#include "SUIT_Application.h"
+#include "SUIT_Desktop.h"
#include <qapplication.h>
return false;
}
+
+void SALOME_Session_i::emitMessage(const char* theMessage)
+{
+ class TEvent: public SALOME_Event {
+ public:
+ TEvent(const char * msg) {
+ _msg = msg;
+ }
+ virtual void Execute() {
+ SUIT_Session::session()->activeApplication()->desktop()->emitMessage(_msg);
+ }
+ private:
+ const char* _msg;
+ };
+ if ( SUIT_Session::session() ) {
+ if ( SUIT_Session::session()->activeApplication() ) {
+ if ( SUIT_Session::session()->activeApplication()->desktop() ) {
+ ProcessVoidEvent( new TEvent(theMessage) );
+ }
+ }
+ }
+}
+
+void SALOME_Session_i::emitMessageOneWay(const char* theMessage)
+{
+ emitMessage(theMessage);
+}
//! Restors a visual state of the study at theSavePoint
bool restoreVisualState(CORBA::Long theSavePoint);
+ //! Emit a qt signal from the session GUI desktop window.
+ void emitMessage(const char* theMessage);
+ void emitMessageOneWay(const char* theMessage);
+
protected:
//! Naming service interface