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/sql-overview-subclass3-main-cpp.html | 36 +++++++++++++-------------- 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'doc/html/sql-overview-subclass3-main-cpp.html') diff --git a/doc/html/sql-overview-subclass3-main-cpp.html b/doc/html/sql-overview-subclass3-main-cpp.html index d94410b5f..b53d3a68a 100644 --- a/doc/html/sql-overview-subclass3-main-cpp.html +++ b/doc/html/sql-overview-subclass3-main-cpp.html @@ -43,24 +43,24 @@ body { background: #ffffff; color: black; } *****************************************************************************/ #include "main.h" -#include <qdatatable.h> +#include <ntqdatatable.h> InvoiceItemCursor::InvoiceItemCursor() : - TQSqlCursor( "invoiceitem" ) + TQSqlCursor( "invoiceitem" ) { TQSqlFieldInfo productName( "productname", TQVariant::String ); - append( productName ); - setCalculated( productName.name(), TRUE ); + append( productName ); + setCalculated( productName.name(), TRUE ); } -TQVariant InvoiceItemCursor::calculateField( const TQString & name ) +TQVariant InvoiceItemCursor::calculateField( const TQString & name ) { if ( name == "productname" ) { - TQSqlQuery query( "SELECT name FROM prices WHERE id=" + - field( "pricesid" )->value().toString() ); - if ( query.next() ) - return query.value( 0 ); + TQSqlQuery query( "SELECT name FROM prices WHERE id=" + + field( "pricesid" )->value().toString() ); + if ( query.next() ) + return query.value( 0 ); } return TQVariant( TQString::null ); @@ -69,23 +69,23 @@ TQVariant InvoiceItemCursor::calculateF int main( int argc, char *argv[] ) { - TQApplication app( argc, argv ); + TQApplication app( argc, argv ); if ( createConnections() ) { InvoiceItemCursor invoiceItemCursor; - TQDataTable *invoiceItemTable = new TQDataTable( &invoiceItemCursor ); + TQDataTable *invoiceItemTable = new TQDataTable( &invoiceItemCursor ); - app.setMainWidget( invoiceItemTable ); + app.setMainWidget( invoiceItemTable ); - invoiceItemTable->addColumn( "productname", "Product" ); - invoiceItemTable->addColumn( "quantity", "Quantity" ); - invoiceItemTable->addColumn( "paiddate", "Paid" ); + invoiceItemTable->addColumn( "productname", "Product" ); + invoiceItemTable->addColumn( "quantity", "Quantity" ); + invoiceItemTable->addColumn( "paiddate", "Paid" ); - invoiceItemTable->refresh(); - invoiceItemTable->show(); + invoiceItemTable->refresh(); + invoiceItemTable->show(); - return app.exec(); + return app.exec(); } return 1; -- cgit v1.2.1