diff options
Diffstat (limited to 'doc/html/bigtable-example.html')
-rw-r--r-- | doc/html/bigtable-example.html | 46 |
1 files changed, 23 insertions, 23 deletions
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; } <p> -<p> This example shows a sparse table implementation using a <a href="qintdict.html">TQIntDict</a> to +<p> This example shows a sparse table implementation using a <a href="ntqintdict.html">TQIntDict</a> to keep track of the cells that are actually in use. <p> <hr> <p> Implementation: @@ -47,46 +47,46 @@ keep track of the cells that are actually in use. ** *****************************************************************************/ -#include <<a href="qapplication-h.html">qapplication.h</a>> -#include <<a href="qtable-h.html">qtable.h</a>> +#include <<a href="qapplication-h.html">ntqapplication.h</a>> +#include <<a href="qtable-h.html">ntqtable.h</a>> // Table size const int numRows = 1000000; const int numCols = 1000000; -class MyTable : public <a href="qtable.html">TQTable</a> +class MyTable : public <a href="ntqtable.html">TQTable</a> { public: - MyTable( int r, int c ) : <a href="qtable.html">TQTable</a>( r, c ) { -<a name="x1291"></a> items.<a href="qptrcollection.html#setAutoDelete">setAutoDelete</a>( TRUE ); - widgets.<a href="qptrcollection.html#setAutoDelete">setAutoDelete</a>( TRUE ); + MyTable( int r, int c ) : <a href="ntqtable.html">TQTable</a>( r, c ) { +<a name="x1291"></a> items.<a href="ntqptrcollection.html#setAutoDelete">setAutoDelete</a>( TRUE ); + widgets.<a href="ntqptrcollection.html#setAutoDelete">setAutoDelete</a>( TRUE ); setCaption( tr( "A 1 Million x 1 Million Cell Table" ) ); setLeftMargin( fontMetrics().width( "W999999W" ) ); } void resizeData( int ) {} -<a name="x1286"></a> <a href="qtableitem.html">TQTableItem</a> *item( int r, int c ) const { return items.<a href="qintdict.html#find">find</a>( indexOf( r, c ) ); } -<a name="x1288"></a> void setItem( int r, int c, TQTableItem *i ) { items.<a href="qintdict.html#replace">replace</a>( indexOf( r, c ), i ); } -<a name="x1287"></a> void clearCell( int r, int c ) { items.<a href="qintdict.html#remove">remove</a>( indexOf( r, c ) ); } +<a name="x1286"></a> <a href="qtableitem.html">TQTableItem</a> *item( int r, int c ) const { return items.<a href="ntqintdict.html#find">find</a>( indexOf( r, c ) ); } +<a name="x1288"></a> void setItem( int r, int c, TQTableItem *i ) { items.<a href="ntqintdict.html#replace">replace</a>( indexOf( r, c ), i ); } +<a name="x1287"></a> void clearCell( int r, int c ) { items.<a href="ntqintdict.html#remove">remove</a>( indexOf( r, c ) ); } void takeItem( <a href="qtableitem.html">TQTableItem</a> *item ) { - items.<a href="qptrcollection.html#setAutoDelete">setAutoDelete</a>( FALSE ); -<a name="x1294"></a><a name="x1293"></a> items.<a href="qintdict.html#remove">remove</a>( indexOf( item-><a href="qtableitem.html#row">row</a>(), item-><a href="qtableitem.html#col">col</a>() ) ); - items.<a href="qptrcollection.html#setAutoDelete">setAutoDelete</a>( TRUE ); + items.<a href="ntqptrcollection.html#setAutoDelete">setAutoDelete</a>( FALSE ); +<a name="x1294"></a><a name="x1293"></a> items.<a href="ntqintdict.html#remove">remove</a>( indexOf( item-><a href="qtableitem.html#row">row</a>(), item-><a href="qtableitem.html#col">col</a>() ) ); + items.<a href="ntqptrcollection.html#setAutoDelete">setAutoDelete</a>( TRUE ); } - void insertWidget( int r, int c, TQWidget *w ) { widgets.<a href="qintdict.html#replace">replace</a>( indexOf( r, c ), w ); } - <a href="qwidget.html">TQWidget</a> *cellWidget( int r, int c ) const { return widgets.<a href="qintdict.html#find">find</a>( indexOf( r, c ) ); } + void insertWidget( int r, int c, TQWidget *w ) { widgets.<a href="ntqintdict.html#replace">replace</a>( indexOf( r, c ), w ); } + <a href="ntqwidget.html">TQWidget</a> *cellWidget( int r, int c ) const { return widgets.<a href="ntqintdict.html#find">find</a>( indexOf( r, c ) ); } void clearCellWidget( int r, int c ) { -<a name="x1289"></a> <a href="qwidget.html">TQWidget</a> *w = widgets.<a href="qintdict.html#take">take</a>( indexOf( r, c ) ); +<a name="x1289"></a> <a href="ntqwidget.html">TQWidget</a> *w = widgets.<a href="ntqintdict.html#take">take</a>( indexOf( r, c ) ); if ( w ) -<a name="x1290"></a> w-><a href="qobject.html#deleteLater">deleteLater</a>(); +<a name="x1290"></a> w-><a href="ntqobject.html#deleteLater">deleteLater</a>(); } private: - <a href="qintdict.html">TQIntDict</a><TQTableItem> items; - <a href="qintdict.html">TQIntDict</a><TQWidget> widgets; + <a href="ntqintdict.html">TQIntDict</a><TQTableItem> items; + <a href="ntqintdict.html">TQIntDict</a><TQWidget> widgets; }; @@ -94,12 +94,12 @@ private: int main( int argc, char **argv ) { - <a href="qapplication.html">TQApplication</a> app( argc, argv ); + <a href="ntqapplication.html">TQApplication</a> app( argc, argv ); MyTable table( numRows, numCols ); - app.<a href="qapplication.html#setMainWidget">setMainWidget</a>( &table ); -<a name="x1292"></a> table.<a href="qwidget.html#show">show</a>(); - return app.<a href="qapplication.html#exec">exec</a>(); + app.<a href="ntqapplication.html#setMainWidget">setMainWidget</a>( &table ); +<a name="x1292"></a> table.<a href="ntqwidget.html#show">show</a>(); + return app.<a href="ntqapplication.html#exec">exec</a>(); } </pre> |