Wireshark 4.7.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
lua_debugger_files.h
Go to the documentation of this file.
1/* lua_debugger_files.h
2 *
3 * Wireshark - Network traffic analyzer
4 * By Gerald Combs <[email protected]>
5 * Copyright 1998 Gerald Combs
6 *
7 * SPDX-License-Identifier: GPL-2.0-or-later
8 */
9
15#ifndef LUA_DEBUGGER_FILES_H
16#define LUA_DEBUGGER_FILES_H
17
18#include <QIcon>
19#include <QObject>
20#include <QPair>
21#include <QString>
22#include <QVector>
23
25class QModelIndex;
26class QPoint;
27class QStandardItem;
28class QStandardItemModel;
29class QTreeView;
30
35class LuaDebuggerFilesController : public QObject
36{
37 Q_OBJECT
38
39 public:
41
42 void attach(QTreeView *tree, QStandardItemModel *model);
43
45 void configureTreeChrome() const;
46
47 void refreshAvailableScripts();
48
49 void scanScriptDirectory(const QString &dir_path);
50
52 bool ensureEntry(const QString &file_path);
53
55 void sortModel();
56
57 public slots:
58 void onItemDoubleClicked(const QModelIndex &index);
59 void showContextMenu(const QPoint &pos);
60
61 private:
62 QStandardItem *findChildItemByPath(QStandardItem *parent, const QString &path) const;
63 bool appendPathComponents(const QString &absolute_path, QVector<QPair<QString, QString>> &components) const;
64
65 LuaDebuggerDialog *host_ = nullptr;
66 QTreeView *tree_ = nullptr;
67 QStandardItemModel *model_ = nullptr;
68
71 QIcon folderIcon_;
72 QIcon fileIcon_;
73};
74
75#endif
Top-level dialog hosting the Lua debugger UI components.
Definition lua_debugger_dialog.h:165
Files panel: plugin/script indexing, hierarchical entries, open / reveal / copy gestures,...
Definition lua_debugger_files.h:36
bool ensureEntry(const QString &file_path)
Definition lua_debugger_files.cpp:145
void sortModel()
Sort column 0 (after discrete inserts from callbacks).
Definition lua_debugger_files.cpp:85
void configureTreeChrome() const
Decorations, scrollbar, and header sizing (after widgets exist).
Definition lua_debugger_files.cpp:70