![]() |
Blamite Game Engine - Keystone
00390.07.02.23.1947.blamite
A library that enables the use of Qt in Blamite's editing tools.
|
Class representing the Tag Designer. More...
#include <tag_designer.h>
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) |
![]() | |
BlamEditorDocumentWidget (QWidget *parent=nullptr) | |
![]() | |
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... | |
![]() | |
BlamEditorDocument * | document = nullptr |
The document associated with this widget. More... | |
![]() | |
QBoxLayout * | drag_layout = nullptr |
The layout container that holds all drag and drop widgets. More... | |
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.
tag_designer::tag_designer | ( | QWidget * | parent = Q_NULLPTR | ) |
tag_designer::tag_designer | ( | BlamPlugin * | _plugin, |
QWidget * | parent = Q_NULLPTR |
||
) |
tag_designer::tag_designer | ( | std::string | name_short, |
std::string | name_long, | ||
std::string | file_path, | ||
QWidget * | parent = Q_NULLPTR |
||
) |
tag_designer::~tag_designer | ( | ) |
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.
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.
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. |
void tag_designer::EnablePluginEditControls | ( | ) |
Removes the default Create/Open UI, and enables field/plugin editing controls.
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.
destination_drag_list | - The drag list to add the generated UI control to. |
plugin_field | - The plugin field to generate a control for. |
void tag_designer::RebuildPluginFieldData | ( | ) |
Reconstructs the field data within the plugin based on the fields present within the designer UI.
void tag_designer::RemoveField | ( | drag_container * | container | ) |
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.
int tag_designer::next_field_id = 0 |
The next number to use for a new field. Increments each time a field is added.
BlamPlugin* tag_designer::plugin = nullptr |
The plugin being designed.