Qt 4.8
Classes | Namespaces | Functions
qpatternplatform.cpp File Reference
#include <QHash>
#include "qpatternistlocale_p.h"
#include "qpatternplatform_p.h"

Go to the source code of this file.

Classes

class  QPatternist::PatternFlag
 Used internally by PatternPlatform and describes a flag that affects how a pattern is treated. More...
 

Namespaces

 QPatternist
 The namespace for the internal API of QtXmlPatterns.
 

Functions

static PatternFlag::Hash flagDescriptions ()
 

Function Documentation

◆ flagDescriptions()

static PatternFlag::Hash flagDescriptions ( )
inlinestatic

Definition at line 86 of file qpatternplatform.cpp.

Referenced by QDirectFBScreenPrivate::createPixmapData(), and QPatternist::PatternPlatform::parseFlags().

87 {
88  PatternFlag::Hash retval;
89 
90  retval.insert(QChar(QLatin1Char('s')),
91  PatternFlag(PatternPlatform::DotAllMode,
92  QtXmlPatterns::tr("%1 matches newline characters").arg(formatKeyword(QLatin1Char('.')))));
93 
94  retval.insert(QChar(QLatin1Char('m')),
95  PatternFlag(PatternPlatform::MultiLineMode,
96  QtXmlPatterns::tr("%1 and %2 match the start and end of a line.")
97  .arg(formatKeyword(QLatin1Char('^')))
98  .arg(formatKeyword(QLatin1Char('$')))));
99 
100  retval.insert(QChar(QLatin1Char('i')),
102  QtXmlPatterns::tr("Matches are case insensitive")));
103 
104  retval.insert(QChar(QLatin1Char('x')),
105  PatternFlag(PatternPlatform::SimplifyWhitespace,
106  QtXmlPatterns::tr("Whitespace characters are removed, except when they appear "
107  "in character classes")));
108 
109  return retval;
110 }
static QString formatKeyword(const VariableDeclaration::Ptr &var, const NamePool::Ptr &np)
Formats var appropriately for display.
The QHash class is a template class that provides a hash-table-based dictionary.
Definition: qdatastream.h:66
The QChar class provides a 16-bit Unicode character.
Definition: qchar.h:72
iterator insert(const Key &key, const T &value)
Inserts a new item with the key and a value of value.
Definition: qhash.h:753
Used internally by PatternPlatform and describes a flag that affects how a pattern is treated...
The QLatin1Char class provides an 8-bit ASCII/Latin-1 character.
Definition: qchar.h:55