From ea318d1431c89e647598c510c4245c6571aa5f46 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Thu, 26 Jan 2012 23:32:43 -0600 Subject: Update to latest tqt3 automated conversion --- doc/html/checklists-example.html | 102 +++++++++++++++++++-------------------- 1 file changed, 51 insertions(+), 51 deletions(-) (limited to 'doc/html/checklists-example.html') 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 <qwidget.h> +#include <ntqwidget.h> class TQListView; class TQLabel; -class CheckLists : public TQWidget +class CheckLists : public TQWidget { Q_OBJECT public: - CheckLists( TQWidget *parent = 0, const char *name = 0 ); + CheckLists( TQWidget *parent = 0, const char *name = 0 ); protected: - TQListView *lv1, *lv2; - TQLabel *label; + TQListView *lv1, *lv2; + TQLabel *label; protected slots: void copy1to2(); @@ -89,13 +89,13 @@ protected slots: #include "checklists.h" -#include <qlistview.h> -#include <qvbox.h> -#include <qlabel.h> -#include <qvaluelist.h> -#include <qstring.h> -#include <qpushbutton.h> -#include <qlayout.h> +#include <ntqlistview.h> +#include <ntqvbox.h> +#include <ntqlabel.h> +#include <ntqvaluelist.h> +#include <ntqstring.h> +#include <ntqpushbutton.h> +#include <ntqlayout.h> /* * Constructor @@ -103,37 +103,37 @@ protected slots: * Create all child widgets of the CheckList Widget */ -CheckLists::CheckLists( TQWidget *parent, const char *name ) - : TQWidget( parent, name ) +CheckLists::CheckLists( TQWidget *parent, const char *name ) + : TQWidget( parent, name ) { TQHBoxLayout *lay = new TQHBoxLayout( this ); - lay->setMargin( 5 ); + lay->setMargin( 5 ); // create a widget which layouts its childs in a column TQVBoxLayout *vbox1 = new TQVBoxLayout( lay ); - vbox1->setMargin( 5 ); + vbox1->setMargin( 5 ); // First child: a Label - vbox1->addWidget( new TQLabel( "Check some items!", this ) ); + vbox1->addWidget( new TQLabel( "Check some items!", this ) ); // Second child: the ListView - lv1 = new TQListView( this ); + lv1 = new TQListView( this ); vbox1->addWidget( lv1 ); - lv1->addColumn( "Items" ); - lv1->setRootIsDecorated( TRUE ); + lv1->addColumn( "Items" ); + lv1->setRootIsDecorated( TRUE ); // create a list with 4 ListViewItems which will be parent items of other ListViewItems - TQValueList<TQListViewItem *> parentList; + TQValueList<TQListViewItem *> parentList; - parentList.append( new TQCheckListItem( lv1, "Parent Item 1", TQCheckListItem::CheckBoxController ) ); - parentList.append( new TQCheckListItem( lv1, "Parent Item 2", TQCheckListItem::CheckBoxController ) ); - parentList.append( new TQCheckListItem( lv1, "Parent Item 3", TQCheckListItem::CheckBoxController ) ); - parentList.append( new TQCheckListItem( lv1, "Parent Item 4", TQCheckListItem::CheckBoxController ) ); + parentList.append( new TQCheckListItem( lv1, "Parent Item 1", TQCheckListItem::CheckBoxController ) ); + parentList.append( new TQCheckListItem( lv1, "Parent Item 2", TQCheckListItem::CheckBoxController ) ); + parentList.append( new TQCheckListItem( lv1, "Parent Item 3", TQCheckListItem::CheckBoxController ) ); + parentList.append( new TQCheckListItem( lv1, "Parent Item 4", TQCheckListItem::CheckBoxController ) ); TQListViewItem *item = 0; unsigned int num = 1; // go through the list of parent items... - for ( TQValueList<TQListViewItem*>::Iterator it = parentList.begin(); it != parentList.end(); + for ( TQValueList<TQListViewItem*>::Iterator it = parentList.begin(); it != parentList.end(); ( *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 TQVBoxLayout *tmp = new TQVBoxLayout( lay ); - tmp->setMargin( 5 ); + tmp->setMargin( 5 ); // create a pushbutton - TQPushButton *copy1 = new TQPushButton( " -> ", this ); + TQPushButton *copy1 = new TQPushButton( " -> ", this ); tmp->addWidget( copy1 ); - copy1->setMaximumWidth( copy1->sizeHint().width() ); + copy1->setMaximumWidth( copy1->sizeHint().width() ); // connect the SIGNAL clicked() of the pushbutton with the SLOT copy1to2() - connect( copy1, SIGNAL( clicked() ), this, SLOT( copy1to2() ) ); + connect( copy1, SIGNAL( clicked() ), this, SLOT( copy1to2() ) ); // another widget for layouting TQVBoxLayout *vbox2 = new TQVBoxLayout( lay ); - vbox2->setMargin( 5 ); + vbox2->setMargin( 5 ); // and another label - vbox2->addWidget( new TQLabel( "Check one item!", this ) ); + vbox2->addWidget( new TQLabel( "Check one item!", this ) ); // create the second listview - lv2 = new TQListView( this ); + lv2 = new TQListView( this ); vbox2->addWidget( lv2 ); - lv2->addColumn( "Items" ); - lv2->setRootIsDecorated( TRUE ); + lv2->addColumn( "Items" ); + lv2->setRootIsDecorated( TRUE ); // another widget needed for layouting only tmp = new TQVBoxLayout( lay ); - tmp->setMargin( 5 ); + tmp->setMargin( 5 ); // create another pushbutton... - TQPushButton *copy2 = new TQPushButton( " -> ", this ); + TQPushButton *copy2 = new TQPushButton( " -> ", this ); lay->addWidget( copy2 ); - copy2->setMaximumWidth( copy2->sizeHint().width() ); + copy2->setMaximumWidth( copy2->sizeHint().width() ); // ...and connect its clicked() SIGNAL to the copy2to3() SLOT - connect( copy2, SIGNAL( clicked() ), this, SLOT( copy2to3() ) ); + connect( copy2, SIGNAL( clicked() ), this, SLOT( copy2to3() ) ); tmp = new TQVBoxLayout( lay ); - tmp->setMargin( 5 ); + tmp->setMargin( 5 ); // and create a label which will be at the right of the window - label = new TQLabel( "No Item yet...", this ); + label = new TQLabel( "No Item yet...", this ); tmp->addWidget( label ); } @@ -196,7 +196,7 @@ void CheckLists::copy1to2() // create an iterator which operates on the first ListView TQListViewItemIterator it( lv1 ); - lv2->clear(); + lv2->clear(); // 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 CheckLists::copy2to3() // create an iterator which operates on the second ListView TQListViewItemIterator it( lv2 ); - label->setText( "No Item checked" ); + label->setText( "No Item checked" ); // iterate through the second ListView... for ( ; it.current(); ++it ) @@ -237,7 +237,7 @@ void CheckLists::copy2to3() // ...if the item is checked... if ( ( (TQCheckListItem*)it.current() )->isOn() ) // ...set the text of the item to the label - label->setText( it.current()->text( 0 ) ); + label->setText( it.current()->text( 0 ) ); } @@ -255,19 +255,19 @@ void CheckLists::copy2to3() *****************************************************************************/ #include "checklists.h" -#include <qapplication.h> +#include <ntqapplication.h> int main( int argc, char **argv ) { - TQApplication a( argc, argv ); + TQApplication a( argc, argv ); CheckLists checklists; - checklists.resize( 650, 350 ); - checklists.setCaption( "TQt Example - CheckLists" ); - a.setMainWidget( &checklists ); - checklists.show(); + checklists.resize( 650, 350 ); + checklists.setCaption( "TQt Example - CheckLists" ); + a.setMainWidget( &checklists ); + checklists.show(); - return a.exec(); + return a.exec(); } -- cgit v1.2.1