: QObject( 0 ),
myStudy( 0 ),
myDesktop( 0 ),
- myStatusLabel( 0 )
+ myStatusLabel( 0 ),
+ myEventLoopStarted(false)
{
if ( SUIT_Session::session() )
SUIT_Session::session()->insertApplication( this );
const QString& /*theContext*/ )
{
}
+
+
+void SUIT_Application::onMainEventLoopStarting()
+{
+ myEventLoopStarted = true;
+ emit mainEventLoopStarting();
+}
virtual int viewManagerId ( const SUIT_ViewManager* ) const = 0;
virtual void viewManagers( const QString&, QList<SUIT_ViewManager*>& ) const = 0;
QAction* action( const int ) const;
+ bool isMainEventLoopStarted() const { return myEventLoopStarted; }
signals:
void applicationClosed( SUIT_Application* );
void activated( SUIT_Application* );
// void moving();
void infoChanged( QString );
+ void mainEventLoopStarting();
public slots:
virtual void updateCommandsStatus();
virtual void onHelpContextModule( const QString&, const QString&, const QString& = QString() );
+ virtual void onMainEventLoopStarting();
private slots:
void onInfoClear();
SUIT_ShortcutMgr* myShortcutMgr;
QLabel* myStatusLabel;
+
+ bool myEventLoopStarted;
};
//! This function must return a new application instance.
#include <QWaitCondition>
#include <QRegExp>
#include <QTextStream>
+#include <QTimer>
/*! - read arguments, define list of server to launch with their arguments.
* - wait for naming service
if ( splash )
splash->finish( aGUIApp->desktop() );
+ // Post an event that will be processed as soon as the main event loop is starting - useful for QtTesting
+ // test scenarios, in the MED module for example.
+ QTimer::singleShot(0, aGUIApp, SLOT(onMainEventLoopStarting()));
result = _qappl.exec();
splash = 0;