diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-01-26 23:32:43 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-01-26 23:32:43 -0600 |
commit | ea318d1431c89e647598c510c4245c6571aa5f46 (patch) | |
tree | 996d29b80c30d453dda86d1a23162d441628f169 /doc/html/sql-overview-subclass5-main-cpp.html | |
parent | aaf89d4b48f69c9293feb187db26362e550b5561 (diff) | |
download | tqt3-ea318d1431c89e647598c510c4245c6571aa5f46.tar.gz tqt3-ea318d1431c89e647598c510c4245c6571aa5f46.zip |
Update to latest tqt3 automated conversion
Diffstat (limited to 'doc/html/sql-overview-subclass5-main-cpp.html')
-rw-r--r-- | doc/html/sql-overview-subclass5-main-cpp.html | 80 |
1 files changed, 40 insertions, 40 deletions
diff --git a/doc/html/sql-overview-subclass5-main-cpp.html b/doc/html/sql-overview-subclass5-main-cpp.html index 275212bf7..2740f677a 100644 --- a/doc/html/sql-overview-subclass5-main-cpp.html +++ b/doc/html/sql-overview-subclass5-main-cpp.html @@ -43,60 +43,60 @@ body { background: #ffffff; color: black; } *****************************************************************************/ #include "main.h" -#include <<a href="qdatatable-h.html">qdatatable.h</a>> +#include <<a href="qdatatable-h.html">ntqdatatable.h</a>> <a name="f25"></a>InvoiceItemCursor::InvoiceItemCursor() : - <a href="qsqlcursor.html">TQSqlCursor</a>( "invoiceitem" ) + <a href="ntqsqlcursor.html">TQSqlCursor</a>( "invoiceitem" ) { <a href="qsqlfieldinfo.html">TQSqlFieldInfo</a> productName( "productname", TQVariant::String ); - <a href="qsqlcursor.html#append">append</a>( productName ); - <a href="qsqlcursor.html#setCalculated">setCalculated</a>( productName.<a href="qsqlfieldinfo.html#name">name</a>(), TRUE ); + <a href="ntqsqlcursor.html#append">append</a>( productName ); + <a href="ntqsqlcursor.html#setCalculated">setCalculated</a>( productName.<a href="qsqlfieldinfo.html#name">name</a>(), TRUE ); <a href="qsqlfieldinfo.html">TQSqlFieldInfo</a> productPrice( "price", TQVariant::Double ); - <a href="qsqlcursor.html#append">append</a>( productPrice ); - <a href="qsqlcursor.html#setCalculated">setCalculated</a>( productPrice.<a href="qsqlfieldinfo.html#name">name</a>(), TRUE ); + <a href="ntqsqlcursor.html#append">append</a>( productPrice ); + <a href="ntqsqlcursor.html#setCalculated">setCalculated</a>( productPrice.<a href="qsqlfieldinfo.html#name">name</a>(), TRUE ); <a href="qsqlfieldinfo.html">TQSqlFieldInfo</a> productCost( "cost", TQVariant::Double ); - <a href="qsqlcursor.html#append">append</a>( productCost ); - <a href="qsqlcursor.html#setCalculated">setCalculated</a>( productCost.<a href="qsqlfieldinfo.html#name">name</a>(), TRUE ); + <a href="ntqsqlcursor.html#append">append</a>( productCost ); + <a href="ntqsqlcursor.html#setCalculated">setCalculated</a>( productCost.<a href="qsqlfieldinfo.html#name">name</a>(), TRUE ); } -TQVariant InvoiceItemCursor::<a href="qsqlcursor.html#calculateField">calculateField</a>( const <a href="qstring.html">TQString</a> & name ) +TQVariant InvoiceItemCursor::<a href="ntqsqlcursor.html#calculateField">calculateField</a>( const <a href="ntqstring.html">TQString</a> & name ) { if ( name == "productname" ) { - <a href="qsqlquery.html">TQSqlQuery</a> query( "SELECT name FROM prices WHERE id=" + - <a href="qsqlrecord.html#field">field</a>( "pricesid" )->value().toString() ); - if ( query.<a href="qsqlquery.html#next">next</a>() ) - return query.<a href="qsqlquery.html#value">value</a>( 0 ); + <a href="ntqsqlquery.html">TQSqlQuery</a> query( "SELECT name FROM prices WHERE id=" + + <a href="ntqsqlrecord.html#field">field</a>( "pricesid" )->value().toString() ); + if ( query.<a href="ntqsqlquery.html#next">next</a>() ) + return query.<a href="ntqsqlquery.html#value">value</a>( 0 ); } else if ( name == "price" ) { - <a href="qsqlquery.html">TQSqlQuery</a> query( "SELECT price FROM prices WHERE id=" + - <a href="qsqlrecord.html#field">field</a>( "pricesid" )->value().toString() ); - if ( query.<a href="qsqlquery.html#next">next</a>() ) - return query.<a href="qsqlquery.html#value">value</a>( 0 ); + <a href="ntqsqlquery.html">TQSqlQuery</a> query( "SELECT price FROM prices WHERE id=" + + <a href="ntqsqlrecord.html#field">field</a>( "pricesid" )->value().toString() ); + if ( query.<a href="ntqsqlquery.html#next">next</a>() ) + return query.<a href="ntqsqlquery.html#value">value</a>( 0 ); } else if ( name == "cost" ) { - <a href="qsqlquery.html">TQSqlQuery</a> query( "SELECT price FROM prices WHERE id=" + - <a href="qsqlrecord.html#field">field</a>( "pricesid" )->value().toString() ); - if ( query.<a href="qsqlquery.html#next">next</a>() ) - return TQVariant( query.<a href="qsqlquery.html#value">value</a>( 0 ).toDouble() * - <a href="qsqlquery.html#value">value</a>( "quantity").toDouble() ); + <a href="ntqsqlquery.html">TQSqlQuery</a> query( "SELECT price FROM prices WHERE id=" + + <a href="ntqsqlrecord.html#field">field</a>( "pricesid" )->value().toString() ); + if ( query.<a href="ntqsqlquery.html#next">next</a>() ) + return TQVariant( query.<a href="ntqsqlquery.html#value">value</a>( 0 ).toDouble() * + <a href="ntqsqlquery.html#value">value</a>( "quantity").toDouble() ); } return TQVariant( TQString::null ); } -TQSqlRecord *InvoiceItemCursor::<a href="qsqlcursor.html#primeInsert">primeInsert</a>() +TQSqlRecord *InvoiceItemCursor::<a href="ntqsqlcursor.html#primeInsert">primeInsert</a>() { - <a href="qsqlrecord.html">TQSqlRecord</a> *buffer = <a href="qsqlcursor.html#editBuffer">editBuffer</a>(); - <a href="qsqlquery.html">TQSqlQuery</a> query( "SELECT NEXTVAL( 'invoiceitem_seq' )" ); - if ( query.<a href="qsqlquery.html#next">next</a>() ) - buffer-><a href="qsqlrecord.html#setValue">setValue</a>( "id", query.<a href="qsqlquery.html#value">value</a>( 0 ) ); - buffer-><a href="qsqlrecord.html#setValue">setValue</a>( "paiddate", TQDate::currentDate() ); - buffer-><a href="qsqlrecord.html#setValue">setValue</a>( "quantity", 1 ); + <a href="ntqsqlrecord.html">TQSqlRecord</a> *buffer = <a href="ntqsqlcursor.html#editBuffer">editBuffer</a>(); + <a href="ntqsqlquery.html">TQSqlQuery</a> query( "SELECT NEXTVAL( 'invoiceitem_seq' )" ); + if ( query.<a href="ntqsqlquery.html#next">next</a>() ) + buffer-><a href="ntqsqlrecord.html#setValue">setValue</a>( "id", query.<a href="ntqsqlquery.html#value">value</a>( 0 ) ); + buffer-><a href="ntqsqlrecord.html#setValue">setValue</a>( "paiddate", TQDate::currentDate() ); + buffer-><a href="ntqsqlrecord.html#setValue">setValue</a>( "quantity", 1 ); return buffer; } @@ -104,25 +104,25 @@ TQSqlRecord *InvoiceItemCursor::<a href="qsqlcursor.html#primeInsert">primeInser int main( int argc, char *argv[] ) { - <a href="qapplication.html">TQApplication</a> app( argc, argv ); + <a href="ntqapplication.html">TQApplication</a> app( argc, argv ); if ( createConnections() ) { InvoiceItemCursor invoiceItemCursor; - <a href="qdatatable.html">TQDataTable</a> *invoiceItemTable = new <a href="qdatatable.html">TQDataTable</a>( &invoiceItemCursor ); + <a href="ntqdatatable.html">TQDataTable</a> *invoiceItemTable = new <a href="ntqdatatable.html">TQDataTable</a>( &invoiceItemCursor ); - app.<a href="qapplication.html#setMainWidget">setMainWidget</a>( invoiceItemTable ); + app.<a href="ntqapplication.html#setMainWidget">setMainWidget</a>( invoiceItemTable ); - invoiceItemTable-><a href="qdatatable.html#addColumn">addColumn</a>( "productname", "Product" ); - invoiceItemTable-><a href="qdatatable.html#addColumn">addColumn</a>( "price", "Price" ); - invoiceItemTable-><a href="qdatatable.html#addColumn">addColumn</a>( "quantity", "Quantity" ); - invoiceItemTable-><a href="qdatatable.html#addColumn">addColumn</a>( "cost", "Cost" ); - invoiceItemTable-><a href="qdatatable.html#addColumn">addColumn</a>( "paiddate", "Paid" ); + invoiceItemTable-><a href="ntqdatatable.html#addColumn">addColumn</a>( "productname", "Product" ); + invoiceItemTable-><a href="ntqdatatable.html#addColumn">addColumn</a>( "price", "Price" ); + invoiceItemTable-><a href="ntqdatatable.html#addColumn">addColumn</a>( "quantity", "Quantity" ); + invoiceItemTable-><a href="ntqdatatable.html#addColumn">addColumn</a>( "cost", "Cost" ); + invoiceItemTable-><a href="ntqdatatable.html#addColumn">addColumn</a>( "paiddate", "Paid" ); - invoiceItemTable-><a href="qdatatable.html#refresh">refresh</a>(); - invoiceItemTable-><a href="qwidget.html#show">show</a>(); + invoiceItemTable-><a href="ntqdatatable.html#refresh">refresh</a>(); + invoiceItemTable-><a href="ntqwidget.html#show">show</a>(); - return app.<a href="qapplication.html#exec">exec</a>(); + return app.<a href="ntqapplication.html#exec">exec</a>(); } return 1; |