23#ifndef BREAKPOINTMODEL_H
24#define BREAKPOINTMODEL_H
26#include "../common/sharedStructures.h"
28#include <qabstractitemmodel.h>
30#include <qstringlist.h>
63QDataStream &operator<<(QDataStream &out,
const BreakPointItem &obj);
66QDataStream &operator>>(QDataStream &in, BreakPointItem &obj);
79 QVariant
data(
const QModelIndex &
index,
int role)
const;
80 QModelIndex
index(
int row,
int column,
const QModelIndex &
parent = QModelIndex())
const;
85 QVariant
headerData(
int section, Qt::Orientation orientation,
int role = Qt::DisplayRole)
const;
99 QList<BreakPointItem>
getBreakPoints(
const QModelIndexList &indizes)
const;
102 RetVal changeBreakPoints(
const QModelIndexList indizes, QList<BreakPointItem> bps,
bool emitBreakPointChanged =
true);
104 QList<BreakPointItem>
const getBreakpoints() {
return m_breakpoints; };
111 QSize span(
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(); };
127 QStringList m_scriptFiles;
128 Qt::CaseSensitivity m_filenameCaseSensitivity;
model for management of all breakpoints. This model will be displayed by a viewer-widget in the main ...
Definition breakPointModel.h:69
void breakPointAdded(BreakPointItem bp, int row)
BreakPointModel()
constructor
Definition breakPointModel.cpp:64
QList< BreakPointItem > getBreakPoints(const QModelIndexList &indizes) const
returns list of BreakPointItem corresponding to given list of model indices
Definition breakPointModel.cpp:943
QModelIndexList getAllFileIndexes()
This function returns a list of all files that contain breakpoints.
Definition breakPointModel.cpp:836
QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const
returns QModelIndex for given row and column
Definition breakPointModel.cpp:474
int getBreakPointIndex(const QModelIndex &index) const
returns the index for given QModelIndex
Definition breakPointModel.cpp:800
QModelIndex getFilenameModelIndex(const QString &filename) const
This function returns the QModelindex of the given File.
Definition breakPointModel.cpp:631
static bool compareRow(QModelIndex a, QModelIndex b)
helper-method for sorting different breakpoints with respect to row-index of both given QModelIndex
Definition breakPointModel.h:122
RetVal deleteAllBreakPoints()
delete all breakpoints
Definition breakPointModel.cpp:297
RetVal addBreakPoint(BreakPointItem bp)
adds given breakpoint to model
Definition breakPointModel.cpp:165
int columnCount(const QModelIndex &parent=QModelIndex()) const
counts number of columns in this model (corresponds to number of header-elements)
Definition breakPointModel.cpp:337
void breakPointDeleted(QString filename, int lineIdx, int pyBpNumber)
QModelIndex getFirstBreakPointIndex(const QString &filename, int lineIdx) const
returns QModelIndex for first breakpoint which is found in given filename and at given line number.
Definition breakPointModel.cpp:650
RetVal restoreState()
Restores the breakpoint model from the settings.
Definition breakPointModel.cpp:128
BreakPointItem getBreakPoint(const QString &filename, int lineIdx) const
returns BreakPointItem for breakpoint being in given file and at given line number
Definition breakPointModel.cpp:752
QList< QString > m_headers
Definition breakPointModel.h:125
QList< QVariant > m_alignment
Definition breakPointModel.h:126
~BreakPointModel()
destructor
Definition breakPointModel.cpp:85
QModelIndexList getAllBreakPointIndizes()
returns a List of all Breakpoints, doesn't matter in which file they are.
Definition breakPointModel.cpp:734
QModelIndex parent(const QModelIndex &index) const
returns parent of given QModelIndex
Definition breakPointModel.cpp:526
RetVal deleteBreakPoint(const QModelIndex &index)
delete breakpoint given by its QModelIndex
Definition breakPointModel.cpp:215
int nrOfBreakpointsInFile(const int fileIdx) const
This function returns the number of breakpoints in the given File.
Definition breakPointModel.cpp:606
RetVal setPyBpNumber(const BreakPointItem &item, int pyBpNumber)
set python breakpoint number of breakpoint at given row in the model
Definition breakPointModel.cpp:1014
QList< BreakPointItem > m_breakpoints
Definition breakPointModel.h:124
int rowCount(const QModelIndex &parent=QModelIndex()) const
counts number of breakpoints in this model
Definition breakPointModel.cpp:316
RetVal resetAllPyBpNumbers()
resets all python breakpoint numbers to -1.
Definition breakPointModel.cpp:992
RetVal changeBreakPoints(const QModelIndexList indizes, QList< BreakPointItem > bps, bool emitBreakPointChanged=true)
change multiple breakpoints to data, given by list of BreakPointItem
Definition breakPointModel.cpp:967
QModelIndexList getBreakPointIndizes(const QString &filename, int lineIdx) const
returns a list of QModelIndex for all breakpoints, which are registered in given file and at given li...
Definition breakPointModel.cpp:693
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
returns header element at given position
Definition breakPointModel.cpp:569
RetVal changeBreakPoint(const QModelIndex index, BreakPointItem bp, bool emitBreakPointChanged=true)
changes breakpoint, given by its QModelIndex to values, determined by BreakPointItem
Definition breakPointModel.cpp:857
RetVal deleteBreakPoints(const QModelIndexList &indizes)
delete multiple breakpoints given by a list of QModelIndex
Definition breakPointModel.cpp:269
RetVal saveState()
Saves the breakpoint model into the settings.
Definition breakPointModel.cpp:98
QVariant data(const QModelIndex &index, int role) const
overwritten data method of QAbstractItemModel
Definition breakPointModel.cpp:350
Class for managing status values (like errors or warning)
Definition retVal.h:54
Definition apiFunctionsGraph.cpp:40
item of BreakPointModel
Definition breakPointModel.h:43
int lineIdx
Definition breakPointModel.h:47
bool temporary
Definition breakPointModel.h:49
QString filename
Definition breakPointModel.h:46
int ignoreCount
Definition breakPointModel.h:52
bool enabled
Definition breakPointModel.h:48
QString condition
Definition breakPointModel.h:51
int pythonDbgBpNumber
Definition breakPointModel.h:53
BreakPointItem()
Definition breakPointModel.h:45
bool conditioned
Definition breakPointModel.h:50