1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-06-05 11:24:17 +03:00
occt/samples/qt/Common/src/DocumentCommon.h
dbp 1503bd7d5b 0024479: Ray Tracing mode does not work in Qt IE sample
Implementation of  Ray Tracing mode in standard Qt sample
Fix compile warnings in Qt samples.
Fix tabs in Common-string.ts.
Update Code style.

0024415: Update QT samples
Code which was based on QT3 was removed. Some bugs and warnings has been also fixed.
Porting from QT4 to QT5 sample files.
2014-03-25 16:05:49 +04:00

71 lines
2.1 KiB
C++
Executable File

#ifndef DOCUMENTCOMMON_H
#define DOCUMENTCOMMON_H
#include "MDIWindow.h"
//#include "IESample.h"
#include <QObject>
#include <QList>
#include <AIS_InteractiveContext.hxx>
#include <V3d_Viewer.hxx>
class ApplicationCommonWindow;
class COMMONSAMPLE_EXPORT DocumentCommon : public QObject
{
Q_OBJECT
public:
DocumentCommon( const int, ApplicationCommonWindow* );
~DocumentCommon();
ApplicationCommonWindow* getApplication();
Handle(AIS_InteractiveContext) getContext();
void removeView( MDIWindow* );
void removeViews();
int countOfWindow();
void fitAll();
protected:
virtual MDIWindow* createNewMDIWindow();
signals:
void selectionChanged();
void sendCloseDocument( DocumentCommon* );
public slots:
virtual void onCloseView( MDIWindow* );
virtual void onCreateNewView();
virtual void onMaterial();
virtual void onMaterial( int );
virtual void onDelete();
void onWireframe();
void onShading();
void onColor();
void onTransparency();
void onTransparency( int );
private:
Handle(V3d_Viewer) Viewer( const Standard_CString aDisplay,
const Standard_ExtString aName,
const Standard_CString aDomain,
const Standard_Real ViewSize,
const V3d_TypeOfOrientation ViewProj,
const Standard_Boolean ComputedMode,
const Standard_Boolean aDefaultComputedMode );
protected:
ApplicationCommonWindow* myApp;
QList<MDIWindow*> myViews;
Handle(V3d_Viewer) myViewer;
Handle(AIS_InteractiveContext) myContext;
int myIndex;
int myNbViews;
};
#endif