Elaztek Developer Hub
Blamite Game Engine - Keystone  00433.02.16.25.2127.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  bool generic_file = false;
26  std::string file_path = "";
27  std::vector<std::string> file_filters = std::vector<std::string>();
28 
29  BlamEditorToolWindow* tool_window = nullptr;
30 
34  void GenerateTreeWidgets();
35 
36 public:
37  BlamTagTreeNode* tag_node = nullptr;
38 
49  BlamExplorerBarTreeWidget(BlamEditorToolWindow* _tool_window, BlamProject* _project, bool hierarchy = true);
50 
61  BlamExplorerBarTreeWidget(BlamEditorToolWindow* _tool_window, BlamTagTreeNode* node, bool hierarchy, BlamProject* _project = nullptr);
62 
71  BlamExplorerBarTreeWidget(BlamEditorToolWindow* _tool_window, BlamPlugin* _plugin);
72 
82  BlamExplorerBarTreeWidget(BlamEditorToolWindow* _tool_window, std::string _file_path, std::string file_extension_filter = "");
83 
88 
94  bool IsValid();
95 
99  void Refresh();
100 
104  void UpdateIcon();
105 
109  void OpenTag();
110 
115  void OpenBackupTag();
116 
123  void Filter(std::string search_filter, bool keep_empty_folders);
124 
128  void ShowInformationDialog();
129 };
BlamEditorToolWindow
Base class for all editor tool windows.
Definition: BlamEditorToolWindow.h:38
BlamExplorerBarTreeWidget::UpdateIcon
void UpdateIcon()
Updates the node's icon.
Definition: treewidget.cpp:275
BlamExplorerBarTreeWidget::IsValid
bool IsValid()
Checks whether the node is valid.
Definition: treewidget.cpp:352
BlamExplorerBarTreeWidget::OpenTag
void OpenTag()
This will open the tag associated with the node, if one is present.
Definition: treewidget.cpp:383
BlamExplorerBarTreeWidget::~BlamExplorerBarTreeWidget
~BlamExplorerBarTreeWidget()
Destructor which releases all pointers if they are still loaded.
Definition: treewidget.cpp:80
BlamExplorerBarTreeWidget::OpenBackupTag
void OpenBackupTag()
This will open the backup tag associated with this node.
Definition: treewidget.cpp:401
BlamExplorerBarTreeWidget::ShowInformationDialog
void ShowInformationDialog()
Shows the tag information dialog.
Definition: treewidget.cpp:476
BlamExplorerBarTreeWidget::Refresh
void Refresh()
Refreshes all data relating to this node.
Definition: treewidget.cpp:357
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:422
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:37
BlamExplorerBarTreeWidget
Definition: treewidget.h:14
BlamEditorWindow
Interface class that all main editing tool windows inherit from.
Definition: BlamEditorWindow.h:34