QFont font;
};
-static VisuGUI MYVISUGUI;
+static VisuGUI MYVISUGUI("");
VisuGUI *visuGUI = &MYVISUGUI;
VISU::VISU_Gen_i* VisuGUI::GetVisuGen(){
}
-VisuGUI::VisuGUI(){
+VisuGUI::VisuGUI( const QString& theName, QObject* theParent )
+: SALOMEGUI( theName, theParent ) {
mySelectionDlg = 0;
}
return true;
}
+//===========================================================================
+// CanProcessEvent
+//===========================================================================
+bool VisuGUI::CanProcessEvent(SALOME_Event* se)
+{
+// return ( se && se->getType() > VISU_FIRST_EVENT && se->getType() < VISU_LAST_EVENT );
+ return true;
+}
+
+//===========================================================================
+// ProcessEvent
+//===========================================================================
+bool VisuGUI::ProcessEvent(SALOME_Event* se)
+{
+ return true;
+}
void VisuGUI::SelectionInfo() {
if (mySelectionDlg) {
//=====================================================================================
-// function : setSettings()
+// function : SetSettings()
// purpose :
//=====================================================================================
-bool VisuGUI::setSettings(QAD_Desktop* parent)
+bool VisuGUI::SetSettings(QAD_Desktop* parent)
{
int anId = 53;
QMenuData* pp;
END_OF("VisuGUI::BuildPresentation");
}
+
+//===========================================================================
+// SupportedViewType
+//===========================================================================
+void VisuGUI::SupportedViewType(int* buffer, int bufferSize)
+{
+ if (!buffer || !bufferSize) return;
+ buffer[0] = (int)VIEW_VTK;
+ if (--bufferSize) buffer[1] = (int)VIEW_PLOT2D;
+}
+
extern "C"
{
+ Standard_EXPORT SALOMEGUI* GetComponentGUI() {
+ if ( !visuGUI )
+ visuGUI = new VisuGUI( "" );
+ return visuGUI;
+ }
+
+//***************************************
+// san - obsolete code - TO BE REMOVED!
+// No extern "C" fucntions below will be necessary!
+//**************************************
bool OnGUIEvent(int theCommandID, QAD_Desktop* parent)
{
//if(MYDEBUG) MESSAGE("VisuGUI::OnGUIEvent "<< theCommandID);
- return VisuGUI::OnGUIEvent(theCommandID, parent);
+ return visuGUI->OnGUIEvent(theCommandID, parent);
}
bool OnKeyPress (QKeyEvent* pe, QAD_Desktop* parent, QAD_StudyFrame* studyFrame)
{
if(MYDEBUG) MESSAGE("VisuGUI::OnKeyPress ");
- return VisuGUI::OnKeyPress (pe, parent, studyFrame);
+ return visuGUI->OnKeyPress (pe, parent, studyFrame);
}
bool OnMousePress (QMouseEvent* pe, QAD_Desktop* parent, QAD_StudyFrame* studyFrame)
{
//if(MYDEBUG) MESSAGE("VisuGUI::OnMousePress ");
- return VisuGUI::OnMousePress (pe, parent, studyFrame);
+ return visuGUI->OnMousePress (pe, parent, studyFrame);
}
bool OnMouseMove (QMouseEvent* pe, QAD_Desktop* parent, QAD_StudyFrame* studyFrame)
{
//if(MYDEBUG) MESSAGE("VisuGUI::OnMouseMove ");
- return VisuGUI::OnMouseMove (pe, parent, studyFrame);
+ return visuGUI->OnMouseMove (pe, parent, studyFrame);
}
bool SetSettings ( QAD_Desktop* parent )
{
- return VisuGUI::setSettings( parent );
+ return visuGUI->SetSettings( parent );
}
bool customPopup ( QAD_Desktop* parent, QPopupMenu* popup, const QString & theContext,
const QString & theParent, const QString & theObject )
{
- return VisuGUI::CustomPopup( parent, popup, theContext, theParent, theObject );
+ return visuGUI->CustomPopup( parent, popup, theContext, theParent, theObject );
}
void definePopup ( QString & theContext, QString & theParent, QString & theObject )
{
- VisuGUI::DefinePopup( theContext, theParent, theObject );
+ visuGUI->DefinePopup( theContext, theParent, theObject );
}
bool activeStudyChanged ( QAD_Desktop* parent )
}
void buildPresentation ( const Handle(SALOME_InteractiveObject)& theIO )
{
- VisuGUI::BuildPresentation(theIO);
+ visuGUI->BuildPresentation(theIO);
}
void supportedViewType(int* buffer, int bufferSize)
}
}
+//***************************************
+// san - temporary code - TO BE REMOVED!
+// No extern "C" fucntions will be necessary!
+//**************************************
+
//////////////////////////////////////////////////////////////////////////////////
//////////////// CHANGE ACTOR COLOR ////////////////////////
#include <TColStd_MapIteratorOfMapOfInteger.hxx>
#include "SALOME_ListIteratorOfListIO.hxx"
+#include "SALOMEGUI.h"
+
namespace VISU{
class VISU_Gen_i;
// ======================================================================
//
-class VisuGUI : public QObject{
+class VisuGUI : public SALOMEGUI{
Q_OBJECT;
public:
- VisuGUI();
- ~VisuGUI();
+ VisuGUI( const QString&, QObject* = 0 );
+ virtual ~VisuGUI();
static VISU::VISU_Gen_i* GetVisuGen();
// ----------------------------------------
// All method of standard EXPORT
// ----------------------------------------
- Standard_EXPORT static bool OnGUIEvent(int theCommandID, QAD_Desktop* parent);
- Standard_EXPORT static bool setSettings(QAD_Desktop* parent);
- Standard_EXPORT static void DefinePopup(QString & theContext,
+ virtual bool OnGUIEvent(int theCommandID, QAD_Desktop* parent);
+ virtual bool CanProcessEvent(SALOME_Event* se);
+ virtual bool ProcessEvent(SALOME_Event* se);
+ virtual bool SetSettings(QAD_Desktop* parent);
+ virtual void DefinePopup(QString & theContext,
QString & theParent,
QString & theObject ) ;
- Standard_EXPORT static bool CustomPopup(QAD_Desktop* parent,
+ virtual bool CustomPopup(QAD_Desktop* parent,
QPopupMenu* popup,
const QString & theContext,
const QString & theParent,
const QString & theObject);
- Standard_EXPORT static void BuildPresentation(const Handle(SALOME_InteractiveObject)&);
- Standard_EXPORT static bool OnMousePress(QMouseEvent* pe ,
+ virtual void BuildPresentation(const Handle(SALOME_InteractiveObject)&);
+ virtual bool OnMousePress(QMouseEvent* pe ,
QAD_Desktop* parent,
QAD_StudyFrame* studyFrame);
- Standard_EXPORT static bool OnMouseMove(QMouseEvent* pe ,
+ virtual bool OnMouseMove(QMouseEvent* pe ,
QAD_Desktop* parent,
QAD_StudyFrame* studyFrame);
- Standard_EXPORT static bool OnKeyPress(QKeyEvent* pe,
+ virtual bool OnKeyPress(QKeyEvent* pe,
QAD_Desktop* parent,
QAD_StudyFrame* studyFrame);
- public slots:
+ virtual void SupportedViewType (int* buffer, int bufferSize);
+
+public slots:
void ImportTablesFromFile();
void ExportTableToFile();
QDialog* myActiveDialogBox;
int myState ;
VisuGUI_SelectionDlg* mySelectionDlg;
-
-signals:
- void SignalDeactivateActiveDialog();
- void SignalCloseAllDialogs();
};
#endif