Elaztek Developer Hub
Blamite Game Engine - Keystone  00433.02.16.25.2127.blamite
A library that enables the use of Qt in Blamite's editing tools.
tagref.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <HEKGuerilla/components/settings/config/config.h>
4 #include <HEKGuerilla/components/tags/fields/tagref/tagref.h>
5 
7 #include "ui_tagref.h"
8 
9 class BlamTagTreeNode;
10 
15 {
16  Q_OBJECT
17 
18 private:
19 
20  Ui::tagref ui;
21 
22  BlamPluginField_Tagref* template_field = nullptr;
23  bool is_template = false;
24 
25  bool use_classic_ui = false;
26 
27  bool generating_class_list = false;
28  bool generating_tag_list = false;
29 
30  void RefreshTagClassSelectionUI();
31  void RefreshTagSelectionUI();
32 
33 public:
34 
35  BlamTagField_Tagref* field = nullptr;
36 
37  BlamTagTreeNode* GetReferencedTagNode();
38  BlamPlugin* GetSelectedClass();
39 
40  ui_tagref_field(BlamTagField_Tagref* _field, BlamEditorDocument_Tag* _document, QWidget* parent = Q_NULLPTR);
41  ui_tagref_field(BlamPluginField_Tagref* _template, BlamEditorDocument_Tag* _document);
43 
44  bool eventFilter(QObject* object, QEvent* event);
45 
46  void SetDesignModeActive(drag_list* _drag_list, tag_designer* _designer) override;
47  void SetDesignNameEditState(bool edit_state, bool save_changes = true) override;
48 
49 private slots:
50 
51  void btn_browse_Click();
52  void btn_open_Click();
53  void btn_import_Click();
54  void btn_search_Click();
55  void btn_clear_Click();
56 
57  void cbox_m_tag_dropdown_IndexChanged(int index);
58  void cbox_m_tag_class_IndexChanged(int index);
59 
60  void LabelEditEnterPressed();
61 
62  void SetupUI() override;
63 };
ui_tagref_field::SetDesignModeActive
void SetDesignModeActive(drag_list *_drag_list, tag_designer *_designer) override
Instructs the field to be editable as a designer field.
Definition: tagref.cpp:425
BlamEditorDocument_Tag
Class representing a Tag document.
Definition: tag.h:15
editor_data.h
ui_tagref_field::GetSelectedClass
BlamPlugin * GetSelectedClass()
Definition: tagref.cpp:382
BlamEditorDocument_Tag::FlagAsModified
void FlagAsModified(bool new_modified_state=true) override
Flags the document as being modified.
Definition: tag.cpp:130
ui_tagref_field
Definition: tagref.h:14
BlamEditorDocumentWidget::document
BlamEditorDocument * document
The document associated with this widget.
Definition: BlamEditorDocument.h:172
SelectTagDialog::HasTag
bool HasTag()
Definition: SelectTagDialog.cpp:62
ui_tagref_field::SetDesignNameEditState
void SetDesignNameEditState(bool edit_state, bool save_changes=true) override
Enables or disables the label edit field for the current field.
Definition: tagref.cpp:446
ui_tagref_field::~ui_tagref_field
~ui_tagref_field()
Definition: tagref.cpp:57
BlamEditorTagFieldControl::document
BlamEditorDocument_Tag * document
The document this field belongs to.
Definition: tag_fields.h:24
BlamEditorTagFieldControl
Interface used as a base for all tag field controls.
Definition: tag_fields.h:18
TagSearchDialog::GetResult
bool GetResult()
Definition: TagSearchDialog.cpp:105
BlamEditorDocument::FlagAsModified
virtual void FlagAsModified(bool new_modified_state=true)
Flags the document as being modified.
Definition: BlamEditorDocument.cpp:79
TagSearchDialog.h
tagref.h
BlamEditorDocumentType::Tag
@ Tag
Indicates the document represents a tag file.
TagSearchDialog
Definition: TagSearchDialog.h:15
SelectTagDialog::GetTagClass
std::string GetTagClass()
Definition: SelectTagDialog.cpp:72
ui_tagref_field::field
BlamTagField_Tagref * field
The field associated with this control.
Definition: tagref.h:35
SelectTagDialog::GetTagPath
std::string GetTagPath()
Definition: SelectTagDialog.cpp:67
BlamEditorTagFieldControl::drag_drop_list
drag_list * drag_drop_list
The active drag list that owns this control. Only used when design_mode is enabled.
Definition: tag_fields.h:26
BlamKeystone::EditorData::GetMainEditorWindow
KEYSTONE BlamEditorWindow * GetMainEditorWindow()
Retrieves the main editor window.
Definition: editor_data.cpp:34
SelectTagDialog
Definition: SelectTagDialog.h:8
drag_list
A basic interface class which can be used for drag and drop behaviors.
Definition: drag_container.h:19
SelectTagDialog.h
ui_tagref_field::eventFilter
bool eventFilter(QObject *object, QEvent *event)
Definition: tagref.cpp:397
BlamEditorTagFieldControl::design_mode
bool design_mode
Whether or not this field is currently in design mode.
Definition: tag_fields.h:25
ui_tagref_field::GetReferencedTagNode
BlamTagTreeNode * GetReferencedTagNode()
Definition: tagref.cpp:347
tag.h
BlamKeystone::UI::TagFields::SetWidgetValidAppearance
KEYSTONE void SetWidgetValidAppearance(QWidget *widget, bool valid)
Applies the configured invalid field colors to a given widget.
Definition: tag_fields.cpp:157
TagSearchDialog::selected_tag
BlamTagTreeNode * selected_tag
Definition: TagSearchDialog.h:28
ui_tagref_field::ui_tagref_field
ui_tagref_field(BlamTagField_Tagref *_field, BlamEditorDocument_Tag *_document, QWidget *parent=Q_NULLPTR)
Definition: tagref.cpp:13
BlamEditorWindow::OpenDocument
bool OpenDocument(std::string file_path, BlamTagTreeNode *tree_node, BlamEditorDocumentType doctype)
Attempts to open the specified document in the main window.
Definition: BlamEditorWindow.cpp:134
tag_fields.h
BlamEditorTagFieldControl::designer
tag_designer * designer
The active tag designer that owns this control. Only used when design_mode is enabled.
Definition: tag_fields.h:27
tag_designer.h
tag_designer
Class representing the Tag Designer.
Definition: tag_designer.h:24
BlamKeystone::EditorData::GetDocumentTypeConfiguration
KEYSTONE BlamConfigurationFile * GetDocumentTypeConfiguration(BlamEditorDocumentType type)
Attempts to locate the configuration file for the specified document type.
Definition: document_config.cpp:107