Salome HOME
NRI : Add message (GUI lib not found).
[modules/kernel.git] / src / SALOMEGUI / QAD_StudyFrame.h
1 //  File      : QAD_StudyFrame.h
2 //  Created   : Wed Mar 20 11:10:03 2002
3 //  Author    : Nicolas REJNERI
4 //  Project   : SALOME
5 //  Module    : SALOMEGUI
6 //  Copyright : Open CASCADE 2002
7 //  $Header$
8
9 #ifndef QAD_StudyFrame_H
10 #define QAD_StudyFrame_H
11
12 #include "QAD.h" 
13 #include "QAD_Splitter.h" 
14 #include "QAD_PyInterp.h"
15
16 // QT Includes
17 #include <qwidget.h>
18 #include <qmainwindow.h>
19
20 class QAD_RightFrame;
21 class QAD_LeftFrame;
22 class QAD_Splitter;
23 class QAD_Study;
24
25 enum ViewType {
26   VIEW_OCC,
27   VIEW_VTK,
28   VIEW_GRAPHSUPERV,
29   VIEW_PLOT2D,
30   VIEW_TYPE_MAX  // must always be the last one; insert new values before it
31 };
32
33 class QAD_EXPORT QAD_StudyFrame: public QMainWindow
34 {
35   Q_OBJECT
36
37  public:
38   QAD_StudyFrame(QAD_Study* study,
39                  QWidget* parent, const QString& title, 
40                  QAD_PyInterp* interp, ViewType typeView);
41   QAD_StudyFrame(QAD_Study*,
42                  QWidget* parent = 0);
43   virtual ~QAD_StudyFrame();
44
45   QAD_Study*          getStudy() { return myStudy; }
46   QAD_RightFrame*     getRightFrame() const;
47   QAD_LeftFrame*      getLeftFrame() const;
48
49   ViewType            getTypeView() const; 
50
51   QAD_PyInterp*       get_PyInterp(void);
52
53   void                setTitle( const QString& aTitle);
54   const QString&      title() const;
55
56   void                setEntry( const QString& aTitle);
57   const QString&      entry() const;
58
59   void                setVisible( bool isVisible = true );
60   void                closeEvent(QCloseEvent* e);
61
62   void                compressLeft();
63   void                compressRight();
64   void                unCompressLeft();
65   void                unCompressRight();
66
67  signals:
68   void                sfStudyFrameActivated( QAD_StudyFrame* );
69   void                sfStudyFrameClosing( QAD_StudyFrame*);
70   void                sfBeforeStudyFrameClosing( QAD_StudyFrame*);
71
72  public slots:
73   void                onStudyFrameActivated ( QWidget* );
74         
75
76  private:
77   QString             myTitle;  /* title */
78   QString             myEntry;  /* entry */
79
80   ViewType            myTypeView;
81   QAD_LeftFrame*      myLeftFrm;
82   QAD_RightFrame*     myRightFrm;
83   QAD_Splitter*       s1; 
84   QAD_PyInterp*       _interp;
85   QAD_Study*          myStudy;
86 };
87
88 #endif