1 // File: GLViewer_Selector.h
2 // Created: November, 2004
4 // Copyright (C) CEA 2004
6 /****************************************************************************
7 ** Class: GLViewer_Selector
8 ** Descr: Base class for object selection in QAD-based application
10 ** Created: UI team, 22.09.00
11 *****************************************************************************/
12 #ifndef GLVIEWER_SELECTOR_H
13 #define GLVIEWER_SELECTOR_H
16 #include "GLViewer_Defs.h"
21 #include <Quantity_NameOfColor.hxx>
23 class GLViewer_Viewer;
25 class GLVIEWER_EXPORT GLViewer_Selector : public QObject
30 GLViewer_Selector( GLViewer_Viewer* );
35 void setMinRectSize( const QSize& minSize );
37 virtual void detect( int, int ) = 0;
38 virtual void select( bool append = false ) = 0;
39 virtual void select( const QRect&, bool append = false ) = 0;
40 virtual void unselectAll() = 0;
41 virtual int numSelected() const = 0;
43 virtual void setHilightColor( Quantity_NameOfColor ) = 0;
44 virtual void setSelectColor( Quantity_NameOfColor ) = 0;
46 virtual void checkSelection( int, bool, int ) = 0;
48 /*! Sets/returns the key for appending selected objects ( SHIFT by default ) */
49 static int appendKey() { return apppendKey; }
50 static void setAppendKey( int k ) { apppendKey = k; }
53 void selSelectionCancel();
54 void selSelectionDone( bool append, SelectionChangeStatus status );
57 GLViewer_Viewer* myViewer;
62 static int apppendKey;