diff options
Diffstat (limited to 'doc/html/checklists-example.html')
-rw-r--r-- | doc/html/checklists-example.html | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/doc/html/checklists-example.html b/doc/html/checklists-example.html index 40f7db55c..05a2d604d 100644 --- a/doc/html/checklists-example.html +++ b/doc/html/checklists-example.html @@ -63,7 +63,7 @@ public: CheckLists( <a href="tqwidget.html">TQWidget</a> *parent = 0, const char *name = 0 ); protected: - <a href="ntqlistview.html">TQListView</a> *lv1, *lv2; + <a href="tqlistview.html">TQListView</a> *lv1, *lv2; <a href="tqlabel.html">TQLabel</a> *label; protected slots: @@ -89,7 +89,7 @@ protected slots: #include "checklists.h" -#include <<a href="qlistview-h.html">ntqlistview.h</a>> +#include <<a href="tqlistview-h.html">tqlistview.h</a>> #include <<a href="qvbox-h.html">ntqvbox.h</a>> #include <<a href="tqlabel-h.html">tqlabel.h</a>> #include <<a href="tqvaluelist-h.html">tqvaluelist.h</a>> @@ -117,10 +117,10 @@ protected slots: <a name="x423"></a> vbox1-><a href="qboxlayout.html#addWidget">addWidget</a>( new <a href="tqlabel.html">TQLabel</a>( "Check some items!", this ) ); // Second child: the ListView - lv1 = new <a href="ntqlistview.html">TQListView</a>( this ); + lv1 = new <a href="tqlistview.html">TQListView</a>( this ); vbox1-><a href="qboxlayout.html#addWidget">addWidget</a>( lv1 ); -<a name="x427"></a> lv1-><a href="ntqlistview.html#addColumn">addColumn</a>( "Items" ); -<a name="x429"></a> lv1-><a href="ntqlistview.html#setRootIsDecorated">setRootIsDecorated</a>( TRUE ); +<a name="x427"></a> lv1-><a href="tqlistview.html#addColumn">addColumn</a>( "Items" ); +<a name="x429"></a> lv1-><a href="tqlistview.html#setRootIsDecorated">setRootIsDecorated</a>( TRUE ); // create a list with 4 ListViewItems which will be parent items of other ListViewItems <a href="tqvaluelist.html">TQValueList</a><TQListViewItem *> parentList; @@ -130,7 +130,7 @@ protected slots: parentList.<a href="tqvaluelist.html#append">append</a>( new <a href="tqchecklistitem.html">TQCheckListItem</a>( lv1, "Parent Item 3", TQCheckListItem::CheckBoxController ) ); parentList.<a href="tqvaluelist.html#append">append</a>( new <a href="tqchecklistitem.html">TQCheckListItem</a>( lv1, "Parent Item 4", TQCheckListItem::CheckBoxController ) ); - <a href="qlistviewitem.html">TQListViewItem</a> *item = 0; + <a href="tqlistviewitem.html">TQListViewItem</a> *item = 0; unsigned int num = 1; // go through the list of parent items... <a name="x436"></a><a name="x435"></a> for ( TQValueList<TQListViewItem*>::Iterator it = parentList.<a href="tqvaluelist.html#begin">begin</a>(); it != parentList.<a href="tqvaluelist.html#end">end</a>(); @@ -150,7 +150,7 @@ protected slots: tmp-><a href="qboxlayout.html#addWidget">addWidget</a>( copy1 ); <a name="x437"></a><a name="x433"></a> copy1-><a href="tqwidget.html#setMaximumWidth">setMaximumWidth</a>( copy1-><a href="tqwidget.html#sizeHint">sizeHint</a>().width() ); // connect the TQ_SIGNAL clicked() of the pushbutton with the TQ_SLOT copy1to2() - <a href="tqobject.html#connect">connect</a>( copy1, TQ_SIGNAL( <a href="ntqbutton.html#clicked">clicked</a>() ), this, TQ_SLOT( copy1to2() ) ); + <a href="tqobject.html#connect">connect</a>( copy1, TQ_SIGNAL( <a href="tqbutton.html#clicked">clicked</a>() ), this, TQ_SLOT( copy1to2() ) ); // another widget for layouting <a href="qvboxlayout.html">TQVBoxLayout</a> *vbox2 = new <a href="qvboxlayout.html">TQVBoxLayout</a>( lay ); @@ -160,10 +160,10 @@ protected slots: vbox2-><a href="qboxlayout.html#addWidget">addWidget</a>( new <a href="tqlabel.html">TQLabel</a>( "Check one item!", this ) ); // create the second listview - lv2 = new <a href="ntqlistview.html">TQListView</a>( this ); + lv2 = new <a href="tqlistview.html">TQListView</a>( this ); vbox2-><a href="qboxlayout.html#addWidget">addWidget</a>( lv2 ); - lv2-><a href="ntqlistview.html#addColumn">addColumn</a>( "Items" ); - lv2-><a href="ntqlistview.html#setRootIsDecorated">setRootIsDecorated</a>( TRUE ); + lv2-><a href="tqlistview.html#addColumn">addColumn</a>( "Items" ); + lv2-><a href="tqlistview.html#setRootIsDecorated">setRootIsDecorated</a>( TRUE ); // another widget needed for layouting only tmp = new <a href="qvboxlayout.html">TQVBoxLayout</a>( lay ); @@ -174,7 +174,7 @@ protected slots: lay-><a href="qboxlayout.html#addWidget">addWidget</a>( copy2 ); copy2-><a href="tqwidget.html#setMaximumWidth">setMaximumWidth</a>( copy2-><a href="tqwidget.html#sizeHint">sizeHint</a>().width() ); // ...and connect its clicked() TQ_SIGNAL to the copy2to3() TQ_SLOT - <a href="tqobject.html#connect">connect</a>( copy2, TQ_SIGNAL( <a href="ntqbutton.html#clicked">clicked</a>() ), this, TQ_SLOT( copy2to3() ) ); + <a href="tqobject.html#connect">connect</a>( copy2, TQ_SIGNAL( <a href="tqbutton.html#clicked">clicked</a>() ), this, TQ_SLOT( copy2to3() ) ); tmp = new <a href="qvboxlayout.html">TQVBoxLayout</a>( lay ); tmp-><a href="ntqlayout.html#setMargin">setMargin</a>( 5 ); @@ -194,26 +194,26 @@ protected slots: void <a name="f249"></a>CheckLists::copy1to2() { // create an iterator which operates on the first ListView - <a href="qlistviewitemiterator.html">TQListViewItemIterator</a> it( lv1 ); + <a href="tqlistviewitemiterator.html">TQListViewItemIterator</a> it( lv1 ); -<a name="x428"></a> lv2-><a href="ntqlistview.html#clear">clear</a>(); +<a name="x428"></a> lv2-><a href="tqlistview.html#clear">clear</a>(); // Insert first a controller Item into the second ListView. Always if Radio-ListViewItems // are inserted into a Listview, the parent item of these MUST be a controller Item! <a href="tqchecklistitem.html">TQCheckListItem</a> *item = new <a href="tqchecklistitem.html">TQCheckListItem</a>( lv2, "Controller", TQCheckListItem::Controller ); -<a name="x431"></a> item-><a href="qlistviewitem.html#setOpen">setOpen</a>( TRUE ); +<a name="x431"></a> item-><a href="tqlistviewitem.html#setOpen">setOpen</a>( TRUE ); // iterate through the first ListView... -<a name="x432"></a> for ( ; it.<a href="qlistviewitemiterator.html#current">current</a>(); ++it ) +<a name="x432"></a> for ( ; it.<a href="tqlistviewitemiterator.html#current">current</a>(); ++it ) // ...check state of childs, and... - if ( it.<a href="qlistviewitemiterator.html#current">current</a>()->parent() ) + if ( it.<a href="tqlistviewitemiterator.html#current">current</a>()->parent() ) // ...if the item is checked... - if ( ( (TQCheckListItem*)it.<a href="qlistviewitemiterator.html#current">current</a>() )->isOn() ) + if ( ( (TQCheckListItem*)it.<a href="tqlistviewitemiterator.html#current">current</a>() )->isOn() ) // ...insert a Radio-ListViewItem with the same text into the second ListView - (void)new <a href="tqchecklistitem.html">TQCheckListItem</a>( item, it.<a href="qlistviewitemiterator.html#current">current</a>()->text( 0 ), TQCheckListItem::RadioButton ); + (void)new <a href="tqchecklistitem.html">TQCheckListItem</a>( item, it.<a href="tqlistviewitemiterator.html#current">current</a>()->text( 0 ), TQCheckListItem::RadioButton ); -<a name="x430"></a> if ( item-><a href="qlistviewitem.html#firstChild">firstChild</a>() ) - ( ( <a href="tqchecklistitem.html">TQCheckListItem</a>* )item-><a href="qlistviewitem.html#firstChild">firstChild</a>() )->setOn( TRUE ); +<a name="x430"></a> if ( item-><a href="tqlistviewitem.html#firstChild">firstChild</a>() ) + ( ( <a href="tqchecklistitem.html">TQCheckListItem</a>* )item-><a href="tqlistviewitem.html#firstChild">firstChild</a>() )->setOn( TRUE ); } /* @@ -226,18 +226,18 @@ void <a name="f249"></a>CheckLists::copy1to2() void <a name="f250"></a>CheckLists::copy2to3() { // create an iterator which operates on the second ListView - <a href="qlistviewitemiterator.html">TQListViewItemIterator</a> it( lv2 ); + <a href="tqlistviewitemiterator.html">TQListViewItemIterator</a> it( lv2 ); label-><a href="tqlabel.html#setText">setText</a>( "No Item checked" ); // iterate through the second ListView... - for ( ; it.<a href="qlistviewitemiterator.html#current">current</a>(); ++it ) + for ( ; it.<a href="tqlistviewitemiterator.html#current">current</a>(); ++it ) // ...check state of childs, and... - if ( it.<a href="qlistviewitemiterator.html#current">current</a>()->parent() ) + if ( it.<a href="tqlistviewitemiterator.html#current">current</a>()->parent() ) // ...if the item is checked... - if ( ( (TQCheckListItem*)it.<a href="qlistviewitemiterator.html#current">current</a>() )->isOn() ) + if ( ( (TQCheckListItem*)it.<a href="tqlistviewitemiterator.html#current">current</a>() )->isOn() ) // ...set the text of the item to the label - label-><a href="tqlabel.html#setText">setText</a>( it.<a href="qlistviewitemiterator.html#current">current</a>()->text( 0 ) ); + label-><a href="tqlabel.html#setText">setText</a>( it.<a href="tqlistviewitemiterator.html#current">current</a>()->text( 0 ) ); } </pre> |