0028934: Coding - Eliminate compiler warnings in OCCT samples
[occt.git] / samples / qt / Common / src / DocumentCommon.h
CommitLineData
7fd59977 1#ifndef DOCUMENTCOMMON_H
2#define DOCUMENTCOMMON_H
3
4#include "MDIWindow.h"
5//#include "IESample.h"
6
55a40de8 7#include <Standard_WarningsDisable.hxx>
7fd59977 8#include <QObject>
9#include <QList>
55a40de8 10#include <Standard_WarningsRestore.hxx>
7fd59977 11
12#include <AIS_InteractiveContext.hxx>
13#include <V3d_Viewer.hxx>
14
15class ApplicationCommonWindow;
16
17class COMMONSAMPLE_EXPORT DocumentCommon : public QObject
18{
19 Q_OBJECT
20
21public:
22 DocumentCommon( const int, ApplicationCommonWindow* );
23 ~DocumentCommon();
24
25 ApplicationCommonWindow* getApplication();
26 Handle(AIS_InteractiveContext) getContext();
27 void removeView( MDIWindow* );
28 void removeViews();
29 int countOfWindow();
30 void fitAll();
31
32protected:
861a7b03 33 virtual MDIWindow* createNewMDIWindow();
7fd59977 34
35signals:
36 void selectionChanged();
37 void sendCloseDocument( DocumentCommon* );
38
39public slots:
40 virtual void onCloseView( MDIWindow* );
861a7b03 41 virtual void onCreateNewView();
7fd59977 42 virtual void onMaterial();
e276548b 43 virtual void onMaterial( int );
7fd59977 44 virtual void onDelete();
e276548b 45
7fd59977 46 void onWireframe();
47 void onShading();
48 void onColor();
49 void onTransparency();
50 void onTransparency( int );
51
52private:
9764ccbb 53 Handle(V3d_Viewer) Viewer (const Standard_ExtString theName,
54 const Standard_CString theDomain,
55 const Standard_Real theViewSize,
56 const V3d_TypeOfOrientation theViewProj,
57 const Standard_Boolean theComputedMode,
58 const Standard_Boolean theDefaultComputedMode );
7fd59977 59
60protected:
61 ApplicationCommonWindow* myApp;
62 QList<MDIWindow*> myViews;
63 Handle(V3d_Viewer) myViewer;
64 Handle(AIS_InteractiveContext) myContext;
65 int myIndex;
66 int myNbViews;
67};
68
69#endif
70
71