diff options
Diffstat (limited to 'doc/html/regexptester-example.html')
-rw-r--r-- | doc/html/regexptester-example.html | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/doc/html/regexptester-example.html b/doc/html/regexptester-example.html index 17e45e390..4f2f1d463 100644 --- a/doc/html/regexptester-example.html +++ b/doc/html/regexptester-example.html @@ -98,7 +98,7 @@ private: #include <<a href="qlabel-h.html">ntqlabel.h</a>> #include <<a href="qlayout-h.html">ntqlayout.h</a>> #include <<a href="qpushbutton-h.html">ntqpushbutton.h</a>> -#include <<a href="qregexp-h.html">ntqregexp.h</a>> +#include <<a href="tqregexp-h.html">tqregexp.h</a>> #include <<a href="tqstatusbar-h.html">tqstatusbar.h</a>> #include <<a href="qtable-h.html">ntqtable.h</a>> @@ -175,18 +175,18 @@ void <a name="f557"></a>RegexpTester::execute() <a name="x2478"></a> <a href="tqstring.html">TQString</a> regex = regexComboBox-><a href="ntqcombobox.html#currentText">currentText</a>(); <a href="tqstring.html">TQString</a> text = textComboBox-><a href="ntqcombobox.html#currentText">currentText</a>(); if (!regex.<a href="tqstring.html#isEmpty">isEmpty</a>() && !text.<a href="tqstring.html#isEmpty">isEmpty</a>()) { - <a href="ntqregexp.html">TQRegExp</a> re(regex); -<a name="x2491"></a><a name="x2474"></a> re.<a href="ntqregexp.html#setCaseSensitive">setCaseSensitive</a>(caseSensitiveCheckBox-><a href="ntqcheckbox.html#isChecked">isChecked</a>()); -<a name="x2492"></a> re.<a href="ntqregexp.html#setMinimal">setMinimal</a>(minimalCheckBox-><a href="ntqcheckbox.html#isChecked">isChecked</a>()); + <a href="tqregexp.html">TQRegExp</a> re(regex); +<a name="x2491"></a><a name="x2474"></a> re.<a href="tqregexp.html#setCaseSensitive">setCaseSensitive</a>(caseSensitiveCheckBox-><a href="ntqcheckbox.html#isChecked">isChecked</a>()); +<a name="x2492"></a> re.<a href="tqregexp.html#setMinimal">setMinimal</a>(minimalCheckBox-><a href="ntqcheckbox.html#isChecked">isChecked</a>()); bool wildcard = wildcardCheckBox-><a href="ntqcheckbox.html#isChecked">isChecked</a>(); -<a name="x2493"></a> re.<a href="ntqregexp.html#setWildcard">setWildcard</a>(wildcard); -<a name="x2487"></a> if (!re.<a href="ntqregexp.html#isValid">isValid</a>()) { -<a name="x2494"></a> statusBar-><a href="tqstatusbar.html#message">message</a>(<a href="tqobject.html#tr">tr</a>("Invalid <a href="ntqregexp.html#regular-expression">regular expression</a>: %1") -<a name="x2486"></a> .arg(re.<a href="ntqregexp.html#errorString">errorString</a>())); +<a name="x2493"></a> re.<a href="tqregexp.html#setWildcard">setWildcard</a>(wildcard); +<a name="x2487"></a> if (!re.<a href="tqregexp.html#isValid">isValid</a>()) { +<a name="x2494"></a> statusBar-><a href="tqstatusbar.html#message">message</a>(<a href="tqobject.html#tr">tr</a>("Invalid <a href="tqregexp.html#regular-expression">regular expression</a>: %1") +<a name="x2486"></a> .arg(re.<a href="tqregexp.html#errorString">errorString</a>())); return; } -<a name="x2490"></a> int offset = re.<a href="ntqregexp.html#search">search</a>(text); -<a name="x2489"></a> int captures = re.<a href="ntqregexp.html#numCaptures">numCaptures</a>(); +<a name="x2490"></a> int offset = re.<a href="tqregexp.html#search">search</a>(text); +<a name="x2489"></a> int captures = re.<a href="tqregexp.html#numCaptures">numCaptures</a>(); int row = 0; const int OFFSET = 5; <a name="x2502"></a> resultTable-><a href="ntqtable.html#setNumRows">setNumRows</a>(0); @@ -212,14 +212,14 @@ void <a name="f557"></a>RegexpTester::execute() } ++row; resultTable-><a href="ntqtable.html#setText">setText</a>(row, 0, tr("Match")); -<a name="x2485"></a> resultTable-><a href="ntqtable.html#setText">setText</a>(row, 1, re.<a href="ntqregexp.html#cap">cap</a>(0)); -<a name="x2488"></a> resultTable-><a href="ntqtable.html#setText">setText</a>(row, 2, TQString::number(re.<a href="ntqregexp.html#matchedLength">matchedLength</a>())); +<a name="x2485"></a> resultTable-><a href="ntqtable.html#setText">setText</a>(row, 1, re.<a href="tqregexp.html#cap">cap</a>(0)); +<a name="x2488"></a> resultTable-><a href="ntqtable.html#setText">setText</a>(row, 2, TQString::number(re.<a href="tqregexp.html#matchedLength">matchedLength</a>())); if (!wildcard) { for (int i = 1; i <= captures; ++i) { resultTable-><a href="ntqtable.html#setText">setText</a>(row + i, 0, tr("Capture #%1").arg(i)); - resultTable-><a href="ntqtable.html#setText">setText</a>(row + i, 1, re.<a href="ntqregexp.html#cap">cap</a>(i)); + resultTable-><a href="ntqtable.html#setText">setText</a>(row + i, 1, re.<a href="tqregexp.html#cap">cap</a>(i)); resultTable-><a href="ntqtable.html#setText">setText</a>(row + i, 2, -<a name="x2496"></a> TQString::<a href="tqstring.html#number">number</a>(re.<a href="ntqregexp.html#cap">cap</a>(i).length())); +<a name="x2496"></a> TQString::<a href="tqstring.html#number">number</a>(re.<a href="tqregexp.html#cap">cap</a>(i).length())); } } else |