PythonQtWrapper_QRegExp.h
53 lines
| 2.5 KiB
| text/x-c
|
CLexer
florianlink
|
r13 | #ifndef PYTHONQTWRAPPER_QREGEXP_H | ||
#define PYTHONQTWRAPPER_QREGEXP_H | ||||
#include <qregexp.h> | ||||
#include <QObject> | ||||
florianlink
|
r24 | #include <PythonQt.h> | ||
florianlink
|
r13 | #include <QStringList> | ||
#include <QVariant> | ||||
#include <qdatastream.h> | ||||
#include <qregexp.h> | ||||
#include <qstringlist.h> | ||||
class PythonQtWrapper_QRegExp : public QObject | ||||
{ Q_OBJECT | ||||
public: | ||||
Q_ENUMS(PatternSyntax CaretMode ) | ||||
enum PatternSyntax{ | ||||
RegExp = QRegExp::RegExp, Wildcard = QRegExp::Wildcard, FixedString = QRegExp::FixedString, RegExp2 = QRegExp::RegExp2}; | ||||
enum CaretMode{ | ||||
CaretAtZero = QRegExp::CaretAtZero, CaretAtOffset = QRegExp::CaretAtOffset, CaretWontMatch = QRegExp::CaretWontMatch}; | ||||
public slots: | ||||
QRegExp* new_QRegExp(); | ||||
QRegExp* new_QRegExp(const QRegExp& rx); | ||||
QRegExp* new_QRegExp(const QString& pattern, Qt::CaseSensitivity cs = Qt::CaseSensitive, QRegExp::PatternSyntax syntax = QRegExp::RegExp); | ||||
void delete_QRegExp(QRegExp* obj) { delete obj; } | ||||
florianlink
|
r73 | QString cap(QRegExp* theWrappedObject, int nth = 0); | ||
Qt::CaseSensitivity caseSensitivity(QRegExp* theWrappedObject) const; | ||||
florianlink
|
r13 | QString static_QRegExp_escape(const QString& str); | ||
florianlink
|
r73 | void writeTo(QRegExp* theWrappedObject, QDataStream& out); | ||
QString pattern(QRegExp* theWrappedObject) const; | ||||
florianlink
|
r28 | void setMinimal(QRegExp* theWrappedObject, bool minimal); | ||
florianlink
|
r73 | bool operator_equal(QRegExp* theWrappedObject, const QRegExp& rx) const; | ||
int lastIndexIn(QRegExp* theWrappedObject, const QString& str, int offset = -1, QRegExp::CaretMode caretMode = QRegExp::CaretAtZero) const; | ||||
florianlink
|
r28 | int numCaptures(QRegExp* theWrappedObject) const; | ||
florianlink
|
r73 | void setPatternSyntax(QRegExp* theWrappedObject, QRegExp::PatternSyntax syntax); | ||
florianlink
|
r28 | int matchedLength(QRegExp* theWrappedObject) const; | ||
florianlink
|
r73 | QRegExp::PatternSyntax patternSyntax(QRegExp* theWrappedObject) const; | ||
QString errorString(QRegExp* theWrappedObject); | ||||
florianlink
|
r28 | void setCaseSensitivity(QRegExp* theWrappedObject, Qt::CaseSensitivity cs); | ||
void setPattern(QRegExp* theWrappedObject, const QString& pattern); | ||||
florianlink
|
r24 | bool isValid(QRegExp* theWrappedObject) const; | ||
florianlink
|
r73 | QStringList capturedTexts(QRegExp* theWrappedObject); | ||
bool isEmpty(QRegExp* theWrappedObject) const; | ||||
bool isMinimal(QRegExp* theWrappedObject) const; | ||||
florianlink
|
r28 | int pos(QRegExp* theWrappedObject, int nth = 0); | ||
florianlink
|
r73 | bool exactMatch(QRegExp* theWrappedObject, const QString& str) const; | ||
void readFrom(QRegExp* theWrappedObject, QDataStream& in); | ||||
int indexIn(QRegExp* theWrappedObject, const QString& str, int offset = 0, QRegExp::CaretMode caretMode = QRegExp::CaretAtZero) const; | ||||
florianlink
|
r13 | }; | ||
#endif // PYTHONQTWRAPPER_QREGEXP_H | ||||