Debian Codegraph @

src/Gui/PreferencePages/DlgSettingsNavigation.h

raw
1 /***************************************************************************
2 * Copyright (c) 2002 Jürgen Riegel <[email protected]> *
3 * *
4 * This file is part of the FreeCAD CAx development system. *
5 * *
6 * This library is free software; you can redistribute it and/or *
7 * modify it under the terms of the GNU Library General Public *
8 * License as published by the Free Software Foundation; either *
9 * version 2 of the License, or (at your option) any later version. *
10 * *
11 * This library is distributed in the hope that it will be useful, *
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14 * GNU Library General Public License for more details. *
15 * *
16 * You should have received a copy of the GNU Library General Public *
17 * License along with this library; see the file COPYING.LIB. If not, *
18 * write to the Free Software Foundation, Inc., 59 Temple Place, *
19 * Suite 330, Boston, MA 02111-1307, USA *
20 * *
21 ***************************************************************************/
22
23
24 #ifndef GUI_DIALOG_DLGSETTINGSNAVIGATION_H
25 #define GUI_DIALOG_DLGSETTINGSNAVIGATION_H
26
27 #include <memory>
28 #include "PropertyPage.h"
29 #include <QDialog>
30
31 class QDoubleSpinBox;
32
33 namespace Gui
34 {
35 namespace Dialog
36 {
37 class Ui_DlgSettingsNavigation;
38
39 /**
40 * The Ui_DlgSettingsNavigation class implements a preference page to change settings
41 * for the Inventor viewer.
42 * \author Werner Mayer
43 */
44 class DlgSettingsNavigation: public PreferencePage
45 {
46 Q_OBJECT
47
48 public:
49 explicit DlgSettingsNavigation(QWidget* parent = nullptr);
50 ~DlgSettingsNavigation() override;
51
52 void saveSettings() override;
53 void loadSettings() override;
54 void resetSettingsToDefaults() override;
55
56 private:
57 void onMouseButtonClicked();
58 void onNewDocViewChanged(int);
59
60 protected:
61 void changeEvent(QEvent* e) override;
62 void retranslate();
63 void addOrientations();
64 void translateOrientations();
65
66 private:
67 std::unique_ptr<Ui_DlgSettingsNavigation> ui;
68 double q0, q1, q2, q3;
69 };
70
71 class CameraDialog: public QDialog
72 {
73 Q_OBJECT
74
75 public:
76 explicit CameraDialog(QWidget* parent = nullptr);
77 ~CameraDialog() override;
78 void setValues(double q0, double q1, double q2, double q3);
79 void getValues(double& q0, double& q1, double& q2, double& q3) const;
80
81
82 private:
83 void onCurrentViewClicked();
84
85 private:
86 QDoubleSpinBox* sb0;
87 QDoubleSpinBox* sb1;
88 QDoubleSpinBox* sb2;
89 QDoubleSpinBox* sb3;
90 };
91
92 } // namespace Dialog
93 } // namespace Gui
94
95 #endif // GUI_DIALOG_DLGSETTINGSNAVIGATION_H