Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef SPlot2d_ViewModel_H
00028 #define SPlot2d_ViewModel_H
00029
00030 #include "SPlot2d.h"
00031 #include "SPlot2d_Curve.h"
00032 #include "Plot2d_ViewModel.h"
00033 #include "Plot2d_ViewFrame.h"
00034 #include "Plot2d_ViewWindow.h"
00035
00036 #include <SALOME_Prs.h>
00037 #include <SALOME_InteractiveObject.hxx>
00038 #include <SALOME_ListIO.hxx>
00039
00040 class SPLOT2D_EXPORT SPlot2d_Viewer : public Plot2d_Viewer, public SALOME_View
00041 {
00042 Q_OBJECT
00043
00044 public:
00045 static QString Type() { return "Plot2d"; }
00046
00047
00048 SPlot2d_Viewer( bool theAutoDel = false );
00049 virtual ~SPlot2d_Viewer();
00050
00051 public:
00052 virtual QString getType() const { return Type(); }
00053
00054
00055 void highlight( const Handle(SALOME_InteractiveObject)& IObject, bool highlight, bool update = true ) {}
00056 void unHighlightAll() {}
00057 void rename( const Handle(SALOME_InteractiveObject)&, const QString&, Plot2d_ViewFrame* = 0 );
00058 void renameAll( const Handle(SALOME_InteractiveObject)&, const QString& );
00059 bool isInViewer( const Handle(SALOME_InteractiveObject)& IObject );
00060
00061 virtual SUIT_ViewWindow* createView(SUIT_Desktop* theDesktop);
00062
00063
00064 void Display( const Handle(SALOME_InteractiveObject)& IObject, bool update = true );
00065 void DisplayOnly( const Handle(SALOME_InteractiveObject)& IObject );
00066 void Erase( const Handle(SALOME_InteractiveObject)& IObject, bool update = true );
00067
00068
00069 void Display( const SALOME_Prs2d* );
00070 void Erase( const SALOME_Prs2d*, const bool = false );
00071 virtual void EraseAll(const bool = false);
00072 virtual void Repaint();
00073 virtual SALOME_Prs* CreatePrs( const char* entry = 0 );
00074
00075 virtual bool isVisible( const Handle(SALOME_InteractiveObject)& IObject );
00076 virtual void GetVisible( SALOME_ListIO& theList );
00077
00078
00079
00080 SPlot2d_Curve* getCurveByIO( const Handle(SALOME_InteractiveObject)&, Plot2d_ViewFrame* = 0 );
00081 Plot2d_ViewFrame* getActiveViewFrame();
00082 Handle(SALOME_InteractiveObject) FindIObject( const char* Entry );
00083
00084 protected slots:
00085 virtual void onLegendClicked( QwtPlotItem* plotItem );
00086
00087 signals:
00088 void legendSelected( const QString& );
00089 };
00090
00091
00092 #endif // SPlot2d_ViewModel_H
00093
00094
00095
00096