7fd59977 |
1 | #ifndef OBJECTDLG_H |
2 | #define OBJECTDLG_H |
3 | |
4 | #include <qdialog.h> |
5 | |
6 | #include <Aspect_TypeOfDegenerateModel.hxx> |
7 | #include <V3d_View.hxx> |
8 | #include <AIS_InteractiveContext.hxx> |
9 | |
10 | class QLabel; |
11 | class QComboBox; |
12 | class QSpinBox; |
13 | class ObjectDlg : public QDialog |
14 | { |
15 | Q_OBJECT |
16 | |
17 | enum { SolidEdgeId, DashEdgeId, DotEdgeId, DotDashEdgeId }; |
18 | |
19 | enum { NoDegId, TinyDegId, WireDegId, MarkerDegId, BBoxDegId }; |
20 | |
21 | public: |
22 | ObjectDlg( QWidget* parent, Handle(V3d_View)&, Handle(AIS_InteractiveContext)& ); |
23 | virtual ~ObjectDlg(); |
24 | |
25 | private slots: |
26 | void onOk(); |
27 | void onCancel(); |
28 | void onHelp(); |
29 | void onShowEdges( bool ); |
30 | void onDegenerateModel( int ); |
31 | void onDegRatio( int ); |
32 | void onEdgeStyle( int ); |
33 | void onEdgeWidth( int ); |
34 | void onAutoApply( bool ); |
35 | |
36 | protected: |
37 | void showEvent ( QShowEvent* ); |
38 | |
39 | private: |
40 | void updateEdgeAspect( bool edgeStyle ); |
41 | /* if edgeStyle - true then type of line will be changed; |
42 | width of line will be changed otherwise |
43 | */ |
44 | void updateDegenerationModel(); |
45 | |
46 | private: |
47 | /* ----- common section ----- */ |
48 | bool myAutoApply; |
49 | Handle_V3d_View myView; |
50 | Handle_AIS_InteractiveContext myContext; |
51 | /* ----- edge section ----- */ |
52 | QLabel* myEdgeStyle; |
53 | QLabel* myEdgeWidth; |
54 | QComboBox* myEdgeBox; |
55 | QSpinBox* myEdgeSpin; |
56 | int myCurrentEdgeStyle; |
57 | float myCurrentEdgeWidth; |
58 | /* ----- degeneration section ----- */ |
59 | Aspect_TypeOfDegenerateModel myDegModel; |
60 | int myCurrentDegModel; |
61 | float myCurrentDegRatio; |
62 | QLabel* myDegModelLabel; |
63 | QLabel* myDegRatioLabel; |
64 | QComboBox* myDegModelBox; |
65 | QSpinBox* myDegRatioSpin; |
66 | }; |
67 | |
68 | #endif |