Gui/Placement.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef GUI_PLACEMENT_H
00024 #define GUI_PLACEMENT_H
00025
00026 #include <Gui/InputVector.h>
00027 #include <Gui/TaskView/TaskDialog.h>
00028 #include <Gui/TaskView/TaskView.h>
00029 #include <Base/Placement.h>
00030
00031 class QSignalMapper;
00032
00033 namespace Gui {
00034 namespace Dialog {
00035
00036 class Ui_Placement;
00037 class TaskPlacement;
00038 class GuiExport Placement : public Gui::LocationDialog
00039 {
00040 Q_OBJECT
00041
00042 public:
00043 Placement(QWidget* parent = 0, Qt::WFlags fl = 0);
00044 ~Placement();
00045 void accept();
00046 void reject();
00047
00048 Base::Vector3f getDirection() const;
00049 void setPlacement(const Base::Placement&);
00050 Base::Placement getPlacement() const;
00051 void showDefaultButtons(bool);
00052
00053 protected:
00054 void changeEvent(QEvent *e);
00055
00056 private Q_SLOTS:
00057 void on_applyButton_clicked();
00058 void on_applyIncrementalPlacement_toggled(bool);
00059 void onPlacementChanged(int);
00060 void on_resetButton_clicked();
00061
00062 private:
00063 void setPlacementData(const Base::Placement&);
00064 Base::Placement getPlacementData() const;
00065 void directionActivated(int);
00066 void applyPlacement(const Base::Placement& p, bool incremental, bool data);
00067
00068 Q_SIGNALS:
00069 void placementChanged(const QVariant &, bool, bool);
00070 void directionChanged();
00071
00072 private:
00073 typedef Gui::LocationInterfaceComp<Ui_Placement> Ui_PlacementComp;
00074 Ui_PlacementComp* ui;
00075 QSignalMapper* signalMapper;
00076 Base::Placement ref;
00077 std::string propertyName;
00078
00079 friend class TaskPlacement;
00080 };
00081
00082 class GuiExport DockablePlacement : public Placement
00083 {
00084 Q_OBJECT
00085
00086 public:
00087 DockablePlacement(QWidget* parent = 0, Qt::WFlags fl = 0);
00088 ~DockablePlacement();
00089
00090 void accept();
00091 void reject();
00092 };
00093
00094 class TaskPlacement : public Gui::TaskView::TaskDialog
00095 {
00096 Q_OBJECT
00097
00098 public:
00099 TaskPlacement();
00100 ~TaskPlacement();
00101
00102 public:
00103 void setPropertyName(const QString&);
00104 void setPlacement(const Base::Placement&);
00105 bool accept();
00106 bool reject();
00107 void clicked(int id);
00108
00109 QDialogButtonBox::StandardButtons getStandardButtons() const;
00110
00111 public Q_SLOTS:
00112 void slotPlacementChanged(const QVariant &, bool, bool);
00113
00114 Q_SIGNALS:
00115 void placementChanged(const QVariant &, bool, bool);
00116
00117 private:
00118 Placement* widget;
00119 Gui::TaskView::TaskBox* taskbox;
00120 };
00121
00122 }
00123 }
00124
00125 #endif // GUI_PLACEMENT_H