Elaztek Developer Hub
Blamite Game Engine - Keystone  00326.06.27.21.0407.blamite
A library that enables the use of Qt in Blamite's editing tools.
BlamExplorerBarTreeWidget Class Reference

#include <treewidget.h>

+ Inheritance diagram for BlamExplorerBarTreeWidget:

Public Member Functions

 BlamExplorerBarTreeWidget (BlamEditorWindow *main_window, BlamEditorToolWindow *_tool_window, BlamProject *_project, bool hierarchy=true)
 Creates a new Tree Widget for the Guerilla Explorer Bar. More...
 
 BlamExplorerBarTreeWidget (BlamEditorWindow *main_window, BlamEditorToolWindow *_tool_window, BlamTagTreeNode *node, bool hierarchy, BlamProject *_project=nullptr)
 Creates a new Tree Widget for the Guerilla Explorer Bar. More...
 
 BlamExplorerBarTreeWidget (BlamEditorWindow *main_window, BlamEditorToolWindow *_tool_window, BlamPlugin *_plugin)
 Creates a new Tree Widget for the Guerilla Explorer Bar. More...
 
 ~BlamExplorerBarTreeWidget ()
 Destructor which releases all pointers if they are still loaded. More...
 
bool IsValid ()
 Checks whether the node is valid. More...
 
void Refresh ()
 Refreshes all data relating to this node. More...
 
void UpdateIcon ()
 Updates the node's icon. More...
 
void OpenTag ()
 This will open the tag associated with the node, if one is present. More...
 
void OpenBackupTag ()
 This will open the backup tag associated with this node. More...
 
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. More...
 
void ShowInformationDialog ()
 Shows the tag information dialog. More...
 

Public Attributes

BlamTagTreeNode * tag_node = nullptr
 The node associated with this widget. More...
 

Constructor & Destructor Documentation

◆ BlamExplorerBarTreeWidget() [1/3]

BlamExplorerBarTreeWidget::BlamExplorerBarTreeWidget ( BlamEditorWindow main_window,
BlamEditorToolWindow _tool_window,
BlamProject *  _project,
bool  hierarchy = true 
)

Creates a new Tree Widget for the Guerilla Explorer Bar.

This override should ONLY be used for the root of a given project or tag folder, as it is treated differently from child nodes.

Parameters
main_window- Pointer to main editor window.
_tool_window- Pointer to explorer bar tool window.
_project- The project that this node will generate children from.
hierarchy- Whether or not the explorer is in hierarchy mode. Defaults to true.

◆ BlamExplorerBarTreeWidget() [2/3]

BlamExplorerBarTreeWidget::BlamExplorerBarTreeWidget ( BlamEditorWindow main_window,
BlamEditorToolWindow _tool_window,
BlamTagTreeNode *  node,
bool  hierarchy,
BlamProject *  _project = nullptr 
)

Creates a new Tree Widget for the Guerilla Explorer Bar.

This override should be used for all non-root tree widgets.

Parameters
main_window- Pointer to main editor window.
_tool_window- Pointer to explorer bar tool window.
node- The node that this tree widget represents.
hierarchy- Whether or not the explorer is in hierarchy mode. Will use class view if this is false.
_project- The project that the node belongs to. Defaults to nullptr, although this is considered invalid.

◆ BlamExplorerBarTreeWidget() [3/3]

BlamExplorerBarTreeWidget::BlamExplorerBarTreeWidget ( BlamEditorWindow main_window,
BlamEditorToolWindow _tool_window,
BlamPlugin *  _plugin 
)

Creates a new Tree Widget for the Guerilla Explorer Bar.

This override is used specifically for creating containers for tag classes when the explorer is in class view.

Parameters
main_window- Pointer to main editor window.
_tool_window- Pointer to explorer bar tool window.
plugin- Pointer to plugin that this node represents.

◆ ~BlamExplorerBarTreeWidget()

BlamExplorerBarTreeWidget::~BlamExplorerBarTreeWidget ( )

Destructor which releases all pointers if they are still loaded.

Member Function Documentation

◆ Filter()

void BlamExplorerBarTreeWidget::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.

Parameters
search_filter- The search filter to check against.
keep_empty_folders- Whether or not to preserve empty folders.

◆ IsValid()

bool BlamExplorerBarTreeWidget::IsValid ( )

Checks whether the node is valid.

If all data associated with this tree node is valid, this will return true.

Returns
true if the node data is valid, otherwise returns false.

◆ OpenBackupTag()

void BlamExplorerBarTreeWidget::OpenBackupTag ( )

This will open the backup tag associated with this node.

This is done by checking if a file of the same path exists with a .bak file extension. If there is no backup file, this will do nothing.

◆ OpenTag()

void BlamExplorerBarTreeWidget::OpenTag ( )

This will open the tag associated with the node, if one is present.

If the node is a directory, this will do nothing.

◆ Refresh()

void BlamExplorerBarTreeWidget::Refresh ( )

Refreshes all data relating to this node.

This will reload the icon and regenerate any child widgets.

◆ ShowInformationDialog()

void BlamExplorerBarTreeWidget::ShowInformationDialog ( )

Shows the tag information dialog.

◆ UpdateIcon()

void BlamExplorerBarTreeWidget::UpdateIcon ( )

Updates the node's icon.

Member Data Documentation

◆ tag_node

BlamTagTreeNode* BlamExplorerBarTreeWidget::tag_node = nullptr

The node associated with this widget.


The documentation for this class was generated from the following files: