Elaztek Developer Hub
Blamite Game Engine - Keystone  00386.06.16.23.0646.blamite
A library that enables the use of Qt in Blamite's editing tools.
drag_container Class Reference

Class representing a draggable widget container. More...

#include <drag_container.h>

+ Inheritance diagram for drag_container:
+ Collaboration diagram for drag_container:

Public Member Functions

 drag_container (drag_list *_parent_list, tag_designer *_designer)
 Creates a new drag_container instance. More...
 
 ~drag_container ()
 
void mousePressEvent (QMouseEvent *mouse_event) override
 
void mouseMoveEvent (QMouseEvent *event) override
 
void mouseReleaseEvent (QMouseEvent *mouse_event) override
 
void OnEditorThemeChangeEvent (EditorThemeChangeEvent *event) override
 
void AddContentWidget (QWidget *widget)
 Adds a widget to this drag container. More...
 
void SetIconVisiblity (bool icon_visible_state)
 Sets whether or not the drag container's sidebar icon should be visible. More...
 
void SetIcon (std::string group_id, std::string resource_id)
 Sets the drag container's sidebar icon. More...
 
void SetFocusState (bool focus_state, bool force_update=false)
 Sets the drag container's focus state. More...
 

Public Attributes

BlamPluginField * field_data = nullptr
 The plugin field that belongs to this container. More...
 
BlamEditorTagFieldControltag_field_control = nullptr
 The tag field widget that belongs to this container. More...
 
tag_designerdesigner = nullptr
 The Tag Designer that this container exists within. More...
 

Detailed Description

Class representing a draggable widget container.

Currently, this is only used for the Tag Designer - however in the future, it could be adapted to be used as a general purpose drag-and-drop widget.

Constructor & Destructor Documentation

◆ drag_container()

drag_container::drag_container ( drag_list _parent_list,
tag_designer _designer 
)

Creates a new drag_container instance.

Parameters
_parent_list- The drag list that this container belongs to.
+ Here is the call graph for this function:

◆ ~drag_container()

drag_container::~drag_container ( )

Member Function Documentation

◆ AddContentWidget()

void drag_container::AddContentWidget ( QWidget *  widget)

Adds a widget to this drag container.

Parameters
widget- Pointer to the widget to add to the container.
+ Here is the caller graph for this function:

◆ mouseMoveEvent()

void drag_container::mouseMoveEvent ( QMouseEvent *  event)
override
+ Here is the call graph for this function:

◆ mousePressEvent()

void drag_container::mousePressEvent ( QMouseEvent *  mouse_event)
override
+ Here is the call graph for this function:

◆ mouseReleaseEvent()

void drag_container::mouseReleaseEvent ( QMouseEvent *  mouse_event)
override
+ Here is the call graph for this function:

◆ OnEditorThemeChangeEvent()

void drag_container::OnEditorThemeChangeEvent ( EditorThemeChangeEvent *  event)
override

◆ SetFocusState()

void drag_container::SetFocusState ( bool  focus_state,
bool  force_update = false 
)

Sets the drag container's focus state.

When focused, the drag container will display slightly differently - exposing certain editing controls to the user.

Parameters
focus_state- Whether or not the container should be focused.
force_update- Whether or not to force a UI update. Note that this is only required if the container already has the specified focus state - if the focus state is actually being changed from this method, the UI will update regardless. Defaults to false.
+ Here is the caller graph for this function:

◆ SetIcon()

void drag_container::SetIcon ( std::string  group_id,
std::string  resource_id 
)

Sets the drag container's sidebar icon.

Parameters
group_id- The ID of the resource group to pull the icon from.
resource_id- The ID of the resource to use for the icon.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetIconVisiblity()

void drag_container::SetIconVisiblity ( bool  icon_visible_state)

Sets whether or not the drag container's sidebar icon should be visible.

Parameters
icon_visible_state- Whether or not the icon should be visible.

Member Data Documentation

◆ designer

tag_designer* drag_container::designer = nullptr

The Tag Designer that this container exists within.

◆ field_data

BlamPluginField* drag_container::field_data = nullptr

The plugin field that belongs to this container.

◆ tag_field_control

BlamEditorTagFieldControl* drag_container::tag_field_control = nullptr

The tag field widget that belongs to this container.


The documentation for this class was generated from the following files: