Elaztek Developer Hub
Blamite Game Engine - Keystone  00326.06.27.21.0407.blamite
A library that enables the use of Qt in Blamite's editing tools.
treewidget.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <qtreewidget.h>
4 #include <HEKGuerilla/components/projects/projects.h>
5 #include <string>
6 
7 #ifndef KEYSTONE
8 #define KEYSTONE
9 #endif
10 
11 class BlamEditorWindow;
13 
14 class BlamExplorerBarTreeWidget : public QTreeWidgetItem
15 {
16 private:
17  BlamProject* project = nullptr;
18  bool is_root = false;
19  bool is_valid = false;
20  bool use_hierarchy_view = true;
21 
22  BlamPlugin* plugin = nullptr;
23  bool is_fake_container = false;
24 
25  BlamEditorWindow* editor_main_window = nullptr;
26  BlamEditorToolWindow* tool_window = nullptr;
27 
31  void GenerateTreeWidgets();
32 
33 public:
34  BlamTagTreeNode* tag_node = nullptr;
35 
47  BlamExplorerBarTreeWidget(BlamEditorWindow* main_window, BlamEditorToolWindow* _tool_window, BlamProject* _project, bool hierarchy = true);
48 
60  BlamExplorerBarTreeWidget(BlamEditorWindow* main_window, BlamEditorToolWindow* _tool_window, BlamTagTreeNode* node, bool hierarchy, BlamProject* _project = nullptr);
61 
71  BlamExplorerBarTreeWidget(BlamEditorWindow* main_window, BlamEditorToolWindow* _tool_window, BlamPlugin* _plugin);
72 
77 
83  bool IsValid();
84 
88  void Refresh();
89 
93  void UpdateIcon();
94 
98  void OpenTag();
99 
104  void OpenBackupTag();
105 
112  void Filter(std::string search_filter, bool keep_empty_folders);
113 
117  void ShowInformationDialog();
118 };
BlamEditorToolWindow
Definition: BlamEditorToolWindow.h:31
BlamExplorerBarTreeWidget::UpdateIcon
void UpdateIcon()
Updates the node's icon.
Definition: treewidget.cpp:205
BlamExplorerBarTreeWidget::IsValid
bool IsValid()
Checks whether the node is valid.
Definition: treewidget.cpp:278
BlamExplorerBarTreeWidget::OpenTag
void OpenTag()
This will open the tag associated with the node, if one is present.
Definition: treewidget.cpp:300
BlamExplorerBarTreeWidget::~BlamExplorerBarTreeWidget
~BlamExplorerBarTreeWidget()
Destructor which releases all pointers if they are still loaded.
Definition: treewidget.cpp:67
BlamExplorerBarTreeWidget::OpenBackupTag
void OpenBackupTag()
This will open the backup tag associated with this node.
Definition: treewidget.cpp:311
BlamExplorerBarTreeWidget::ShowInformationDialog
void ShowInformationDialog()
Shows the tag information dialog.
Definition: treewidget.cpp:386
BlamExplorerBarTreeWidget::Refresh
void Refresh()
Refreshes all data relating to this node.
Definition: treewidget.cpp:283
BlamExplorerBarTreeWidget::Filter
void Filter(std::string search_filter, bool keep_empty_folders)
Instructs the tree node to filter out any child items that do not contain a specified string.
Definition: treewidget.cpp:332
BlamExplorerBarTreeWidget::tag_node
BlamTagTreeNode * tag_node
The node associated with this widget.
Definition: treewidget.h:34
BlamExplorerBarTreeWidget
Definition: treewidget.h:14
BlamEditorWindow
Interface class that all main editing tool windows inherit from.
Definition: BlamEditorWindow.h:47
BlamExplorerBarTreeWidget::BlamExplorerBarTreeWidget
BlamExplorerBarTreeWidget(BlamEditorWindow *main_window, BlamEditorToolWindow *_tool_window, BlamProject *_project, bool hierarchy=true)
Creates a new Tree Widget for the Guerilla Explorer Bar.
Definition: treewidget.cpp:15