Elaztek Developer Hub
Blamite Game Engine - Keystone  00402.09.29.23.0627.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  BlamEditorToolWindow* tool_window = nullptr;
26 
30  void GenerateTreeWidgets();
31 
32 public:
33  BlamTagTreeNode* tag_node = nullptr;
34 
45  BlamExplorerBarTreeWidget(BlamEditorToolWindow* _tool_window, BlamProject* _project, bool hierarchy = true);
46 
57  BlamExplorerBarTreeWidget(BlamEditorToolWindow* _tool_window, BlamTagTreeNode* node, bool hierarchy, BlamProject* _project = nullptr);
58 
67  BlamExplorerBarTreeWidget(BlamEditorToolWindow* _tool_window, BlamPlugin* _plugin);
68 
73 
79  bool IsValid();
80 
84  void Refresh();
85 
89  void UpdateIcon();
90 
94  void OpenTag();
95 
100  void OpenBackupTag();
101 
108  void Filter(std::string search_filter, bool keep_empty_folders);
109 
113  void ShowInformationDialog();
114 };
BlamEditorToolWindow
Base class for all editor tool windows.
Definition: BlamEditorToolWindow.h:37
BlamExplorerBarTreeWidget::UpdateIcon
void UpdateIcon()
Updates the node's icon.
Definition: treewidget.cpp:218
BlamExplorerBarTreeWidget::IsValid
bool IsValid()
Checks whether the node is valid.
Definition: treewidget.cpp:291
BlamExplorerBarTreeWidget::OpenTag
void OpenTag()
This will open the tag associated with the node, if one is present.
Definition: treewidget.cpp:313
BlamExplorerBarTreeWidget::~BlamExplorerBarTreeWidget
~BlamExplorerBarTreeWidget()
Destructor which releases all pointers if they are still loaded.
Definition: treewidget.cpp:66
BlamExplorerBarTreeWidget::OpenBackupTag
void OpenBackupTag()
This will open the backup tag associated with this node.
Definition: treewidget.cpp:324
BlamExplorerBarTreeWidget::ShowInformationDialog
void ShowInformationDialog()
Shows the tag information dialog.
Definition: treewidget.cpp:399
BlamExplorerBarTreeWidget::Refresh
void Refresh()
Refreshes all data relating to this node.
Definition: treewidget.cpp:296
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:345
BlamExplorerBarTreeWidget::BlamExplorerBarTreeWidget
BlamExplorerBarTreeWidget(BlamEditorToolWindow *_tool_window, BlamProject *_project, bool hierarchy=true)
Creates a new Tree Widget for the Guerilla Explorer Bar.
Definition: treewidget.cpp:17
BlamExplorerBarTreeWidget::tag_node
BlamTagTreeNode * tag_node
The node associated with this widget.
Definition: treewidget.h:33
BlamExplorerBarTreeWidget
Definition: treewidget.h:14
BlamEditorWindow
Interface class that all main editing tool windows inherit from.
Definition: BlamEditorWindow.h:48