#include <QColorDialog>
#include <QColormap>
#include <QCoreApplication>
-#include <QX11Info>
#include <stdlib.h>
#if !defined WNT
+#include <QX11Info>
#include <GL/glx.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
PyConsole_Editor* theListener,
bool sync = false )
: PyInterp_LockRequest( theInterp, theListener, sync ),
- myCommand( theCommand ), myState( PyInterp_Event::OK )
+ myCommand( theCommand ), myState( PyInterp_Event::ES_OK )
{}
protected:
{
int ret = getInterp()->run( myCommand.toLatin1() );
if ( ret < 0 )
- myState = PyInterp_Event::ERROR;
+ myState = PyInterp_Event::ES_ERROR;
else if ( ret > 0 )
- myState = PyInterp_Event::INCOMPLETE;
+ myState = PyInterp_Event::ES_INCOMPLETE;
}
}
addText( pe->text() );
return;
}
- case PyInterp_Event::OK:
- case PyInterp_Event::ERROR:
+ case PyInterp_Event::ES_OK:
+ case PyInterp_Event::ES_ERROR:
{
// clear command buffer
myCommandBuffer.truncate( 0 );
myEventLoop->exit();
break;
}
- case PyInterp_Event::INCOMPLETE:
+ case PyInterp_Event::ES_INCOMPLETE:
{
// extend command buffer (multi-line command)
myCommandBuffer.append( "\n" );
// unset history browsing mode
myCmdInHistory = -1;
- if ( (int)event->type() == (int)PyInterp_Event::OK && myQueue.count() > 0 )
+ if ( (int)event->type() == (int)PyInterp_Event::ES_OK && myQueue.count() > 0 )
{
// process the next sheduled command from the queue (if there is any)
QString nextcmd = myQueue[0];
QEvent* PyInterp_Request::createEvent() const
{
- return new PyInterp_Event( PyInterp_Event::NOTIFY, (PyInterp_Request*)this );
+ return new PyInterp_Event( PyInterp_Event::ES_NOTIFY, (PyInterp_Request*)this );
}
void PyInterp_Request::processEvent( QObject* o )
PyInterp_Event( const PyInterp_Event& );
public:
- enum { NOTIFY = QEvent::User + 5000, OK, ERROR, INCOMPLETE, LAST };
+ //Execution status
+ enum { ES_NOTIFY = QEvent::User + 5000, ES_OK, ES_ERROR, ES_INCOMPLETE, ES_LAST };
PyInterp_Event( int type, PyInterp_Request* request )
: QEvent( (QEvent::Type)type ), myRequest( request ) {}
class SVTK_RectPicker;
class SVTK_InteractorStyle;
-extern int SALOME_POINT_SIZE;
-extern int SALOME_LINE_WIDTH;
+SVTK_EXPORT extern int SALOME_POINT_SIZE;
+SVTK_EXPORT extern int SALOME_LINE_WIDTH;
#ifdef WIN32
#pragma warning ( disable:4251 )
// QT Includes
// Put Qt includes before the X11 includes which #define the symbol None
// (see SVTK_SpaceMouse.h) to avoid the compilation error.
-#include <QX11Info>
+#ifndef WIN32
+# include <QX11Info>
+#endif
#include <QMouseEvent>
#include "SVTK_SpaceMouse.h"
/*!
To handle native Win32 events (from such devices as SpaceMouse)
*/
-bool QVTK_RenderWindowInteractor::winEvent( MSG* msg )
+bool QVTK_RenderWindowInteractor::winEvent( MSG* msg, long* result )
{
// TODO: Implement event handling for SpaceMouse
- return QWidget::winEvent( msg );
+ return QWidget::winEvent( msg, result);
}
#else
//! To handle native events (from such devices as SpaceMouse)
#ifdef WIN32
- virtual bool winEvent( MSG* );
+ virtual bool winEvent( MSG*, long* );
#else
virtual bool x11Event( XEvent *e );
#endif
#include <SUIT_ResourceMgr.h>
#include <SUIT_ExceptionHandler.h>
+#include <Standard_Version.hxx>
+
/*! - read arguments, define list of server to launch with their arguments.
* - wait for naming service
* - create and run a thread for launch of all servers
#include "SALOME_Event.h"
#include "SUIT_Session.h"
-//#include "SUIT_Application.h"
#include "SUIT_Desktop.h"
#include "SUIT_Study.h"
-//#include <QApplication>
#include <QMutex>
#include <QWaitCondition>
#include <OSD_SharedLibrary.hxx>
#include <OSD_Function.hxx>
+#ifdef WNT
+# include <process.h>
+#endif
+
+
using namespace std;
/*!
return aStudyId;
}
+CORBA::Long SALOME_Session_i::getPID() {
+ return (CORBA::Long)
+#ifndef WNT
+ getpid();
+#else
+ _getpid();
+#endif
+}
+
bool SALOME_Session_i::restoreVisualState(CORBA::Long theSavePoint)
{
class TEvent: public SALOME_Event {
CORBA::Long GetActiveStudyId();
void ping(){};
- CORBA::Long getPID() { return (CORBA::Long)getpid(); };
+ CORBA::Long getPID();
//! Restors a visual state of the study at theSavePoint
bool restoreVisualState(CORBA::Long theSavePoint);