1 // Copyright 2001-2018 Crytek GmbH / Crytek Group. All rights reserved.
5 #include "ICryGraphEditor.h"
6 #include "EditorCommonAPI.h"
8 #include "NodeGraphStyleItem.h"
14 #include <unordered_map>
16 namespace CryGraphEditor
{
18 class CNodePinWidgetStyle
;
19 class CNodeWidgetStyle
;
21 class EDITOR_COMMON_API CNodeContentWidgetStyle
: protected QWidget
26 Q_PROPERTY(QColor backgroundColor READ GetBackgroundColor WRITE SetBackgroundColor DESIGNABLE
true);
27 Q_PROPERTY(QMargins margins READ GetMargins WRITE SetMargins DESIGNABLE
true);
30 CNodeContentWidgetStyle(CNodeWidgetStyle
& nodeWidgetStyle
);
32 const CNodeWidgetStyle
& GetNodeWidgetStyle() const { return m_nodeWidgetStyle
; }
34 const QColor
& GetBackgroundColor() const { return m_backgroundColor
; }
35 void SetBackgroundColor(const QColor
& color
) { m_backgroundColor
= color
; }
37 const QMargins
& GetMargins() const { return m_margins
; }
38 void SetMargins(const QMargins
& margins
) { m_margins
= margins
; }
40 void RegisterPinWidgetStyle(CNodePinWidgetStyle
* pStyle
);
41 const CNodePinWidgetStyle
* GetPinWidgetStyle(const char* styleId
) const;
44 const CNodeWidgetStyle
& m_nodeWidgetStyle
;
46 QColor m_backgroundColor
;
49 std::unordered_map
<StyleIdHash
, CNodePinWidgetStyle
*> m_pinWidgetStylesById
;