WSF
wizard::TextLocationItemModel Class Reference

#include <TextLocationItemModel.hpp>

Inherits QAbstractTableModel.

Collaboration diagram for wizard::TextLocationItemModel:

Public Slots

void SourceCleanupEligibility (QSet< TextSource * > &aEligibleSources)
void ProjectClosed (Project *)

Public Member Functions

 TextLocationItemModel (const std::vector< UtTextDocumentAutoUpdateRange > &aLocationList)
 TextLocationItemModel (const std::vector< UtTextDocumentRange > &aLocationList)
int rowCount (const QModelIndex &parent) const override
int columnCount (const QModelIndex &parent) const override
QVariant data (const QModelIndex &index, int role=Qt::DisplayRole) const override
QVariant headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override
const std::vector< UtTextDocumentAutoUpdateRange > & GetLocations () const

Public Attributes

ItemTranslateTextRange mTextRangeToItem
bool mShowText
 When 'true', the model contains a second column containing the line text.

Protected Attributes

std::vector< UtTextDocumentAutoUpdateRange > mLocations

Detailed Description

A model containing a list of UtTextDocumentRange's Provides the first column as the file/line location Optionally, provides the second column as the line text

Constructor & Destructor Documentation

◆ TextLocationItemModel() [1/2]

wizard::TextLocationItemModel::TextLocationItemModel ( const std::vector< UtTextDocumentAutoUpdateRange > & aLocationList)
explicit

◆ TextLocationItemModel() [2/2]

wizard::TextLocationItemModel::TextLocationItemModel ( const std::vector< UtTextDocumentRange > & aLocationList)
explicit

Member Function Documentation

◆ columnCount()

int wizard::TextLocationItemModel::columnCount ( const QModelIndex & parent) const
inlineoverride

References mShowText.

◆ data()

QVariant wizard::TextLocationItemModel::data ( const QModelIndex & index,
int role = Qt::DisplayRole ) const
override

◆ GetLocations()

const std::vector< UtTextDocumentAutoUpdateRange > & wizard::TextLocationItemModel::GetLocations ( ) const

References mLocations.

◆ headerData()

QVariant wizard::TextLocationItemModel::headerData ( int section,
Qt::Orientation orientation,
int role = Qt::DisplayRole ) const
override

◆ ProjectClosed

void wizard::TextLocationItemModel::ProjectClosed ( Project * )
slot

◆ rowCount()

int wizard::TextLocationItemModel::rowCount ( const QModelIndex & parent) const
inlineoverride

References mLocations.

◆ SourceCleanupEligibility

void wizard::TextLocationItemModel::SourceCleanupEligibility ( QSet< TextSource * > & aEligibleSources)
slot

Member Data Documentation

◆ mLocations

std::vector<UtTextDocumentAutoUpdateRange> wizard::TextLocationItemModel::mLocations
protected

◆ mShowText

bool wizard::TextLocationItemModel::mShowText

When 'true', the model contains a second column containing the line text.

Referenced by columnCount(), data(), TextLocationItemModel(), and TextLocationItemModel().

◆ mTextRangeToItem

ItemTranslateTextRange wizard::TextLocationItemModel::mTextRangeToItem

Referenced by data().


The documentation for this class was generated from the following files:
Copyrights Multiple, All Rights Reserved