Class StringUtils
Inherits the following classes: QObject
Public Functions
| Type | Name |
|---|---|
| StringUtils (QObject * parent=nullptr) |
Public Static Functions
| Type | Name |
|---|---|
| Q_INVOKABLE QString | createUuid () Returns a new UUID string. |
| const QStringList | csvToStringList (const QString & string) Returns a list from a CSV formatted string . |
| bool | fuzzyMatch (const QString & source, const QString & term) Checks whether the string term is part of__source . |
| Q_INVOKABLE bool | hasLinks (const QString & string) Returns whether a string contains one or more URLs. |
| Q_INVOKABLE QString | highlightText (const QString & string, const QString & highlightText, const QColor & highlightColor=QColor()) Returns a string highlighting a text using HTML formatting. |
| Q_INVOKABLE QString | insertLinks (const QString & string) Returns a string with any URL (e.g., http(s)/ftp) and mailto: text converted to valid HTML links. |
| Q_INVOKABLE QString | pointInformation (const QgsPoint & point, const QgsCoordinateReferenceSystem & crs) Returns a string containing the point location and details of the__crs . |
| Q_INVOKABLE QString | replaceFilenameTags (const QString & string, const QString & filename) |
| const QString | stringListToCsv (QStringList list) Returns a CSV formatted string from a list . |
Public Functions Documentation
function StringUtils
explicit StringUtils::StringUtils (
QObject * parent=nullptr
)
Public Static Functions Documentation
function createUuid
Returns a new UUID string.
static Q_INVOKABLE QString StringUtils::createUuid ()
function csvToStringList
Returns a list from a CSV formatted string .
static const QStringList StringUtils::csvToStringList (
const QString & string
)
function fuzzyMatch
Checks whether the string term is part of__source .
static bool StringUtils::fuzzyMatch (
const QString & source,
const QString & term
)
function hasLinks
Returns whether a string contains one or more URLs.
static Q_INVOKABLE bool StringUtils::hasLinks (
const QString & string
)
function highlightText
Returns a string highlighting a text using HTML formatting.
static Q_INVOKABLE QString StringUtils::highlightText (
const QString & string,
const QString & highlightText,
const QColor & highlightColor=QColor()
)
function insertLinks
Returns a string with any URL (e.g., http(s)/ftp) and mailto: text converted to valid HTML links.
static Q_INVOKABLE QString StringUtils::insertLinks (
const QString & string
)
function pointInformation
Returns a string containing the point location and details of the__crs .
static Q_INVOKABLE QString StringUtils::pointInformation (
const QgsPoint & point,
const QgsCoordinateReferenceSystem & crs
)
function replaceFilenameTags
static Q_INVOKABLE QString StringUtils::replaceFilenameTags (
const QString & string,
const QString & filename
)
Returns a string in which QField-specific filename tags have been replaced with their values.
function stringListToCsv
Returns a CSV formatted string from a list .
static const QString StringUtils::stringListToCsv (
QStringList list
)
The documentation for this class was generated from the following file src/core/utils/stringutils.h