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/bigtable-example.html | 46 +++++++++++++++++++++--------------------- 1 file changed, 23 insertions(+), 23 deletions(-) (limited to 'doc/html/bigtable-example.html') diff --git a/doc/html/bigtable-example.html b/doc/html/bigtable-example.html index c94a1f69a..9d65bd569 100644 --- a/doc/html/bigtable-example.html +++ b/doc/html/bigtable-example.html @@ -33,7 +33,7 @@ body { background: #ffffff; color: black; }

-

This example shows a sparse table implementation using a TQIntDict to +

This example shows a sparse table implementation using a TQIntDict to keep track of the cells that are actually in use.


Implementation: @@ -47,46 +47,46 @@ keep track of the cells that are actually in use. ** *****************************************************************************/ -#include <qapplication.h> -#include <qtable.h> +#include <ntqapplication.h> +#include <ntqtable.h> // Table size const int numRows = 1000000; const int numCols = 1000000; -class MyTable : public TQTable +class MyTable : public TQTable { public: - MyTable( int r, int c ) : TQTable( r, c ) { - items.setAutoDelete( TRUE ); - widgets.setAutoDelete( TRUE ); + MyTable( int r, int c ) : TQTable( r, c ) { + items.setAutoDelete( TRUE ); + widgets.setAutoDelete( TRUE ); setCaption( tr( "A 1 Million x 1 Million Cell Table" ) ); setLeftMargin( fontMetrics().width( "W999999W" ) ); } void resizeData( int ) {} - TQTableItem *item( int r, int c ) const { return items.find( indexOf( r, c ) ); } - void setItem( int r, int c, TQTableItem *i ) { items.replace( indexOf( r, c ), i ); } - void clearCell( int r, int c ) { items.remove( indexOf( r, c ) ); } + TQTableItem *item( int r, int c ) const { return items.find( indexOf( r, c ) ); } + void setItem( int r, int c, TQTableItem *i ) { items.replace( indexOf( r, c ), i ); } + void clearCell( int r, int c ) { items.remove( indexOf( r, c ) ); } void takeItem( TQTableItem *item ) { - items.setAutoDelete( FALSE ); - items.remove( indexOf( item->row(), item->col() ) ); - items.setAutoDelete( TRUE ); + items.setAutoDelete( FALSE ); + items.remove( indexOf( item->row(), item->col() ) ); + items.setAutoDelete( TRUE ); } - void insertWidget( int r, int c, TQWidget *w ) { widgets.replace( indexOf( r, c ), w ); } - TQWidget *cellWidget( int r, int c ) const { return widgets.find( indexOf( r, c ) ); } + void insertWidget( int r, int c, TQWidget *w ) { widgets.replace( indexOf( r, c ), w ); } + TQWidget *cellWidget( int r, int c ) const { return widgets.find( indexOf( r, c ) ); } void clearCellWidget( int r, int c ) { - TQWidget *w = widgets.take( indexOf( r, c ) ); + TQWidget *w = widgets.take( indexOf( r, c ) ); if ( w ) - w->deleteLater(); + w->deleteLater(); } private: - TQIntDict<TQTableItem> items; - TQIntDict<TQWidget> widgets; + TQIntDict<TQTableItem> items; + TQIntDict<TQWidget> widgets; }; @@ -94,12 +94,12 @@ private: int main( int argc, char **argv ) { - TQApplication app( argc, argv ); + TQApplication app( argc, argv ); MyTable table( numRows, numCols ); - app.setMainWidget( &table ); - table.show(); - return app.exec(); + app.setMainWidget( &table ); + table.show(); + return app.exec(); } -- cgit v1.2.3