C
QAndroidMatchPattern Class
Used to store a path and pattern matcher for use in QAndroidIntentFilter. (Technical Preview). More...
Header: | #include <QAndroidMatchPattern> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS AndroidAutomotiveBase) target_link_libraries(mytarget PRIVATE Qt6::AndroidAutomotiveBase) |
Since: | QtAndroidAutomotive 6.5 |
In QML: | AndroidMatchPattern and matchPattern |
Public Types
enum class | MatchType { PATTERN_LITERAL, PATTERN_PREFIX, PATTERN_SIMPLE_GLOB, PATTERN_ADVANCED_GLOB, PATTERN_SUFFIX } |
Properties
Public Functions
QAndroidMatchPattern() | |
QAndroidMatchPattern(const QString &pattern, QAndroidMatchPattern::MatchType matchType) | |
QAndroidMatchPattern(const QAndroidMatchPattern &other) | |
QAndroidMatchPattern(QAndroidMatchPattern &&other) | |
QAndroidMatchPattern::MatchType | matchType() const |
QString | pattern() const |
void | setMatchType(QAndroidMatchPattern::MatchType matchType) |
void | setPattern(const QString &pattern) |
void | swap(QAndroidMatchPattern &other) |
QAndroidMatchPattern & | operator=(const QAndroidMatchPattern &other) |
Detailed Description
This type is a close representation of the Android PatternMatcher.
Like the Android PatternMatcher, it is safe to use on untrusted data as it does not provide full support for regular expressions but only simple globbing.
Member Type Documentation
enum class QAndroidMatchPattern::MatchType
This enum type specifies the type of matching done by this QAndroidMatchPattern.
Constant | Value | Description |
---|---|---|
QAndroidMatchPattern::MatchType::PATTERN_LITERAL | 0 | The pattern must exactly match the string it is tested against. |
QAndroidMatchPattern::MatchType::PATTERN_PREFIX | 1 | The pattern must match the beginning of the string it is tested against. |
QAndroidMatchPattern::MatchType::PATTERN_SIMPLE_GLOB | 2 | The pattern is interpreted with a simple glob syntax for matching against the string it is tested against. |
QAndroidMatchPattern::MatchType::PATTERN_ADVANCED_GLOB | 3 | The pattern is interpreted with a regular expression-like syntax for matching against the string it is tested against. |
QAndroidMatchPattern::MatchType::PATTERN_SUFFIX | 4 | The pattern must match the end of the string it is tested against |
Property Documentation
matchType : MatchType
Holds the current matcher type.
Access functions:
QAndroidMatchPattern::MatchType | matchType() const |
void | setMatchType(QAndroidMatchPattern::MatchType matchType) |
pattern : QString
Holds the current pattern.
Access functions:
QString | pattern() const |
void | setPattern(const QString &pattern) |
Member Function Documentation
QAndroidMatchPattern::QAndroidMatchPattern()
Constructs an empty QAndroidMatchPattern.
[explicit]
QAndroidMatchPattern::QAndroidMatchPattern(const QString &pattern, QAndroidMatchPattern::MatchType matchType)
Constructs a QAndroidMatchPattern with pattern and matcher type matchType.
QAndroidMatchPattern::QAndroidMatchPattern(const QAndroidMatchPattern &other)
Copy-constructs a QAndroidMatchPattern instance from other.
QAndroidMatchPattern::QAndroidMatchPattern(QAndroidMatchPattern &&other)
Constructs a new QAndroidMatchPattern instance via a move operation from other.
void QAndroidMatchPattern::setMatchType(QAndroidMatchPattern::MatchType matchType)
Sets the matcher type to be matchType.
Note: Setter function for property matchType.
See also matchType().
void QAndroidMatchPattern::setPattern(const QString &pattern)
Sets the pattern to be pattern.
Note: Setter function for property pattern.
See also pattern().
void QAndroidMatchPattern::swap(QAndroidMatchPattern &other)
Swaps this QAndroidMatchPattern instance with other.
QAndroidMatchPattern &QAndroidMatchPattern::operator=(const QAndroidMatchPattern &other)
Assigns the value of the QAndroidMatchPattern other to this instance.
Available under certain Qt licenses.
Find out more.