23 #ifndef BREAKPOINTMODEL_H
24 #define BREAKPOINTMODEL_H
26 #include "../common/sharedStructures.h"
28 #include <qabstractitemmodel.h>
30 #include <qstringlist.h>
63 QDataStream &operator<<(QDataStream &out,
const BreakPointItem &obj);
66 QDataStream &operator>>(QDataStream &in, BreakPointItem &obj);
77 RetVal restoreState();
79 QVariant data(
const QModelIndex &index,
int role)
const;
80 QModelIndex index(
int row,
int column,
const QModelIndex &parent = QModelIndex())
const;
81 QModelIndex parent(
const QModelIndex &index)
const;
82 int rowCount(
const QModelIndex &parent = QModelIndex())
const;
83 int columnCount(
const QModelIndex &parent = QModelIndex())
const;
85 QVariant headerData(
int section, Qt::Orientation orientation,
int role = Qt::DisplayRole)
const;
87 RetVal addBreakPoint(BreakPointItem bp);
88 RetVal deleteBreakPoint(
const QModelIndex &index);
89 RetVal deleteBreakPoints(
const QModelIndexList &indizes);
90 RetVal deleteAllBreakPoints();
92 QModelIndex getFirstBreakPointIndex(
const QString &filename,
int lineIdx)
const;
93 QModelIndexList getBreakPointIndizes(
const QString &filename,
int lineIdx)
const;
94 QModelIndexList getBreakPointIndizes(
const QString &filename)
const;
95 QModelIndexList getAllBreakPointIndizes();
97 BreakPointItem getBreakPoint(
const QString &filename,
int lineIdx)
const;
98 BreakPointItem getBreakPoint(
const QModelIndex &index)
const;
99 QList<BreakPointItem> getBreakPoints(
const QModelIndexList &indizes)
const;
101 RetVal changeBreakPoint(
const QModelIndex index, BreakPointItem bp,
bool emitBreakPointChanged =
true);
102 RetVal changeBreakPoints(
const QModelIndexList indizes, QList<BreakPointItem> bps,
bool emitBreakPointChanged =
true);
104 QList<BreakPointItem>
const getBreakpoints() {
return m_breakpoints; };
106 QModelIndexList getAllFileIndexes();
108 RetVal resetAllPyBpNumbers();
109 RetVal setPyBpNumber(
const BreakPointItem &item,
int pyBpNumber);
111 QSize span(
const QModelIndex &index)
const;
116 int nrOfBreakpointsInFile(
const int fileIdx)
const;
117 QModelIndex getFilenameModelIndex(
const QString &filename)
const;
118 int getBreakPointIndex(
const QModelIndex &index)
const;
119 int getFileIndexFromInternalPtr(
const void* ptr)
const;
122 static inline bool compareRow(QModelIndex a, QModelIndex b) {
return a.row()>b.row(); };
124 QList<BreakPointItem> m_breakpoints;
125 QList<QString> m_headers;
126 QList<QVariant> m_alignment;
127 QStringList m_scriptFiles;
128 Qt::CaseSensitivity m_filenameCaseSensitivity;
132 void breakPointAdded(BreakPointItem bp,
int row);
136 void breakPointDeleted(QString filename,
int lineIdx,
int pyBpNumber);
139 void breakPointChanged(BreakPointItem oldBp, BreakPointItem newBp);
BreakPointItem()
Definition: breakPointModel.h:45
int lineIdx
Definition: breakPointModel.h:47
model for management of all breakpoints. This model will be displayed by a viewer-widget in the main ...
bool conditioned
Definition: breakPointModel.h:50
QString condition
Definition: breakPointModel.h:51
Definition: apiFunctionsGraph.cpp:39
bool temporary
Definition: breakPointModel.h:49
int ignoreCount
Definition: breakPointModel.h:52
bool enabled
Definition: breakPointModel.h:48
QString filename
Definition: breakPointModel.h:46
int pythonDbgBpNumber
Definition: breakPointModel.h:53
item of BreakPointModel
Definition: breakPointModel.h:42