diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2024-08-12 22:02:11 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2024-08-12 22:02:11 +0900 |
commit | 42957a3f812a1db64a9ae452baa2d3fbc35f2466 (patch) | |
tree | 0928f4e01a3dcc0698b46c7608d8310e471bdb49 /doc/html/listboxcombo-example.html | |
parent | fef846914f8db6dc117e206ef913d519bf6bb33e (diff) | |
download | tqt3-42957a3f812a1db64a9ae452baa2d3fbc35f2466.tar.gz tqt3-42957a3f812a1db64a9ae452baa2d3fbc35f2466.zip |
Rename more widget nt* related files to equivalent tq*
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'doc/html/listboxcombo-example.html')
-rw-r--r-- | doc/html/listboxcombo-example.html | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/doc/html/listboxcombo-example.html b/doc/html/listboxcombo-example.html index 1e966ba03..a1b4e6301 100644 --- a/doc/html/listboxcombo-example.html +++ b/doc/html/listboxcombo-example.html @@ -63,7 +63,7 @@ public: ListBoxCombo( <a href="tqwidget.html">TQWidget</a> *parent = 0, const char *name = 0 ); protected: - <a href="ntqlistbox.html">TQListBox</a> *lb1, *lb2; + <a href="tqlistbox.html">TQListBox</a> *lb1, *lb2; <a href="tqlabel.html">TQLabel</a> *label1, *label2; protected slots: @@ -91,7 +91,7 @@ protected slots: #include "listboxcombo.h" #include <<a href="tqcombobox-h.html">tqcombobox.h</a>> -#include <<a href="qlistbox-h.html">ntqlistbox.h</a>> +#include <<a href="tqlistbox-h.html">tqlistbox.h</a>> #include <<a href="qhbox-h.html">ntqhbox.h</a>> #include <<a href="tqpushbutton-h.html">tqpushbutton.h</a>> #include <<a href="tqstring-h.html">tqstring.h</a>> @@ -102,28 +102,28 @@ protected slots: #include <<a href="tqstyle-h.html">tqstyle.h</a>> -class MyListBoxItem : public <a href="qlistboxitem.html">TQListBoxItem</a> +class MyListBoxItem : public <a href="tqlistboxitem.html">TQListBoxItem</a> { public: MyListBoxItem() - : <a href="qlistboxitem.html">TQListBoxItem</a>() + : <a href="tqlistboxitem.html">TQListBoxItem</a>() { setCustomHighlighting( TRUE ); } protected: virtual void paint( <a href="tqpainter.html">TQPainter</a> * ); - virtual int width( const <a href="ntqlistbox.html">TQListBox</a>* ) const { return 100; } - virtual int height( const <a href="ntqlistbox.html">TQListBox</a>* ) const { return 16; } + virtual int width( const <a href="tqlistbox.html">TQListBox</a>* ) const { return 100; } + virtual int height( const <a href="tqlistbox.html">TQListBox</a>* ) const { return 16; } }; -<a name="x1410"></a>void MyListBoxItem::<a href="qlistboxitem.html#paint">paint</a>( <a href="tqpainter.html">TQPainter</a> *painter ) +<a name="x1410"></a>void MyListBoxItem::<a href="tqlistboxitem.html#paint">paint</a>( <a href="tqpainter.html">TQPainter</a> *painter ) { // evil trick: find out whether we are painted onto our listbox -<a name="x1413"></a> bool in_list_box = <a href="qlistboxitem.html#listBox">listBox</a>() && listBox()->viewport() == painter-><a href="tqpainter.html#device">device</a>(); +<a name="x1413"></a> bool in_list_box = <a href="tqlistboxitem.html#listBox">listBox</a>() && listBox()->viewport() == painter-><a href="tqpainter.html#device">device</a>(); - <a href="tqrect.html">TQRect</a> r ( 0, 0, width( <a href="qlistboxitem.html#listBox">listBox</a>() ), height( <a href="qlistboxitem.html#listBox">listBox</a>() ) ); + <a href="tqrect.html">TQRect</a> r ( 0, 0, width( <a href="tqlistboxitem.html#listBox">listBox</a>() ), height( <a href="tqlistboxitem.html#listBox">listBox</a>() ) ); if ( in_list_box && isSelected() ) <a name="x1414"></a> painter-><a href="tqpainter.html#eraseRect">eraseRect</a>( r ); <a name="x1415"></a> painter-><a href="tqpainter.html#fillRect">fillRect</a>( 5, 5, width( listBox() ) - 10, height( listBox() ) - 10, TQt::red ); @@ -140,7 +140,7 @@ protected: <a name="f437"></a>ListBoxCombo::ListBoxCombo( <a href="tqwidget.html">TQWidget</a> *parent, const char *name ) : <a href="ntqvbox.html">TQVBox</a>( parent, name ) { - <a href="ntqframe.html#setMargin">setMargin</a>( 5 ); + <a href="tqframe.html#setMargin">setMargin</a>( 5 ); <a href="ntqhbox.html#setSpacing">setSpacing</a>( 5 ); unsigned int i; @@ -150,27 +150,27 @@ protected: <a name="x1402"></a> row1-><a href="ntqhbox.html#setSpacing">setSpacing</a>( 5 ); // Create a multi-selection ListBox... - lb1 = new <a href="ntqlistbox.html">TQListBox</a>( row1 ); -<a name="x1408"></a> lb1-><a href="ntqlistbox.html#setSelectionMode">setSelectionMode</a>( TQListBox::Multi ); + lb1 = new <a href="tqlistbox.html">TQListBox</a>( row1 ); +<a name="x1408"></a> lb1-><a href="tqlistbox.html#setSelectionMode">setSelectionMode</a>( TQListBox::Multi ); // ...insert a pixmap item... -<a name="x1406"></a> lb1-><a href="ntqlistbox.html#insertItem">insertItem</a>( TQPixmap( "qtlogo.png" ) ); +<a name="x1406"></a> lb1-><a href="tqlistbox.html#insertItem">insertItem</a>( TQPixmap( "qtlogo.png" ) ); // ...and 100 text items for ( i = 0; i < 100; i++ ) { str = TQString( "Listbox Item %1" ).arg( i ); if ( !( i % 4 ) ) - lb1-><a href="ntqlistbox.html#insertItem">insertItem</a>( TQPixmap( "fileopen.xpm" ), str ); + lb1-><a href="tqlistbox.html#insertItem">insertItem</a>( TQPixmap( "fileopen.xpm" ), str ); else - lb1-><a href="ntqlistbox.html#insertItem">insertItem</a>( str ); + lb1-><a href="tqlistbox.html#insertItem">insertItem</a>( str ); } // Create a pushbutton... <a href="tqpushbutton.html">TQPushButton</a> *arrow1 = new <a href="tqpushbutton.html">TQPushButton</a>( " -> ", row1 ); // ...and connect the clicked TQ_SIGNAL with the TQ_SLOT slotLeft2Right - <a href="tqobject.html#connect">connect</a>( arrow1, TQ_SIGNAL( <a href="ntqbutton.html#clicked">clicked</a>() ), this, TQ_SLOT( slotLeft2Right() ) ); + <a href="tqobject.html#connect">connect</a>( arrow1, TQ_SIGNAL( <a href="tqbutton.html#clicked">clicked</a>() ), this, TQ_SLOT( slotLeft2Right() ) ); // create an empty single-selection ListBox - lb2 = new <a href="ntqlistbox.html">TQListBox</a>( row1 ); + lb2 = new <a href="tqlistbox.html">TQListBox</a>( row1 ); <a href="ntqhbox.html">TQHBox</a> *row2 = new <a href="ntqhbox.html">TQHBox</a>( this ); row2-><a href="ntqhbox.html#setSpacing">setSpacing</a>( 5 ); @@ -182,7 +182,7 @@ protected: <a href="tqcombobox.html">TQComboBox</a> *cb1 = new <a href="tqcombobox.html">TQComboBox</a>( FALSE, box1 ); label1 = new <a href="tqlabel.html">TQLabel</a>( "Current Item: Combobox Item 0", box1 ); <a name="x1416"></a><a name="x1404"></a> label1-><a href="tqwidget.html#setMaximumHeight">setMaximumHeight</a>( label1-><a href="tqwidget.html#sizeHint">sizeHint</a>().height() * 2 ); -<a name="x1401"></a> label1-><a href="ntqframe.html#setFrameStyle">setFrameStyle</a>( TQFrame::Panel | TQFrame::Sunken ); +<a name="x1401"></a> label1-><a href="tqframe.html#setFrameStyle">setFrameStyle</a>( TQFrame::Panel | TQFrame::Sunken ); //...and insert 50 items into the Combobox for ( i = 0; i < 50; i++ ) { @@ -200,7 +200,7 @@ protected: <a href="tqcombobox.html">TQComboBox</a> *cb2 = new <a href="tqcombobox.html">TQComboBox</a>( TRUE, box2 ); label2 = new <a href="tqlabel.html">TQLabel</a>( "Current Item: Combobox Item 0", box2 ); label2-><a href="tqwidget.html#setMaximumHeight">setMaximumHeight</a>( label2-><a href="tqwidget.html#sizeHint">sizeHint</a>().height() * 2 ); - label2-><a href="ntqframe.html#setFrameStyle">setFrameStyle</a>( TQFrame::Panel | TQFrame::Sunken ); + label2-><a href="tqframe.html#setFrameStyle">setFrameStyle</a>( TQFrame::Panel | TQFrame::Sunken ); // ... and insert 50 items into the Combobox for ( i = 0; i < 50; i++ ) { @@ -226,17 +226,17 @@ protected: void <a name="f438"></a>ListBoxCombo::slotLeft2Right() { // Go through all items of the first ListBox -<a name="x1405"></a> for ( unsigned int i = 0; i < lb1-><a href="ntqlistbox.html#count">count</a>(); i++ ) { -<a name="x1407"></a> <a href="qlistboxitem.html">TQListBoxItem</a> *item = lb1-><a href="ntqlistbox.html#item">item</a>( i ); +<a name="x1405"></a> for ( unsigned int i = 0; i < lb1-><a href="tqlistbox.html#count">count</a>(); i++ ) { +<a name="x1407"></a> <a href="tqlistboxitem.html">TQListBoxItem</a> *item = lb1-><a href="tqlistbox.html#item">item</a>( i ); // if the item is selected... -<a name="x1409"></a> if ( item-><a href="qlistboxitem.html#isSelected">isSelected</a>() ) { +<a name="x1409"></a> if ( item-><a href="tqlistboxitem.html#isSelected">isSelected</a>() ) { // ...and it is a text item... -<a name="x1412"></a><a name="x1411"></a> if ( item-><a href="qlistboxitem.html#pixmap">pixmap</a>() && !item-><a href="qlistboxitem.html#text">text</a>().isEmpty() ) - lb2-><a href="ntqlistbox.html#insertItem">insertItem</a>( *item-><a href="qlistboxitem.html#pixmap">pixmap</a>(), item-><a href="qlistboxitem.html#text">text</a>() ); - else if ( !item-><a href="qlistboxitem.html#pixmap">pixmap</a>() ) - lb2-><a href="ntqlistbox.html#insertItem">insertItem</a>( item-><a href="qlistboxitem.html#text">text</a>() ); - else if ( item-><a href="qlistboxitem.html#text">text</a>().isEmpty() ) - lb2-><a href="ntqlistbox.html#insertItem">insertItem</a>( *item-><a href="qlistboxitem.html#pixmap">pixmap</a>() ); +<a name="x1412"></a><a name="x1411"></a> if ( item-><a href="tqlistboxitem.html#pixmap">pixmap</a>() && !item-><a href="tqlistboxitem.html#text">text</a>().isEmpty() ) + lb2-><a href="tqlistbox.html#insertItem">insertItem</a>( *item-><a href="tqlistboxitem.html#pixmap">pixmap</a>(), item-><a href="tqlistboxitem.html#text">text</a>() ); + else if ( !item-><a href="tqlistboxitem.html#pixmap">pixmap</a>() ) + lb2-><a href="tqlistbox.html#insertItem">insertItem</a>( item-><a href="tqlistboxitem.html#text">text</a>() ); + else if ( item-><a href="tqlistboxitem.html#text">text</a>().isEmpty() ) + lb2-><a href="tqlistbox.html#insertItem">insertItem</a>( *item-><a href="tqlistboxitem.html#pixmap">pixmap</a>() ); } } } |