AusweisApp2
governikus::FormattedTextModel Klassenreferenz

#include <FormattedTextModel.h>

Klassendiagramm für governikus::FormattedTextModel:

Klassen

struct  ReadLinesResult
 

Öffentliche Typen

enum  LineType {
  EMPTY, HEADER, SECTION, SUBSECTION,
  REGULARTEXT, LISTITEM
}
 
enum  FormattedTextRoles { ContentRole = Qt::UserRole + 1, LineTypeRole }
 

Öffentliche Methoden

 FormattedTextModel (QObject *pParent=nullptr)
 
 FormattedTextModel (const QStringList &pLines)
 
int rowCount (const QModelIndex &pIndex=QModelIndex()) const override
 
QVariant data (const QModelIndex &pIndex, int pRole=Qt::DisplayRole) const override
 
QHash< int, QByteArray > roleNames () const override
 
Q_INVOKABLE bool load (const QString &pFilepath)
 
Q_INVOKABLE bool loadSeveral (const QStringList &pFilepaths)
 

Öffentliche, statische Methoden

static bool isFormattingLine (LineType pType)
 
static LineType lineType (const QString &pLine)
 
static QString stripFormattingCharacters (const QString &pLine, LineType pType)
 
static QString replaceControlCharactersWithHtml (const QString &pLine)
 
static ReadLinesResult readLines (const QString &pFilepath)
 

Dokumentation der Aufzählungstypen

◆ FormattedTextRoles

Aufzählungswerte
ContentRole 
LineTypeRole 

◆ LineType

Aufzählungswerte
EMPTY 
HEADER 
SECTION 
SUBSECTION 
REGULARTEXT 
LISTITEM 

Beschreibung der Konstruktoren und Destruktoren

◆ FormattedTextModel() [1/2]

FormattedTextModel::FormattedTextModel ( QObject *  pParent = nullptr)
explicit

◆ FormattedTextModel() [2/2]

FormattedTextModel::FormattedTextModel ( const QStringList &  pLines)
explicit

Dokumentation der Elementfunktionen

◆ data()

QVariant FormattedTextModel::data ( const QModelIndex &  pIndex,
int  pRole = Qt::DisplayRole 
) const
override
Hier ist ein Graph, der zeigt, was diese Funktion aufruft:

◆ isFormattingLine()

bool FormattedTextModel::isFormattingLine ( FormattedTextModel::LineType  pType)
static

◆ lineType()

FormattedTextModel::LineType FormattedTextModel::lineType ( const QString &  pLine)
static

◆ load()

bool FormattedTextModel::load ( const QString &  pFilepath)
Hier ist ein Graph, der zeigt, was diese Funktion aufruft:

◆ loadSeveral()

bool FormattedTextModel::loadSeveral ( const QStringList &  pFilepaths)
Hier ist ein Graph, der zeigt, was diese Funktion aufruft:

◆ readLines()

FormattedTextModel::ReadLinesResult FormattedTextModel::readLines ( const QString &  pFilepath)
static
Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

◆ replaceControlCharactersWithHtml()

QString FormattedTextModel::replaceControlCharactersWithHtml ( const QString &  pLine)
static

◆ roleNames()

QHash< int, QByteArray > FormattedTextModel::roleNames ( ) const
override

◆ rowCount()

int FormattedTextModel::rowCount ( const QModelIndex &  pIndex = QModelIndex()) const
override
Hier ist ein Graph der zeigt, wo diese Funktion aufgerufen wird:

◆ stripFormattingCharacters()

QString FormattedTextModel::stripFormattingCharacters ( const QString &  pLine,
LineType  pType 
)
static

Die Dokumentation für diese Klasse wurde erzeugt aufgrund der Dateien: