summaryrefslogtreecommitdiffstats
path: root/kugar/lib/mreportengine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kugar/lib/mreportengine.cpp')
-rw-r--r--kugar/lib/mreportengine.cpp230
1 files changed, 115 insertions, 115 deletions
diff --git a/kugar/lib/mreportengine.cpp b/kugar/lib/mreportengine.cpp
index fd4a2ce24..654e1fff9 100644
--- a/kugar/lib/mreportengine.cpp
+++ b/kugar/lib/mreportengine.cpp
@@ -8,8 +8,8 @@
email : cloudtemple@mksat.net
***************************************************************************/
-#include <qfile.h>
-#include <qprinter.h>
+#include <tqfile.h>
+#include <tqprinter.h>
#include "mreportengine.h"
#include "mutil.h"
@@ -22,7 +22,7 @@ namespace Kugar
{
/** Constructor */
-MReportEngine::MReportEngine() : QObject()
+MReportEngine::MReportEngine() : TQObject()
{
// Set page params
m_pageCollection = 0;
@@ -54,13 +54,13 @@ MReportEngine::MReportEngine() : QObject()
rFooter.setPrintFrequency( MReportSection::LastPage );
// Set the default page metrics
- QSize ps = getPageMetrics( pageSize, pageOrientation );
+ TQSize ps = getPageMetrics( pageSize, pageOrientation );
pageWidth = ps.width();
pageHeight = ps.height();
}
/** Copy constructor */
-MReportEngine::MReportEngine( const MReportEngine& mReportEngine ) /*: QObject((QObject &) mReportEngine)*/
+MReportEngine::MReportEngine( const MReportEngine& mReportEngine ) /*: TQObject((TQObject &) mReportEngine)*/
{
copy( &mReportEngine );
}
@@ -75,7 +75,7 @@ MReportEngine MReportEngine::operator=( const MReportEngine& mReportEngine )
copy( &mReportEngine );
// Copy the base class's data
- //((QObject &) *this) = mReportEngine;
+ //((TQObject &) *this) = mReportEngine;
return *this;
}
@@ -113,8 +113,8 @@ void MReportEngine::clearFormatting()
}
-//Set the report data from an existing QDomDocument
-bool MReportEngine::setReportData( const QDomDocument &data )
+//Set the report data from an existing TQDomDocument
+bool MReportEngine::setReportData( const TQDomDocument &data )
{
rd = data.cloneNode( true ).toDocument();
initData();
@@ -126,7 +126,7 @@ bool MReportEngine::setReportData( const QDomDocument &data )
// Set the report's data from an inline string. Return true if it was valid
// data.
-bool MReportEngine::setReportData( const QString &data )
+bool MReportEngine::setReportData( const TQString &data )
{
if ( !rd.setContent( data ) )
@@ -142,7 +142,7 @@ bool MReportEngine::setReportData( const QString &data )
// Set the report's data from an i/o device. Return true if it was valid data.
-bool MReportEngine::setReportData( QIODevice *dev )
+bool MReportEngine::setReportData( TQIODevice *dev )
{
if ( !rd.setContent( dev ) )
{
@@ -162,7 +162,7 @@ void MReportEngine::initData()
m_needRegeneration = true;
// Get the record set (we assume there is only one).
- for ( QDomNode n = rd.firstChild(); !n.isNull(); n = n.nextSibling() )
+ for ( TQDomNode n = rd.firstChild(); !n.isNull(); n = n.nextSibling() )
if ( n.nodeName() == "KugarData" )
{
// Get the records.
@@ -171,9 +171,9 @@ void MReportEngine::initData()
// See if there is a prefered template given.
- QDomNamedNodeMap attr = n.attributes();
- QDomNode tempattr = attr.namedItem( "Template" );
- QString tempname = tempattr.nodeValue();
+ TQDomNamedNodeMap attr = n.attributes();
+ TQDomNode tempattr = attr.namedItem( "Template" );
+ TQString tempname = tempattr.nodeValue();
if ( !tempname.isNull() )
emit preferedTemplate( tempname );
@@ -186,7 +186,7 @@ void MReportEngine::initData()
// Set the report's template from an inline string. Return true if it was a
// valid template.
-bool MReportEngine::setReportTemplate( const QString &tpl )
+bool MReportEngine::setReportTemplate( const TQString &tpl )
{
clearFormatting();
@@ -205,7 +205,7 @@ bool MReportEngine::setReportTemplate( const QString &tpl )
// Set the report's template from an i/o device. Return true if it was a valid
// template.
-bool MReportEngine::setReportTemplate( QIODevice *dev )
+bool MReportEngine::setReportTemplate( TQIODevice *dev )
{
clearFormatting();
@@ -289,18 +289,18 @@ MPageCollection* MReportEngine::renderReport()
// Initialize the basic page data
currHeight = pageHeight - ( topMargin + bottomMargin + pFooter.getHeight() );
currPage = 0;
- currDate = QDate::currentDate();
+ currDate = TQDate::tqcurrentDate();
// Initialise global report variables
unsigned int rowCount = records.length();
for ( j = 0; j < rowCount; j++ )
{
- QDomNode record = records.item( j );
- if ( ( record.nodeType() == QDomNode::ElementNode )
+ TQDomNode record = records.item( j );
+ if ( ( record.nodeType() == TQDomNode::ElementNode )
&& ( record.nodeName() == "Var" ) )
{
// Process the variable ...
- QDomNamedNodeMap fields = record.attributes();
+ TQDomNamedNodeMap fields = record.attributes();
for ( int k = 0; k < fields.count(); ++k )
{
rHeader.setFieldData( fields.item( k ).nodeName(), fields.item( k ).nodeValue() );
@@ -314,7 +314,7 @@ MPageCollection* MReportEngine::renderReport()
// Initialize the grand total array
grandTotal.clear();
for ( int i = 0; i < rFooter.getCalcFieldCount(); i++ )
- grandTotal.append( new QMemArray<double> );
+ grandTotal.append( new TQMemArray<double> );
// Create the first page
startPage( pages );
@@ -328,15 +328,15 @@ MPageCollection* MReportEngine::renderReport()
for ( j = 0; j < rowCount; j++ )
{
- QString detailValue;
- QDomNode record = records.item( j );
+ TQString detailValue;
+ TQDomNode record = records.item( j );
- if ( ( record.nodeType() == QDomNode::ElementNode )
+ if ( ( record.nodeType() == TQDomNode::ElementNode )
&& ( record.nodeName() == "Row" ) )
{
// Update status event
if ( ( chkRow = ( j / 2 ) % 20 ) == 0 )
- emit signalRenderStatus( j / 2 );
+ emit signalRendertqStatus( j / 2 );
// Check for cancel action
if ( cancelRender )
@@ -347,7 +347,7 @@ MPageCollection* MReportEngine::renderReport()
}
// Process the record ...
- QDomNamedNodeMap fields = record.attributes();
+ TQDomNamedNodeMap fields = record.attributes();
// Find the detail object to process with rendering
detailValue = fields.namedItem( "level" ).nodeValue();
@@ -476,12 +476,12 @@ MPageCollection* MReportEngine::renderReport()
p.end();
// Set the page collection attributes
- pages->setPageDimensions( QSize( pageWidth, pageHeight ) );
+ pages->setPageDimensions( TQSize( pageWidth, pageHeight ) );
pages->setPageSize( pageSize );
pages->setPageOrientation( pageOrientation );
// Send final status
- emit signalRenderStatus( rowCount / 2 );
+ emit signalRendertqStatus( rowCount / 2 );
m_needRegeneration = false;
m_pageCollection = pages;
return pages;
@@ -606,20 +606,20 @@ void MReportEngine::drawReportFooter( MPageCollection* pages )
}
/** Gets the metrics for the selected page size & orientation */
-QSize MReportEngine::getPageMetrics( int size, int orientation )
+TQSize MReportEngine::getPageMetrics( int size, int orientation )
{
- QPrinter * printer;
- QSize ps;
+ TQPrinter * printer;
+ TQSize ps;
// Set the page size
- printer = new QPrinter();
+ printer = new TQPrinter();
printer->setFullPage( true );
- printer->setPageSize( ( QPrinter::PageSize ) size );
- printer->setOrientation( ( QPrinter::Orientation ) orientation );
+ printer->setPageSize( ( TQPrinter::PageSize ) size );
+ printer->setOrientation( ( TQPrinter::Orientation ) orientation );
// Get the page metrics
- QPaintDeviceMetrics pdm( printer );
+ TQPaintDeviceMetrics pdm( printer );
// Display the first page of the report
ps.setWidth( pdm.width() );
@@ -640,34 +640,34 @@ FIXME: TODO: make this function work on X11 too
*/
void MReportEngine::recalcDimensions()
{
- QDomNode report;
- QDomNode child;
+ TQDomNode report;
+ TQDomNode child;
for ( report = rt.firstChild(); !report.isNull(); report = report.nextSibling() )
if ( report.nodeName() == "KugarTemplate" )
break;
- QDomNamedNodeMap rattributes = report.attributes();
+ TQDomNamedNodeMap rattributes = report.attributes();
recalcAttribute( "BottomMargin", rattributes );
recalcAttribute( "TopMargin", rattributes );
recalcAttribute( "LeftMargin", rattributes );
recalcAttribute( "RightMargin", rattributes );
- QDomNodeList children = report.childNodes();
- int childCount = children.length();
+ TQDomNodeList tqchildren = report.childNodes();
+ int childCount = tqchildren.length();
for ( int j = 0; j < childCount; j++ )
{
- child = children.item( j );
- QDomNamedNodeMap attributes = child.attributes();
+ child = tqchildren.item( j );
+ TQDomNamedNodeMap attributes = child.attributes();
- QDomNodeList children2 = child.childNodes();
- int childCount2 = children2.length();
+ TQDomNodeList tqchildren2 = child.childNodes();
+ int childCount2 = tqchildren2.length();
recalcAttribute( "Height", attributes );
for ( int k = 0; k < childCount2; k++ )
{
- QDomNode child2 = children2.item( k );
- QDomNamedNodeMap attributes = child2.attributes();
+ TQDomNode child2 = tqchildren2.item( k );
+ TQDomNamedNodeMap attributes = child2.attributes();
recalcAttribute( "X", attributes );
recalcAttribute( "Y", attributes );
recalcAttribute( "Width", attributes );
@@ -681,26 +681,26 @@ void MReportEngine::recalcDimensions()
}
-void MReportEngine::recalcAttribute( const QString& name, QDomNamedNodeMap attributes )
+void MReportEngine::recalcAttribute( const TQString& name, TQDomNamedNodeMap attributes )
{
if ( !attributes.namedItem( name ).isNull() )
{
- attributes.namedItem( name ).setNodeValue( QString( "%1" ).arg( attributes.namedItem( name ).nodeValue().toInt() * 93 / 81 ) );
+ attributes.namedItem( name ).setNodeValue( TQString( "%1" ).tqarg( attributes.namedItem( name ).nodeValue().toInt() * 93 / 81 ) );
}
}
-/** Walks the document tree, setting the report layout */
+/** Walks the document tree, setting the report tqlayout */
void MReportEngine::initTemplate()
{
heightOfDetails = 0;
-#ifdef Q_WS_WIN
+#ifdef TQ_WS_WIN
recalcDimensions();
#endif
- QDomNode report;
- QDomNode child;
+ TQDomNode report;
+ TQDomNode child;
m_needRegeneration = true;
// Get the report - assume there is only one.
@@ -712,14 +712,14 @@ void MReportEngine::initTemplate()
setReportAttributes( &report );
// Get all the child report elements
- QDomNodeList children = report.childNodes();
- int childCount = children.length();
+ TQDomNodeList tqchildren = report.childNodes();
+ int childCount = tqchildren.length();
for ( int j = 0; j < childCount; j++ )
{
- child = children.item( j );
+ child = tqchildren.item( j );
- if ( child.nodeType() == QDomNode::ElementNode )
+ if ( child.nodeType() == TQDomNode::ElementNode )
{
// Report Header
if ( child.nodeName() == "ReportHeader" )
@@ -748,18 +748,18 @@ void MReportEngine::initTemplate()
}
}
-/** Sets the main layout attributes for the report */
-void MReportEngine::setReportAttributes( QDomNode* report )
+/** Sets the main tqlayout attributes for the report */
+void MReportEngine::setReportAttributes( TQDomNode* report )
{
// Get the attributes for the report
- QDomNamedNodeMap attributes = report->attributes();
+ TQDomNamedNodeMap attributes = report->attributes();
pageSize = attributes.namedItem( "PageSize" ).nodeValue().toInt();
pageOrientation = attributes.namedItem( "PageOrientation" ).nodeValue().toInt();
int templateWidth = attributes.namedItem( "PageWidth" ).nodeValue().toInt();
int templateheight = attributes.namedItem( "PageHeight" ).nodeValue().toInt();
- QSize ps = getPageMetrics( pageSize, pageOrientation );
+ TQSize ps = getPageMetrics( pageSize, pageOrientation );
pageWidth = ps.width();
pageHeight = ps.height();
@@ -792,58 +792,58 @@ int MReportEngine::scaleDeltaHeight( int height ) const
return f > 1 ? int( f + 0.5 ) : ceil( f );
}
-/** Sets the layout attributes for the given report section */
-void MReportEngine::setSectionAttributes( MReportSection* section, QDomNode* report )
+/** Sets the tqlayout attributes for the given report section */
+void MReportEngine::setSectionAttributes( MReportSection* section, TQDomNode* report )
{
// Get the attributes for the section
- QDomNamedNodeMap attributes = report->attributes();
+ TQDomNamedNodeMap attributes = report->attributes();
// Get the section attributes
section->setHeight( scaleDeltaHeight( attributes.namedItem( "Height" ).nodeValue().toInt() ) );
section->setPrintFrequency( attributes.namedItem( "PrintFrequency" ).nodeValue().toInt() );
// Process the sections labels
- QDomNodeList children = report->childNodes();
- int childCount = children.length();
+ TQDomNodeList tqchildren = report->childNodes();
+ int childCount = tqchildren.length();
// For each label, extract the attr list and add the new label
// to the sections's label collection
for ( int j = 0; j < childCount; j++ )
{
- QDomNode child = children.item( j );
- if ( child.nodeType() == QDomNode::ElementNode )
+ TQDomNode child = tqchildren.item( j );
+ if ( child.nodeType() == TQDomNode::ElementNode )
{
if ( child.nodeName() == "Line" )
{
- QDomNamedNodeMap attributes = child.attributes();
+ TQDomNamedNodeMap attributes = child.attributes();
MLineObject* line = new MLineObject();
setLineAttributes( line, &attributes );
section->addLine( line );
}
else if ( child.nodeName() == "Label" )
{
- QDomNamedNodeMap attributes = child.attributes();
+ TQDomNamedNodeMap attributes = child.attributes();
MLabelObject* label = new MLabelObject();
setLabelAttributes( label, &attributes );
section->addLabel( label );
}
else if ( child.nodeName() == "Special" )
{
- QDomNamedNodeMap attributes = child.attributes();
+ TQDomNamedNodeMap attributes = child.attributes();
MSpecialObject* field = new MSpecialObject();
setSpecialAttributes( field, &attributes );
section->addSpecialField( field );
}
else if ( child.nodeName() == "CalculatedField" )
{
- QDomNamedNodeMap attributes = child.attributes();
+ TQDomNamedNodeMap attributes = child.attributes();
MCalcObject* field = new MCalcObject();
setCalculatedFieldAttributes( field, &attributes );
section->addCalculatedField( field );
}
else if ( child.nodeName() == "Field" )
{
- QDomNamedNodeMap attributes = child.attributes();
+ TQDomNamedNodeMap attributes = child.attributes();
MFieldObject* field = new MFieldObject();
setFieldAttributes( field, &attributes );
section->addField( field );
@@ -852,11 +852,11 @@ void MReportEngine::setSectionAttributes( MReportSection* section, QDomNode* rep
}
}
-/** Sets the layout attributes for the detail headers and footers */
-void MReportEngine::setDetMiscAttributes( MReportSection* section, QDomNode* report )
+/** Sets the tqlayout attributes for the detail headers and footers */
+void MReportEngine::setDetMiscAttributes( MReportSection* section, TQDomNode* report )
{
// Get the attributes for the section
- QDomNamedNodeMap attributes = report->attributes();
+ TQDomNamedNodeMap attributes = report->attributes();
// Get the section attributes
section->setLevel( attributes.namedItem( "Level" ).nodeValue().toInt() );
@@ -866,11 +866,11 @@ void MReportEngine::setDetMiscAttributes( MReportSection* section, QDomNode* rep
}
-/** Sets the layout attributes for the detail section */
-void MReportEngine::setDetailAttributes( QDomNode* report )
+/** Sets the tqlayout attributes for the detail section */
+void MReportEngine::setDetailAttributes( TQDomNode* report )
{
// Get the attributes for the detail section
- QDomNamedNodeMap attributes = report->attributes();
+ TQDomNamedNodeMap attributes = report->attributes();
// Get the report detail attributes
MReportDetail *detail = new MReportDetail;
@@ -881,38 +881,38 @@ void MReportEngine::setDetailAttributes( QDomNode* report )
detail->setRepeat( attributes.namedItem( "Repeat" ).nodeValue() == "true" );
// Process the report detail labels
- QDomNodeList children = report->childNodes();
- int childCount = children.length();
+ TQDomNodeList tqchildren = report->childNodes();
+ int childCount = tqchildren.length();
for ( int j = 0; j < childCount; j++ )
{
- QDomNode child = children.item( j );
- if ( child.nodeType() == QDomNode::ElementNode )
+ TQDomNode child = tqchildren.item( j );
+ if ( child.nodeType() == TQDomNode::ElementNode )
{
if ( child.nodeName() == "Line" )
{
- QDomNamedNodeMap attributes = child.attributes();
+ TQDomNamedNodeMap attributes = child.attributes();
MLineObject* line = new MLineObject();
setLineAttributes( line, &attributes );
detail->addLine( line );
}
else if ( child.nodeName() == "Label" )
{
- QDomNamedNodeMap attributes = child.attributes();
+ TQDomNamedNodeMap attributes = child.attributes();
MLabelObject* label = new MLabelObject();
setLabelAttributes( label, &attributes );
detail->addLabel( label );
}
else if ( child.nodeName() == "Special" )
{
- QDomNamedNodeMap attributes = child.attributes();
+ TQDomNamedNodeMap attributes = child.attributes();
MSpecialObject* field = new MSpecialObject();
setSpecialAttributes( field, &attributes );
detail->addSpecialField( field );
}
else if ( child.nodeName() == "Field" )
{
- QDomNamedNodeMap attributes = child.attributes();
+ TQDomNamedNodeMap attributes = child.attributes();
MFieldObject* field = new MFieldObject();
setFieldAttributes( field, &attributes );
detail->addField( field );
@@ -923,28 +923,28 @@ void MReportEngine::setDetailAttributes( QDomNode* report )
details.append( detail );
}
-/** Sets a line's layout attributes */
-void MReportEngine::setLineAttributes( MLineObject* line, QDomNamedNodeMap* attr )
+/** Sets a line's tqlayout attributes */
+void MReportEngine::setLineAttributes( MLineObject* line, TQDomNamedNodeMap* attr )
{
line->setLine( scaleDeltaWidth( attr->namedItem( "X1" ).nodeValue().toInt() ),
scaleDeltaHeight( attr->namedItem( "Y1" ).nodeValue().toInt() ),
scaleDeltaWidth( attr->namedItem( "X2" ).nodeValue().toInt() ),
scaleDeltaHeight( attr->namedItem( "Y2" ).nodeValue().toInt() ) );
- QString tmp = attr->namedItem( "Color" ).nodeValue();
+ TQString tmp = attr->namedItem( "Color" ).nodeValue();
- line->setColor( tmp.left( tmp.find( "," ) ).toInt(),
- tmp.mid( tmp.find( "," ) + 1, ( tmp.findRev( "," ) - tmp.find( "," ) ) - 1 ).toInt(),
- tmp.right( tmp.length() - tmp.findRev( "," ) - 1 ).toInt() );
+ line->setColor( tmp.left( tmp.tqfind( "," ) ).toInt(),
+ tmp.mid( tmp.tqfind( "," ) + 1, ( tmp.tqfindRev( "," ) - tmp.tqfind( "," ) ) - 1 ).toInt(),
+ tmp.right( tmp.length() - tmp.tqfindRev( "," ) - 1 ).toInt() );
line->setWidth( attr->namedItem( "Width" ).nodeValue().toInt() );
line->setStyle( attr->namedItem( "Style" ).nodeValue().toInt() );
}
-/** Sets a label's layout attributes */
-void MReportEngine::setLabelAttributes( MLabelObject* label, QDomNamedNodeMap* attr )
+/** Sets a label's tqlayout attributes */
+void MReportEngine::setLabelAttributes( MLabelObject* label, TQDomNamedNodeMap* attr )
{
- QString tmp;
+ TQString tmp;
label->setText( attr->namedItem( "Text" ).nodeValue() );
label->setGeometry( scaleDeltaWidth( attr->namedItem( "X" ).nodeValue().toInt() ),
@@ -953,19 +953,19 @@ void MReportEngine::setLabelAttributes( MLabelObject* label, QDomNamedNodeMap* a
scaleDeltaHeight( attr->namedItem( "Height" ).nodeValue().toInt() ) );
tmp = attr->namedItem( "BackgroundColor" ).nodeValue();
- label->setBackgroundColor( tmp.left( tmp.find( "," ) ).toInt(),
- tmp.mid( tmp.find( "," ) + 1, ( tmp.findRev( "," ) - tmp.find( "," ) ) - 1 ).toInt(),
- tmp.right( tmp.length() - tmp.findRev( "," ) - 1 ).toInt() );
+ label->setBackgroundColor( tmp.left( tmp.tqfind( "," ) ).toInt(),
+ tmp.mid( tmp.tqfind( "," ) + 1, ( tmp.tqfindRev( "," ) - tmp.tqfind( "," ) ) - 1 ).toInt(),
+ tmp.right( tmp.length() - tmp.tqfindRev( "," ) - 1 ).toInt() );
tmp = attr->namedItem( "ForegroundColor" ).nodeValue();
- label->setForegroundColor( tmp.left( tmp.find( "," ) ).toInt(),
- tmp.mid( tmp.find( "," ) + 1, ( tmp.findRev( "," ) - tmp.find( "," ) ) - 1 ).toInt(),
- tmp.right( tmp.length() - tmp.findRev( "," ) - 1 ).toInt() );
+ label->setForegroundColor( tmp.left( tmp.tqfind( "," ) ).toInt(),
+ tmp.mid( tmp.tqfind( "," ) + 1, ( tmp.tqfindRev( "," ) - tmp.tqfind( "," ) ) - 1 ).toInt(),
+ tmp.right( tmp.length() - tmp.tqfindRev( "," ) - 1 ).toInt() );
tmp = attr->namedItem( "BorderColor" ).nodeValue();
- label->setBorderColor( tmp.left( tmp.find( "," ) ).toInt(),
- tmp.mid( tmp.find( "," ) + 1, ( tmp.findRev( "," ) - tmp.find( "," ) ) - 1 ).toInt(),
- tmp.right( tmp.length() - tmp.findRev( "," ) - 1 ).toInt() );
+ label->setBorderColor( tmp.left( tmp.tqfind( "," ) ).toInt(),
+ tmp.mid( tmp.tqfind( "," ) + 1, ( tmp.tqfindRev( "," ) - tmp.tqfind( "," ) ) - 1 ).toInt(),
+ tmp.right( tmp.length() - tmp.tqfindRev( "," ) - 1 ).toInt() );
label->setBorderWidth( attr->namedItem( "BorderWidth" ).nodeValue().toInt() );
label->setBorderStyle( attr->namedItem( "BorderStyle" ).nodeValue().toInt() );
@@ -986,8 +986,8 @@ void MReportEngine::setLabelAttributes( MLabelObject* label, QDomNamedNodeMap* a
label->setWordWrap( attr->namedItem( "WordWrap" ).nodeValue().toInt() == 0 ? false : true );
}
-/** Sets a special field's layout attributes */
-void MReportEngine::setSpecialAttributes( MSpecialObject* field, QDomNamedNodeMap* attr )
+/** Sets a special field's tqlayout attributes */
+void MReportEngine::setSpecialAttributes( MSpecialObject* field, TQDomNamedNodeMap* attr )
{
field->setType( attr->namedItem( "Type" ).nodeValue().toInt() );
field->setDateFormat( attr->namedItem( "DateFormat" ).nodeValue().toInt() );
@@ -995,8 +995,8 @@ void MReportEngine::setSpecialAttributes( MSpecialObject* field, QDomNamedNodeMa
setLabelAttributes( ( MLabelObject * ) field, attr );
}
-/** Sets a field's layout attributes */
-void MReportEngine::setFieldAttributes( MFieldObject* field, QDomNamedNodeMap* attr )
+/** Sets a field's tqlayout attributes */
+void MReportEngine::setFieldAttributes( MFieldObject* field, TQDomNamedNodeMap* attr )
{
field->setFieldName( attr->namedItem( "Field" ).nodeValue() );
field->setDataType( attr->namedItem( "DataType" ).nodeValue().toInt() );
@@ -1006,17 +1006,17 @@ void MReportEngine::setFieldAttributes( MFieldObject* field, QDomNamedNodeMap* a
field->setCommaSeparator( attr->namedItem( "CommaSeparator" ).nodeValue().toInt() );
field->setInputMask( attr->namedItem( "InputMask" ).nodeValue() );
- QString tmp = attr->namedItem( "NegValueColor" ).nodeValue();
+ TQString tmp = attr->namedItem( "NegValueColor" ).nodeValue();
- field->setNegValueColor( tmp.left( tmp.find( "," ) ).toInt(),
- tmp.mid( tmp.find( "," ) + 1, ( tmp.findRev( "," ) - tmp.find( "," ) ) - 1 ).toInt(),
- tmp.right( tmp.length() - tmp.findRev( "," ) - 1 ).toInt() );
+ field->setNegValueColor( tmp.left( tmp.tqfind( "," ) ).toInt(),
+ tmp.mid( tmp.tqfind( "," ) + 1, ( tmp.tqfindRev( "," ) - tmp.tqfind( "," ) ) - 1 ).toInt(),
+ tmp.right( tmp.length() - tmp.tqfindRev( "," ) - 1 ).toInt() );
setLabelAttributes( ( MLabelObject * ) field, attr );
}
-/** Sets a calculated field's layout attributes */
-void MReportEngine::setCalculatedFieldAttributes( MCalcObject* field, QDomNamedNodeMap* attr )
+/** Sets a calculated field's tqlayout attributes */
+void MReportEngine::setCalculatedFieldAttributes( MCalcObject* field, TQDomNamedNodeMap* attr )
{
field->setCalculationType( attr->namedItem( "CalculationType" ).nodeValue().toInt() );
setFieldAttributes( ( MFieldObject * ) field, attr );
@@ -1048,7 +1048,7 @@ void MReportEngine::copy( const MReportEngine* mReportEngine )
pHeader = mReportEngine->pHeader;
// Copy the detail sections
MReportDetail *detail;
- QPtrList<MReportDetail> temp = mReportEngine->details;
+ TQPtrList<MReportDetail> temp = mReportEngine->details;
temp.setAutoDelete( false );
for ( detail = temp.first(); detail; detail = temp.next() )
{