#ifndef INODEEDITOR_H #define INODEEDITOR_H #include #include #include #include #include #include #include "CGizmo.h" #include #include class INodeEditor : public QMainWindow { Q_OBJECT protected: // Undo stack QUndoStack mUndoStack; QList mUndoActions; // Node management CSceneManager mScene; QList mSelection; CAABox mSelectionBounds; // Gizmo CGizmo mGizmo; bool mShowGizmo; bool mGizmoHovering; bool mGizmoTransforming; ETransformSpace mTranslateSpace; ETransformSpace mRotateSpace; // Gizmo widgets QActionGroup *mpGizmoGroup; QList mGizmoActions; QComboBox *mpTransformCombo; public: explicit INodeEditor(QWidget *pParent = 0); virtual ~INodeEditor(); QUndoStack* UndoStack(); CSceneManager* Scene(); CGizmo* Gizmo(); bool IsGizmoVisible(); void BeginGizmoTransform(); void EndGizmoTransform(); ETransformSpace CurrentTransformSpace(); void RecalculateSelectionBounds(); void ExpandSelectionBounds(CSceneNode *pNode); void SelectNode(CSceneNode *pNode); void DeselectNode(CSceneNode *pNode); void ClearSelection(); void ClearAndSelectNode(CSceneNode *pNode); signals: void SelectionModified(); void SelectionTransformed(); public slots: void OnGizmoMoved(); virtual void UpdateGizmoUI() = 0; virtual void UpdateSelectionUI() = 0; protected: virtual void GizmoModeChanged(CGizmo::EGizmoMode /*mode*/) {} private: void UpdateTransformActionsEnabled(); private slots: void OnSelectObjectsTriggered(); void OnTranslateTriggered(); void OnRotateTriggered(); void OnScaleTriggered(); void OnTransformSpaceChanged(int spaceIndex); void OnSelectionModified(); }; #endif // INODEEDITOR_H