Debian Codegraph @

src/Gui/TaskDlgRelocation.h

raw
1 /***************************************************************************
2 * Copyright (c) 2010 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_TASKDLGRELOCATE_H
25 #define GUI_TASKDLGRELOCATE_H
26
27 #include <Gui/TaskView/TaskDialog.h>
28 #include <Gui/TaskView/TaskView.h>
29
30 #include <FCGlobal.h>
31
32 class Ui_Position;
33 class Ui_Angle;
34
35 namespace Gui
36 {
37
38 class TaskBoxPosition: public Gui::TaskView::TaskBox
39 {
40 Q_OBJECT
41
42 public:
43 explicit TaskBoxPosition(QWidget* parent = nullptr);
44 ~TaskBoxPosition() override;
45
46
47 private Q_SLOTS:
48
49 protected:
50 private:
51 QWidget* proxy;
52 Ui_Position* ui;
53 };
54
55 class TaskBoxAngle: public Gui::TaskView::TaskBox
56 {
57 Q_OBJECT
58
59 public:
60 explicit TaskBoxAngle(QWidget* parent = nullptr);
61 ~TaskBoxAngle() override;
62
63
64 private Q_SLOTS:
65
66 protected:
67 private:
68 QWidget* proxy;
69 Ui_Angle* ui;
70 };
71
72
73 ///
74 class GuiExport TaskDlgRelocation: public Gui::TaskView::TaskDialog
75 {
76 Q_OBJECT
77
78 public:
79 TaskDlgRelocation();
80 ~TaskDlgRelocation() override;
81
82 public:
83 /// is called the TaskView when the dialog is opened
84 void open() override;
85 /// is called by the framework if an button is clicked which has no accept or rject role
86 void clicked(int) override;
87 /// is called by the framework if the dialog is accepted (Ok)
88 bool accept() override;
89 /// is called by the framework if the dialog is rejected (Cancel)
90 bool reject() override;
91 /// is called by the framework if the user press the help button
92 void helpRequested() override;
93
94 /// returns for Close and Help button
95 QDialogButtonBox::StandardButtons getStandardButtons() const override
96 {
97 return QDialogButtonBox::Ok | QDialogButtonBox::Cancel;
98 }
99
100 protected:
101 };
102
103
104 } // namespace Gui
105
106 #endif // ROBOTGUI_TASKDLGSIMULATE_H