Elaztek Developer Hub
Blamite Game Engine - Keystone  00314.05.25.21.0023.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 <Strings/editor/guerilla/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  BlamTagTreeNode* tag_node = nullptr;
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  guerilla_window* guerilla_main_window = nullptr;
26 
30  void GenerateTreeWidgets();
31 
32 public:
43  BlamExplorerBarTreeWidget(guerilla_window* main_window, BlamProject* _project, bool hierarchy = true);
44 
55  BlamExplorerBarTreeWidget(guerilla_window* main_window, BlamTagTreeNode* node, bool hierarchy, BlamProject* _project = nullptr);
56 
65  BlamExplorerBarTreeWidget(guerilla_window* main_window, BlamPlugin* _plugin);
66 
71 
77  bool IsValid();
78 
82  void Refresh();
83 
87  void UpdateIcon();
88 
92  void OpenTag();
93 
100  void Filter(std::string search_filter, bool keep_empty_folders);
101 };
BlamExplorerBarTreeWidget::UpdateIcon
void UpdateIcon()
Updates the node's icon.
Definition: treewidget.cpp:177
BlamExplorerBarTreeWidget::IsValid
bool IsValid()
Checks whether the node is valid.
Definition: treewidget.cpp:245
BlamExplorerBarTreeWidget::OpenTag
void OpenTag()
This will open the tag associated with the node, if one is present.
Definition: treewidget.cpp:267
BlamExplorerBarTreeWidget::~BlamExplorerBarTreeWidget
~BlamExplorerBarTreeWidget()
Destructor which releases all pointers if they are still loaded.
Definition: treewidget.cpp:62
BlamExplorerBarTreeWidget::Refresh
void Refresh()
Refreshes all data relating to this node.
Definition: treewidget.cpp:250
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:275
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:13
guerilla_window
The main Guerilla window.
Definition: guerilla_window.h:20