Salome HOME
updated copyright message
[modules/gui.git] / src / OCCViewer / OCCViewer_LightSourceDlg.h
1 // Copyright (C) 2015-2023  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19
20 #ifndef OCCVIEWER_LIGHTSOURCEDLG_H
21 #define OCCVIEWER_LIGHTSOURCEDLG_H
22
23 #include "OCCViewer.h"
24 #include <QDialog>
25 #include <V3d_DirectionalLight.hxx>
26 #include <V3d_PositionalLight.hxx>
27 #include <V3d_TypeOfLight.hxx>
28
29 class OCCViewer_ViewWindow;
30 class OCCViewer_Viewer;
31 class QtxDoubleSpinBox;
32 class QtxColorButton;
33 class QPushButton;
34 class QCheckBox;
35 class QRadioButton;
36 class QStackedLayout;
37
38 class OCCVIEWER_EXPORT OCCViewer_LightSourceDlg: public QDialog
39 {
40   Q_OBJECT
41
42 public:
43   OCCViewer_LightSourceDlg( OCCViewer_ViewWindow*, OCCViewer_Viewer* );
44   ~OCCViewer_LightSourceDlg();
45
46   static QString getName();
47
48 protected slots:
49
50 private slots:
51   void onTypeChanged();
52   void onDirChanged();
53   void onPosChanged();
54
55   void ClickOnOk();
56   void ClickOnDefault();
57   void ClickOnClose();
58   void ClickOnHelp();
59
60 private:
61   void initParam( bool theIsDefault = false );
62
63   OCCViewer_Viewer* myModel;
64
65   Handle(V3d_DirectionalLight) myDirLight;
66   Handle(V3d_PositionalLight) myPosLight;
67
68   QRadioButton* myDirType;
69   QRadioButton* myPosType;
70
71   QStackedLayout* myStackedLayout;
72
73   QtxDoubleSpinBox* myDx;
74   QtxDoubleSpinBox* myDy;
75   QtxDoubleSpinBox* myDz;
76   QCheckBox* myDirHeadLight;
77   QtxColorButton* myDirColor;
78
79   QtxDoubleSpinBox* myX;
80   QtxDoubleSpinBox* myY;
81   QtxDoubleSpinBox* myZ;
82   QCheckBox* myPosHeadLight;
83   QtxColorButton* myPosColor;
84
85   double myInX, myInY, myInZ;
86   bool myInHeadLight;
87   Quantity_Color myInColor;
88   V3d_TypeOfLight myInType;
89
90   bool isBusy;
91 };
92
93 #endif // OCCVIEWER_LIGHTSOURCEDLG_H