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.
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 
12 {
13  Q_OBJECT
14 
15 private:
16 
17  Ui::tagref ui;
18 
19  BlamPluginField_Tagref* template_field = nullptr;
20  bool is_template = false;
21 
22  bool use_classic_ui = false;
23 
24  bool generating_class_list = false;
25  bool generating_tag_list = false;
26 
27  void RefreshTagClassSelectionUI();
28  void RefreshTagSelectionUI();
29 
30 public:
31 
32  BlamTagField_Tagref* field = nullptr;
33 
34  BlamTagTreeNode* GetReferencedTagNode();
35  BlamPlugin* GetSelectedClass();
36 
37  ui_tagref_field(BlamTagField_Tagref* _field, BlamEditorDocument_Tag* _document, QWidget* parent = Q_NULLPTR);
38  ui_tagref_field(BlamPluginField_Tagref* _template, BlamEditorDocument_Tag* _document);
40 
41  bool eventFilter(QObject* object, QEvent* event);
42 
43  void SetDesignModeActive(drag_list* _drag_list, tag_designer* _designer) override;
44  void SetDesignNameEditState(bool edit_state, bool save_changes = true) override;
45 
46 private slots:
47 
48  void btn_browse_Click();
49  void btn_open_Click();
50  void btn_import_Click();
51  void btn_search_Click();
52  void btn_clear_Click();
53 
54  void cbox_m_tag_dropdown_IndexChanged(int index);
55  void cbox_m_tag_class_IndexChanged(int index);
56 
57  void LabelEditEnterPressed();
58 
59  void SetupUI() override;
60 };
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:374
BlamEditorDocument_Tag
Class representing a Tag document.
Definition: tag.h:15
editor_data.h
ui_tagref_field::GetSelectedClass
BlamPlugin * GetSelectedClass()
Definition: tagref.cpp:331
ui_tagref_field
Definition: tagref.h:11
BlamEditorDocument_Tag::FlagAsModified
void FlagAsModified(bool new_modified_state=true)
Definition: tag.cpp:126
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:395
ui_tagref_field::~ui_tagref_field
~ui_tagref_field()
Definition: tagref.cpp:55
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:92
TagSearchDialog.h
tagref.h
BlamEditorDocumentType::Tag
@ Tag
Indicates the document represents a tag file.
TagSearchDialog
Definition: TagSearchDialog.h:15
ui_tagref_field::field
BlamTagField_Tagref * field
The field associated with this control.
Definition: tagref.h:32
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:32
drag_list
A basic interface class which can be used for drag and drop behaviors.
Definition: drag_container.h:19
ui_tagref_field::eventFilter
bool eventFilter(QObject *object, QEvent *event)
Definition: tagref.cpp:346
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:296
tag.h
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:11
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:99
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
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