/* manipulator.h This file is part of the Project::OSiRiON world editor and is distributed under the terms and conditions of the GNU General Public License version 2 */ #ifndef __INCLUDED_EDITOR_MANIPULATOR__ #define __INCLUDED_EDITOR_MANIPULATOR__ #include "entityproperties.h" #include namespace editor { /** * @brief a Widget displaying the manipulator state of an entity * */ class Manipulator : public QWidget { Q_OBJECT public: enum Mode {None = 0, Select = 1, Move = 2, Rotate = 3 }; Manipulator(QWidget *parent = 0); /* ---- inspectors ---- */ /** * @brief returns the current manipulator Mode * */ inline const Mode mode() const { return manipulator_mode; } /* ---- mutatorss ---- */ /** * @brief set the manipulator mode * */ inline void setMode(Mode mode) { manipulator_mode = mode; } void setSize(const QWidget *widget); public slots: void setProperties(const EntityProperties *properties); protected: /** * @brief handle draw events * */ virtual void paintEvent(QPaintEvent *event); private: Mode manipulator_mode; float manipulator_yaw; }; } #endif // __INCLUDED_EDITOR_MANIPULATOR__