FOSSredder 0.5.0
Loading...
Searching...
No Matches
ui::payload::mapper Namespace Reference

Functions

QStringList toQStringList (const std::vector< std::string > &values)
 Converts standard strings to a Qt string list.
QVariantList toVariantStringList (const std::vector< std::string > &values)
 Converts standard strings to a QVariant string list.
QVariantList toVariantStringList (const QStringList &values)
 Converts Qt strings to a QVariant string list.
QStringList toQStringList (const QVariantList &values)
 Converts a QVariant list to a Qt string list.
QVariantList toVariantList (const QVariant &value)
 Converts a QVariant value to a QVariantList.
QVariantMap mapAt (const QVariantList &rows, int index)
 Returns a map at an index in a row list.
QString rowId (const QVariantMap &row)
 Reads a row id.
QString rowType (const QVariantMap &row)
 Reads a row type.
QString rowDisplayName (const QVariantMap &row)
 Reads a row display name.
int rowIntValue (const QVariantMap &row, int fallback=0)
 Reads an integer row value.
QString rowStringValue (const QVariantMap &row, const QString &fallback={})
 Reads a string row value.
int indexById (const QVariantList &rows, const QString &id)
 Finds the index of a row id.
QString stringValue (const QVariantMap &map, const QString &key)
 Reads a string value from a map.
QVariantList listValue (const QVariantMap &map, const QString &key)
 Reads a list value from a map.
QStringList stringListValue (const QVariantMap &map, const QString &key)
 Reads a string list value from a map.

Function Documentation

◆ indexById()

int ui::payload::mapper::indexById ( const QVariantList & rows,
const QString & id )
inline

Finds the index of a row id.

Parameters
rowsQVariant row list.
idRow id to find.
Returns
Matching index or 0.

Definition at line 156 of file PayloadMapper.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ listValue()

QVariantList ui::payload::mapper::listValue ( const QVariantMap & map,
const QString & key )
inline

Reads a list value from a map.

Parameters
mapSource map.
keyValue key.
Returns
List value.

Definition at line 181 of file PayloadMapper.h.

Here is the call graph for this function:

◆ mapAt()

QVariantMap ui::payload::mapper::mapAt ( const QVariantList & rows,
int index )
inline

Returns a map at an index in a row list.

Parameters
rowsQVariant row list.
indexRow index.
Returns
Row map or an empty map.

Definition at line 96 of file PayloadMapper.h.

Here is the caller graph for this function:

◆ rowDisplayName()

QString ui::payload::mapper::rowDisplayName ( const QVariantMap & row)
inline

Reads a row display name.

Parameters
rowRow map.
Returns
Row name or display text.

Definition at line 124 of file PayloadMapper.h.

◆ rowId()

QString ui::payload::mapper::rowId ( const QVariantMap & row)
inline

Reads a row id.

Parameters
rowRow map.
Returns
Row id.

Definition at line 106 of file PayloadMapper.h.

Here is the caller graph for this function:

◆ rowIntValue()

int ui::payload::mapper::rowIntValue ( const QVariantMap & row,
int fallback = 0 )
inline

Reads an integer row value.

Parameters
rowRow map.
fallbackValue returned when the row has no integer value.
Returns
Row integer value.

Definition at line 135 of file PayloadMapper.h.

Here is the caller graph for this function:

◆ rowStringValue()

QString ui::payload::mapper::rowStringValue ( const QVariantMap & row,
const QString & fallback = {} )
inline

Reads a string row value.

Parameters
rowRow map.
fallbackValue returned when the row has no string value.
Returns
Row string value.

Definition at line 145 of file PayloadMapper.h.

Here is the caller graph for this function:

◆ rowType()

QString ui::payload::mapper::rowType ( const QVariantMap & row)
inline

Reads a row type.

Parameters
rowRow map.
Returns
Row type.

Definition at line 115 of file PayloadMapper.h.

Here is the caller graph for this function:

◆ stringListValue()

QStringList ui::payload::mapper::stringListValue ( const QVariantMap & map,
const QString & key )
inline

Reads a string list value from a map.

Parameters
mapSource map.
keyValue key.
Returns
String list value.

Definition at line 191 of file PayloadMapper.h.

Here is the call graph for this function:

◆ stringValue()

QString ui::payload::mapper::stringValue ( const QVariantMap & map,
const QString & key )
inline

Reads a string value from a map.

Parameters
mapSource map.
keyValue key.
Returns
String value.

Definition at line 171 of file PayloadMapper.h.

◆ toQStringList() [1/2]

QStringList ui::payload::mapper::toQStringList ( const QVariantList & values)
inline

Converts a QVariant list to a Qt string list.

Parameters
valuesQVariant values.
Returns
Qt string list.

Definition at line 69 of file PayloadMapper.h.

◆ toQStringList() [2/2]

QStringList ui::payload::mapper::toQStringList ( const std::vector< std::string > & values)
inline

Converts standard strings to a Qt string list.

Parameters
valuesStandard string values.
Returns
Qt string list.

Definition at line 26 of file PayloadMapper.h.

Here is the caller graph for this function:

◆ toVariantList()

QVariantList ui::payload::mapper::toVariantList ( const QVariant & value)
inline

Converts a QVariant value to a QVariantList.

Parameters
valueQVariant that may contain QStringList or QVariantList.
Returns
QVariantList projection.

Definition at line 83 of file PayloadMapper.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ toVariantStringList() [1/2]

QVariantList ui::payload::mapper::toVariantStringList ( const QStringList & values)
inline

Converts Qt strings to a QVariant string list.

Parameters
valuesQt string values.
Returns
QVariantList containing QString values.

Definition at line 55 of file PayloadMapper.h.

◆ toVariantStringList() [2/2]

QVariantList ui::payload::mapper::toVariantStringList ( const std::vector< std::string > & values)
inline

Converts standard strings to a QVariant string list.

Parameters
valuesStandard string values.
Returns
QVariantList containing QString values.

Definition at line 41 of file PayloadMapper.h.

Here is the caller graph for this function: