diff options
Diffstat (limited to 'doc/html/checklists-example.html')
-rw-r--r-- | doc/html/checklists-example.html | 102 |
1 files changed, 51 insertions, 51 deletions
diff --git a/doc/html/checklists-example.html b/doc/html/checklists-example.html index 4260f4f31..510e3c796 100644 --- a/doc/html/checklists-example.html +++ b/doc/html/checklists-example.html @@ -50,21 +50,21 @@ checkable items. #ifndef CHECKLISTS_H #define CHECKLISTS_H -#include <<a href="qwidget-h.html">qwidget.h</a>> +#include <<a href="qwidget-h.html">ntqwidget.h</a>> class TQListView; class TQLabel; -class CheckLists : public <a href="qwidget.html">TQWidget</a> +class CheckLists : public <a href="ntqwidget.html">TQWidget</a> { <a href="metaobjects.html#Q_OBJECT">Q_OBJECT</a> public: - CheckLists( <a href="qwidget.html">TQWidget</a> *parent = 0, const char *name = 0 ); + CheckLists( <a href="ntqwidget.html">TQWidget</a> *parent = 0, const char *name = 0 ); protected: - <a href="qlistview.html">TQListView</a> *lv1, *lv2; - <a href="qlabel.html">TQLabel</a> *label; + <a href="ntqlistview.html">TQListView</a> *lv1, *lv2; + <a href="ntqlabel.html">TQLabel</a> *label; protected slots: void copy1to2(); @@ -89,13 +89,13 @@ protected slots: #include "checklists.h" -#include <<a href="qlistview-h.html">qlistview.h</a>> -#include <<a href="qvbox-h.html">qvbox.h</a>> -#include <<a href="qlabel-h.html">qlabel.h</a>> -#include <<a href="qvaluelist-h.html">qvaluelist.h</a>> -#include <<a href="qstring-h.html">qstring.h</a>> -#include <<a href="qpushbutton-h.html">qpushbutton.h</a>> -#include <<a href="qlayout-h.html">qlayout.h</a>> +#include <<a href="qlistview-h.html">ntqlistview.h</a>> +#include <<a href="qvbox-h.html">ntqvbox.h</a>> +#include <<a href="qlabel-h.html">ntqlabel.h</a>> +#include <<a href="qvaluelist-h.html">ntqvaluelist.h</a>> +#include <<a href="qstring-h.html">ntqstring.h</a>> +#include <<a href="qpushbutton-h.html">ntqpushbutton.h</a>> +#include <<a href="qlayout-h.html">ntqlayout.h</a>> /* * Constructor @@ -103,37 +103,37 @@ protected slots: * Create all child widgets of the CheckList Widget */ -<a name="f248"></a>CheckLists::CheckLists( <a href="qwidget.html">TQWidget</a> *parent, const char *name ) - : <a href="qwidget.html">TQWidget</a>( parent, name ) +<a name="f248"></a>CheckLists::CheckLists( <a href="ntqwidget.html">TQWidget</a> *parent, const char *name ) + : <a href="ntqwidget.html">TQWidget</a>( parent, name ) { <a href="qhboxlayout.html">TQHBoxLayout</a> *lay = new <a href="qhboxlayout.html">TQHBoxLayout</a>( this ); -<a name="x426"></a> lay-><a href="qlayout.html#setMargin">setMargin</a>( 5 ); +<a name="x426"></a> lay-><a href="ntqlayout.html#setMargin">setMargin</a>( 5 ); // create a widget which layouts its childs in a column <a href="qvboxlayout.html">TQVBoxLayout</a> *vbox1 = new <a href="qvboxlayout.html">TQVBoxLayout</a>( lay ); - vbox1-><a href="qlayout.html#setMargin">setMargin</a>( 5 ); + vbox1-><a href="ntqlayout.html#setMargin">setMargin</a>( 5 ); // First child: a Label -<a name="x423"></a> vbox1-><a href="qboxlayout.html#addWidget">addWidget</a>( new <a href="qlabel.html">TQLabel</a>( "Check some items!", this ) ); +<a name="x423"></a> vbox1-><a href="qboxlayout.html#addWidget">addWidget</a>( new <a href="ntqlabel.html">TQLabel</a>( "Check some items!", this ) ); // Second child: the ListView - lv1 = new <a href="qlistview.html">TQListView</a>( this ); + lv1 = new <a href="ntqlistview.html">TQListView</a>( this ); vbox1-><a href="qboxlayout.html#addWidget">addWidget</a>( lv1 ); -<a name="x427"></a> lv1-><a href="qlistview.html#addColumn">addColumn</a>( "Items" ); -<a name="x429"></a> lv1-><a href="qlistview.html#setRootIsDecorated">setRootIsDecorated</a>( TRUE ); +<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 ); // create a list with 4 ListViewItems which will be parent items of other ListViewItems - <a href="qvaluelist.html">TQValueList</a><TQListViewItem *> parentList; + <a href="ntqvaluelist.html">TQValueList</a><TQListViewItem *> parentList; -<a name="x434"></a> parentList.<a href="qvaluelist.html#append">append</a>( new <a href="qchecklistitem.html">TQCheckListItem</a>( lv1, "Parent Item 1", TQCheckListItem::CheckBoxController ) ); - parentList.<a href="qvaluelist.html#append">append</a>( new <a href="qchecklistitem.html">TQCheckListItem</a>( lv1, "Parent Item 2", TQCheckListItem::CheckBoxController ) ); - parentList.<a href="qvaluelist.html#append">append</a>( new <a href="qchecklistitem.html">TQCheckListItem</a>( lv1, "Parent Item 3", TQCheckListItem::CheckBoxController ) ); - parentList.<a href="qvaluelist.html#append">append</a>( new <a href="qchecklistitem.html">TQCheckListItem</a>( lv1, "Parent Item 4", TQCheckListItem::CheckBoxController ) ); +<a name="x434"></a> parentList.<a href="ntqvaluelist.html#append">append</a>( new <a href="qchecklistitem.html">TQCheckListItem</a>( lv1, "Parent Item 1", TQCheckListItem::CheckBoxController ) ); + parentList.<a href="ntqvaluelist.html#append">append</a>( new <a href="qchecklistitem.html">TQCheckListItem</a>( lv1, "Parent Item 2", TQCheckListItem::CheckBoxController ) ); + parentList.<a href="ntqvaluelist.html#append">append</a>( new <a href="qchecklistitem.html">TQCheckListItem</a>( lv1, "Parent Item 3", TQCheckListItem::CheckBoxController ) ); + parentList.<a href="ntqvaluelist.html#append">append</a>( new <a href="qchecklistitem.html">TQCheckListItem</a>( lv1, "Parent Item 4", TQCheckListItem::CheckBoxController ) ); <a href="qlistviewitem.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="qvaluelist.html#begin">begin</a>(); it != parentList.<a href="qvaluelist.html#end">end</a>(); +<a name="x436"></a><a name="x435"></a> for ( TQValueList<TQListViewItem*>::Iterator it = parentList.<a href="ntqvaluelist.html#begin">begin</a>(); it != parentList.<a href="ntqvaluelist.html#end">end</a>(); ( *it )->setOpen( TRUE ), ++it, num++ ) { item = *it; // ...and create 5 checkable child ListViewItems for each parent item @@ -143,44 +143,44 @@ protected slots: // Create another widget for layouting <a href="qvboxlayout.html">TQVBoxLayout</a> *tmp = new <a href="qvboxlayout.html">TQVBoxLayout</a>( lay ); - tmp-><a href="qlayout.html#setMargin">setMargin</a>( 5 ); + tmp-><a href="ntqlayout.html#setMargin">setMargin</a>( 5 ); // create a pushbutton - <a href="qpushbutton.html">TQPushButton</a> *copy1 = new <a href="qpushbutton.html">TQPushButton</a>( " -> ", this ); + <a href="ntqpushbutton.html">TQPushButton</a> *copy1 = new <a href="ntqpushbutton.html">TQPushButton</a>( " -> ", this ); tmp-><a href="qboxlayout.html#addWidget">addWidget</a>( copy1 ); -<a name="x437"></a><a name="x433"></a> copy1-><a href="qwidget.html#setMaximumWidth">setMaximumWidth</a>( copy1-><a href="qwidget.html#sizeHint">sizeHint</a>().width() ); +<a name="x437"></a><a name="x433"></a> copy1-><a href="ntqwidget.html#setMaximumWidth">setMaximumWidth</a>( copy1-><a href="ntqwidget.html#sizeHint">sizeHint</a>().width() ); // connect the SIGNAL clicked() of the pushbutton with the SLOT copy1to2() - <a href="qobject.html#connect">connect</a>( copy1, SIGNAL( <a href="qbutton.html#clicked">clicked</a>() ), this, SLOT( copy1to2() ) ); + <a href="ntqobject.html#connect">connect</a>( copy1, SIGNAL( <a href="ntqbutton.html#clicked">clicked</a>() ), this, SLOT( copy1to2() ) ); // another widget for layouting <a href="qvboxlayout.html">TQVBoxLayout</a> *vbox2 = new <a href="qvboxlayout.html">TQVBoxLayout</a>( lay ); - vbox2-><a href="qlayout.html#setMargin">setMargin</a>( 5 ); + vbox2-><a href="ntqlayout.html#setMargin">setMargin</a>( 5 ); // and another label - vbox2-><a href="qboxlayout.html#addWidget">addWidget</a>( new <a href="qlabel.html">TQLabel</a>( "Check one item!", this ) ); + vbox2-><a href="qboxlayout.html#addWidget">addWidget</a>( new <a href="ntqlabel.html">TQLabel</a>( "Check one item!", this ) ); // create the second listview - lv2 = new <a href="qlistview.html">TQListView</a>( this ); + lv2 = new <a href="ntqlistview.html">TQListView</a>( this ); vbox2-><a href="qboxlayout.html#addWidget">addWidget</a>( lv2 ); - lv2-><a href="qlistview.html#addColumn">addColumn</a>( "Items" ); - lv2-><a href="qlistview.html#setRootIsDecorated">setRootIsDecorated</a>( TRUE ); + lv2-><a href="ntqlistview.html#addColumn">addColumn</a>( "Items" ); + lv2-><a href="ntqlistview.html#setRootIsDecorated">setRootIsDecorated</a>( TRUE ); // another widget needed for layouting only tmp = new <a href="qvboxlayout.html">TQVBoxLayout</a>( lay ); - tmp-><a href="qlayout.html#setMargin">setMargin</a>( 5 ); + tmp-><a href="ntqlayout.html#setMargin">setMargin</a>( 5 ); // create another pushbutton... - <a href="qpushbutton.html">TQPushButton</a> *copy2 = new <a href="qpushbutton.html">TQPushButton</a>( " -> ", this ); + <a href="ntqpushbutton.html">TQPushButton</a> *copy2 = new <a href="ntqpushbutton.html">TQPushButton</a>( " -> ", this ); lay-><a href="qboxlayout.html#addWidget">addWidget</a>( copy2 ); - copy2-><a href="qwidget.html#setMaximumWidth">setMaximumWidth</a>( copy2-><a href="qwidget.html#sizeHint">sizeHint</a>().width() ); + copy2-><a href="ntqwidget.html#setMaximumWidth">setMaximumWidth</a>( copy2-><a href="ntqwidget.html#sizeHint">sizeHint</a>().width() ); // ...and connect its clicked() SIGNAL to the copy2to3() SLOT - <a href="qobject.html#connect">connect</a>( copy2, SIGNAL( <a href="qbutton.html#clicked">clicked</a>() ), this, SLOT( copy2to3() ) ); + <a href="ntqobject.html#connect">connect</a>( copy2, SIGNAL( <a href="ntqbutton.html#clicked">clicked</a>() ), this, SLOT( copy2to3() ) ); tmp = new <a href="qvboxlayout.html">TQVBoxLayout</a>( lay ); - tmp-><a href="qlayout.html#setMargin">setMargin</a>( 5 ); + tmp-><a href="ntqlayout.html#setMargin">setMargin</a>( 5 ); // and create a label which will be at the right of the window - label = new <a href="qlabel.html">TQLabel</a>( "No Item yet...", this ); + label = new <a href="ntqlabel.html">TQLabel</a>( "No Item yet...", this ); tmp-><a href="qboxlayout.html#addWidget">addWidget</a>( label ); } @@ -196,7 +196,7 @@ 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 name="x428"></a> lv2-><a href="qlistview.html#clear">clear</a>(); +<a name="x428"></a> lv2-><a href="ntqlistview.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! @@ -228,7 +228,7 @@ void <a name="f250"></a>CheckLists::copy2to3() // create an iterator which operates on the second ListView <a href="qlistviewitemiterator.html">TQListViewItemIterator</a> it( lv2 ); - label-><a href="qlabel.html#setText">setText</a>( "No Item checked" ); + label-><a href="ntqlabel.html#setText">setText</a>( "No Item checked" ); // iterate through the second ListView... for ( ; it.<a href="qlistviewitemiterator.html#current">current</a>(); ++it ) @@ -237,7 +237,7 @@ void <a name="f250"></a>CheckLists::copy2to3() // ...if the item is checked... if ( ( (TQCheckListItem*)it.<a href="qlistviewitemiterator.html#current">current</a>() )->isOn() ) // ...set the text of the item to the label - label-><a href="qlabel.html#setText">setText</a>( it.<a href="qlistviewitemiterator.html#current">current</a>()->text( 0 ) ); + label-><a href="ntqlabel.html#setText">setText</a>( it.<a href="qlistviewitemiterator.html#current">current</a>()->text( 0 ) ); } </pre> @@ -255,19 +255,19 @@ void <a name="f250"></a>CheckLists::copy2to3() *****************************************************************************/ #include "checklists.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 ); CheckLists checklists; - checklists.<a href="qwidget.html#resize">resize</a>( 650, 350 ); - checklists.<a href="qwidget.html#setCaption">setCaption</a>( "TQt Example - CheckLists" ); - a.<a href="qapplication.html#setMainWidget">setMainWidget</a>( &checklists ); - checklists.<a href="qwidget.html#show">show</a>(); + checklists.<a href="ntqwidget.html#resize">resize</a>( 650, 350 ); + checklists.<a href="ntqwidget.html#setCaption">setCaption</a>( "TQt Example - CheckLists" ); + a.<a href="ntqapplication.html#setMainWidget">setMainWidget</a>( &checklists ); + checklists.<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> |