16#ifndef LUA_DEBUGGER_BREAKPOINTS_H
17#define LUA_DEBUGGER_BREAKPOINTS_H
25#include <QStyledItemDelegate>
33class QAbstractItemModel;
45class QStandardItemModel;
46class QStyleOptionViewItem;
54constexpr int Active = 0;
55constexpr int Line = 1;
56constexpr int Location = 2;
57constexpr int Count = 3;
93 const char *placeholder;
94 const char *valueTooltip;
192 void setEmbeddedWidgets(QComboBox *modeCombo, QComboBox *hitModeCombo, QToolButton *pauseButton);
208 void resizeEvent(QResizeEvent *e)
override;
209 void showEvent(QShowEvent *e)
override;
210 void paintEvent(QPaintEvent *e)
override;
213 QComboBox *modeCombo_ =
nullptr;
214 QComboBox *hitModeCombo_ =
nullptr;
215 QToolButton *pauseButton_ =
nullptr;
235 QWidget *createEditor(QWidget *parent,
const QStyleOptionViewItem &option,
236 const QModelIndex &index)
const override;
237 void setEditorData(QWidget *editor,
const QModelIndex &index)
const override;
238 void setModelData(QWidget *editor, QAbstractItemModel *model,
const QModelIndex &index)
const override;
239 void updateEditorGeometry(QWidget *editor,
const QStyleOptionViewItem &option,
240 const QModelIndex &index)
const override;
241 QSize sizeHint(
const QStyleOptionViewItem &option,
const QModelIndex &index)
const override;
244 bool eventFilter(QObject *watched, QEvent *event)
override;
248 int preferredEditorHeight()
const;
249 mutable int cachedPreferredHeight_ = 0;
272 void attach(QTreeView *tree, QStandardItemModel *model);
276 void attachHeaderButtons(QToolButton *toggleAll, QToolButton *remove, QToolButton *removeAll, QToolButton *edit,
277 QAction *removeAllAction);
279 void configureColumns()
const;
366 void onItemDoubleClicked(
const QModelIndex &index);
367 void showContextMenu(
const QPoint &pos);
371 void onModelDataChanged(
const QModelIndex &topLeft,
const QModelIndex &bottomRight,
const QVector<int> &roles);
373 void showGutterMenu(
const QString &filename, qint32 line,
const QPoint &globalPos);
377 void refreshAllOpenTabMarkers()
const;
379 void refreshOpenTabMarkers(
const QSet<QString> &files)
const;
382 QTreeView *tree_ =
nullptr;
383 QStandardItemModel *model_ =
nullptr;
385 QToolButton *toggleAllButton_ =
nullptr;
386 QToolButton *removeButton_ =
nullptr;
387 QToolButton *removeAllButton_ =
nullptr;
388 QToolButton *editButton_ =
nullptr;
389 QAction *removeAllAction_ =
nullptr;
397 QIcon headerIconCache_[3];
398 QString headerIconCacheKey_;
405 bool tabsPrimed_ =
false;
414 bool suppressItemChanged_ =
false;
Inline editor for the Breakpoints "Location" column.
Definition lua_debugger_breakpoints.h:185
void relayout()
Definition lua_debugger_breakpoints.cpp:349
void setEmbeddedWidgets(QComboBox *modeCombo, QComboBox *hitModeCombo, QToolButton *pauseButton)
Definition lua_debugger_breakpoints.cpp:340
Item delegate for the Breakpoints list Location column (condition / hit count / log message inline ed...
Definition lua_debugger_breakpoints.h:231
Owns the breakpoints panel: tree wiring, model rebuild from the engine, inline edit dispatch,...
Definition lua_debugger_breakpoints.h:265
void startInlineEdit(int row)
Focus column 2 and open the delegate editor when editable.
Definition lua_debugger_breakpoints.cpp:1262
void shiftToggleAtLine(const QString &file, qint32 line)
Pre-arm a breakpoint at file:@p line — the Shift+click gutter gesture. If absent, creates the breakpo...
Definition lua_debugger_breakpoints.cpp:2199
void attachHeaderButtons(QToolButton *toggleAll, QToolButton *remove, QToolButton *removeAll, QToolButton *edit, QAction *removeAllAction)
Bind the section-header strip and its shortcut action. Wires button clicks; safe to call before or af...
Definition lua_debugger_breakpoints.cpp:1181
void setActiveFromUser(const QString &file, qint32 line, bool active)
Set the active flag of an existing breakpoint at file:@p line. Used by the gutter context menu's Enab...
Definition lua_debugger_breakpoints.cpp:2229
bool removeRows(const QList< int > &rows)
Remove the breakpoints in the given (deduped) model rows.
Definition lua_debugger_breakpoints.cpp:1964
void toggleAtLine(const QString &file, qint32 line)
Add the breakpoint at file:@p line if absent, otherwise remove it. Drives F9 in the editor,...
Definition lua_debugger_breakpoints.cpp:2168
bool removeSelected()
Remove every selected breakpoint row.
Definition lua_debugger_breakpoints.cpp:2008
void updateHeaderButtonState()
Refresh header dot icon + button enable states.
Definition lua_debugger_breakpoints.cpp:2066
void restoreFrom(const QVariantMap &settingsMap)
Apply the Breakpoints array from settingsMap to the engine. Missing keys fall back to the engine's de...
Definition lua_debugger_breakpoints.cpp:2354
void toggleAllActive()
Activate-all / deactivate-all toggle (header).
Definition lua_debugger_breakpoints.cpp:2030
void serializeTo(QVariantMap &settingsMap) const
Snapshot the engine breakpoint list (file/line/active + condition / hit-count / log-message) into set...
Definition lua_debugger_breakpoints.cpp:2302
void refreshFromEngine()
Rebuild tree rows from the engine; refreshes header chrome.
Definition lua_debugger_breakpoints.cpp:1473
void removeAtLine(const QString &file, qint32 line)
Remove the breakpoint at file:@p line and refresh chrome. Drives the gutter context menu's Remove act...
Definition lua_debugger_breakpoints.cpp:2245
void onItemChanged(QStandardItem *item)
Active-checkbox toggle from the model.
Definition lua_debugger_breakpoints.cpp:1729
void showGutterMenu(const QString &filename, qint32 line, const QPoint &globalPos)
Show Edit/Disable/Remove popup for a click in an editor gutter.
Definition lua_debugger_breakpoints.cpp:1887
void clearAll()
Confirm-and-clear all breakpoints (header / shortcut).
Definition lua_debugger_breakpoints.cpp:1450
void onModelDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight, const QVector< int > &roles)
Role-based dispatch for delegate-driven inline edits.
Definition lua_debugger_breakpoints.cpp:1766
void attach(QTreeView *tree, QStandardItemModel *model)
Bind the tree + model and wire their signals.
Definition lua_debugger_breakpoints.cpp:1158
void toggleOnCodeViewLine(LuaDebuggerCodeView *codeView, qint32 line)
Convenience overload that resolves the file path from a LuaDebuggerCodeView. Silently ignores null vi...
Definition lua_debugger_breakpoints.cpp:2190
Editable code editor supporting gutter breakpoints and highlighting.
Definition lua_debugger_code_editor.h:127
Top-level dialog hosting the Lua debugger UI components.
Definition lua_debugger_dialog.h:165
Column indices for the Breakpoints tree model.
Definition lua_debugger_breakpoints.h:53
Inline editor mode metadata for the Breakpoints "Location" column.
Definition lua_debugger_breakpoints.cpp:91
QIcon makePauseIcon(const QPalette &palette)
Definition lua_debugger_breakpoints.cpp:256
QString translatedLabel(const ModeSpec &spec)
Definition lua_debugger_breakpoints.cpp:136
constexpr int kModeCount
Definition lua_debugger_breakpoints.h:98
QToolButton * editorPauseToggle(QWidget *editor)
Definition lua_debugger_breakpoints.cpp:164
QString pauseToggleStyleSheet()
Definition lua_debugger_breakpoints.cpp:316
const ModeSpec kBreakpointEditModes[kModeCount]
Definition lua_debugger_breakpoints.cpp:93
const char * draftPropertyName(Mode m)
Definition lua_debugger_breakpoints.cpp:141
QComboBox * editorHitModeCombo(QWidget *editor)
Definition lua_debugger_breakpoints.cpp:155
void applyEditorMode(QWidget *editor, int modeIndex)
Definition lua_debugger_breakpoints.cpp:173
Definition lua_debugger_breakpoints.h:90