![]() |
itom
|
model for management of all breakpoints. This model will be displayed by a viewer-widget in the main window More...
Signals | |
| void | breakPointAdded (BreakPointItem bp, int row) |
| void | breakPointDeleted (QString filename, int lineIdx, int pyBpNumber) |
| void | breakPointChanged (BreakPointItem oldBp, BreakPointItem newBp) |
Public Member Functions | |
| BreakPointModel () | |
| constructor | |
| ~BreakPointModel () | |
| destructor | |
| RetVal | saveState () |
| Saves the breakpoint model into the settings. | |
| RetVal | restoreState () |
| Restores the breakpoint model from the settings. | |
| QVariant | data (const QModelIndex &index, int role) const |
| overwritten data method of QAbstractItemModel | |
| QModelIndex | index (int row, int column, const QModelIndex &parent=QModelIndex()) const |
| returns QModelIndex for given row and column | |
| QModelIndex | parent (const QModelIndex &index) const |
| returns parent of given QModelIndex | |
| int | rowCount (const QModelIndex &parent=QModelIndex()) const |
| counts number of breakpoints in this model | |
| int | columnCount (const QModelIndex &parent=QModelIndex()) const |
| counts number of columns in this model (corresponds to number of header-elements) | |
| QVariant | headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const |
| returns header element at given position | |
| RetVal | addBreakPoint (BreakPointItem bp) |
| adds given breakpoint to model | |
| RetVal | deleteBreakPoint (const QModelIndex &index) |
| delete breakpoint given by its QModelIndex | |
| RetVal | deleteBreakPoints (const QModelIndexList &indizes) |
| delete multiple breakpoints given by a list of QModelIndex | |
| RetVal | deleteAllBreakPoints () |
| delete all breakpoints | |
| QModelIndex | getFirstBreakPointIndex (const QString &filename, int lineIdx) const |
| returns QModelIndex for first breakpoint which is found in given filename and at given line number. | |
| 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 line number. | |
| QModelIndexList | getBreakPointIndizes (const QString &filename) const |
| returns QModelIndexList with all breakpoints being in one given file | |
| QModelIndexList | getAllBreakPointIndizes () |
| returns a List of all Breakpoints, doesn't matter in which file they are. | |
| BreakPointItem | getBreakPoint (const QString &filename, int lineIdx) const |
| returns BreakPointItem for breakpoint being in given file and at given line number | |
| BreakPointItem | getBreakPoint (const QModelIndex &index) const |
| returns BreakPointItem for given QModelIndex | |
| QList< BreakPointItem > | getBreakPoints (const QModelIndexList &indizes) const |
| returns list of BreakPointItem corresponding to given list of model indices | |
| RetVal | changeBreakPoint (const QModelIndex index, BreakPointItem bp, bool emitBreakPointChanged=true) |
| changes breakpoint, given by its QModelIndex to values, determined by BreakPointItem | |
| RetVal | changeBreakPoints (const QModelIndexList indizes, QList< BreakPointItem > bps, bool emitBreakPointChanged=true) |
| change multiple breakpoints to data, given by list of BreakPointItem | |
| QList< BreakPointItem > const | getBreakpoints () |
| QModelIndexList | getAllFileIndexes () |
| This function returns a list of all files that contain breakpoints. | |
| RetVal | resetAllPyBpNumbers () |
| resets all python breakpoint numbers to -1. | |
| RetVal | setPyBpNumber (const BreakPointItem &item, int pyBpNumber) |
| set python breakpoint number of breakpoint at given row in the model | |
| QSize | span (const QModelIndex &index) const |
Private Member Functions | |
| int | nrOfBreakpointsInFile (const int fileIdx) const |
| This function returns the number of breakpoints in the given File. | |
| QModelIndex | getFilenameModelIndex (const QString &filename) const |
| This function returns the QModelindex of the given File. | |
| int | getBreakPointIndex (const QModelIndex &index) const |
| returns the index for given QModelIndex | |
| int | getFileIndexFromInternalPtr (const void *ptr) const |
Static Private Member Functions | |
| static bool | compareRow (QModelIndex a, QModelIndex b) |
| helper-method for sorting different breakpoints with respect to row-index of both given QModelIndex | |
Private Attributes | |
| QList< BreakPointItem > | m_breakpoints |
| QList< QString > | m_headers |
| QList< QVariant > | m_alignment |
| QStringList | m_scriptFiles |
| Qt::CaseSensitivity | m_filenameCaseSensitivity |
model for management of all breakpoints. This model will be displayed by a viewer-widget in the main window
| ito::BreakPointModel::BreakPointModel | ( | ) |
constructor
initializes headers and its alignment
| RetVal ito::BreakPointModel::addBreakPoint | ( | BreakPointItem | bp | ) |
adds given breakpoint to model
if added, the signal breakPointAdded is emitted.
| [in] | bp | Breakpoint of type BreakPointItem |
|
signal |
< emitted if breakpoint has been added to model at position row emitted if breakpoint in file filename at line lineIdx with python internal debugger number has been deleted from model
|
signal |
emitted if breakpoint oldBp has been changed to newBp
| RetVal ito::BreakPointModel::changeBreakPoint | ( | const QModelIndex | index, |
| BreakPointItem | bp, | ||
| bool | emitBreakPointChanged = true ) |
changes breakpoint, given by its QModelIndex to values, determined by BreakPointItem
if indicated, emits signal emitBreakPointChanged with old and new BreakPointItem
| index | QModelIndex of item, which should be changed |
| bp | BreakPointItem with new values for this breakpoint |
| emitBreakPointChanged | if signal should be emitted, this value must be true, else false |
< should be false, if filename or line-nr of editor has changed.
| RetVal ito::BreakPointModel::changeBreakPoints | ( | const QModelIndexList | indizes, |
| QList< BreakPointItem > | bps, | ||
| bool | emitBreakPointChanged = true ) |
change multiple breakpoints to data, given by list of BreakPointItem
| indizes | list of model indices |
| bps | list of BreakPointItem |
| emitBreakPointChanged | true if the breakPointChanged signal should be emitted after having changed the property of one single breakpoint |
| int ito::BreakPointModel::columnCount | ( | const QModelIndex & | parent = QModelIndex() | ) | const |
counts number of columns in this model (corresponds to number of header-elements)
| QVariant ito::BreakPointModel::data | ( | const QModelIndex & | index, |
| int | role ) const |
overwritten data method of QAbstractItemModel
data method will be called by View-Widget in order to fill the table.
| index | QModelIndex of item, whose content should be returned |
| RetVal ito::BreakPointModel::deleteAllBreakPoints | ( | ) |
delete all breakpoints
| indizes | list of QModelIndex |
| RetVal ito::BreakPointModel::deleteBreakPoint | ( | const QModelIndex & | index | ) |
delete breakpoint given by its QModelIndex
emits breakPointDeleted if deletion has been successful.
| index | QModelIndex of breakpoint which should be deleted |
| RetVal ito::BreakPointModel::deleteBreakPoints | ( | const QModelIndexList & | indizes | ) |
delete multiple breakpoints given by a list of QModelIndex
calls deleteBreakPoint method for each element of QModelIndexList
| indizes | list of QModelIndex |
| QModelIndexList ito::BreakPointModel::getAllFileIndexes | ( | ) |
This function returns a list of all files that contain breakpoints.
| BreakPointItem ito::BreakPointModel::getBreakPoint | ( | const QModelIndex & | index | ) | const |
returns BreakPointItem for given QModelIndex
| index | given QModelIndex |
| BreakPointItem ito::BreakPointModel::getBreakPoint | ( | const QString & | filename, |
| int | lineIdx ) const |
returns BreakPointItem for breakpoint being in given file and at given line number
| filename | Filename of python macro file |
| lineIdx | line number in given filename |
|
private |
returns the index for given QModelIndex
| index | given QModelIndex |
| QModelIndexList ito::BreakPointModel::getBreakPointIndizes | ( | const QString & | filename | ) | const |
returns QModelIndexList with all breakpoints being in one given file
| filename | Filename of python macro file |
| QModelIndexList ito::BreakPointModel::getBreakPointIndizes | ( | const QString & | filename, |
| int | lineIdx ) const |
returns a list of QModelIndex for all breakpoints, which are registered in given file and at given line number.
| filename | Filename of python macro |
| lineIdx | line, where breakpoint is expected |
| QList< BreakPointItem > ito::BreakPointModel::getBreakPoints | ( | const QModelIndexList & | indizes | ) | const |
returns list of BreakPointItem corresponding to given list of model indices
| indizes | list of model indices |
|
private |
This function returns the QModelindex of the given File.
| QModelIndex ito::BreakPointModel::getFirstBreakPointIndex | ( | const QString & | filename, |
| int | lineIdx ) const |
returns QModelIndex for first breakpoint which is found in given filename and at given line number.
| filename | Filename of Python macro file |
| lineIdx | line, where breakpoint is expected |
| QVariant ito::BreakPointModel::headerData | ( | int | section, |
| Qt::Orientation | orientation, | ||
| int | role = Qt::DisplayRole ) const |
returns header element at given position
| section | position in m_headers list |
| orientation | the model's orientation should be horizontal, no other orientation is supported |
| role | model is only prepared for DisplayRole |
| QModelIndex ito::BreakPointModel::index | ( | int | row, |
| int | column, | ||
| const QModelIndex & | parent = QModelIndex() ) const |
returns QModelIndex for given row and column
| row | row of desired entry, corresponds to index in m_breakpoints list |
| column | column of desired entry |
| parent | since this model is no tree model, parent always points to a "virtual" root element |
|
private |
This function returns the number of breakpoints in the given File.
| QModelIndex ito::BreakPointModel::parent | ( | const QModelIndex & | index | ) | const |
returns parent of given QModelIndex
since this model is not a tree model, returns always an empty QModelIndex
| RetVal ito::BreakPointModel::resetAllPyBpNumbers | ( | ) |
resets all python breakpoint numbers to -1.
every breakpoint only gets a valid python breakpoint number, if python is in debugging mode. This method is called, if python leaves the debugging mode.
| int ito::BreakPointModel::rowCount | ( | const QModelIndex & | parent = QModelIndex() | ) | const |
counts number of breakpoints in this model
| RetVal ito::BreakPointModel::setPyBpNumber | ( | const BreakPointItem & | item, |
| int | pyBpNumber ) |
set python breakpoint number of breakpoint at given row in the model
If starting debugging a python macro, the whole breakpoint list is submitted to the python debugger, which assigns a python debugging number for each breakpoint. This method calls the changeBreakPoint method.
| row | row of breakpoint in model |
| pyBpNumber | python breakpoint number for this breakpoint |
|
private |
list of alignments for the corresponding headers
|
private |
list of breakpoints (BreakPointItem) which are currently available in this application
|
private |
string list of names of column headers