diff options
Diffstat (limited to 'doc/html/regexptester-example.html')
-rw-r--r-- | doc/html/regexptester-example.html | 96 |
1 files changed, 48 insertions, 48 deletions
diff --git a/doc/html/regexptester-example.html b/doc/html/regexptester-example.html index c134421d4..c7b9271df 100644 --- a/doc/html/regexptester-example.html +++ b/doc/html/regexptester-example.html @@ -72,7 +72,7 @@ public: <a href="tqcheckbox.html">TQCheckBox</a> *caseSensitiveCheckBox; <a href="tqcheckbox.html">TQCheckBox</a> *minimalCheckBox; <a href="tqcheckbox.html">TQCheckBox</a> *wildcardCheckBox; - <a href="ntqtable.html">TQTable</a> *resultTable; + <a href="tqtable.html">TQTable</a> *resultTable; <a href="tqpushbutton.html">TQPushButton</a> *executePushButton; <a href="tqpushbutton.html">TQPushButton</a> *copyPushButton; <a href="tqpushbutton.html">TQPushButton</a> *quitPushButton; @@ -100,7 +100,7 @@ private: #include <<a href="tqpushbutton-h.html">tqpushbutton.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>> +#include <<a href="tqtable-h.html">tqtable.h</a>> #include "regexptester.h" @@ -123,23 +123,23 @@ private: <a name="x2475"></a> caseSensitiveCheckBox-><a href="tqcheckbox.html#setChecked">setChecked</a>(true); minimalCheckBox = new <a href="tqcheckbox.html">TQCheckBox</a>(this); wildcardCheckBox = new <a href="tqcheckbox.html">TQCheckBox</a>(this); - resultTable = new <a href="ntqtable.html">TQTable</a>(3, 3, this); -<a name="x2506"></a> resultTable-><a href="ntqtable.html#verticalHeader">verticalHeader</a>()->hide(); -<a name="x2501"></a> resultTable-><a href="ntqtable.html#setLeftMargin">setLeftMargin</a>(0); -<a name="x2499"></a> resultTable-><a href="ntqtable.html#horizontalHeader">horizontalHeader</a>()->hide(); -<a name="x2505"></a> resultTable-><a href="ntqtable.html#setTopMargin">setTopMargin</a>(0); -<a name="x2503"></a> resultTable-><a href="ntqtable.html#setReadOnly">setReadOnly</a>(true); + resultTable = new <a href="tqtable.html">TQTable</a>(3, 3, this); +<a name="x2506"></a> resultTable-><a href="tqtable.html#verticalHeader">verticalHeader</a>()->hide(); +<a name="x2501"></a> resultTable-><a href="tqtable.html#setLeftMargin">setLeftMargin</a>(0); +<a name="x2499"></a> resultTable-><a href="tqtable.html#horizontalHeader">horizontalHeader</a>()->hide(); +<a name="x2505"></a> resultTable-><a href="tqtable.html#setTopMargin">setTopMargin</a>(0); +<a name="x2503"></a> resultTable-><a href="tqtable.html#setReadOnly">setReadOnly</a>(true); executePushButton = new <a href="tqpushbutton.html">TQPushButton</a>(this); <a name="x2484"></a> executePushButton-><a href="tqpushbutton.html#setDefault">setDefault</a>(true); copyPushButton = new <a href="tqpushbutton.html">TQPushButton</a>(this); quitPushButton = new <a href="tqpushbutton.html">TQPushButton</a>(this); statusBar = new <a href="tqstatusbar.html">TQStatusBar</a>(this); - <a href="qgridlayout.html">TQGridLayout</a> *gridLayout = new <a href="qgridlayout.html">TQGridLayout</a>(2, 2, 6); - gridLayout-><a href="qgridlayout.html#addWidget">addWidget</a>(regexLabel, 0, 0); - gridLayout-><a href="qgridlayout.html#addWidget">addWidget</a>(regexComboBox, 0, 1); - gridLayout-><a href="qgridlayout.html#addWidget">addWidget</a>(textLabel, 1, 0); - gridLayout-><a href="qgridlayout.html#addWidget">addWidget</a>(textComboBox, 1, 1); + <a href="tqgridlayout.html">TQGridLayout</a> *gridLayout = new <a href="tqgridlayout.html">TQGridLayout</a>(2, 2, 6); + gridLayout-><a href="tqgridlayout.html#addWidget">addWidget</a>(regexLabel, 0, 0); + gridLayout-><a href="tqgridlayout.html#addWidget">addWidget</a>(regexComboBox, 0, 1); + gridLayout-><a href="tqgridlayout.html#addWidget">addWidget</a>(textLabel, 1, 0); + gridLayout-><a href="tqgridlayout.html#addWidget">addWidget</a>(textComboBox, 1, 1); <a href="qhboxlayout.html">TQHBoxLayout</a> *checkboxLayout = new <a href="qhboxlayout.html">TQHBoxLayout</a>(0, 6, 6); checkboxLayout-><a href="qboxlayout.html#addWidget">addWidget</a>(caseSensitiveCheckBox); checkboxLayout-><a href="qboxlayout.html#addWidget">addWidget</a>(minimalCheckBox); @@ -163,9 +163,9 @@ private: languageChange(); - <a href="tqobject.html#connect">connect</a>(copyPushButton, TQ_SIGNAL(<a href="ntqbutton.html#clicked">clicked</a>()), this, TQ_SLOT(copy())); - <a href="tqobject.html#connect">connect</a>(executePushButton, TQ_SIGNAL(<a href="ntqbutton.html#clicked">clicked</a>()), this, TQ_SLOT(execute())); - <a href="tqobject.html#connect">connect</a>(quitPushButton, TQ_SIGNAL(<a href="ntqbutton.html#clicked">clicked</a>()), this, TQ_SLOT(<a href="tqdialog.html#accept">accept</a>())); + <a href="tqobject.html#connect">connect</a>(copyPushButton, TQ_SIGNAL(<a href="tqbutton.html#clicked">clicked</a>()), this, TQ_SLOT(copy())); + <a href="tqobject.html#connect">connect</a>(executePushButton, TQ_SIGNAL(<a href="tqbutton.html#clicked">clicked</a>()), this, TQ_SLOT(execute())); + <a href="tqobject.html#connect">connect</a>(quitPushButton, TQ_SIGNAL(<a href="tqbutton.html#clicked">clicked</a>()), this, TQ_SLOT(<a href="tqdialog.html#accept">accept</a>())); execute(); } @@ -189,51 +189,51 @@ void <a name="f557"></a>RegexpTester::execute() <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); - resultTable-><a href="ntqtable.html#setNumRows">setNumRows</a>(captures + OFFSET); -<a name="x2504"></a> resultTable-><a href="ntqtable.html#setText">setText</a>(row, 0, tr("Regex")); +<a name="x2502"></a> resultTable-><a href="tqtable.html#setNumRows">setNumRows</a>(0); + resultTable-><a href="tqtable.html#setNumRows">setNumRows</a>(captures + OFFSET); +<a name="x2504"></a> resultTable-><a href="tqtable.html#setText">setText</a>(row, 0, tr("Regex")); <a href="tqstring.html">TQString</a> escaped = regex; <a name="x2497"></a> escaped = escaped.<a href="tqstring.html#replace">replace</a>("\\", "\\\\"); - resultTable-><a href="ntqtable.html#setText">setText</a>(row, 1, escaped); -<a name="x2500"></a> resultTable-><a href="ntqtable.html#item">item</a>(row, 1)->setSpan(1, 2); + resultTable-><a href="tqtable.html#setText">setText</a>(row, 1, escaped); +<a name="x2500"></a> resultTable-><a href="tqtable.html#item">item</a>(row, 1)->setSpan(1, 2); if (offset != -1) { ++row; - resultTable-><a href="ntqtable.html#setText">setText</a>(row, 0, tr("Offset")); - resultTable-><a href="ntqtable.html#setText">setText</a>(row, 1, TQString::number(offset)); - resultTable-><a href="ntqtable.html#item">item</a>(row, 1)->setSpan(1, 2); + resultTable-><a href="tqtable.html#setText">setText</a>(row, 0, tr("Offset")); + resultTable-><a href="tqtable.html#setText">setText</a>(row, 1, TQString::number(offset)); + resultTable-><a href="tqtable.html#item">item</a>(row, 1)->setSpan(1, 2); if (!wildcard) { ++row; - resultTable-><a href="ntqtable.html#setText">setText</a>(row, 0, tr("Captures")); - resultTable-><a href="ntqtable.html#setText">setText</a>(row, 1, TQString::number(captures)); - resultTable-><a href="ntqtable.html#item">item</a>(row, 1)->setSpan(1, 2); + resultTable-><a href="tqtable.html#setText">setText</a>(row, 0, tr("Captures")); + resultTable-><a href="tqtable.html#setText">setText</a>(row, 1, TQString::number(captures)); + resultTable-><a href="tqtable.html#item">item</a>(row, 1)->setSpan(1, 2); ++row; - resultTable-><a href="ntqtable.html#setText">setText</a>(row, 1, tr("Text")); - resultTable-><a href="ntqtable.html#setText">setText</a>(row, 2, tr("Characters")); + resultTable-><a href="tqtable.html#setText">setText</a>(row, 1, tr("Text")); + resultTable-><a href="tqtable.html#setText">setText</a>(row, 2, tr("Characters")); } ++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="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>())); + resultTable-><a href="tqtable.html#setText">setText</a>(row, 0, tr("Match")); +<a name="x2485"></a> resultTable-><a href="tqtable.html#setText">setText</a>(row, 1, re.<a href="tqregexp.html#cap">cap</a>(0)); +<a name="x2488"></a> resultTable-><a href="tqtable.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="tqregexp.html#cap">cap</a>(i)); - resultTable-><a href="ntqtable.html#setText">setText</a>(row + i, 2, + resultTable-><a href="tqtable.html#setText">setText</a>(row + i, 0, tr("Capture #%1").arg(i)); + resultTable-><a href="tqtable.html#setText">setText</a>(row + i, 1, re.<a href="tqregexp.html#cap">cap</a>(i)); + resultTable-><a href="tqtable.html#setText">setText</a>(row + i, 2, <a name="x2496"></a> TQString::<a href="tqstring.html#number">number</a>(re.<a href="tqregexp.html#cap">cap</a>(i).length())); } } else - resultTable-><a href="ntqtable.html#setNumRows">setNumRows</a>(3); + resultTable-><a href="tqtable.html#setNumRows">setNumRows</a>(3); } else { - resultTable-><a href="ntqtable.html#setNumRows">setNumRows</a>(2); + resultTable-><a href="tqtable.html#setNumRows">setNumRows</a>(2); ++row; - resultTable-><a href="ntqtable.html#setText">setText</a>(row, 0, tr("No matches")); - resultTable-><a href="ntqtable.html#item">item</a>(row, 0)->setSpan(1, 3); + resultTable-><a href="tqtable.html#setText">setText</a>(row, 0, tr("No matches")); + resultTable-><a href="tqtable.html#item">item</a>(row, 0)->setSpan(1, 3); } -<a name="x2498"></a> resultTable-><a href="ntqtable.html#adjustColumn">adjustColumn</a>(0); - resultTable-><a href="ntqtable.html#adjustColumn">adjustColumn</a>(1); - resultTable-><a href="ntqtable.html#adjustColumn">adjustColumn</a>(2); +<a name="x2498"></a> resultTable-><a href="tqtable.html#adjustColumn">adjustColumn</a>(0); + resultTable-><a href="tqtable.html#adjustColumn">adjustColumn</a>(1); + resultTable-><a href="tqtable.html#adjustColumn">adjustColumn</a>(2); statusBar-><a href="tqstatusbar.html#message">message</a>(<a href="tqobject.html#tr">tr</a>("Executed \"%1\" on \"%2\"") .arg(escaped).arg(text)); } @@ -262,12 +262,12 @@ void <a name="f559"></a>RegexpTester::languageChange() <a name="x2479"></a> regexComboBox-><a href="tqcombobox.html#insertItem">insertItem</a>(<a href="tqobject.html#tr">tr</a>("[A-Z]+=(\\d+):(\\d*)")); textLabel-><a href="tqlabel.html#setText">setText</a>(<a href="tqobject.html#tr">tr</a>("&Text:")); textComboBox-><a href="tqcombobox.html#insertItem">insertItem</a>(<a href="tqobject.html#tr">tr</a>("ABC=12:3456")); -<a name="x2473"></a> caseSensitiveCheckBox-><a href="ntqbutton.html#setText">setText</a>(<a href="tqobject.html#tr">tr</a>("Case &Sensitive")); - minimalCheckBox-><a href="ntqbutton.html#setText">setText</a>(<a href="tqobject.html#tr">tr</a>("&Minimal")); - wildcardCheckBox-><a href="ntqbutton.html#setText">setText</a>(<a href="tqobject.html#tr">tr</a>("&Wildcard")); - copyPushButton-><a href="ntqbutton.html#setText">setText</a>(<a href="tqobject.html#tr">tr</a>("&Copy")); - executePushButton-><a href="ntqbutton.html#setText">setText</a>(<a href="tqobject.html#tr">tr</a>("&Execute")); - quitPushButton-><a href="ntqbutton.html#setText">setText</a>(<a href="tqobject.html#tr">tr</a>("&Quit")); +<a name="x2473"></a> caseSensitiveCheckBox-><a href="tqbutton.html#setText">setText</a>(<a href="tqobject.html#tr">tr</a>("Case &Sensitive")); + minimalCheckBox-><a href="tqbutton.html#setText">setText</a>(<a href="tqobject.html#tr">tr</a>("&Minimal")); + wildcardCheckBox-><a href="tqbutton.html#setText">setText</a>(<a href="tqobject.html#tr">tr</a>("&Wildcard")); + copyPushButton-><a href="tqbutton.html#setText">setText</a>(<a href="tqobject.html#tr">tr</a>("&Copy")); + executePushButton-><a href="tqbutton.html#setText">setText</a>(<a href="tqobject.html#tr">tr</a>("&Execute")); + quitPushButton-><a href="tqbutton.html#setText">setText</a>(<a href="tqobject.html#tr">tr</a>("&Quit")); } </pre> |