SUBDIRS = Qtx SUIT STD CAF CAM SUITApp VTKViewer OCCViewer GLViewer \
LogWindow Event Loader OBJECT Prs PyInterp PythonConsole ObjBrowser \
- RegistryDisplay Plot2d TOOLSGUI SOCC SVTK SPlot2d SalomeApp SALOME_SWIG SALOME_PY Session
-# excluded : SUPERVGraph SALOME_PYQT
+ RegistryDisplay Plot2d TOOLSGUI SOCC SVTK SPlot2d SalomeApp SALOME_SWIG SALOME_PY SUPERVGraph Session
+# excluded : SALOME_PYQT
@MODULE@
@COMMENCE@
-EXPORT_HEADERS = \
- SUPERVGraph_ViewFrame.h
+EXPORT_HEADERS = SUPERVGraph_ViewFrame.h \
+ SUPERVGraph_ViewManager.h \
+ SUPERVGraph_ViewModel.h
# Libraries targets
LIB = libSUPERVGraph.la
LIB_SRC = SUPERVGraph.cxx \
- SUPERVGraph_ViewFrame.cxx
+ SUPERVGraph_ViewFrame.cxx \
+ SUPERVGraph_ViewManager.cxx \
+ SUPERVGraph_ViewModel.cxx
LIB_MOC = SUPERVGraph_moc.cxx \
- SUPERVGraph_ViewFrame_moc.cxx
+ SUPERVGraph_ViewFrame_moc.cxx \
+ SUPERVGraph_ViewManager_moc.cxx \
+ SUPERVGraph_ViewModel_moc.cxx
LIB_CLIENT_IDL = SALOMEDS.idl \
SALOME_ModuleCatalog.idl \
SALOME_GenericObj.idl
-CPPFLAGS+=$(QT_INCLUDES) $(OCC_INCLUDES) $(PYTHON_INCLUDES) $(BOOST_CPPFLAGS) -I${KERNEL_ROOT_DIR}/include/salome
-LDFLAGS+=$(QT_MT_LIBS) -L$(top_builddir)/lib -lSalomeGUI
+CPPFLAGS+=$(QT_INCLUDES) $(OCC_INCLUDES) $(PYTHON_INCLUDES) $(BOOST_CPPFLAGS) -I${KERNEL_ROOT_DIR}/include/salome -I${GUI_ROOT_DIR}/include/salome
+LDFLAGS+=$(QT_MT_LIBS) -L$(top_builddir)/lib
@CONCLUDE@
#include "SUPERVGraph.h"
#include "SUPERVGraph_ViewFrame.h"
-QAD_ViewFrame* SUPERVGraph::createView(QAD_RightFrame* parent)
+SUIT_ViewWindow* SUPERVGraph::createView(SUIT_Desktop* parent)
{
- return new SUPERVGraph_ViewFrame( parent, "vtkView" );
+ return new SUPERVGraph_ViewFrame( parent/*, "vtkView"*/ );
}
extern "C"
{
- QAD_ViewFrame* createView(QAD_RightFrame* parent)
+ SUIT_ViewWindow* createView(SUIT_Desktop* parent)
{
return SUPERVGraph::createView(parent);
}
#ifndef SUPERVGraph_HeaderFile
#define SUPERVGraph_HeaderFile
-#include "QAD_RightFrame.h"
-#include "QAD_ViewFrame.h"
+#include "SUIT_Desktop.h"
+#include "SUIT_ViewWindow.h"
class SUPERVGraph : public QObject
{
public :
- Standard_EXPORT static QAD_ViewFrame* createView ( QAD_RightFrame* parent);
+ /*Standard_EXPORT*/ static SUIT_ViewWindow* createView ( SUIT_Desktop* parent);
};
+++ /dev/null
-// SALOME SUPERVGraph : build Supervisor viewer into desktop
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
-//
-//
-//
-// File : SUPERVGraph_Graph.cxx
-// Author : Francis KLOSS
-// Module : SALOME
-
-using namespace std;
-#include "SUPERVGraph_Graph.h"
-
-#include "QAD_Settings.h"
-#include "QAD_Config.h"
-
-#include <qcolordialog.h>
-#include <qpopupmenu.h>
-
-
-SUPERVGraph_Graph::SUPERVGraph_Graph(QWidget* parent) :
- QScrollView(parent),
- where(QPoint(0, 0))
-{
- installEventFilter(viewport());
- // viewport()->setBackgroundColor(QColor(165, 255, 176));
-
- connect(this, SIGNAL(contentsMoving(int, int)), this, SLOT(Draw(int, int)));
-
- popup = new QPopupMenu(viewport());
- // if (main->isModify()) {
- // pan = popup->insertItem("Add Node", main, SLOT(addNode()));
- // pap = popup->insertItem("Add Point", this, SLOT(addPoint()));
- // pdl = popup->insertItem("Delete Link", this, SLOT(deleteLink()));
- // pif = popup->insertItem("Insert File", main, SLOT(insertFile()));
- // pci = popup->insertItem("Change Informations", this, SLOT(changeInformation()));
- // popup->insertSeparator();
- // };
- // popup->insertItem("Add in Study", main, SLOT(addStudy()));
- // popup->insertItem("Show Informations", this, SLOT(showInformation()));
- // popup->insertSeparator();
- // popup->insertItem("Copy (Read Only)", main, SLOT(copyReading()));
- // popup->insertItem("Copy (Modifiying)", main, SLOT(copyModifying()));
-}
-
-void SUPERVGraph_Graph::sync() {
- // bool editing = main->getDataflow()->IsEditing();
- // if (main->isModify()) {
- // popup->setItemEnabled(pci, editing);
- // popup->setItemEnabled(pan, editing);
- // popup->setItemEnabled(pap, editing);
- // popup->setItemEnabled(pdl, editing);
- // popup->setItemEnabled(pif, editing);
- // };
-
- // SUPERVGraph_Node* ihmNode;
- // QObjectList* ihmList = queryList("SUPERVGraph_Node");
- // SUPERV_Nodes nodes = main->getDataflow()->Nodes();
- // int n = nodes->length();
-
- // for (int i=0; i<n; i++) {
- // ihmNode = (SUPERVGraph_Node *)child(nodes[i]->Name(), "SUPERVGraph_Node");
- // if (ihmNode == NULL) {
- // ihmNode = new SUPERVGraph_Node(viewport(), main, nodes[i]);
- // addChild(ihmNode, nodes[i]->X(), nodes[i]->Y());
- // } else {
- // moveChild(ihmNode, nodes[i]->X(), nodes[i]->Y());
- // ihmList->removeRef(ihmNode);
- // };
- // ihmNode->sync();
- // };
-
- // QObjectListIt i(*ihmList);
- // while ((ihmNode=(SUPERVGraph_Node*)i.current()) != 0) {
- // ++i;
- // ihmNode->close();
- // };
- // delete ihmList;
-
- // SUPERVGraph_PortIn* pi;
- // ihmList = queryList("SUPERVGraph_PortIn");
- // i = *ihmList;
- // while ((pi=(SUPERVGraph_PortIn*)i.current()) != 0) {
- // ++i;
- // pi->sync(true);
- // };
- // delete ihmList;
-
- // SUPERVGraph_PortOut* po;
- // ihmList = queryList("SUPERVGraph_PortOut");
- // i = *ihmList;
- // while ((po=(SUPERVGraph_PortOut*)i.current()) != 0) {
- // ++i;
- // po->sync();
- // };
- // delete ihmList;
-
- // Draw(0, 0);
-}
-
-SUPERVGraph_Graph::~SUPERVGraph_Graph() {
-}
-
-bool SUPERVGraph_Graph::eventFilter(QObject* object, QEvent* event) {
- if ((event->type() == QEvent::Move ) ||
- (event->type() == QEvent::Paint) ||
- (event->type() == QEvent::Resize) ) {
- Draw(0, 0);
- };
- return(QScrollView::eventFilter(object, event));
-}
-
-void SUPERVGraph_Graph::Draw(int x, int y) {
- QPainter p(viewport());
- p.eraseRect(viewport()->rect());
- p.setPen(QPen(Qt::black, 2));
-
- // SUPERVGraph_Point* c;
- // SUPERVGraph_Point* n;
- // QObjectList* points = queryList("SUPERVGraph_Point");
- // QObjectListIt i(*points);
- // while ((c=(SUPERVGraph_Point*)i.current()) != 0) {
- // ++i;
- // n=c->getNext();
- // if (n!=c) {
- // p.drawLine(contentsToViewport(QPoint(c->getX()+POINT_SIZE_HALF, c->getY()+POINT_SIZE_HALF)),
- // contentsToViewport(QPoint(n->getX()+POINT_SIZE_HALF, n->getY()+POINT_SIZE_HALF)) );
- // };
- // };
- // delete points;
-}
-
-void SUPERVGraph_Graph::contentsMousePressEvent(QMouseEvent* e) {
- where = viewportToContents(viewport()->mapFromGlobal(e->globalPos()));
- // main->showPopup(popup, e);
-}
-
-void SUPERVGraph_Graph::contentsMouseReleaseEvent(QMouseEvent* e) {
- // main->sketchPoint(NULL);
-
- if ( e->button() == Qt::RightButton ) {
- QPopupMenu* popup = createPopup();
- if ( popup ) {
- popup->exec( QCursor::pos() );
- destroyPopup();
- }
- return;
- }
-
-}
-
-void SUPERVGraph_Graph::contentsMouseMoveEvent(QMouseEvent* e) {
- // main->sketchMove();
-}
-
-float SUPERVGraph_Graph::distance(int xp, int yp, int xl, int yl, int xn, int yn) {
- float r, s;
- float a, b, c, d;
-
- float px = (float)(xp);
- float py = (float)(yp);
- float lx = (float)(xl);
- float ly = (float)(yl);
- float nx = (float)(xn);
- float ny = (float)(yn);
-
- r = px - lx;
- r = r * r;
- s = py - ly;
- s = s * s;
- a = r + s;
-
- r = px - nx;
- r = r * r;
- s = py - ny;
- s = s * s;
- b = r + s;
-
- r = nx - lx;
- r = r * r;
- s = ny - ly;
- s = s * s;
- c = r + s;
-
- if (c<0.001) {
- return(a);
- } else {
- r = a + c - b;
- r = r * r;
- d = r / ( 4 * c);
- return(a - d);
- };
-}
-
-QPoint SUPERVGraph_Graph::getPoint() {
- return(where);
-}
-
-// SUPERVGraph_Point* SUPERVGraph_Graph::findPoint(int x, int y) {
-// float m;
-// float d = SCROLL_MAX;
-// SUPERVGraph_Point* t = NULL;
-// SUPERVGraph_Point* c;
-// SUPERVGraph_Point* n;
-// QObjectList* points = queryList("SUPERVGraph_Point");
-// QObjectListIt i(*points);
-
-// while ((c=(SUPERVGraph_Point*)i.current()) != 0) {
-// ++i;
-// n=c->getNext();
-// if (n != c) {
-// m = distance(x, y, c->getX(), c->getY(), n->getX(), n->getY());
-// if (m < d) {
-// d = m;
-// t = c;
-// };
-// };
-// };
-// delete points;
-// return(t);
-// }
-
-void SUPERVGraph_Graph::addPoint() {
- // int x = where.x();
- // int y = where.y();
- // SUPERVGraph_Point* p = findPoint(x, y);
- // if (p == NULL) {
- // QMessageBox::warning(0, "Supervision Error", "No Link to Add a Point");
- // } else {
- // p->addPoint(x, y, true);
- // };
-}
-
-void SUPERVGraph_Graph::deleteLink() {
- // SUPERVGraph_Point* p = findPoint(where.x(), where.y());
- // if (p == NULL) {
- // QMessageBox::warning(0, "Supervision Error", "No Link to Delete");
- // } else {
- // SUPERV_Link l = p->getLink();
- // if (l == NULL) {
- // QMessageBox::warning(0, "Supervision Error", "No Link to Delete");
- // } else {
- // l->Destroy();
- // main->sync();
- // };
- // };
-}
-
-void SUPERVGraph_Graph::showInformation() {
- // if (Supervision.information(Engines::Node::_narrow(main->getDataflow()), false)) {
- // main->sync();
- // };
-}
-
-void SUPERVGraph_Graph::changeInformation() {
- // if (Supervision.information(Engines::Node::_narrow(main->getDataflow()), true)) {
- // main->sync();
- // };
-}
-
-/*!
- Creates the popup
-*/
-void SUPERVGraph_Graph::onCreatePopup()
-{
- if ( myPopup ) {
-// if (myPopup->count()<1) {
- if ( myPopup->count() > 0 )
- myIDs.append ( myPopup->insertSeparator() );
- int id;
- myIDs.append ( id = myPopup->insertItem (tr ("MEN_VP3D_CHANGEBGR")) );
- QAD_ASSERT ( myPopup->connectItem ( id, this, SLOT(onChangeBackgroundColor())) );
-// }
- }
-}
-
-void SUPERVGraph_Graph::onChangeBackgroundColor()
-{
- QColor previousColor = viewport()->backgroundColor();
- QColor selColor = QColorDialog::getColor ( previousColor, NULL );
- if ( selColor.isValid() )
- viewport()->setBackgroundColor( selColor );
-
- QAD_CONFIG->addSetting( "SUPERVGraph:BackgroundColorRed", selColor.red() );
- QAD_CONFIG->addSetting( "SUPERVGraph:BackgroundColorGreen", selColor.green() );
- QAD_CONFIG->addSetting( "SUPERVGraph:BackgroundColorBlue", selColor.blue() );
-}
+++ /dev/null
-// SALOME SUPERVGraph : build Supervisor viewer into desktop
-//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
-//
-//
-//
-// File : SUPERVGraph_Graph.h
-// Author : Francis KLOSS
-// Module : SALOME
-
-#ifndef SUPERVGraph_Graph_HXX
-#define SUPERVGraph_Graph_HXX
-
-#include "QAD.h"
-#include "QAD_Popup.h"
-
-#include <qscrollview.h>
-#include <qpopupmenu.h>
-
-class QAD_EXPORT SUPERVGraph_Graph: public QScrollView, public QAD_PopupClientServer
-{
- Q_OBJECT
-
-public:
- SUPERVGraph_Graph(QWidget* parent);
- ~SUPERVGraph_Graph();
-
- /* popup management */
- void onCreatePopup();
-
- void sync();
- void contentsMousePressEvent(QMouseEvent* e);
- void contentsMouseReleaseEvent(QMouseEvent* e);
- void contentsMouseMoveEvent(QMouseEvent* e);
-
- QPoint getPoint();
-
-public slots:
- void Draw(int x, int y);
-
-private slots:
- void addPoint();
- void deleteLink();
- void showInformation();
- void changeInformation();
-
-protected slots:
- void onChangeBackgroundColor();
-
-protected:
- bool eventFilter(QObject* object, QEvent* event);
-
-private:
-// SUPERVGraph_Point* findPoint(int x, int y);
- float distance(int xp, int yp, int xl, int yl, int xn, int yn);
-
-// SUPERVGraph_Main* main;
- QPoint where;
- QPopupMenu* popup;
- int pci;
- int pan;
- int pap;
- int pdl;
- int pif;
-};
-
-#endif
using namespace std;
#include "SUPERVGraph_ViewFrame.h"
-#include "QAD_Settings.h"
-#include "QAD_Config.h"
-#include "QAD_Application.h"
-#include "QAD_Desktop.h"
-#include "SALOME_Selection.h"
-
#include "utilities.h"
//QT Include
#include <qcolordialog.h>
-SUPERVGraph_View::SUPERVGraph_View(QWidget* theParent): QWidget(theParent){
+SUPERVGraph_View::SUPERVGraph_View( QWidget* theParent ): QWidget( theParent )
+{
init(theParent);
}
-SUPERVGraph_View::SUPERVGraph_View(SUPERVGraph_View* theParent): QWidget(theParent){
- setPopupServer(theParent->getPopupServer());
+
+SUPERVGraph_View::SUPERVGraph_View( SUPERVGraph_View* theParent ): QWidget( theParent )
+{
init(theParent);
}
-void SUPERVGraph_View::init(QWidget* theParent){
+
+void SUPERVGraph_View::contextMenuPopup( QPopupMenu* )
+{
+ // to be implemented
+}
+
+void SUPERVGraph_View::init( QWidget* theParent )
+{
if ( theParent->inherits( "QMainWindow" ) ) {
( ( QMainWindow* )theParent )->setCentralWidget( this );
}
}
}
-void SUPERVGraph_View::onCreatePopup(){
- /*
- if ( myPopup ) {
- QAD_Desktop* Desktop = (QAD_Desktop*) QAD_Application::getDesktop();
- QAD_Study* ActiveStudy = Desktop->getActiveStudy();
- SALOME_Selection* Sel = SALOME_Selection::Selection( ActiveStudy->getSelection() );
-
- QString theContext;
- QString theParent("Viewer");
- QString theObject;
-
- Desktop->definePopup( theContext, theParent, theObject );
- Desktop->createPopup( myPopup, theContext, theParent, theObject);
- Desktop->customPopup( myPopup, theContext, theParent, theObject );
- if (Sel->IObjectCount() == 0 && myPopup->count()<1) {
- int id;
- myIDs.append ( id = myPopup->insertItem (tr ("MEN_VP3D_CHANGEBGR")) );
- QAD_ASSERT ( myPopup->connectItem ( id, this, SLOT(onChangeBackgroundColor())) );
- }
- }
- */
- }
+
/*!
Constructor
*/
-SUPERVGraph_ViewFrame::SUPERVGraph_ViewFrame(QWidget* parent, const char* name)
- : QAD_ViewFrame(parent, name)
+SUPERVGraph_ViewFrame::SUPERVGraph_ViewFrame( SUIT_Desktop* theDesktop )
+ : SUIT_ViewWindow( theDesktop )
{
myView = 0;
+
//myView = new SUPERVGraph_View(this);
// Set BackgroundColor
/*
int B = QAD_CONFIG->getSetting("SUPERVGraph:BackgroundColorBlue").toInt();
setBackgroundColor(QColor(R,G,B));*/
}
-SUPERVGraph_ViewFrame::~SUPERVGraph_ViewFrame(){}
+
+SUPERVGraph_ViewFrame::~SUPERVGraph_ViewFrame() {}
/*!
Returns widget containing 3D-Viewer
*/
-SUPERVGraph_View* SUPERVGraph_ViewFrame::getViewWidget(){
+SUPERVGraph_View* SUPERVGraph_ViewFrame::getViewWidget()
+{
return myView;
}
-void SUPERVGraph_ViewFrame::setViewWidget(SUPERVGraph_View* theView) {
+void SUPERVGraph_ViewFrame::setViewWidget( SUPERVGraph_View* theView )
+{
myView = theView;
- if (myApp) {
- myView->setPopupServer(myApp);
- }
}
/*!
Set background of the viewport
*/
-void SUPERVGraph_ViewFrame::setBackgroundColor( const QColor& color)
+void SUPERVGraph_ViewFrame::setBackgroundColor( const QColor& color )
{
if (myView)
myView->setPaletteBackgroundColor(color);
return QMainWindow::backgroundColor();
}
-
-void SUPERVGraph_ViewFrame::SetSelectionMode( Selection_Mode mode )
-{
- MESSAGE ( "SUPERVGraph_ViewFrame::SetSelectionMode" )
-}
-
-void SUPERVGraph_ViewFrame::onAdjustTrihedron( )
+void SUPERVGraph_ViewFrame::onAdjustTrihedron()
{
MESSAGE ( "SUPERVGraph_ViewFrame::onAdjustTrihedron" )
}
return false;
}
-void SUPERVGraph_ViewFrame::setPopupServer( QAD_Application* App )
-{
- myApp = App;
- if (myView) {
- myView->setPopupServer(myApp);
- }
-}
-
-void SUPERVGraph_ViewFrame::undo(const _PTR(Study)& aStudy,
- const char* StudyFrameEntry)
+void SUPERVGraph_ViewFrame::undo( const _PTR(Study)& aStudy,
+ const char* StudyFrameEntry )
{
MESSAGE ( "SUPERVGraph_ViewFrame::undo" )
}
-void SUPERVGraph_ViewFrame::redo(const _PTR(Study)& aStudy,
- const char* StudyFrameEntry)
+void SUPERVGraph_ViewFrame::redo( const _PTR(Study)& aStudy,
+ const char* StudyFrameEntry )
{
MESSAGE ( "SUPERVGraph_ViewFrame::redo" )
}
#ifndef SUPERVGraph_ViewFrame_H
#define SUPERVGraph_ViewFrame_H
-#include "QAD.h"
-#include "QAD_ViewFrame.h"
-#include "QAD_Application.h"
-
#include "SALOME_InteractiveObject.hxx"
-#include "SALOME_Selection.h"
#include "SALOMEDSClient.hxx"
-class QAD_EXPORT SUPERVGraph_View: public QWidget, public QAD_PopupClientServer{
+#include "SalomeApp_Application.h"
+#include "SUIT_PopupClient.h"
+#include "SUIT_ViewWindow.h"
+
+class /*SUPERVGRAPH_EXPORT*/ SUPERVGraph_View: public QWidget, public SUIT_PopupClient {
Q_OBJECT;
public:
+ static QString Type() { return "SUPERVGraphViewer"; }
+
SUPERVGraph_View(QWidget* theParent);
SUPERVGraph_View(SUPERVGraph_View* theParent);
virtual void ActivatePanning() = 0;
virtual void ResetView() = 0;
+
+ /* redefine functions from SUIT_PopupClient */
+ virtual QString popupClientType() const { return Type(); }
+ virtual void contextMenuPopup( QPopupMenu* );
+
protected:
void init(QWidget* theParent);
- void onCreatePopup();
};
-class QAD_EXPORT SUPERVGraph_ViewFrame : public QAD_ViewFrame {
+class /*SUPERVGRAPH_EXPORT*/ SUPERVGraph_ViewFrame : public SUIT_ViewWindow {
Q_OBJECT
public:
- SUPERVGraph_ViewFrame(QWidget* parent, const char* name=0 );
+ SUPERVGraph_ViewFrame(SUIT_Desktop* theDesktop );
~SUPERVGraph_ViewFrame();
- ViewType getTypeView() const{ return VIEW_GRAPHSUPERV;};
SUPERVGraph_View* getViewWidget();
void setViewWidget(SUPERVGraph_View* theView);
void setBackgroundColor( const QColor& );
QColor backgroundColor() const;
- void SetSelectionMode( Selection_Mode mode );
-
void onAdjustTrihedron( );
- /* popup management */
- void setPopupServer( QAD_Application* );
-
/* interactive object management */
void highlight( const Handle(SALOME_InteractiveObject)& IObject,
bool highlight, bool immediatly = true );
void undo(const _PTR(Study)& aStudy, const char* StudyFrameEntry);
void redo(const _PTR(Study)& aStudy, const char* StudyFrameEntry);
-
+
/* selection */
Handle(SALOME_InteractiveObject) FindIObject(const char* Entry) { Handle(SALOME_InteractiveObject) o; return o; };
void onViewBottom();
void onViewTop();
void onViewTrihedron();
-
+
private:
SUPERVGraph_View* myView;
- QAD_Application* myApp;
+ SalomeApp_Application* myApp;
};
#endif
--- /dev/null
+#include "SUPERVGraph_ViewManager.h"
+
+SUPERVGraph_ViewManager::SUPERVGraph_ViewManager( SUIT_Study* theStudy,
+ SUIT_Desktop* theDesktop,
+ SUIT_ViewModel* theViewModel )
+ : SUIT_ViewManager( theStudy, theDesktop, theViewModel )
+{
+}
+
+SUPERVGraph_ViewManager::~SUPERVGraph_ViewManager()
+{
+}
+
+void SUPERVGraph_ViewManager::setViewName(SUIT_ViewWindow* theView)
+{
+ int aPos = myViews.find(theView);
+ theView->setCaption( QString( "SUPERVISION - viewer:%1" ).arg(aPos+1));
+}
+
+void SUPERVGraph_ViewManager::contextMenuPopup( QPopupMenu* thePopup)
+{
+ SUIT_ViewManager::contextMenuPopup( thePopup );
+ // to be implemented
+}
--- /dev/null
+#ifndef SUPERVGRAPH_VIEWMANAGER_H
+#define SUPERVGRAPH_VIEWMANAGER_H
+
+#include "SUPERVGraph_ViewModel.h"
+
+#include "SUIT_ViewManager.h"
+
+class SUIT_Desktop;
+
+class /*SUPERVGRAPH_EXPORT*/ SUPERVGraph_ViewManager : public SUIT_ViewManager
+{
+ Q_OBJECT
+
+public:
+ SUPERVGraph_ViewManager( SUIT_Study* theStudy, SUIT_Desktop* theDesktop, SUIT_ViewModel* theViewModel = 0 );
+ ~SUPERVGraph_ViewManager();
+
+ virtual void contextMenuPopup( QPopupMenu* thePopup );
+
+protected:
+ void setViewName(SUIT_ViewWindow* theView);
+
+};
+
+#endif
--- /dev/null
+#include "SUPERVGraph_ViewModel.h"
+#include "SUPERVGraph_ViewFrame.h"
+#include "SUIT_Desktop.h"
+#include "SUIT_ViewWindow.h"
+
+SUPERVGraph_Viewer::SUPERVGraph_Viewer()
+:SUIT_ViewModel()
+{
+}
+
+SUPERVGraph_Viewer::~SUPERVGraph_Viewer()
+{
+}
+
+SUIT_ViewWindow* SUPERVGraph_Viewer::createView(SUIT_Desktop* theDesktop)
+{
+ SUPERVGraph_ViewFrame* aRes = new SUPERVGraph_ViewFrame( theDesktop );
+ return aRes;
+}
--- /dev/null
+#ifndef SUPERVGRAPH_VIEWMODEL_H
+#define SUPERVGRAPH_VIEWMODEL_H
+
+#include "SUIT_ViewModel.h"
+
+class /*SUPERVGRAPH_EXPORT*/ SUPERVGraph_Viewer: public SUIT_ViewModel
+{
+ Q_OBJECT
+
+public:
+ static QString Type() { return "SUPERVGraphViewer"; }
+
+ SUPERVGraph_Viewer();
+ virtual ~SUPERVGraph_Viewer();
+
+ virtual SUIT_ViewWindow* createView(SUIT_Desktop* theDesktop);
+
+};
+
+#endif
CPPFLAGS+=$(PYTHON_INCLUDES) $(QT_INCLUDES) $(QWT_INCLUDES) $(OCC_INCLUDES) $(VTK_INCLUDES) $(BOOST_CPPFLAGS) -I${KERNEL_ROOT_DIR}/include/salome
LDFLAGS+=$(PYTHON_LIBS) $(QT_MT_LIBS)
-LIBS+= -L$(GUI_ROOT_DIR)/lib/salome -lsuit -lstd -lCAM -lObjBrowser -L$(KERNEL_ROOT_DIR)/lib/salome -lOpUtil -lSALOMELocalTrace $(CAS_KERNEL) -lPlot2d -lGLViewer -lOCCViewer -lVTKViewer -lSalomeObject -lSVTK -lSOCC -lPyInterp -lPythonConsole
+LIBS+= -L$(GUI_ROOT_DIR)/lib/salome -lsuit -lstd -lCAM -lObjBrowser -L$(KERNEL_ROOT_DIR)/lib/salome -lOpUtil -lSALOMELocalTrace $(CAS_KERNEL) -lPlot2d -lGLViewer -lOCCViewer -lVTKViewer -lSalomeObject -lSVTK -lSOCC -lPyInterp -lPythonConsole -lLogWindow
@CONCLUDE@
<parameter name="xterm" value="no"/>
<parameter name="portkill" value="no"/>
<parameter name="killall" value="no"/>
- <parameter name="modules" value="GEOM,SMESH"/>
+ <parameter name="modules" value="GEOM,SMESH,SUPERV"/>
<parameter name="pyModules" value=""/>
<parameter name="embedded" value="SalomeAppEngine"/>
<parameter name="standalone" value="pyContainer,cppContainer,registry,moduleCatalog"/>
<parameter name="GEOM" value="${GEOM_ROOT_DIR}/share/salome/resources"/>
<parameter name="SMESH" value="${SMESH_ROOT_DIR}/share/salome/resources"/>
<parameter name="VISU" value="${VISU_ROOT_DIR}/share/salome/resources"/>
+ <parameter name="SUPERV" value="${SUPERV_ROOT_DIR}/share/salome/resources"/>
</section>
<section name="GEOM">
<parameter name="name" value="Geometry"/>
<parameter name="name" value="Post-Pro"/>
<parameter name="icon" value="ModuleVisu.png"/>
</section>
+ <section name="SUPERV">
+ <parameter name="name" value="Supervision"/>
+ <parameter name="icon" value="ModuleSupervision.png"/>
+ </section>
<!-- values below this line are just an example, they are not used -->
<section name="application">
<parameter name="QuickDirList" value=""/>