Elaztek Developer Hub
Blamite Game Engine - Keystone  00317.05.31.21.2243.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 guerilla_window;
12 
13 class BlamExplorerBarTreeWidget : public QTreeWidgetItem
14 {
15 private:
16  BlamProject* project = nullptr;
17  bool is_root = false;
18  bool is_valid = false;
19  bool use_hierarchy_view = true;
20 
21  BlamPlugin* plugin = nullptr;
22  bool is_fake_container = false;
23 
24  guerilla_window* guerilla_main_window = nullptr;
25 
29  void GenerateTreeWidgets();
30 
31 public:
32  BlamTagTreeNode* tag_node = nullptr;
33 
44  BlamExplorerBarTreeWidget(guerilla_window* main_window, BlamProject* _project, bool hierarchy = true);
45 
56  BlamExplorerBarTreeWidget(guerilla_window* main_window, BlamTagTreeNode* node, bool hierarchy, BlamProject* _project = nullptr);
57 
66  BlamExplorerBarTreeWidget(guerilla_window* main_window, BlamPlugin* _plugin);
67 
72 
78  bool IsValid();
79 
83  void Refresh();
84 
88  void UpdateIcon();
89 
93  void OpenTag();
94 
99  void OpenBackupTag();
100 
107  void Filter(std::string search_filter, bool keep_empty_folders);
108 
112  void ShowInformationDialog();
113 };
BlamExplorerBarTreeWidget::UpdateIcon
void UpdateIcon()
Updates the node's icon.
Definition: treewidget.cpp:202
BlamExplorerBarTreeWidget::IsValid
bool IsValid()
Checks whether the node is valid.
Definition: treewidget.cpp:275
BlamExplorerBarTreeWidget::OpenTag
void OpenTag()
This will open the tag associated with the node, if one is present.
Definition: treewidget.cpp:297
BlamExplorerBarTreeWidget::~BlamExplorerBarTreeWidget
~BlamExplorerBarTreeWidget()
Destructor which releases all pointers if they are still loaded.
Definition: treewidget.cpp:64
BlamExplorerBarTreeWidget::OpenBackupTag
void OpenBackupTag()
This will open the backup tag associated with this node.
Definition: treewidget.cpp:308
BlamExplorerBarTreeWidget::ShowInformationDialog
void ShowInformationDialog()
Shows the tag information dialog.
Definition: treewidget.cpp:383
BlamExplorerBarTreeWidget::Refresh
void Refresh()
Refreshes all data relating to this node.
Definition: treewidget.cpp:280
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:329
BlamExplorerBarTreeWidget::tag_node
BlamTagTreeNode * tag_node
The node associated with this widget.
Definition: treewidget.h:32
BlamExplorerBarTreeWidget
Definition: treewidget.h:13
BlamExplorerBarTreeWidget::BlamExplorerBarTreeWidget
BlamExplorerBarTreeWidget(guerilla_window *main_window, BlamProject *_project, bool hierarchy=true)
Creates a new Tree Widget for the Guerilla Explorer Bar.
Definition: treewidget.cpp:15
guerilla_window
The main Guerilla window.
Definition: guerilla_window.h:20