summaryrefslogtreecommitdiffstats
path: root/doc/html/regexptester-example.html
diff options
context:
space:
mode:
Diffstat (limited to 'doc/html/regexptester-example.html')
-rw-r--r--doc/html/regexptester-example.html244
1 files changed, 122 insertions, 122 deletions
diff --git a/doc/html/regexptester-example.html b/doc/html/regexptester-example.html
index 8afc5d77f..432d3f561 100644
--- a/doc/html/regexptester-example.html
+++ b/doc/html/regexptester-example.html
@@ -48,7 +48,7 @@ comboboxes.
<p> <pre>#ifndef REGEXPTESTER_H
#define REGEXPTESTER_H
-#include &lt;<a href="qdialog-h.html">qdialog.h</a>&gt;
+#include &lt;<a href="qdialog-h.html">ntqdialog.h</a>&gt;
class TQCheckBox;
class TQComboBox;
@@ -57,7 +57,7 @@ class TQPushButton;
class TQStatusBar;
class TQTable;
-class RegexpTester : public <a href="qdialog.html">TQDialog</a>
+class RegexpTester : public <a href="ntqdialog.html">TQDialog</a>
{
<a href="metaobjects.html#Q_OBJECT">Q_OBJECT</a>
@@ -65,18 +65,18 @@ public:
RegexpTester(TQWidget* parent=0, const char* name=0, bool modal=false,
WFlags f=0);
- <a href="qlabel.html">TQLabel</a> *regexLabel;
- <a href="qcombobox.html">TQComboBox</a> *regexComboBox;
- <a href="qlabel.html">TQLabel</a> *textLabel;
- <a href="qcombobox.html">TQComboBox</a> *textComboBox;
- <a href="qcheckbox.html">TQCheckBox</a> *caseSensitiveCheckBox;
- <a href="qcheckbox.html">TQCheckBox</a> *minimalCheckBox;
- <a href="qcheckbox.html">TQCheckBox</a> *wildcardCheckBox;
- <a href="qtable.html">TQTable</a> *resultTable;
- <a href="qpushbutton.html">TQPushButton</a> *executePushButton;
- <a href="qpushbutton.html">TQPushButton</a> *copyPushButton;
- <a href="qpushbutton.html">TQPushButton</a> *quitPushButton;
- <a href="qstatusbar.html">TQStatusBar</a> *statusBar;
+ <a href="ntqlabel.html">TQLabel</a> *regexLabel;
+ <a href="ntqcombobox.html">TQComboBox</a> *regexComboBox;
+ <a href="ntqlabel.html">TQLabel</a> *textLabel;
+ <a href="ntqcombobox.html">TQComboBox</a> *textComboBox;
+ <a href="ntqcheckbox.html">TQCheckBox</a> *caseSensitiveCheckBox;
+ <a href="ntqcheckbox.html">TQCheckBox</a> *minimalCheckBox;
+ <a href="ntqcheckbox.html">TQCheckBox</a> *wildcardCheckBox;
+ <a href="ntqtable.html">TQTable</a> *resultTable;
+ <a href="ntqpushbutton.html">TQPushButton</a> *executePushButton;
+ <a href="ntqpushbutton.html">TQPushButton</a> *copyPushButton;
+ <a href="ntqpushbutton.html">TQPushButton</a> *quitPushButton;
+ <a href="ntqstatusbar.html">TQStatusBar</a> *statusBar;
public slots:
void copy();
@@ -91,49 +91,49 @@ private:
<p> <hr>
<p> Implementation:
-<p> <pre>#include &lt;<a href="qapplication-h.html">qapplication.h</a>&gt;
-#include &lt;<a href="qcheckbox-h.html">qcheckbox.h</a>&gt;
-#include &lt;<a href="qclipboard-h.html">qclipboard.h</a>&gt;
-#include &lt;<a href="qcombobox-h.html">qcombobox.h</a>&gt;
-#include &lt;<a href="qlabel-h.html">qlabel.h</a>&gt;
-#include &lt;<a href="qlayout-h.html">qlayout.h</a>&gt;
-#include &lt;<a href="qpushbutton-h.html">qpushbutton.h</a>&gt;
-#include &lt;<a href="qregexp-h.html">qregexp.h</a>&gt;
-#include &lt;<a href="qstatusbar-h.html">qstatusbar.h</a>&gt;
-#include &lt;<a href="qtable-h.html">qtable.h</a>&gt;
+<p> <pre>#include &lt;<a href="qapplication-h.html">ntqapplication.h</a>&gt;
+#include &lt;<a href="qcheckbox-h.html">ntqcheckbox.h</a>&gt;
+#include &lt;<a href="qclipboard-h.html">ntqclipboard.h</a>&gt;
+#include &lt;<a href="qcombobox-h.html">ntqcombobox.h</a>&gt;
+#include &lt;<a href="qlabel-h.html">ntqlabel.h</a>&gt;
+#include &lt;<a href="qlayout-h.html">ntqlayout.h</a>&gt;
+#include &lt;<a href="qpushbutton-h.html">ntqpushbutton.h</a>&gt;
+#include &lt;<a href="qregexp-h.html">ntqregexp.h</a>&gt;
+#include &lt;<a href="qstatusbar-h.html">ntqstatusbar.h</a>&gt;
+#include &lt;<a href="qtable-h.html">ntqtable.h</a>&gt;
#include "regexptester.h"
<a name="f556"></a>RegexpTester::RegexpTester(TQWidget* parent, const char* name, bool modal,
WFlags f)
- : <a href="qdialog.html">TQDialog</a>(parent, name, modal, f)
+ : <a href="ntqdialog.html">TQDialog</a>(parent, name, modal, f)
{
- regexLabel = new <a href="qlabel.html">TQLabel</a>(this);
- regexComboBox = new <a href="qcombobox.html">TQComboBox</a>(this);
-<a name="x2480"></a> regexComboBox-&gt;<a href="qcombobox.html#setEditable">setEditable</a>(true);
-<a name="x2507"></a> regexComboBox-&gt;<a href="qwidget.html#setSizePolicy">setSizePolicy</a>(TQSizePolicy::Expanding, TQSizePolicy::Preferred);
-<a name="x2482"></a> regexLabel-&gt;<a href="qlabel.html#setBuddy">setBuddy</a>(regexComboBox);
- textLabel = new <a href="qlabel.html">TQLabel</a>(this);
- textComboBox = new <a href="qcombobox.html">TQComboBox</a>(this);
- textComboBox-&gt;<a href="qcombobox.html#setEditable">setEditable</a>(true);
- textComboBox-&gt;<a href="qwidget.html#setSizePolicy">setSizePolicy</a>(TQSizePolicy::Expanding, TQSizePolicy::Preferred);
- textLabel-&gt;<a href="qlabel.html#setBuddy">setBuddy</a>(textComboBox);
- caseSensitiveCheckBox = new <a href="qcheckbox.html">TQCheckBox</a>(this);
-<a name="x2475"></a> caseSensitiveCheckBox-&gt;<a href="qcheckbox.html#setChecked">setChecked</a>(true);
- minimalCheckBox = new <a href="qcheckbox.html">TQCheckBox</a>(this);
- wildcardCheckBox = new <a href="qcheckbox.html">TQCheckBox</a>(this);
- resultTable = new <a href="qtable.html">TQTable</a>(3, 3, this);
-<a name="x2506"></a> resultTable-&gt;<a href="qtable.html#verticalHeader">verticalHeader</a>()-&gt;hide();
-<a name="x2501"></a> resultTable-&gt;<a href="qtable.html#setLeftMargin">setLeftMargin</a>(0);
-<a name="x2499"></a> resultTable-&gt;<a href="qtable.html#horizontalHeader">horizontalHeader</a>()-&gt;hide();
-<a name="x2505"></a> resultTable-&gt;<a href="qtable.html#setTopMargin">setTopMargin</a>(0);
-<a name="x2503"></a> resultTable-&gt;<a href="qtable.html#setReadOnly">setReadOnly</a>(true);
- executePushButton = new <a href="qpushbutton.html">TQPushButton</a>(this);
-<a name="x2484"></a> executePushButton-&gt;<a href="qpushbutton.html#setDefault">setDefault</a>(true);
- copyPushButton = new <a href="qpushbutton.html">TQPushButton</a>(this);
- quitPushButton = new <a href="qpushbutton.html">TQPushButton</a>(this);
- statusBar = new <a href="qstatusbar.html">TQStatusBar</a>(this);
+ regexLabel = new <a href="ntqlabel.html">TQLabel</a>(this);
+ regexComboBox = new <a href="ntqcombobox.html">TQComboBox</a>(this);
+<a name="x2480"></a> regexComboBox-&gt;<a href="ntqcombobox.html#setEditable">setEditable</a>(true);
+<a name="x2507"></a> regexComboBox-&gt;<a href="ntqwidget.html#setSizePolicy">setSizePolicy</a>(TQSizePolicy::Expanding, TQSizePolicy::Preferred);
+<a name="x2482"></a> regexLabel-&gt;<a href="ntqlabel.html#setBuddy">setBuddy</a>(regexComboBox);
+ textLabel = new <a href="ntqlabel.html">TQLabel</a>(this);
+ textComboBox = new <a href="ntqcombobox.html">TQComboBox</a>(this);
+ textComboBox-&gt;<a href="ntqcombobox.html#setEditable">setEditable</a>(true);
+ textComboBox-&gt;<a href="ntqwidget.html#setSizePolicy">setSizePolicy</a>(TQSizePolicy::Expanding, TQSizePolicy::Preferred);
+ textLabel-&gt;<a href="ntqlabel.html#setBuddy">setBuddy</a>(textComboBox);
+ caseSensitiveCheckBox = new <a href="ntqcheckbox.html">TQCheckBox</a>(this);
+<a name="x2475"></a> caseSensitiveCheckBox-&gt;<a href="ntqcheckbox.html#setChecked">setChecked</a>(true);
+ minimalCheckBox = new <a href="ntqcheckbox.html">TQCheckBox</a>(this);
+ wildcardCheckBox = new <a href="ntqcheckbox.html">TQCheckBox</a>(this);
+ resultTable = new <a href="ntqtable.html">TQTable</a>(3, 3, this);
+<a name="x2506"></a> resultTable-&gt;<a href="ntqtable.html#verticalHeader">verticalHeader</a>()-&gt;hide();
+<a name="x2501"></a> resultTable-&gt;<a href="ntqtable.html#setLeftMargin">setLeftMargin</a>(0);
+<a name="x2499"></a> resultTable-&gt;<a href="ntqtable.html#horizontalHeader">horizontalHeader</a>()-&gt;hide();
+<a name="x2505"></a> resultTable-&gt;<a href="ntqtable.html#setTopMargin">setTopMargin</a>(0);
+<a name="x2503"></a> resultTable-&gt;<a href="ntqtable.html#setReadOnly">setReadOnly</a>(true);
+ executePushButton = new <a href="ntqpushbutton.html">TQPushButton</a>(this);
+<a name="x2484"></a> executePushButton-&gt;<a href="ntqpushbutton.html#setDefault">setDefault</a>(true);
+ copyPushButton = new <a href="ntqpushbutton.html">TQPushButton</a>(this);
+ quitPushButton = new <a href="ntqpushbutton.html">TQPushButton</a>(this);
+ statusBar = new <a href="ntqstatusbar.html">TQStatusBar</a>(this);
<a href="qgridlayout.html">TQGridLayout</a> *gridLayout = new <a href="qgridlayout.html">TQGridLayout</a>(2, 2, 6);
gridLayout-&gt;<a href="qgridlayout.html#addWidget">addWidget</a>(regexLabel, 0, 0);
@@ -159,131 +159,131 @@ private:
mainLayout-&gt;<a href="qboxlayout.html#addLayout">addLayout</a>(middleLayout);
mainLayout-&gt;<a href="qboxlayout.html#addWidget">addWidget</a>(statusBar);
- <a href="qwidget.html#resize">resize</a>(TQSize(500, 350).expandedTo(<a href="qwidget.html#minimumSizeHint">minimumSizeHint</a>()));
+ <a href="ntqwidget.html#resize">resize</a>(TQSize(500, 350).expandedTo(<a href="ntqwidget.html#minimumSizeHint">minimumSizeHint</a>()));
languageChange();
- <a href="qobject.html#connect">connect</a>(copyPushButton, SIGNAL(<a href="qbutton.html#clicked">clicked</a>()), this, SLOT(copy()));
- <a href="qobject.html#connect">connect</a>(executePushButton, SIGNAL(<a href="qbutton.html#clicked">clicked</a>()), this, SLOT(execute()));
- <a href="qobject.html#connect">connect</a>(quitPushButton, SIGNAL(<a href="qbutton.html#clicked">clicked</a>()), this, SLOT(<a href="qdialog.html#accept">accept</a>()));
+ <a href="ntqobject.html#connect">connect</a>(copyPushButton, SIGNAL(<a href="ntqbutton.html#clicked">clicked</a>()), this, SLOT(copy()));
+ <a href="ntqobject.html#connect">connect</a>(executePushButton, SIGNAL(<a href="ntqbutton.html#clicked">clicked</a>()), this, SLOT(execute()));
+ <a href="ntqobject.html#connect">connect</a>(quitPushButton, SIGNAL(<a href="ntqbutton.html#clicked">clicked</a>()), this, SLOT(<a href="ntqdialog.html#accept">accept</a>()));
execute();
}
void <a name="f557"></a>RegexpTester::execute()
{
-<a name="x2478"></a> <a href="qstring.html">TQString</a> regex = regexComboBox-&gt;<a href="qcombobox.html#currentText">currentText</a>();
- <a href="qstring.html">TQString</a> text = textComboBox-&gt;<a href="qcombobox.html#currentText">currentText</a>();
- if (!regex.<a href="qstring.html#isEmpty">isEmpty</a>() &amp;&amp; !text.<a href="qstring.html#isEmpty">isEmpty</a>()) {
- <a href="qregexp.html">TQRegExp</a> re(regex);
-<a name="x2491"></a><a name="x2474"></a> re.<a href="qregexp.html#setCaseSensitive">setCaseSensitive</a>(caseSensitiveCheckBox-&gt;<a href="qcheckbox.html#isChecked">isChecked</a>());
-<a name="x2492"></a> re.<a href="qregexp.html#setMinimal">setMinimal</a>(minimalCheckBox-&gt;<a href="qcheckbox.html#isChecked">isChecked</a>());
- bool wildcard = wildcardCheckBox-&gt;<a href="qcheckbox.html#isChecked">isChecked</a>();
-<a name="x2493"></a> re.<a href="qregexp.html#setWildcard">setWildcard</a>(wildcard);
-<a name="x2487"></a> if (!re.<a href="qregexp.html#isValid">isValid</a>()) {
-<a name="x2494"></a> statusBar-&gt;<a href="qstatusbar.html#message">message</a>(<a href="qobject.html#tr">tr</a>("Invalid <a href="qregexp.html#regular-expression">regular expression</a>: %1")
-<a name="x2486"></a> .arg(re.<a href="qregexp.html#errorString">errorString</a>()));
+<a name="x2478"></a> <a href="ntqstring.html">TQString</a> regex = regexComboBox-&gt;<a href="ntqcombobox.html#currentText">currentText</a>();
+ <a href="ntqstring.html">TQString</a> text = textComboBox-&gt;<a href="ntqcombobox.html#currentText">currentText</a>();
+ if (!regex.<a href="ntqstring.html#isEmpty">isEmpty</a>() &amp;&amp; !text.<a href="ntqstring.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-&gt;<a href="ntqcheckbox.html#isChecked">isChecked</a>());
+<a name="x2492"></a> re.<a href="ntqregexp.html#setMinimal">setMinimal</a>(minimalCheckBox-&gt;<a href="ntqcheckbox.html#isChecked">isChecked</a>());
+ bool wildcard = wildcardCheckBox-&gt;<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-&gt;<a href="ntqstatusbar.html#message">message</a>(<a href="ntqobject.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>()));
return;
}
-<a name="x2490"></a> int offset = re.<a href="qregexp.html#search">search</a>(text);
-<a name="x2489"></a> int captures = re.<a href="qregexp.html#numCaptures">numCaptures</a>();
+<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>();
int row = 0;
const int OFFSET = 5;
-<a name="x2502"></a> resultTable-&gt;<a href="qtable.html#setNumRows">setNumRows</a>(0);
- resultTable-&gt;<a href="qtable.html#setNumRows">setNumRows</a>(captures + OFFSET);
-<a name="x2504"></a> resultTable-&gt;<a href="qtable.html#setText">setText</a>(row, 0, tr("Regex"));
- <a href="qstring.html">TQString</a> escaped = regex;
-<a name="x2497"></a> escaped = escaped.<a href="qstring.html#replace">replace</a>("\\", "\\\\");
- resultTable-&gt;<a href="qtable.html#setText">setText</a>(row, 1, escaped);
-<a name="x2500"></a> resultTable-&gt;<a href="qtable.html#item">item</a>(row, 1)-&gt;setSpan(1, 2);
+<a name="x2502"></a> resultTable-&gt;<a href="ntqtable.html#setNumRows">setNumRows</a>(0);
+ resultTable-&gt;<a href="ntqtable.html#setNumRows">setNumRows</a>(captures + OFFSET);
+<a name="x2504"></a> resultTable-&gt;<a href="ntqtable.html#setText">setText</a>(row, 0, tr("Regex"));
+ <a href="ntqstring.html">TQString</a> escaped = regex;
+<a name="x2497"></a> escaped = escaped.<a href="ntqstring.html#replace">replace</a>("\\", "\\\\");
+ resultTable-&gt;<a href="ntqtable.html#setText">setText</a>(row, 1, escaped);
+<a name="x2500"></a> resultTable-&gt;<a href="ntqtable.html#item">item</a>(row, 1)-&gt;setSpan(1, 2);
if (offset != -1) {
++row;
- resultTable-&gt;<a href="qtable.html#setText">setText</a>(row, 0, tr("Offset"));
- resultTable-&gt;<a href="qtable.html#setText">setText</a>(row, 1, TQString::number(offset));
- resultTable-&gt;<a href="qtable.html#item">item</a>(row, 1)-&gt;setSpan(1, 2);
+ resultTable-&gt;<a href="ntqtable.html#setText">setText</a>(row, 0, tr("Offset"));
+ resultTable-&gt;<a href="ntqtable.html#setText">setText</a>(row, 1, TQString::number(offset));
+ resultTable-&gt;<a href="ntqtable.html#item">item</a>(row, 1)-&gt;setSpan(1, 2);
if (!wildcard) {
++row;
- resultTable-&gt;<a href="qtable.html#setText">setText</a>(row, 0, tr("Captures"));
- resultTable-&gt;<a href="qtable.html#setText">setText</a>(row, 1, TQString::number(captures));
- resultTable-&gt;<a href="qtable.html#item">item</a>(row, 1)-&gt;setSpan(1, 2);
+ resultTable-&gt;<a href="ntqtable.html#setText">setText</a>(row, 0, tr("Captures"));
+ resultTable-&gt;<a href="ntqtable.html#setText">setText</a>(row, 1, TQString::number(captures));
+ resultTable-&gt;<a href="ntqtable.html#item">item</a>(row, 1)-&gt;setSpan(1, 2);
++row;
- resultTable-&gt;<a href="qtable.html#setText">setText</a>(row, 1, tr("Text"));
- resultTable-&gt;<a href="qtable.html#setText">setText</a>(row, 2, tr("Characters"));
+ resultTable-&gt;<a href="ntqtable.html#setText">setText</a>(row, 1, tr("Text"));
+ resultTable-&gt;<a href="ntqtable.html#setText">setText</a>(row, 2, tr("Characters"));
}
++row;
- resultTable-&gt;<a href="qtable.html#setText">setText</a>(row, 0, tr("Match"));
-<a name="x2485"></a> resultTable-&gt;<a href="qtable.html#setText">setText</a>(row, 1, re.<a href="qregexp.html#cap">cap</a>(0));
-<a name="x2488"></a> resultTable-&gt;<a href="qtable.html#setText">setText</a>(row, 2, TQString::number(re.<a href="qregexp.html#matchedLength">matchedLength</a>()));
+ resultTable-&gt;<a href="ntqtable.html#setText">setText</a>(row, 0, tr("Match"));
+<a name="x2485"></a> resultTable-&gt;<a href="ntqtable.html#setText">setText</a>(row, 1, re.<a href="ntqregexp.html#cap">cap</a>(0));
+<a name="x2488"></a> resultTable-&gt;<a href="ntqtable.html#setText">setText</a>(row, 2, TQString::number(re.<a href="ntqregexp.html#matchedLength">matchedLength</a>()));
if (!wildcard) {
for (int i = 1; i &lt;= captures; ++i) {
- resultTable-&gt;<a href="qtable.html#setText">setText</a>(row + i, 0, tr("Capture #%1").arg(i));
- resultTable-&gt;<a href="qtable.html#setText">setText</a>(row + i, 1, re.<a href="qregexp.html#cap">cap</a>(i));
- resultTable-&gt;<a href="qtable.html#setText">setText</a>(row + i, 2,
-<a name="x2496"></a> TQString::<a href="qstring.html#number">number</a>(re.<a href="qregexp.html#cap">cap</a>(i).length()));
+ resultTable-&gt;<a href="ntqtable.html#setText">setText</a>(row + i, 0, tr("Capture #%1").arg(i));
+ resultTable-&gt;<a href="ntqtable.html#setText">setText</a>(row + i, 1, re.<a href="ntqregexp.html#cap">cap</a>(i));
+ resultTable-&gt;<a href="ntqtable.html#setText">setText</a>(row + i, 2,
+<a name="x2496"></a> TQString::<a href="ntqstring.html#number">number</a>(re.<a href="ntqregexp.html#cap">cap</a>(i).length()));
}
}
else
- resultTable-&gt;<a href="qtable.html#setNumRows">setNumRows</a>(3);
+ resultTable-&gt;<a href="ntqtable.html#setNumRows">setNumRows</a>(3);
}
else {
- resultTable-&gt;<a href="qtable.html#setNumRows">setNumRows</a>(2);
+ resultTable-&gt;<a href="ntqtable.html#setNumRows">setNumRows</a>(2);
++row;
- resultTable-&gt;<a href="qtable.html#setText">setText</a>(row, 0, tr("No matches"));
- resultTable-&gt;<a href="qtable.html#item">item</a>(row, 0)-&gt;setSpan(1, 3);
+ resultTable-&gt;<a href="ntqtable.html#setText">setText</a>(row, 0, tr("No matches"));
+ resultTable-&gt;<a href="ntqtable.html#item">item</a>(row, 0)-&gt;setSpan(1, 3);
}
-<a name="x2498"></a> resultTable-&gt;<a href="qtable.html#adjustColumn">adjustColumn</a>(0);
- resultTable-&gt;<a href="qtable.html#adjustColumn">adjustColumn</a>(1);
- resultTable-&gt;<a href="qtable.html#adjustColumn">adjustColumn</a>(2);
- statusBar-&gt;<a href="qstatusbar.html#message">message</a>(<a href="qobject.html#tr">tr</a>("Executed \"%1\" on \"%2\"")
+<a name="x2498"></a> resultTable-&gt;<a href="ntqtable.html#adjustColumn">adjustColumn</a>(0);
+ resultTable-&gt;<a href="ntqtable.html#adjustColumn">adjustColumn</a>(1);
+ resultTable-&gt;<a href="ntqtable.html#adjustColumn">adjustColumn</a>(2);
+ statusBar-&gt;<a href="ntqstatusbar.html#message">message</a>(<a href="ntqobject.html#tr">tr</a>("Executed \"%1\" on \"%2\"")
.arg(escaped).arg(text));
}
else
- statusBar-&gt;<a href="qstatusbar.html#message">message</a>(<a href="qobject.html#tr">tr</a>("A regular expression and a text must be given"));
+ statusBar-&gt;<a href="ntqstatusbar.html#message">message</a>(<a href="ntqobject.html#tr">tr</a>("A regular expression and a text must be given"));
}
void <a name="f558"></a>RegexpTester::copy()
{
- <a href="qstring.html">TQString</a> escaped = regexComboBox-&gt;<a href="qcombobox.html#currentText">currentText</a>();
- if (!escaped.<a href="qstring.html#isEmpty">isEmpty</a>()) {
- escaped = escaped.<a href="qstring.html#replace">replace</a>("\\", "\\\\");
-<a name="x2468"></a> <a href="qclipboard.html">TQClipboard</a> *cb = TQApplication::<a href="qapplication.html#clipboard">clipboard</a>();
-<a name="x2476"></a> cb-&gt;<a href="qclipboard.html#setText">setText</a>(escaped, TQClipboard::Clipboard);
-<a name="x2477"></a> if (cb-&gt;<a href="qclipboard.html#supportsSelection">supportsSelection</a>())
- cb-&gt;<a href="qclipboard.html#setText">setText</a>(escaped, TQClipboard::Selection);
- statusBar-&gt;<a href="qstatusbar.html#message">message</a>(<a href="qobject.html#tr">tr</a>("Copied \"%1\" to the clipboard")
+ <a href="ntqstring.html">TQString</a> escaped = regexComboBox-&gt;<a href="ntqcombobox.html#currentText">currentText</a>();
+ if (!escaped.<a href="ntqstring.html#isEmpty">isEmpty</a>()) {
+ escaped = escaped.<a href="ntqstring.html#replace">replace</a>("\\", "\\\\");
+<a name="x2468"></a> <a href="ntqclipboard.html">TQClipboard</a> *cb = TQApplication::<a href="ntqapplication.html#clipboard">clipboard</a>();
+<a name="x2476"></a> cb-&gt;<a href="ntqclipboard.html#setText">setText</a>(escaped, TQClipboard::Clipboard);
+<a name="x2477"></a> if (cb-&gt;<a href="ntqclipboard.html#supportsSelection">supportsSelection</a>())
+ cb-&gt;<a href="ntqclipboard.html#setText">setText</a>(escaped, TQClipboard::Selection);
+ statusBar-&gt;<a href="ntqstatusbar.html#message">message</a>(<a href="ntqobject.html#tr">tr</a>("Copied \"%1\" to the clipboard")
.arg(escaped));
}
}
void <a name="f559"></a>RegexpTester::languageChange()
{
- <a href="qwidget.html#setCaption">setCaption</a>(<a href="qobject.html#tr">tr</a>("Regex Tester"));
- regexLabel-&gt;<a href="qlabel.html#setText">setText</a>(<a href="qobject.html#tr">tr</a>("&amp;Regex:"));
-<a name="x2479"></a> regexComboBox-&gt;<a href="qcombobox.html#insertItem">insertItem</a>(<a href="qobject.html#tr">tr</a>("[A-Z]+=(\\d+):(\\d*)"));
- textLabel-&gt;<a href="qlabel.html#setText">setText</a>(<a href="qobject.html#tr">tr</a>("&amp;Text:"));
- textComboBox-&gt;<a href="qcombobox.html#insertItem">insertItem</a>(<a href="qobject.html#tr">tr</a>("ABC=12:3456"));
-<a name="x2473"></a> caseSensitiveCheckBox-&gt;<a href="qbutton.html#setText">setText</a>(<a href="qobject.html#tr">tr</a>("Case &amp;Sensitive"));
- minimalCheckBox-&gt;<a href="qbutton.html#setText">setText</a>(<a href="qobject.html#tr">tr</a>("&amp;Minimal"));
- wildcardCheckBox-&gt;<a href="qbutton.html#setText">setText</a>(<a href="qobject.html#tr">tr</a>("&amp;Wildcard"));
- copyPushButton-&gt;<a href="qbutton.html#setText">setText</a>(<a href="qobject.html#tr">tr</a>("&amp;Copy"));
- executePushButton-&gt;<a href="qbutton.html#setText">setText</a>(<a href="qobject.html#tr">tr</a>("&amp;Execute"));
- quitPushButton-&gt;<a href="qbutton.html#setText">setText</a>(<a href="qobject.html#tr">tr</a>("&amp;Quit"));
+ <a href="ntqwidget.html#setCaption">setCaption</a>(<a href="ntqobject.html#tr">tr</a>("Regex Tester"));
+ regexLabel-&gt;<a href="ntqlabel.html#setText">setText</a>(<a href="ntqobject.html#tr">tr</a>("&amp;Regex:"));
+<a name="x2479"></a> regexComboBox-&gt;<a href="ntqcombobox.html#insertItem">insertItem</a>(<a href="ntqobject.html#tr">tr</a>("[A-Z]+=(\\d+):(\\d*)"));
+ textLabel-&gt;<a href="ntqlabel.html#setText">setText</a>(<a href="ntqobject.html#tr">tr</a>("&amp;Text:"));
+ textComboBox-&gt;<a href="ntqcombobox.html#insertItem">insertItem</a>(<a href="ntqobject.html#tr">tr</a>("ABC=12:3456"));
+<a name="x2473"></a> caseSensitiveCheckBox-&gt;<a href="ntqbutton.html#setText">setText</a>(<a href="ntqobject.html#tr">tr</a>("Case &amp;Sensitive"));
+ minimalCheckBox-&gt;<a href="ntqbutton.html#setText">setText</a>(<a href="ntqobject.html#tr">tr</a>("&amp;Minimal"));
+ wildcardCheckBox-&gt;<a href="ntqbutton.html#setText">setText</a>(<a href="ntqobject.html#tr">tr</a>("&amp;Wildcard"));
+ copyPushButton-&gt;<a href="ntqbutton.html#setText">setText</a>(<a href="ntqobject.html#tr">tr</a>("&amp;Copy"));
+ executePushButton-&gt;<a href="ntqbutton.html#setText">setText</a>(<a href="ntqobject.html#tr">tr</a>("&amp;Execute"));
+ quitPushButton-&gt;<a href="ntqbutton.html#setText">setText</a>(<a href="ntqobject.html#tr">tr</a>("&amp;Quit"));
}
</pre>
<p> <hr>
<p> Main:
-<p> <pre>#include &lt;<a href="qapplication-h.html">qapplication.h</a>&gt;
+<p> <pre>#include &lt;<a href="qapplication-h.html">ntqapplication.h</a>&gt;
#include "regexptester.h"
int main(int argc, char **argv)
{
- <a href="qapplication.html">TQApplication</a> app(argc, argv);
+ <a href="ntqapplication.html">TQApplication</a> app(argc, argv);
RegexpTester form;
-<a name="x2511"></a> form.<a href="qdialog.html#show">show</a>();
-<a name="x2512"></a><a name="x2510"></a><a name="x2509"></a> app.<a href="qobject.html#connect">connect</a>(&amp;app, SIGNAL(<a href="qapplication.html#lastWindowClosed">lastWindowClosed</a>()), &amp;app, SLOT(<a href="qapplication.html#quit">quit</a>()));
- return app.<a href="qapplication.html#exec">exec</a>();
+<a name="x2511"></a> form.<a href="ntqdialog.html#show">show</a>();
+<a name="x2512"></a><a name="x2510"></a><a name="x2509"></a> app.<a href="ntqobject.html#connect">connect</a>(&amp;app, SIGNAL(<a href="ntqapplication.html#lastWindowClosed">lastWindowClosed</a>()), &amp;app, SLOT(<a href="ntqapplication.html#quit">quit</a>()));
+ return app.<a href="ntqapplication.html#exec">exec</a>();
}
</pre>