Update for QT definition
[occt.git] / samples / qt / Tutorial / src / DocumentTut.cxx
CommitLineData
7fd59977 1#include "DocumentTut.h"
2
3#include <QFileDialog>
4#include <QMessageBox>
5#include <QApplication>
6
7#include <TopoDS_Shape.hxx>
8#include <AIS_Shape.hxx>
9
10TopoDS_Shape
11MakeBottle(const Standard_Real myWidth , const Standard_Real myHeight , const Standard_Real myThickness);
12
13DocumentTut::DocumentTut( const int theIndex, ApplicationCommonWindow* app )
14: DocumentCommon( theIndex, app )
15{
16}
17
18DocumentTut::~DocumentTut()
19{
20}
21
22void DocumentTut::onMakeBottle()
23{
24 QApplication::setOverrideCursor( Qt::WaitCursor );
25 TopoDS_Shape aBottle=MakeBottle(50,70,30);
26 Handle(AIS_Shape) AISBottle=new AIS_Shape(aBottle);
27 getContext()->SetMaterial(AISBottle,Graphic3d_NOM_GOLD);
28 getContext()->SetDisplayMode(AISBottle,1,Standard_False);
29 getContext()->Display(AISBottle, Standard_False);
30 getContext()->SetCurrentObject(AISBottle,Standard_False);
31 emit selectionChanged();
32 fitAll();
33 QApplication::restoreOverrideCursor();
34}
35
36