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 #if !defined( OCCVIEWER_AISSELECTOR_H )
00024 #define OCCVIEWER_AISSELECTOR_H
00025
00026 #include "OCCViewer.h"
00027 #include <QObject>
00028
00029 #include <Quantity_NameOfColor.hxx>
00030 #include <AIS_InteractiveContext.hxx>
00031
00032 class OCCVIEWER_EXPORT OCCViewer_AISSelector : public QObject
00033 {
00034 Q_OBJECT
00035
00036 public:
00037
00038 OCCViewer_AISSelector( QObject* parent, const Handle (AIS_InteractiveContext)& );
00039
00040 ~OCCViewer_AISSelector();
00041
00042
00043 void enableSelection( bool );
00044
00045 void enableMultipleSelection( bool );
00046
00047
00048 bool moveTo ( int, int, const Handle (V3d_View)& );
00049
00050 bool select ( int, int, int, int, const Handle (V3d_View)& );
00051
00052
00053 bool shiftSelect ( int, int, int, int, const Handle (V3d_View)& );
00054
00055 bool select ();
00056
00057 bool shiftSelect ();
00058
00059
00060 void setAISContext ( const Handle (AIS_InteractiveContext)& );
00061
00062 void setHilightColor ( Quantity_NameOfColor color );
00063
00064 void setSelectColor ( Quantity_NameOfColor color );
00065
00066 protected:
00067
00068 bool checkSelection ( AIS_StatusOfPick status, bool hadSelection, bool addTo );
00069
00070 signals:
00071
00072 void selSelectionDone( bool bAdded );
00073
00074 void selSelectionCancel( bool bAdded );
00075
00076 protected:
00077 Handle (AIS_InteractiveContext) myAISContext;
00078 Quantity_NameOfColor myHilightColor;
00079 Quantity_NameOfColor mySelectColor;
00080
00081 int myNumSelected;
00082 bool myEnableSelection;
00083 bool myEnableMultipleSelection;
00084 };
00085
00086 #endif // OCCVIEWER_AISSELECTOR_H