![]() |
Blamite Game Engine - Keystone
00386.06.16.23.0646.blamite
A library that enables the use of Qt in Blamite's editing tools.
|
A generic tag field control template. More...
#include <generic.h>
Public Member Functions | |
ui_generic_field (BlamTagField *_field, BlamEditorDocument_Tag *_document, QWidget *parent=Q_NULLPTR) | |
ui_generic_field (BlamPluginField *_template, BlamEditorDocument_Tag *_document) | |
~ui_generic_field () | |
bool | eventFilter (QObject *object, QEvent *event) override |
void | SetDesignModeActive (drag_list *_drag_list, tag_designer *_designer) override |
Instructs the field to be editable as a designer field. More... | |
void | SetDesignNameEditState (bool edit_state, bool save_changes=true) override |
Enables or disables the label edit field for the current field. More... | |
void | SetupUI () override |
Configures the UI for the current field. More... | |
![]() | |
BlamEditorTagFieldControl (QWidget *parent=Q_NULLPTR) | |
Public Attributes | |
BlamTagField * | field = nullptr |
The field associated with this control. More... | |
BlamPluginField * | template_field = nullptr |
The plugin field associated with this control. More... | |
bool | is_template = false |
Whether or not this field is displaying as a template. More... | |
![]() | |
BlamTagField * | field = nullptr |
The field associated with this control. More... | |
BlamEditorDocument_Tag * | document = nullptr |
The document this field belongs to. More... | |
bool | design_mode = false |
Whether or not this field is currently in design mode. More... | |
drag_list * | drag_drop_list = nullptr |
The active drag list that owns this control. Only used when design_mode is enabled. More... | |
tag_designer * | designer = nullptr |
The active tag designer that owns this control. Only used when design_mode is enabled. More... | |
Protected Attributes | |
Ui::basic_tag_field | ui |
A generic tag field control template.
This class is used as a base for most tag fields. Some tag fields (such as blocks or comments) will not derive from this, but instead will have their own UI. This control has a label for the display name or field ID, and a layout panel to contain any specific controls for a given field.
ui_generic_field::ui_generic_field | ( | BlamTagField * | _field, |
BlamEditorDocument_Tag * | _document, | ||
QWidget * | parent = Q_NULLPTR |
||
) |
ui_generic_field::ui_generic_field | ( | BlamPluginField * | _template, |
BlamEditorDocument_Tag * | _document | ||
) |
ui_generic_field::~ui_generic_field | ( | ) |
|
override |
|
overridevirtual |
Instructs the field to be editable as a designer field.
This slightly tweaks how the field is displayed, and provides additional functionality to allow the field to be altered within the Tag Designer.
Once design mode is activated, it cannot be deactivated.
Reimplemented from BlamEditorTagFieldControl.
|
overridevirtual |
Enables or disables the label edit field for the current field.
When enabled, this will replace the field display label with a text input, allowing the user to rename the field. When disabled, this will hide the edit field and optionally save any changes made.
This only has any effect when design mode is enabled.
edit_state | - Whether or not the edit field should be enabled. |
save_changes | - Whether or not any changes from the text input should be saved. Defaults to true . |
Reimplemented from BlamEditorTagFieldControl.
|
overridevirtual |
Configures the UI for the current field.
This will rebuild the control from its original data, identical to what happens when a control is first created. This is ideal in cases where the original field has been updated externally and needs to have its changes reflected in the UI, such as the tag designer.
resetting | - Whether or not the widget is resetting after being initialized. If true, some additional operations may be performed to clear any existing data. |
Reimplemented from BlamEditorTagFieldControl.
Reimplemented in ui_vector_field, and ui_int_field.
BlamTagField* ui_generic_field::field = nullptr |
The field associated with this control.
bool ui_generic_field::is_template = false |
Whether or not this field is displaying as a template.
BlamPluginField* ui_generic_field::template_field = nullptr |
The plugin field associated with this control.
Only used when the field is displaying as a template.
|
protected |