diff options
Diffstat (limited to 'doc/html/lineedits-example.html')
-rw-r--r-- | doc/html/lineedits-example.html | 178 |
1 files changed, 89 insertions, 89 deletions
diff --git a/doc/html/lineedits-example.html b/doc/html/lineedits-example.html index d467ed793..66611cf23 100644 --- a/doc/html/lineedits-example.html +++ b/doc/html/lineedits-example.html @@ -50,21 +50,21 @@ how to use different echo modes and validators. #ifndef LINEDITS_H #define LINEDITS_H -#include <<a href="qgroupbox-h.html">qgroupbox.h</a>> +#include <<a href="qgroupbox-h.html">ntqgroupbox.h</a>> class TQLineEdit; class TQComboBox; -class LineEdits : public <a href="qgroupbox.html">TQGroupBox</a> +class LineEdits : public <a href="ntqgroupbox.html">TQGroupBox</a> { <a href="metaobjects.html#Q_OBJECT">Q_OBJECT</a> public: - LineEdits( <a href="qwidget.html">TQWidget</a> *parent = 0, const char *name = 0 ); + LineEdits( <a href="ntqwidget.html">TQWidget</a> *parent = 0, const char *name = 0 ); protected: - <a href="qlineedit.html">TQLineEdit</a> *lined1, *lined2, *lined3, *lined4, *lined5; - <a href="qcombobox.html">TQComboBox</a> *combo1, *combo2, *combo3, *combo4, *combo5; + <a href="ntqlineedit.html">TQLineEdit</a> *lined1, *lined2, *lined3, *lined4, *lined5; + <a href="ntqcombobox.html">TQComboBox</a> *combo1, *combo2, *combo3, *combo4, *combo5; protected slots: void slotEchoChanged( int ); @@ -91,13 +91,13 @@ protected slots: #include "lineedits.h" -#include <<a href="qlineedit-h.html">qlineedit.h</a>> -#include <<a href="qcombobox-h.html">qcombobox.h</a>> -#include <<a href="qframe-h.html">qframe.h</a>> -#include <<a href="qvalidator-h.html">qvalidator.h</a>> -#include <<a href="qlabel-h.html">qlabel.h</a>> -#include <<a href="qlayout-h.html">qlayout.h</a>> -#include <<a href="qhbox-h.html">qhbox.h</a>> +#include <<a href="qlineedit-h.html">ntqlineedit.h</a>> +#include <<a href="qcombobox-h.html">ntqcombobox.h</a>> +#include <<a href="qframe-h.html">ntqframe.h</a>> +#include <<a href="qvalidator-h.html">ntqvalidator.h</a>> +#include <<a href="qlabel-h.html">ntqlabel.h</a>> +#include <<a href="qlayout-h.html">ntqlayout.h</a>> +#include <<a href="qhbox-h.html">ntqhbox.h</a>> /* * Constructor @@ -105,121 +105,121 @@ protected slots: * Creates child widgets of the LineEdits widget */ -<a name="f219"></a>LineEdits::LineEdits( <a href="qwidget.html">TQWidget</a> *parent, const char *name ) - : <a href="qgroupbox.html">TQGroupBox</a>( 0, Horizontal, "Line edits", parent, name ) +<a name="f219"></a>LineEdits::LineEdits( <a href="ntqwidget.html">TQWidget</a> *parent, const char *name ) + : <a href="ntqgroupbox.html">TQGroupBox</a>( 0, Horizontal, "Line edits", parent, name ) { - <a href="qframe.html#setMargin">setMargin</a>( 10 ); + <a href="ntqframe.html#setMargin">setMargin</a>( 10 ); - <a href="qvboxlayout.html">TQVBoxLayout</a>* box = new <a href="qvboxlayout.html">TQVBoxLayout</a>( <a href="qwidget.html#layout">layout</a>() ); + <a href="qvboxlayout.html">TQVBoxLayout</a>* box = new <a href="qvboxlayout.html">TQVBoxLayout</a>( <a href="ntqwidget.html#layout">layout</a>() ); <a href="qhboxlayout.html">TQHBoxLayout</a> *row1 = new <a href="qhboxlayout.html">TQHBoxLayout</a>( box ); -<a name="x173"></a> row1-><a href="qlayout.html#setMargin">setMargin</a>( 5 ); +<a name="x173"></a> row1-><a href="ntqlayout.html#setMargin">setMargin</a>( 5 ); // Create a Label - <a href="qlabel.html">TQLabel</a>* label = new <a href="qlabel.html">TQLabel</a>( "Echo Mode: ", this); + <a href="ntqlabel.html">TQLabel</a>* label = new <a href="ntqlabel.html">TQLabel</a>( "Echo Mode: ", this); <a name="x169"></a> row1-><a href="qboxlayout.html#addWidget">addWidget</a>( label ); // Create a Combobox with three items... - combo1 = new <a href="qcombobox.html">TQComboBox</a>( FALSE, this ); + combo1 = new <a href="ntqcombobox.html">TQComboBox</a>( FALSE, this ); row1-><a href="qboxlayout.html#addWidget">addWidget</a>( combo1 ); -<a name="x171"></a> combo1-><a href="qcombobox.html#insertItem">insertItem</a>( "Normal" ); - combo1-><a href="qcombobox.html#insertItem">insertItem</a>( "Password" ); - combo1-><a href="qcombobox.html#insertItem">insertItem</a>( "No Echo" ); +<a name="x171"></a> combo1-><a href="ntqcombobox.html#insertItem">insertItem</a>( "Normal" ); + combo1-><a href="ntqcombobox.html#insertItem">insertItem</a>( "Password" ); + combo1-><a href="ntqcombobox.html#insertItem">insertItem</a>( "No Echo" ); // ...and connect the activated() SIGNAL with the slotEchoChanged() SLOT to be able // to react when an item is selected -<a name="x170"></a> <a href="qobject.html#connect">connect</a>( combo1, SIGNAL( <a href="qcombobox.html#activated">activated</a>( int ) ), this, SLOT( slotEchoChanged( int ) ) ); +<a name="x170"></a> <a href="ntqobject.html#connect">connect</a>( combo1, SIGNAL( <a href="ntqcombobox.html#activated">activated</a>( int ) ), this, SLOT( slotEchoChanged( int ) ) ); // insert the first LineEdit - lined1 = new <a href="qlineedit.html">TQLineEdit</a>( this ); + lined1 = new <a href="ntqlineedit.html">TQLineEdit</a>( this ); box-><a href="qboxlayout.html#addWidget">addWidget</a>( lined1 ); // another widget which is used for layouting <a href="qhboxlayout.html">TQHBoxLayout</a> *row2 = new <a href="qhboxlayout.html">TQHBoxLayout</a>( box ); - row2-><a href="qlayout.html#setMargin">setMargin</a>( 5 ); + row2-><a href="ntqlayout.html#setMargin">setMargin</a>( 5 ); // and the second label - label = new <a href="qlabel.html">TQLabel</a>( "Validator: ", this ); + label = new <a href="ntqlabel.html">TQLabel</a>( "Validator: ", this ); row2-><a href="qboxlayout.html#addWidget">addWidget</a>( label ); // A second Combobox with again three items... - combo2 = new <a href="qcombobox.html">TQComboBox</a>( FALSE, this ); + combo2 = new <a href="ntqcombobox.html">TQComboBox</a>( FALSE, this ); row2-><a href="qboxlayout.html#addWidget">addWidget</a>( combo2 ); - combo2-><a href="qcombobox.html#insertItem">insertItem</a>( "No Validator" ); - combo2-><a href="qcombobox.html#insertItem">insertItem</a>( "Integer Validator" ); - combo2-><a href="qcombobox.html#insertItem">insertItem</a>( "Double Validator" ); + combo2-><a href="ntqcombobox.html#insertItem">insertItem</a>( "No Validator" ); + combo2-><a href="ntqcombobox.html#insertItem">insertItem</a>( "Integer Validator" ); + combo2-><a href="ntqcombobox.html#insertItem">insertItem</a>( "Double Validator" ); // ...and again the activated() SIGNAL gets connected with a SLOT - <a href="qobject.html#connect">connect</a>( combo2, SIGNAL( <a href="qcombobox.html#activated">activated</a>( int ) ), this, SLOT( slotValidatorChanged( int ) ) ); + <a href="ntqobject.html#connect">connect</a>( combo2, SIGNAL( <a href="ntqcombobox.html#activated">activated</a>( int ) ), this, SLOT( slotValidatorChanged( int ) ) ); // and the second LineEdit - lined2 = new <a href="qlineedit.html">TQLineEdit</a>( this ); + lined2 = new <a href="ntqlineedit.html">TQLineEdit</a>( this ); box-><a href="qboxlayout.html#addWidget">addWidget</a>( lined2 ); // yet another widget which is used for layouting <a href="qhboxlayout.html">TQHBoxLayout</a> *row3 = new <a href="qhboxlayout.html">TQHBoxLayout</a>( box ); - row3-><a href="qlayout.html#setMargin">setMargin</a>( 5 ); + row3-><a href="ntqlayout.html#setMargin">setMargin</a>( 5 ); // we need a label for this too - label = new <a href="qlabel.html">TQLabel</a>( "Alignment: ", this ); + label = new <a href="ntqlabel.html">TQLabel</a>( "Alignment: ", this ); row3-><a href="qboxlayout.html#addWidget">addWidget</a>( label ); // A combo box for setting alignment - combo3 = new <a href="qcombobox.html">TQComboBox</a>( FALSE, this ); + combo3 = new <a href="ntqcombobox.html">TQComboBox</a>( FALSE, this ); row3-><a href="qboxlayout.html#addWidget">addWidget</a>( combo3 ); - combo3-><a href="qcombobox.html#insertItem">insertItem</a>( "Left" ); - combo3-><a href="qcombobox.html#insertItem">insertItem</a>( "Centered" ); - combo3-><a href="qcombobox.html#insertItem">insertItem</a>( "Right" ); + combo3-><a href="ntqcombobox.html#insertItem">insertItem</a>( "Left" ); + combo3-><a href="ntqcombobox.html#insertItem">insertItem</a>( "Centered" ); + combo3-><a href="ntqcombobox.html#insertItem">insertItem</a>( "Right" ); // ...and again the activated() SIGNAL gets connected with a SLOT - <a href="qobject.html#connect">connect</a>( combo3, SIGNAL( <a href="qcombobox.html#activated">activated</a>( int ) ), this, SLOT( slotAlignmentChanged( int ) ) ); + <a href="ntqobject.html#connect">connect</a>( combo3, SIGNAL( <a href="ntqcombobox.html#activated">activated</a>( int ) ), this, SLOT( slotAlignmentChanged( int ) ) ); // and the third lineedit - lined3 = new <a href="qlineedit.html">TQLineEdit</a>( this ); + lined3 = new <a href="ntqlineedit.html">TQLineEdit</a>( this ); box-><a href="qboxlayout.html#addWidget">addWidget</a>( lined3 ); // exactly the same for the fourth <a href="qhboxlayout.html">TQHBoxLayout</a> *row4 = new <a href="qhboxlayout.html">TQHBoxLayout</a>( box ); - row4-><a href="qlayout.html#setMargin">setMargin</a>( 5 ); + row4-><a href="ntqlayout.html#setMargin">setMargin</a>( 5 ); // we need a label for this too - label = new <a href="qlabel.html">TQLabel</a>( "Input mask: ", this ); + label = new <a href="ntqlabel.html">TQLabel</a>( "Input mask: ", this ); row4-><a href="qboxlayout.html#addWidget">addWidget</a>( label ); // A combo box for choosing an input mask - combo4 = new <a href="qcombobox.html">TQComboBox</a>( FALSE, this ); + combo4 = new <a href="ntqcombobox.html">TQComboBox</a>( FALSE, this ); row4-><a href="qboxlayout.html#addWidget">addWidget</a>( combo4 ); - combo4-><a href="qcombobox.html#insertItem">insertItem</a>( "No mask" ); - combo4-><a href="qcombobox.html#insertItem">insertItem</a>( "Phone number" ); - combo4-><a href="qcombobox.html#insertItem">insertItem</a>( "ISO date" ); - combo4-><a href="qcombobox.html#insertItem">insertItem</a>( "License key" ); + combo4-><a href="ntqcombobox.html#insertItem">insertItem</a>( "No mask" ); + combo4-><a href="ntqcombobox.html#insertItem">insertItem</a>( "Phone number" ); + combo4-><a href="ntqcombobox.html#insertItem">insertItem</a>( "ISO date" ); + combo4-><a href="ntqcombobox.html#insertItem">insertItem</a>( "License key" ); - // ...this time we use the activated( const <a href="qstring.html">TQString</a> & ) signal - <a href="qobject.html#connect">connect</a>( combo4, SIGNAL( <a href="qcombobox.html#activated">activated</a>( int ) ), + // ...this time we use the activated( const <a href="ntqstring.html">TQString</a> & ) signal + <a href="ntqobject.html#connect">connect</a>( combo4, SIGNAL( <a href="ntqcombobox.html#activated">activated</a>( int ) ), this, SLOT( slotInputMaskChanged( int ) ) ); // and the fourth lineedit - lined4 = new <a href="qlineedit.html">TQLineEdit</a>( this ); + lined4 = new <a href="ntqlineedit.html">TQLineEdit</a>( this ); box-><a href="qboxlayout.html#addWidget">addWidget</a>( lined4 ); // last widget used for layouting - <a href="qhbox.html">TQHBox</a> *row5 = new <a href="qhbox.html">TQHBox</a>( this ); + <a href="ntqhbox.html">TQHBox</a> *row5 = new <a href="ntqhbox.html">TQHBox</a>( this ); box-><a href="qboxlayout.html#addWidget">addWidget</a>( row5 ); - row5-><a href="qframe.html#setMargin">setMargin</a>( 5 ); + row5-><a href="ntqframe.html#setMargin">setMargin</a>( 5 ); // last label - (void)new <a href="qlabel.html">TQLabel</a>( "Read-Only: ", row5 ); + (void)new <a href="ntqlabel.html">TQLabel</a>( "Read-Only: ", row5 ); // A combo box for setting alignment - combo5 = new <a href="qcombobox.html">TQComboBox</a>( FALSE, row5 ); - combo5-><a href="qcombobox.html#insertItem">insertItem</a>( "False" ); - combo5-><a href="qcombobox.html#insertItem">insertItem</a>( "True" ); + combo5 = new <a href="ntqcombobox.html">TQComboBox</a>( FALSE, row5 ); + combo5-><a href="ntqcombobox.html#insertItem">insertItem</a>( "False" ); + combo5-><a href="ntqcombobox.html#insertItem">insertItem</a>( "True" ); // ...and again the activated() SIGNAL gets connected with a SLOT - <a href="qobject.html#connect">connect</a>( combo5, SIGNAL( <a href="qcombobox.html#activated">activated</a>( int ) ), this, SLOT( slotReadOnlyChanged( int ) ) ); + <a href="ntqobject.html#connect">connect</a>( combo5, SIGNAL( <a href="ntqcombobox.html#activated">activated</a>( int ) ), this, SLOT( slotReadOnlyChanged( int ) ) ); // and the last lineedit - lined5 = new <a href="qlineedit.html">TQLineEdit</a>( this ); + lined5 = new <a href="ntqlineedit.html">TQLineEdit</a>( this ); box-><a href="qboxlayout.html#addWidget">addWidget</a>( lined5 ); // give the first LineEdit the focus at the beginning -<a name="x181"></a> lined1-><a href="qwidget.html#setFocus">setFocus</a>(); +<a name="x181"></a> lined1-><a href="ntqwidget.html#setFocus">setFocus</a>(); } /* @@ -234,17 +234,17 @@ void <a name="f220"></a>LineEdits::slotEchoChanged( int i ) { switch ( i ) { case 0: -<a name="x176"></a> lined1-><a href="qlineedit.html#setEchoMode">setEchoMode</a>( TQLineEdit::Normal ); +<a name="x176"></a> lined1-><a href="ntqlineedit.html#setEchoMode">setEchoMode</a>( TQLineEdit::Normal ); break; case 1: - lined1-><a href="qlineedit.html#setEchoMode">setEchoMode</a>( TQLineEdit::Password ); + lined1-><a href="ntqlineedit.html#setEchoMode">setEchoMode</a>( TQLineEdit::Password ); break; case 2: - lined1-><a href="qlineedit.html#setEchoMode">setEchoMode</a>( TQLineEdit::NoEcho ); + lined1-><a href="ntqlineedit.html#setEchoMode">setEchoMode</a>( TQLineEdit::NoEcho ); break; } - lined1-><a href="qwidget.html#setFocus">setFocus</a>(); + lined1-><a href="ntqwidget.html#setFocus">setFocus</a>(); } /* @@ -261,19 +261,19 @@ void <a name="f221"></a>LineEdits::slotValidatorChanged( int i ) { switch ( i ) { case 0: -<a name="x180"></a> lined2-><a href="qlineedit.html#setValidator">setValidator</a>( 0 ); +<a name="x180"></a> lined2-><a href="ntqlineedit.html#setValidator">setValidator</a>( 0 ); break; case 1: - lined2-><a href="qlineedit.html#setValidator">setValidator</a>( new <a href="qintvalidator.html">TQIntValidator</a>( lined2 ) ); + lined2-><a href="ntqlineedit.html#setValidator">setValidator</a>( new <a href="qintvalidator.html">TQIntValidator</a>( lined2 ) ); break; case 2: - lined2-><a href="qlineedit.html#setValidator">setValidator</a>( new <a href="qdoublevalidator.html">TQDoubleValidator</a>( -999.0, 999.0, 2, + lined2-><a href="ntqlineedit.html#setValidator">setValidator</a>( new <a href="qdoublevalidator.html">TQDoubleValidator</a>( -999.0, 999.0, 2, lined2 ) ); break; } -<a name="x179"></a> lined2-><a href="qlineedit.html#setText">setText</a>( "" ); - lined2-><a href="qwidget.html#setFocus">setFocus</a>(); +<a name="x179"></a> lined2-><a href="ntqlineedit.html#setText">setText</a>( "" ); + lined2-><a href="ntqwidget.html#setFocus">setFocus</a>(); } @@ -289,21 +289,21 @@ void <a name="f222"></a>LineEdits::slotAlignmentChanged( int i ) { switch ( i ) { case 0: -<a name="x174"></a> lined3-><a href="qlineedit.html#setAlignment">setAlignment</a>( TQLineEdit::AlignLeft ); +<a name="x174"></a> lined3-><a href="ntqlineedit.html#setAlignment">setAlignment</a>( TQLineEdit::AlignLeft ); break; case 1: - lined3-><a href="qlineedit.html#setAlignment">setAlignment</a>( TQLineEdit::AlignCenter ); + lined3-><a href="ntqlineedit.html#setAlignment">setAlignment</a>( TQLineEdit::AlignCenter ); break; case 2: - lined3-><a href="qlineedit.html#setAlignment">setAlignment</a>( TQLineEdit::AlignRight ); + lined3-><a href="ntqlineedit.html#setAlignment">setAlignment</a>( TQLineEdit::AlignRight ); break; } - lined3-><a href="qwidget.html#setFocus">setFocus</a>(); + lined3-><a href="ntqwidget.html#setFocus">setFocus</a>(); } /* - * SLOT slotInputMaskChanged( const <a href="qstring.html">TQString</a> &mask ) + * SLOT slotInputMaskChanged( const <a href="ntqstring.html">TQString</a> &mask ) * * i contains the number of the item which the user has been chosen in * the third Combobox. According to this value, we set an input mask on @@ -314,21 +314,21 @@ void <a name="f223"></a>LineEdits::slotInputMaskChanged( int i ) { switch( i ) { case 0: -<a name="x177"></a> lined4-><a href="qlineedit.html#setInputMask">setInputMask</a>( <a href="qstring.html#TQString-null">TQString::null</a> ); +<a name="x177"></a> lined4-><a href="ntqlineedit.html#setInputMask">setInputMask</a>( <a href="ntqstring.html#TQString-null">TQString::null</a> ); break; case 1: - lined4-><a href="qlineedit.html#setInputMask">setInputMask</a>( "+99 99 99 99 99;_" ); + lined4-><a href="ntqlineedit.html#setInputMask">setInputMask</a>( "+99 99 99 99 99;_" ); break; case 2: - lined4-><a href="qlineedit.html#setInputMask">setInputMask</a>( "0000-00-00" ); - lined4-><a href="qlineedit.html#setText">setText</a>( "00000000" ); -<a name="x175"></a> lined4-><a href="qlineedit.html#setCursorPosition">setCursorPosition</a>( 0 ); + lined4-><a href="ntqlineedit.html#setInputMask">setInputMask</a>( "0000-00-00" ); + lined4-><a href="ntqlineedit.html#setText">setText</a>( "00000000" ); +<a name="x175"></a> lined4-><a href="ntqlineedit.html#setCursorPosition">setCursorPosition</a>( 0 ); break; case 3: - lined4-><a href="qlineedit.html#setInputMask">setInputMask</a>( ">AAAAA-AAAAA-AAAAA-AAAAA-AAAAA;#" ); + lined4-><a href="ntqlineedit.html#setInputMask">setInputMask</a>( ">AAAAA-AAAAA-AAAAA-AAAAA-AAAAA;#" ); break; } - lined4-><a href="qwidget.html#setFocus">setFocus</a>(); + lined4-><a href="ntqwidget.html#setFocus">setFocus</a>(); } /* @@ -342,14 +342,14 @@ void <a name="f224"></a>LineEdits::slotReadOnlyChanged( int i ) { switch ( i ) { case 0: -<a name="x178"></a> lined5-><a href="qlineedit.html#setReadOnly">setReadOnly</a>( FALSE ); +<a name="x178"></a> lined5-><a href="ntqlineedit.html#setReadOnly">setReadOnly</a>( FALSE ); break; case 1: - lined5-><a href="qlineedit.html#setReadOnly">setReadOnly</a>( TRUE ); + lined5-><a href="ntqlineedit.html#setReadOnly">setReadOnly</a>( TRUE ); break; } - lined5-><a href="qwidget.html#setFocus">setFocus</a>(); + lined5-><a href="ntqwidget.html#setFocus">setFocus</a>(); } </pre> @@ -367,18 +367,18 @@ void <a name="f224"></a>LineEdits::slotReadOnlyChanged( int i ) *****************************************************************************/ #include "lineedits.h" -#include <<a href="qapplication-h.html">qapplication.h</a>> +#include <<a href="qapplication-h.html">ntqapplication.h</a>> int main( int argc, char **argv ) { - <a href="qapplication.html">TQApplication</a> a( argc, argv ); + <a href="ntqapplication.html">TQApplication</a> a( argc, argv ); LineEdits lineedits; - lineedits.<a href="qwidget.html#setCaption">setCaption</a>( "TQt Example - Lineedits" ); - a.<a href="qapplication.html#setMainWidget">setMainWidget</a>( &lineedits ); - lineedits.<a href="qwidget.html#show">show</a>(); + lineedits.<a href="ntqwidget.html#setCaption">setCaption</a>( "TQt Example - Lineedits" ); + a.<a href="ntqapplication.html#setMainWidget">setMainWidget</a>( &lineedits ); + lineedits.<a href="ntqwidget.html#show">show</a>(); - return a.<a href="qapplication.html#exec">exec</a>(); + return a.<a href="ntqapplication.html#exec">exec</a>(); } </pre> |