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/table-statistics-statistics-cpp.html | 68 +++++++++++++-------------- 1 file changed, 34 insertions(+), 34 deletions(-) (limited to 'doc/html/table-statistics-statistics-cpp.html') diff --git a/doc/html/table-statistics-statistics-cpp.html b/doc/html/table-statistics-statistics-cpp.html index 3a50861ad..6702b636b 100644 --- a/doc/html/table-statistics-statistics-cpp.html +++ b/doc/html/table-statistics-statistics-cpp.html @@ -44,10 +44,10 @@ body { background: #ffffff; color: black; } #include "statistics.h" -#include <qdir.h> -#include <qstringlist.h> -#include <qheader.h> -#include <qcombobox.h> +#include <ntqdir.h> +#include <ntqstringlist.h> +#include <ntqheader.h> +#include <ntqcombobox.h> #include <stdlib.h> const char* dirs[] = { @@ -64,30 +64,30 @@ const char* dirs[] = { }; Table::Table() - : TQTable( 10, 100, 0, "table" ) + : TQTable( 10, 100, 0, "table" ) { - setSorting( TRUE ); - horizontalHeader()->setLabel( 0, tr( "File" ) ); - horizontalHeader()->setLabel( 1, tr( "Size (bytes)" ) ); - horizontalHeader()->setLabel( 2, tr( "Use in Sum" ) ); + setSorting( TRUE ); + horizontalHeader()->setLabel( 0, tr( "File" ) ); + horizontalHeader()->setLabel( 1, tr( "Size (bytes)" ) ); + horizontalHeader()->setLabel( 2, tr( "Use in Sum" ) ); initTable(); - adjustColumn( 0 ); + adjustColumn( 0 ); // if the user edited something we might need to recalculate the sum - connect( this, SIGNAL( valueChanged( int, int ) ), + connect( this, SIGNAL( valueChanged( int, int ) ), this, SLOT( recalcSum( int, int ) ) ); } void Table::initTable() { // read all the TQt source and header files into a list - TQStringList all; + TQStringList all; int i = 0; - TQString srcdir( "../../../src/" ); + TQString srcdir( "../../../src/" ); while ( dirs[ i ] ) { - TQDir dir( srcdir + dirs[ i ] ); - TQStringList lst = dir.entryList( "*.cpp; *.h" ); - for ( TQStringList::Iterator it = lst.begin(); it != lst.end(); ++it ) { + TQDir dir( srcdir + dirs[ i ] ); + TQStringList lst = dir.entryList( "*.cpp; *.h" ); + for ( TQStringList::Iterator it = lst.begin(); it != lst.end(); ++it ) { if ( ( *it ).contains( "moc" ) ) continue; all << (TQString( dirs[ i ] ) + "/" + *it); @@ -96,25 +96,25 @@ void Table::initTable() } // set the number of rows we'll need for the table - setNumRows( all.count() + 1 ); + setNumRows( all.count() + 1 ); i = 0; int sum = 0; // insert the data into the table - for ( TQStringList::Iterator it = all.begin(); it != all.end(); ++it ) { - setText( i, 0, *it ); - TQFile f( srcdir + *it ); - setText( i, 1, TQString::number( (ulong)f.size() ) ); + for ( TQStringList::Iterator it = all.begin(); it != all.end(); ++it ) { + setText( i, 0, *it ); + TQFile f( srcdir + *it ); + setText( i, 1, TQString::number( (ulong)f.size() ) ); ComboItem *ci = new ComboItem( this, TQTableItem::WhenCurrent ); - setItem( i++, 2, ci ); - sum += f.size(); + setItem( i++, 2, ci ); + sum += f.size(); } // last row should show the sum TableItem *i1 = new TableItem( this, TQTableItem::Never, tr( "Sum" ) ); - setItem( i, 0, i1 ); + setItem( i, 0, i1 ); TableItem *i2 = new TableItem( this, TQTableItem::Never, TQString::number( sum ) ); - setItem( i, 1, i2 ); + setItem( i, 1, i2 ); } void Table::recalcSum( int, int col ) @@ -138,20 +138,20 @@ void Table::recalcSum( int, int col ) setItem( numRows() - 1, 1, i2 ); } -void Table::sortColumn( int col, bool ascending, bool /*wholeRows*/ ) +void Table::sortColumn( int col, bool ascending, bool /*wholeRows*/ ) { // sum row should not be sorted, so get rid of it for now clearCell( numRows() - 1, 0 ); clearCell( numRows() - 1, 1 ); // do sort - TQTable::sortColumn( col, ascending, TRUE ); + TQTable::sortColumn( col, ascending, TRUE ); // re-insert sum row recalcSum( 0, 1 ); } -void TableItem::paint( TQPainter *p, const TQColorGroup &cg, const TQRect &cr, bool selected ) +void TableItem::paint( TQPainter *p, const TQColorGroup &cg, const TQRect &cr, bool selected ) { TQColorGroup g( cg ); // last row is the sum row - we want to make it more visible by @@ -164,7 +164,7 @@ void Table::recalcSum( int, int col ) -ComboItem::ComboItem( TQTable *t, EditType et ) +ComboItem::ComboItem( TQTable *t, EditType et ) : TQTableItem( t, et, "Yes" ), cb( 0 ) { // we do not want this item to be replaced @@ -174,8 +174,8 @@ void Table::recalcSum( int, int col ) TQWidget *ComboItem::createEditor() const { // create an editor - a combobox in our case - ( (ComboItem*)this )->cb = new TQComboBox( table()->viewport() ); - TQObject::connect( cb, SIGNAL( activated( int ) ), table(), SLOT( doValueChanged() ) ); + ( (ComboItem*)this )->cb = new TQComboBox( table()->viewport() ); + TQObject::connect( cb, SIGNAL( activated( int ) ), table(), SLOT( doValueChanged() ) ); cb->insertItem( "Yes" ); cb->insertItem( "No" ); // and initialize it @@ -183,17 +183,17 @@ void Table::recalcSum( int, int col ) return cb; } -void ComboItem::setContentFromEditor( TQWidget *w ) +void ComboItem::setContentFromEditor( TQWidget *w ) { // the user changed the value of the combobox, so synchronize the // value of the item (its text), with the value of the combobox - if ( w->inherits( "TQComboBox" ) ) + if ( w->inherits( "TQComboBox" ) ) setText( ( (TQComboBox*)w )->currentText() ); else TQTableItem::setContentFromEditor( w ); } -void ComboItem::setText( const TQString &s ) +void ComboItem::setText( const TQString &s ) { if ( cb ) { // initialize the combobox from the text -- cgit v1.2.3