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

Class representing the Tag Designer. More...

#include <tag_designer.h>

+ Inheritance diagram for tag_designer:
+ Collaboration diagram for tag_designer:

Public Member Functions

 tag_designer (QWidget *parent=Q_NULLPTR)
 
 tag_designer (BlamPlugin *_plugin, QWidget *parent=Q_NULLPTR)
 
 tag_designer (std::string name_short, std::string name_long, std::string file_path, QWidget *parent=Q_NULLPTR)
 
 ~tag_designer ()
 
void CloseAllLabelEditors ()
 Closes all display name and/or description text editors on all fields. More...
 
void UnfocusAllContainers ()
 Unfocuses all existing drag containers. More...
 
void EnablePluginEditControls ()
 Removes the default Create/Open UI, and enables field/plugin editing controls. More...
 
void GeneratePluginFieldControl (drag_list *destination_drag_list, BlamPluginField *plugin_field)
 Creates a new plugin field control and adds it to a drag list. More...
 
void CreateNewPluginField (drag_list *destination_drag_list, int *next_item_id, BlamTagFieldType type)
 Creates a new plugin field and adds it to a drag list. More...
 
void RebuildPluginFieldData ()
 Reconstructs the field data within the plugin based on the fields present within the designer UI. More...
 
void RemoveField (drag_container *container)
 
- Public Member Functions inherited from BlamEditorDocumentWidget
 BlamEditorDocumentWidget (QWidget *parent=nullptr)
 
- Public Member Functions inherited from drag_list
void GenerateDropZones (bool clear_existing=true)
 Generates drop zones for the given drag list. More...
 
void AddContentWidget (QWidget *widget)
 Adds a content item to the drag list. More...
 
std::vector< QWidget * > GetContentWidgets ()
 Retrieves a list of all content widgets within the drag list. More...
 

Public Attributes

BlamPlugin * plugin = nullptr
 The plugin being designed. More...
 
int next_field_id = 0
 The next number to use for a new field. Increments each time a field is added. More...
 
- Public Attributes inherited from BlamEditorDocumentWidget
BlamEditorDocumentdocument = nullptr
 The document associated with this widget. More...
 
- Public Attributes inherited from drag_list
QBoxLayout * drag_layout = nullptr
 The layout container that holds all drag and drop widgets. More...
 

Detailed Description

Class representing the Tag Designer.

The Tag Designer provides a GUI for authoring tag class definition files, or 'plugins'. These plugins are stored as XML files on disk, and are used by the Editing Kit to interact with tag files.

These files are not directly used by the game engine - instead, the game engine itself has its tag definitions built-in using C++ code. While this reduces compatiability, it ensures that the game engine can read tags as quickly and efficiently as possible - with minimal memory overhead.

The Tag Designer saves tag files as XML by default, for use within the Editing Kit. However, tags can also be exported to C++ code for ready use in-engine, allowing the designer to be used for both project-level tags as well as our own in-engine tags.

Constructor & Destructor Documentation

◆ tag_designer() [1/3]

tag_designer::tag_designer ( QWidget *  parent = Q_NULLPTR)

◆ tag_designer() [2/3]

tag_designer::tag_designer ( BlamPlugin *  _plugin,
QWidget *  parent = Q_NULLPTR 
)

◆ tag_designer() [3/3]

tag_designer::tag_designer ( std::string  name_short,
std::string  name_long,
std::string  file_path,
QWidget *  parent = Q_NULLPTR 
)

◆ ~tag_designer()

tag_designer::~tag_designer ( )

Member Function Documentation

◆ CloseAllLabelEditors()

void tag_designer::CloseAllLabelEditors ( )

Closes all display name and/or description text editors on all fields.

In most cases, this shouldn't be necessary - but it can be used in certain cases as an additional measure to ensure that all edit fields are closed properly.

+ Here is the call graph for this function:

◆ CreateNewPluginField()

void tag_designer::CreateNewPluginField ( drag_list destination_drag_list,
int *  next_item_id,
BlamTagFieldType  type 
)

Creates a new plugin field and adds it to a drag list.

Parameters
destination_drag_list- The drag list to add the generated UI control to.
next_item_id- Pointer to the next item ID. This is used to create a unique name for the field, and will be incremented by 1 after the field is created.
type- The type of field to create.
+ Here is the call graph for this function:

◆ EnablePluginEditControls()

void tag_designer::EnablePluginEditControls ( )

Removes the default Create/Open UI, and enables field/plugin editing controls.

◆ GeneratePluginFieldControl()

void tag_designer::GeneratePluginFieldControl ( drag_list destination_drag_list,
BlamPluginField *  plugin_field 
)

Creates a new plugin field control and adds it to a drag list.

Parameters
destination_drag_list- The drag list to add the generated UI control to.
plugin_field- The plugin field to generate a control for.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RebuildPluginFieldData()

void tag_designer::RebuildPluginFieldData ( )

Reconstructs the field data within the plugin based on the fields present within the designer UI.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RemoveField()

void tag_designer::RemoveField ( drag_container container)
+ Here is the call graph for this function:

◆ UnfocusAllContainers()

void tag_designer::UnfocusAllContainers ( )

Unfocuses all existing drag containers.

This is used to ensure that two drag containers are not displaying as focused at once. When containers are focused, additional editing controls are made available.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ next_field_id

int tag_designer::next_field_id = 0

The next number to use for a new field. Increments each time a field is added.

◆ plugin

BlamPlugin* tag_designer::plugin = nullptr

The plugin being designed.


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