Elaztek Developer Hub
Blamite Game Engine - Keystone  00319.06.14.21.0211.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;
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  BlamEditorWindow* editor_main_window = nullptr;
25 
29  void GenerateTreeWidgets();
30 
31 public:
32  BlamTagTreeNode* tag_node = nullptr;
33 
44  BlamExplorerBarTreeWidget(BlamEditorWindow* main_window, BlamProject* _project, bool hierarchy = true);
45 
56  BlamExplorerBarTreeWidget(BlamEditorWindow* main_window, BlamTagTreeNode* node, bool hierarchy, BlamProject* _project = nullptr);
57 
66  BlamExplorerBarTreeWidget(BlamEditorWindow* 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:203
BlamExplorerBarTreeWidget::IsValid
bool IsValid()
Checks whether the node is valid.
Definition: treewidget.cpp:276
BlamExplorerBarTreeWidget::BlamExplorerBarTreeWidget
BlamExplorerBarTreeWidget(BlamEditorWindow *main_window, BlamProject *_project, bool hierarchy=true)
Creates a new Tree Widget for the Guerilla Explorer Bar.
Definition: treewidget.cpp:16
BlamExplorerBarTreeWidget::OpenTag
void OpenTag()
This will open the tag associated with the node, if one is present.
Definition: treewidget.cpp:298
BlamExplorerBarTreeWidget::~BlamExplorerBarTreeWidget
~BlamExplorerBarTreeWidget()
Destructor which releases all pointers if they are still loaded.
Definition: treewidget.cpp:65
BlamExplorerBarTreeWidget::OpenBackupTag
void OpenBackupTag()
This will open the backup tag associated with this node.
Definition: treewidget.cpp:309
BlamExplorerBarTreeWidget::ShowInformationDialog
void ShowInformationDialog()
Shows the tag information dialog.
Definition: treewidget.cpp:384
BlamExplorerBarTreeWidget::Refresh
void Refresh()
Refreshes all data relating to this node.
Definition: treewidget.cpp:281
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:330
BlamExplorerBarTreeWidget::tag_node
BlamTagTreeNode * tag_node
The node associated with this widget.
Definition: treewidget.h:32
BlamExplorerBarTreeWidget
Definition: treewidget.h:13
BlamEditorWindow
Interface class that all main editing tool windows inherit from.
Definition: BlamEditorWindow.h:47