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 | |
10 | TopoDS_Shape |
11 | MakeBottle(const Standard_Real myWidth , const Standard_Real myHeight , const Standard_Real myThickness); |
12 | |
13 | DocumentTut::DocumentTut( const int theIndex, ApplicationCommonWindow* app ) |
14 | : DocumentCommon( theIndex, app ) |
15 | { |
16 | } |
17 | |
18 | DocumentTut::~DocumentTut() |
19 | { |
20 | } |
21 | |
22 | void 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 | |