// Qt includes
// #define INCLUDE_MENUITEM_DEF // VSR commented ????????
+#include <QApplication>
#include <QMenu>
#include <QTextStream>
#endif
}
+void SMESHGUI::message( const QString& msg )
+{
+ // dispatch message
+ QStringList data = msg.split("/");
+ if ( data.count() > 0 ) {
+ if ( data.first() == "mesh_loading" ) {
+ // get mesh entry
+ QString entry = data.count() > 1 ? data[1] : QString();
+ if ( entry.isEmpty() )
+ return;
+ // get study
+ _PTR(Study) study = dynamic_cast<SalomeApp_Study*>( application()->activeStudy() )->studyDS();
+ // get mesh name
+ _PTR(SObject) obj = study->FindObjectID( entry.toLatin1().constData() );
+ QString name;
+ if ( obj )
+ name = obj->GetName().c_str();
+ if ( name.isEmpty() )
+ return;
+
+ if ( data.last() == "stop" )
+ application()->putInfo( tr( "MESH_LOADING_MSG_FINISHED" ).arg( name ) );
+ else
+ application()->putInfo( tr( "MESH_LOADING_MSG" ).arg( name ) );
+ QApplication::processEvents();
+ }
+ }
+}
+
/*!
\brief Connects or disconnects signals about activating and cloning view on the module slots
\param pview view which is connected/disconnected
virtual void createPreferences();
virtual void preferencesChanged( const QString&, const QString& );
+ virtual void message( const QString& );
+
virtual void update( const int );
static SALOMEDS::Color getUniqueColor( const QList<SALOMEDS::Color>& );
virtual void studyClosed( SUIT_Study* );
void onViewClosed( SUIT_ViewWindow* );
-
private slots:
void OnGUIEvent();
void onViewManagerActivated( SUIT_ViewManager* );
<source>SMESH_PLUGINS_OTHER</source>
<translation>SMESH plugins</translation>
</message>
+ <message>
+ <source>MESH_LOADING_MSG</source>
+ <translation>Loading mesh %0 in progress</translation>
+ </message>
+ <message>
+ <source>MESH_LOADING_MSG_FINISHED</source>
+ <translation>Mesh %0 loading done</translation>
+ </message>
</context>
<context>
<name>SMESHGUI_GroupDlg</name>
<source>SMESH_PLUGINS_OTHER</source>
<translation>Extensions SMESH</translation>
</message>
+ <message>
+ <source>MESH_LOADING_MSG</source>
+ <translation type="unfinished">Loading mesh %0 in progress</translation>
+ </message>
+ <message>
+ <source>MESH_LOADING_MSG_FINISHED</source>
+ <translation type="unfinished">Mesh %0 loading done</translation>
+ </message>
</context>
<context>
<name>SMESHGUI_GroupDlg</name>