diff options
Diffstat (limited to 'doc/html/regexptester-example.html')
-rw-r--r-- | doc/html/regexptester-example.html | 72 |
1 files changed, 36 insertions, 36 deletions
diff --git a/doc/html/regexptester-example.html b/doc/html/regexptester-example.html index 0666ff806..c134421d4 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 <<a href="qdialog-h.html">ntqdialog.h</a>> +#include <<a href="tqdialog-h.html">tqdialog.h</a>> class TQCheckBox; class TQComboBox; @@ -57,7 +57,7 @@ class TQPushButton; class TQStatusBar; class TQTable; -class RegexpTester : public <a href="ntqdialog.html">TQDialog</a> +class RegexpTester : public <a href="tqdialog.html">TQDialog</a> { <a href="metaobjects.html#TQ_OBJECT">TQ_OBJECT</a> @@ -66,16 +66,16 @@ public: WFlags f=0); <a href="tqlabel.html">TQLabel</a> *regexLabel; - <a href="ntqcombobox.html">TQComboBox</a> *regexComboBox; + <a href="tqcombobox.html">TQComboBox</a> *regexComboBox; <a href="tqlabel.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="tqcombobox.html">TQComboBox</a> *textComboBox; + <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="ntqpushbutton.html">TQPushButton</a> *executePushButton; - <a href="ntqpushbutton.html">TQPushButton</a> *copyPushButton; - <a href="ntqpushbutton.html">TQPushButton</a> *quitPushButton; + <a href="tqpushbutton.html">TQPushButton</a> *executePushButton; + <a href="tqpushbutton.html">TQPushButton</a> *copyPushButton; + <a href="tqpushbutton.html">TQPushButton</a> *quitPushButton; <a href="tqstatusbar.html">TQStatusBar</a> *statusBar; public slots: @@ -92,12 +92,12 @@ private: <p> <hr> <p> Implementation: <p> <pre>#include <<a href="qapplication-h.html">ntqapplication.h</a>> -#include <<a href="qcheckbox-h.html">ntqcheckbox.h</a>> +#include <<a href="tqcheckbox-h.html">tqcheckbox.h</a>> #include <<a href="tqclipboard-h.html">tqclipboard.h</a>> -#include <<a href="qcombobox-h.html">ntqcombobox.h</a>> +#include <<a href="tqcombobox-h.html">tqcombobox.h</a>> #include <<a href="tqlabel-h.html">tqlabel.h</a>> #include <<a href="qlayout-h.html">ntqlayout.h</a>> -#include <<a href="qpushbutton-h.html">ntqpushbutton.h</a>> +#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>> @@ -107,32 +107,32 @@ private: <a name="f556"></a>RegexpTester::RegexpTester(TQWidget* parent, const char* name, bool modal, WFlags f) - : <a href="ntqdialog.html">TQDialog</a>(parent, name, modal, f) + : <a href="tqdialog.html">TQDialog</a>(parent, name, modal, f) { regexLabel = new <a href="tqlabel.html">TQLabel</a>(this); - regexComboBox = new <a href="ntqcombobox.html">TQComboBox</a>(this); -<a name="x2480"></a> regexComboBox-><a href="ntqcombobox.html#setEditable">setEditable</a>(true); + regexComboBox = new <a href="tqcombobox.html">TQComboBox</a>(this); +<a name="x2480"></a> regexComboBox-><a href="tqcombobox.html#setEditable">setEditable</a>(true); <a name="x2507"></a> regexComboBox-><a href="tqwidget.html#setSizePolicy">setSizePolicy</a>(TQSizePolicy::Expanding, TQSizePolicy::Preferred); <a name="x2482"></a> regexLabel-><a href="tqlabel.html#setBuddy">setBuddy</a>(regexComboBox); textLabel = new <a href="tqlabel.html">TQLabel</a>(this); - textComboBox = new <a href="ntqcombobox.html">TQComboBox</a>(this); - textComboBox-><a href="ntqcombobox.html#setEditable">setEditable</a>(true); + textComboBox = new <a href="tqcombobox.html">TQComboBox</a>(this); + textComboBox-><a href="tqcombobox.html#setEditable">setEditable</a>(true); textComboBox-><a href="tqwidget.html#setSizePolicy">setSizePolicy</a>(TQSizePolicy::Expanding, TQSizePolicy::Preferred); textLabel-><a href="tqlabel.html#setBuddy">setBuddy</a>(textComboBox); - caseSensitiveCheckBox = new <a href="ntqcheckbox.html">TQCheckBox</a>(this); -<a name="x2475"></a> caseSensitiveCheckBox-><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); + caseSensitiveCheckBox = new <a href="tqcheckbox.html">TQCheckBox</a>(this); +<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); - executePushButton = new <a href="ntqpushbutton.html">TQPushButton</a>(this); -<a name="x2484"></a> executePushButton-><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); + 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); @@ -165,20 +165,20 @@ private: <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="ntqdialog.html#accept">accept</a>())); + <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>())); execute(); } 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>(); +<a name="x2478"></a> <a href="tqstring.html">TQString</a> regex = regexComboBox-><a href="tqcombobox.html#currentText">currentText</a>(); + <a href="tqstring.html">TQString</a> text = textComboBox-><a href="tqcombobox.html#currentText">currentText</a>(); if (!regex.<a href="tqstring.html#isEmpty">isEmpty</a>() && !text.<a href="tqstring.html#isEmpty">isEmpty</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="x2491"></a><a name="x2474"></a> re.<a href="tqregexp.html#setCaseSensitive">setCaseSensitive</a>(caseSensitiveCheckBox-><a href="tqcheckbox.html#isChecked">isChecked</a>()); +<a name="x2492"></a> re.<a href="tqregexp.html#setMinimal">setMinimal</a>(minimalCheckBox-><a href="tqcheckbox.html#isChecked">isChecked</a>()); + bool wildcard = wildcardCheckBox-><a href="tqcheckbox.html#isChecked">isChecked</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") @@ -243,7 +243,7 @@ void <a name="f557"></a>RegexpTester::execute() void <a name="f558"></a>RegexpTester::copy() { - <a href="tqstring.html">TQString</a> escaped = regexComboBox-><a href="ntqcombobox.html#currentText">currentText</a>(); + <a href="tqstring.html">TQString</a> escaped = regexComboBox-><a href="tqcombobox.html#currentText">currentText</a>(); if (!escaped.<a href="tqstring.html#isEmpty">isEmpty</a>()) { escaped = escaped.<a href="tqstring.html#replace">replace</a>("\\", "\\\\"); <a name="x2468"></a> <a href="tqclipboard.html">TQClipboard</a> *cb = TQApplication::<a href="ntqapplication.html#clipboard">clipboard</a>(); @@ -259,9 +259,9 @@ void <a name="f559"></a>RegexpTester::languageChange() { <a href="tqwidget.html#setCaption">setCaption</a>(<a href="tqobject.html#tr">tr</a>("Regex Tester")); regexLabel-><a href="tqlabel.html#setText">setText</a>(<a href="tqobject.html#tr">tr</a>("&Regex:")); -<a name="x2479"></a> regexComboBox-><a href="ntqcombobox.html#insertItem">insertItem</a>(<a href="tqobject.html#tr">tr</a>("[A-Z]+=(\\d+):(\\d*)")); +<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="ntqcombobox.html#insertItem">insertItem</a>(<a href="tqobject.html#tr">tr</a>("ABC=12:3456")); + 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")); @@ -281,7 +281,7 @@ int main(int argc, char **argv) { <a href="ntqapplication.html">TQApplication</a> app(argc, argv); RegexpTester form; -<a name="x2511"></a> form.<a href="ntqdialog.html#show">show</a>(); +<a name="x2511"></a> form.<a href="tqdialog.html#show">show</a>(); <a name="x2512"></a><a name="x2510"></a><a name="x2509"></a> app.<a href="tqobject.html#connect">connect</a>(&app, TQ_SIGNAL(<a href="ntqapplication.html#lastWindowClosed">lastWindowClosed</a>()), &app, TQ_SLOT(<a href="ntqapplication.html#quit">quit</a>())); return app.<a href="ntqapplication.html#exec">exec</a>(); } |