SegmentsModel

class SegmentsModel

Inherits from AddressableItemModel< QAbstractListModel >

Public Types

enum Column

Values:

NameColumn = 0
SizeColumn
AddressColumn
EndAddressColumn
PermColumn
ColumnCount
enum Role

Values:

SegmentDescriptionRole = Qt::UserRole

Public Functions

SegmentsModel(QList<SegmentDescription> *segments, QObject *parent = nullptr)
int rowCount(const QModelIndex &parent = QModelIndex()) const
int columnCount(const QModelIndex &parent = QModelIndex()) const
QVariant data(const QModelIndex &index, int role) const
QVariant headerData(int segment, Qt::Orientation orientation, int role = Qt::DisplayRole) const
RVA address(const QModelIndex &index) const
QString name(const QModelIndex &index) const

Get name for item, optional.

Return
Item name or empty QString if item doesn’t have short descriptive name.
Parameters
  • index: item intex