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 #ifndef QOCCVIEWFRAME_H
00027 #define QOCCVIEWFRAME_H
00028 
00029 #include <QtGui/QToolBar>
00030 #include <QtGui/QMenu>
00031 #include <QtGui/QFrame>
00032 
00033 #include "qocc.h"
00034 
00035 class QoccMainWindow;
00036 class Qocc3dWidget;
00037 class QoccController;
00038 class QVBoxLayout;
00039 class Handle_AIS_InteractiveContext;
00040 
00041 class QOCC_DECLSPEC QoccFrame : public QFrame
00042 {
00043         Q_OBJECT
00044 
00045 public:
00046 
00047         QoccFrame ( QoccController* aContext = NULL, 
00048                                 QWidget *parent = NULL, 
00049                                 Qt::WindowFlags wflags = 0 );
00050 
00051     ~QoccFrame();
00052 
00053         Qocc3dWidget*   getWidget()  { return myWidget; };
00054         QToolBar*       getToolBar() { return myToolBar; };
00055 
00056 signals:
00057 
00058 public slots:
00059         void fitArea      ();
00060         void fitAll       ();
00061         void fitExtents   ();
00062         void viewAxo      ();
00063         void viewTop      ();
00064         void viewLeft     ();
00065         void viewFront    ();
00066         void viewTopFront ();
00067 
00068 protected: 
00069 
00070 private: 
00071         QoccController*  myController;
00072         Qocc3dWidget*    myWidget;
00073         
00074         QToolBar*               myToolBar;
00075         QVBoxLayout*    myLayout;
00076         QoccMainWindow* myParent;
00077 
00078         QAction* actionIdle;
00079         
00080         QAction* actionZoomGroup;
00081         QMenu*   popupZoomGroup;
00082         QAction* actionFitExtents;
00083         QAction* actionFitArea;
00084         QAction* actionFitAll;
00085 
00086         QAction* actionViewGroup;
00087         QMenu*   popupViewGroup;
00088         QAction* actionViewTop;
00089         QAction* actionViewFront;
00090         QAction* actionViewTopFront;
00091         QAction* actionViewLeft;
00092         QAction* actionViewAxo;
00093 
00094 private: 
00095         void setToolbarActions( void );
00096 
00097         void createActions( void );
00098 
00099         void connectActions( void );
00100         void disconnectActions( void );
00101 
00102         void connectParent( void );
00103         void disconnectParent( void );
00104 
00105         void createZoomGroup( void );
00106         void createViewGroup( void );
00107 
00108         void invokeAction( QAction* group, QAction* action, const char* signal );
00109 
00110 public:
00111 
00112 };
00113 
00114 #endif // QOCCVIEWFRAME_H