Files panel: plugin/script indexing, hierarchical entries, open / reveal / copy gestures, and tree chrome.
More...
#include <lua_debugger_files.h>
|
| void | onItemDoubleClicked (const QModelIndex &index) |
| | Opens the script associated with the double-clicked item in the debugger editor.
|
| |
| void | showContextMenu (const QPoint &pos) |
| | Displays a context menu offering open, reveal, and copy actions for the item under the cursor.
|
| |
|
| | LuaDebuggerFilesController (LuaDebuggerDialog *host) |
| | Constructs the controller and binds it to its host dialog.
|
| |
| void | attach (QTreeView *tree, QStandardItemModel *model) |
| | Binds the controller to the tree view and model, and loads stock icons ready for the first ensureEntry call.
|
| |
|
void | configureTreeChrome () const |
| | Configures decorations, scrollbar, and header sizing (after widgets exist).
|
| |
|
void | refreshAvailableScripts () |
| | Rescans all known script locations and repopulates the model with up-to-date entries.
|
| |
| void | scanScriptDirectory (const QString &dir_path) |
| | Recursively walks dir_path and calls ensureEntry for every script file found.
|
| |
| bool | ensureEntry (const QString &file_path) |
| | Ensures a leaf row exists for file_path, creating intermediate folder rows as needed.
|
| |
|
void | sortModel () |
| | Sorts column 0 after discrete inserts from callbacks.
|
| |
Files panel: plugin/script indexing, hierarchical entries, open / reveal / copy gestures, and tree chrome.
◆ LuaDebuggerFilesController()
Constructs the controller and binds it to its host dialog.
- Parameters
-
| host | The owning Lua debugger dialog. |
◆ attach()
| void LuaDebuggerFilesController::attach |
( |
QTreeView * |
tree, |
|
|
QStandardItemModel * |
model |
|
) |
| |
Binds the controller to the tree view and model, and loads stock icons ready for the first ensureEntry call.
- Parameters
-
| tree | The tree view that displays the file hierarchy. |
| model | The standard item model backing the tree view. |
◆ ensureEntry()
| bool LuaDebuggerFilesController::ensureEntry |
( |
const QString & |
file_path | ) |
|
Ensures a leaf row exists for file_path, creating intermediate folder rows as needed.
- Parameters
-
| file_path | Absolute path of the script file. |
- Returns
- True if a new leaf row was created; false if it already existed.
◆ onItemDoubleClicked
| void LuaDebuggerFilesController::onItemDoubleClicked |
( |
const QModelIndex & |
index | ) |
|
|
slot |
Opens the script associated with the double-clicked item in the debugger editor.
- Parameters
-
| index | Model index of the activated item. |
◆ scanScriptDirectory()
| void LuaDebuggerFilesController::scanScriptDirectory |
( |
const QString & |
dir_path | ) |
|
Recursively walks dir_path and calls ensureEntry for every script file found.
- Parameters
-
| dir_path | Absolute path of the directory to scan. |
◆ showContextMenu
| void LuaDebuggerFilesController::showContextMenu |
( |
const QPoint & |
pos | ) |
|
|
slot |
Displays a context menu offering open, reveal, and copy actions for the item under the cursor.
- Parameters
-
| pos | Cursor position in tree-view viewport coordinates. |
The documentation for this class was generated from the following files: