The model that holds data for the tag tree displayed in ReverseGeocodingWidget.
More...
|
void | slotColumnsAboutToBeInserted (const QModelIndex &parent, int start, int end) |
|
void | slotColumnsAboutToBeMoved (const QModelIndex &sourceParent, int sourceStart, int sourceEnd, const QModelIndex &destinationParent, int destinationColumn) |
|
void | slotColumnsAboutToBeRemoved (const QModelIndex &parent, int start, int end) |
|
void | slotColumnsInserted () |
|
void | slotColumnsMoved () |
|
void | slotColumnsRemoved () |
|
void | slotLayoutAboutToBeChanged () |
|
void | slotLayoutChanged () |
|
void | slotModelAboutToBeReset () |
|
void | slotModelReset () |
|
void | slotRowsAboutToBeInserted (const QModelIndex &parent, int start, int end) |
|
void | slotRowsAboutToBeMoved (const QModelIndex &sourceParent, int sourceStart, int sourceEnd, const QModelIndex &destinationParent, int destinationRow) |
|
void | slotRowsAboutToBeRemoved (const QModelIndex &parent, int start, int end) |
|
void | slotRowsInserted () |
|
void | slotRowsMoved () |
|
void | slotRowsRemoved () |
|
void | slotSourceDataChanged (const QModelIndex &topLeft, const QModelIndex &bottomRight) |
|
void | slotSourceHeaderDataChanged (const Qt::Orientation orientation, int first, int last) |
|
|
| RGTagModel (QAbstractItemModel *const externalTagModel, QObject *const parent=nullptr) |
| Constructor.
|
|
| ~RGTagModel () override |
| Destructor.
|
|
void | addAllExternalTagsToTreeView () |
| Add all external tags to the tag tree.
|
|
void | addAllSpacersToTag (const QModelIndex ¤tIndex, const QStringList &spacerList, int spacerListIndex) |
| Adds all spacers found in spacerList to the tag tree.
|
|
void | addDataInTree (TreeBranch *currentBranch, int currentRow, const QStringList &addressElements, const QStringList &elementsData) |
| The function starts to scan the tree starting with currentBranch.
|
|
void | addExternalTags (TreeBranch *parentBranch, int currentRow) |
| Add tags from host application to the tag tree.
|
|
QList< QList< TagData > > | addNewData (const QStringList &elements, const QStringList &resultedData) |
| Add new tags to tag tree.
|
|
QPersistentModelIndex | addNewTag (const QModelIndex &parent, const QString &newTagName, const QString &newElement) |
| Adds a tag containing data returned from backends.
|
|
void | addSpacerTag (const QModelIndex &parent, const QString &spacerName) |
| Adds a spacer tag.
|
|
TreeBranch * | branchFromIndex (const QModelIndex &index) const |
| Returns the branch found at index.
|
|
void | climbTreeAndGetSpacers (const TreeBranch *currentBranch) |
| Gets the spacers addresses below currentBranch.
|
|
int | columnCount (const QModelIndex &parent=QModelIndex()) const override |
| QAbstractItemModel.
|
|
QVariant | data (const QModelIndex &index, int role=Qt::DisplayRole) const override |
|
void | deleteAllSpacersOrNewTags (const QModelIndex ¤tIndex, Type whatShouldRemove) |
| Deletes all spacers or all new tags.
|
|
void | deleteTag (const QModelIndex ¤tIndex) |
| Deletes a tag.
|
|
void | findAndDeleteSpacersOrNewTags (TreeBranch *currentBranch, int currentRow, Type whatShouldRemove) |
| Deletes all spacers or all new tags below current branch.
|
|
Qt::ItemFlags | flags (const QModelIndex &index) const override |
|
QModelIndex | fromSourceIndex (const QModelIndex &externalTagModelIndex) const |
| Local functions.
|
|
QList< TagData > | getSpacerAddress (TreeBranch *currentBranch) |
| Gets the address of a spacer.
|
|
QList< QList< TagData > > | getSpacers () |
| Gets all spacers.
|
|
QList< TagData > | getTagAddress () |
| Gets the address of a tag.
|
|
Type | getTagType (const QModelIndex &index) const |
| Gets the type of a tag found at index.
|
|
QVariant | headerData (int section, Qt::Orientation orientation, int role) const override |
|
QModelIndex | index (int row, int column, const QModelIndex &parent=QModelIndex()) const override |
|
QModelIndex | parent (const QModelIndex &index) const override |
|
void | readdNewTags (const QList< QList< TagData > > &tagAddressList) |
| Takes each tag contained in tagAddressList and adds it to the tag tree.
|
|
void | readdTag (TreeBranch *¤tBranch, int currentRow, const QList< TagData > &tagAddressElements, int currentAddressElementIndex) |
| Reads new tags to tag tree.
|
|
int | rowCount (const QModelIndex &parent=QModelIndex()) const override |
|
bool | setData (const QModelIndex &index, const QVariant &value, int role) override |
|
bool | setHeaderData (int section, Qt::Orientation orientation, const QVariant &value, int role) override |
|
QModelIndex | toSourceIndex (const QModelIndex &tagModelIndex) const |
| Translates the model index from this model to host's tag model.
|
|
The RGTagModel class is a wrapper above QAbstractItemModel. It helds data for the tag tree displayed in ReverseGeocodingWidget. The model gets the data from the tag model of host application and displays it in a QTreeView. It stores three type of tags: old tags (the tags that belong to the host's tag model), spacer tags (tags representing address elements or custom tags) and new tags (tags containing data retrieved from backend).