summaryrefslogtreecommitdiffstats
path: root/kugar/lib
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
commitf008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch)
tree8e9244c4d4957c36be81e15b566b4aa5ea26c982 /kugar/lib
parent1210f27b660efb7b37ff43ec68763e85a403471f (diff)
downloadkoffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz
koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kugar/lib')
-rw-r--r--kugar/lib/inputmask.cpp130
-rw-r--r--kugar/lib/inputmask.h35
-rw-r--r--kugar/lib/mfieldobject.cpp34
-rw-r--r--kugar/lib/mfieldobject.h26
-rw-r--r--kugar/lib/mlabelobject.cpp44
-rw-r--r--kugar/lib/mlabelobject.h26
-rw-r--r--kugar/lib/mlineobject.cpp16
-rw-r--r--kugar/lib/mlineobject.h16
-rw-r--r--kugar/lib/mpagecollection.cpp22
-rw-r--r--kugar/lib/mpagecollection.h30
-rw-r--r--kugar/lib/mpagedisplay.cpp16
-rw-r--r--kugar/lib/mpagedisplay.h27
-rw-r--r--kugar/lib/mreportdetail.cpp6
-rw-r--r--kugar/lib/mreportdetail.h8
-rw-r--r--kugar/lib/mreportengine.cpp230
-rw-r--r--kugar/lib/mreportengine.h89
-rw-r--r--kugar/lib/mreportobject.cpp22
-rw-r--r--kugar/lib/mreportobject.h20
-rw-r--r--kugar/lib/mreportsection.cpp36
-rw-r--r--kugar/lib/mreportsection.h34
-rw-r--r--kugar/lib/mreportviewer.cpp70
-rw-r--r--kugar/lib/mreportviewer.h49
-rw-r--r--kugar/lib/mspecialobject.cpp2
-rw-r--r--kugar/lib/mspecialobject.h4
-rw-r--r--kugar/lib/mutil.cpp40
-rw-r--r--kugar/lib/mutil.h20
26 files changed, 528 insertions, 524 deletions
diff --git a/kugar/lib/inputmask.cpp b/kugar/lib/inputmask.cpp
index 75a72f61..08d67b26 100644
--- a/kugar/lib/inputmask.cpp
+++ b/kugar/lib/inputmask.cpp
@@ -17,61 +17,61 @@
namespace Kugar
{
-InputMask::InputMask( QObject *parent, const char *name )
- : QObject( parent, name ),
- m_text( QString::null ),
+InputMask::InputMask( TQObject *tqparent, const char *name )
+ : TQObject( tqparent, name ),
+ m_text( TQString() ),
m_maxLength( 32767 ),
m_blank( ' ' ),
- m_mask( QString::null ),
- m_maskData( 0L )
+ m_tqmask( TQString() ),
+ m_tqmaskData( 0L )
{}
InputMask::~InputMask()
{
- delete [] m_maskData;
+ delete [] m_tqmaskData;
}
-QString InputMask::mask() const
+TQString InputMask::tqmask() const
{
- return ( m_maskData ? m_mask + ';' + m_blank : QString::null );
+ return ( m_tqmaskData ? m_tqmask + ';' + m_blank : TQString() );
}
-void InputMask::setMask( const QString &mask )
+void InputMask::setMask( const TQString &tqmask )
{
- parseInputMask( mask );
+ parseInputMask( tqmask );
}
-QString InputMask::formatText( const QString &txt )
+TQString InputMask::formatText( const TQString &txt )
{
- return maskString( 0, txt, true );
+ return tqmaskString( 0, txt, true );
}
-void InputMask::parseInputMask( const QString &maskFields )
+void InputMask::parseInputMask( const TQString &tqmaskFields )
{
- if ( maskFields.isEmpty() || maskFields.section( ';', 0, 0 ).isEmpty() )
+ if ( tqmaskFields.isEmpty() || tqmaskFields.section( ';', 0, 0 ).isEmpty() )
{
- if ( m_maskData )
+ if ( m_tqmaskData )
{
- delete [] m_maskData;
- m_maskData = 0;
+ delete [] m_tqmaskData;
+ m_tqmaskData = 0;
m_maxLength = 32767;
}
return ;
}
- m_mask = maskFields.section( ';', 0, 0 );
- m_blank = maskFields.section( ';', 1, 1 ).at( 0 );
+ m_tqmask = tqmaskFields.section( ';', 0, 0 );
+ m_blank = tqmaskFields.section( ';', 1, 1 ).at( 0 );
if ( m_blank.isNull() )
m_blank = ' ';
- // calculate m_maxLength / m_maskData length
+ // calculate m_maxLength / m_tqmaskData length
m_maxLength = 0;
- QChar c = 0;
+ TQChar c = 0;
uint i;
- for ( i = 0; i < m_mask.length(); i++ )
+ for ( i = 0; i < m_tqmask.length(); i++ )
{
- c = m_mask.at( i );
- if ( i > 0 && m_mask.at( i - 1 ) == '\\' )
+ c = m_tqmask.at( i );
+ if ( i > 0 && m_tqmask.at( i - 1 ) == '\\' )
{
m_maxLength++;
continue;
@@ -83,23 +83,23 @@ void InputMask::parseInputMask( const QString &maskFields )
m_maxLength++;
}
- delete [] m_maskData;
- m_maskData = new MaskInputData[ m_maxLength ];
+ delete [] m_tqmaskData;
+ m_tqmaskData = new MaskInputData[ m_maxLength ];
MaskInputData::Casemode m = MaskInputData::NoCaseMode;
c = 0;
bool s;
bool escape = FALSE;
int index = 0;
- for ( i = 0; i < m_mask.length(); i++ )
+ for ( i = 0; i < m_tqmask.length(); i++ )
{
- c = m_mask.at( i );
+ c = m_tqmask.at( i );
if ( escape )
{
s = TRUE;
- m_maskData[ index ].maskChar = c;
- m_maskData[ index ].separator = s;
- m_maskData[ index ].caseMode = m;
+ m_tqmaskData[ index ].tqmaskChar = c;
+ m_tqmaskData[ index ].separator = s;
+ m_tqmaskData[ index ].caseMode = m;
index++;
escape = FALSE;
}
@@ -144,18 +144,18 @@ void InputMask::parseInputMask( const QString &maskFields )
if ( !escape )
{
- m_maskData[ index ].maskChar = c;
- m_maskData[ index ].separator = s;
- m_maskData[ index ].caseMode = m;
+ m_tqmaskData[ index ].tqmaskChar = c;
+ m_tqmaskData[ index ].separator = s;
+ m_tqmaskData[ index ].caseMode = m;
index++;
}
}
}
}
-bool InputMask::isValidInput( QChar key, QChar mask ) const
+bool InputMask::isValidInput( TQChar key, TQChar tqmask ) const
{
- switch ( mask )
+ switch ( tqmask )
{
case 'A':
if ( key.isLetter() && key != m_blank )
@@ -207,33 +207,33 @@ bool InputMask::isValidInput( QChar key, QChar mask ) const
return FALSE;
}
-QString InputMask::maskString( uint pos, const QString &str, bool clear ) const
+TQString InputMask::tqmaskString( uint pos, const TQString &str, bool clear ) const
{
if ( pos >= ( uint ) m_maxLength )
- return QString::fromLatin1( "" );
+ return TQString::tqfromLatin1( "" );
- QString fill;
+ TQString fill;
fill = clear ? clearString( 0, m_maxLength ) : m_text;
uint strIndex = 0;
- QString s = QString::fromLatin1( "" );
+ TQString s = TQString::tqfromLatin1( "" );
int i = pos;
while ( i < m_maxLength )
{
if ( strIndex < str.length() )
{
- if ( m_maskData[ i ].separator )
+ if ( m_tqmaskData[ i ].separator )
{
- s += m_maskData[ i ].maskChar;
- if ( str[ ( int ) strIndex ] == m_maskData[ i ].maskChar )
+ s += m_tqmaskData[ i ].tqmaskChar;
+ if ( str[ ( int ) strIndex ] == m_tqmaskData[ i ].tqmaskChar )
strIndex++;
++i;
}
else
{
- if ( isValidInput( str[ ( int ) strIndex ], m_maskData[ i ].maskChar ) )
+ if ( isValidInput( str[ ( int ) strIndex ], m_tqmaskData[ i ].tqmaskChar ) )
{
- switch ( m_maskData[ i ].caseMode )
+ switch ( m_tqmaskData[ i ].caseMode )
{
case MaskInputData::Upper:
s += str[ ( int ) strIndex ].upper();
@@ -252,10 +252,10 @@ QString InputMask::maskString( uint pos, const QString &str, bool clear ) const
int n = findInMask( i, TRUE, TRUE, str[ ( int ) strIndex ] );
if ( n != -1 )
{
- if ( str.length() != 1 || i == 0 || ( i > 0 && ( !m_maskData[ i - 1 ].separator || m_maskData[ i - 1 ].maskChar != str[ ( int ) strIndex ] ) ) )
+ if ( str.length() != 1 || i == 0 || ( i > 0 && ( !m_tqmaskData[ i - 1 ].separator || m_tqmaskData[ i - 1 ].tqmaskChar != str[ ( int ) strIndex ] ) ) )
{
s += fill.mid( i, n - i + 1 );
- i = n + 1; // update i to find + 1
+ i = n + 1; // update i to tqfind + 1
}
}
else
@@ -265,7 +265,7 @@ QString InputMask::maskString( uint pos, const QString &str, bool clear ) const
if ( n != -1 )
{
s += fill.mid( i, n - i );
- switch ( m_maskData[ n ].caseMode )
+ switch ( m_tqmaskData[ n ].caseMode )
{
case MaskInputData::Upper:
s += str[ ( int ) strIndex ].upper();
@@ -276,7 +276,7 @@ QString InputMask::maskString( uint pos, const QString &str, bool clear ) const
default:
s += str[ ( int ) strIndex ];
}
- i = n + 1; // updates i to find + 1
+ i = n + 1; // updates i to tqfind + 1
}
}
}
@@ -290,32 +290,32 @@ QString InputMask::maskString( uint pos, const QString &str, bool clear ) const
return s;
}
-QString InputMask::clearString( uint pos, uint len ) const
+TQString InputMask::clearString( uint pos, uint len ) const
{
if ( pos >= ( uint ) m_maxLength )
- return QString::null;
+ return TQString();
- QString s;
- int end = QMIN( ( uint ) m_maxLength, pos + len );
+ TQString s;
+ int end = TQMIN( ( uint ) m_maxLength, pos + len );
for ( int i = pos; i < end; i++ )
- if ( m_maskData[ i ].separator )
- s += m_maskData[ i ].maskChar;
+ if ( m_tqmaskData[ i ].separator )
+ s += m_tqmaskData[ i ].tqmaskChar;
else
s += m_blank;
return s;
}
-QString InputMask::stripString( const QString &str ) const
+TQString InputMask::stripString( const TQString &str ) const
{
- if ( !m_maskData )
+ if ( !m_tqmaskData )
return str;
- QString s;
- int end = QMIN( m_maxLength, ( int ) str.length() );
+ TQString s;
+ int end = TQMIN( m_maxLength, ( int ) str.length() );
for ( int i = 0; i < end; i++ )
- if ( m_maskData[ i ].separator )
- s += m_maskData[ i ].maskChar;
+ if ( m_tqmaskData[ i ].separator )
+ s += m_tqmaskData[ i ].tqmaskChar;
else
if ( str[ i ] != m_blank )
s += str[ i ];
@@ -323,7 +323,7 @@ QString InputMask::stripString( const QString &str ) const
return s;
}
-int InputMask::findInMask( int pos, bool forward, bool findSeparator, QChar searchChar ) const
+int InputMask::findInMask( int pos, bool forward, bool findSeparator, TQChar searchChar ) const
{
if ( pos >= m_maxLength || pos < 0 )
return -1;
@@ -336,16 +336,16 @@ int InputMask::findInMask( int pos, bool forward, bool findSeparator, QChar sear
{
if ( findSeparator )
{
- if ( m_maskData[ i ].separator && m_maskData[ i ].maskChar == searchChar )
+ if ( m_tqmaskData[ i ].separator && m_tqmaskData[ i ].tqmaskChar == searchChar )
return i;
}
else
{
- if ( !m_maskData[ i ].separator )
+ if ( !m_tqmaskData[ i ].separator )
{
if ( searchChar.isNull() )
return i;
- else if ( isValidInput( searchChar, m_maskData[ i ].maskChar ) )
+ else if ( isValidInput( searchChar, m_tqmaskData[ i ].tqmaskChar ) )
return i;
}
}
diff --git a/kugar/lib/inputmask.h b/kugar/lib/inputmask.h
index 2668ba0c..98d5c717 100644
--- a/kugar/lib/inputmask.h
+++ b/kugar/lib/inputmask.h
@@ -15,45 +15,46 @@
#ifndef INPUTMASK_H
#define INPUTMASK_H
-#include <qobject.h>
+#include <tqobject.h>
namespace Kugar
{
-class InputMask : public QObject
+class InputMask : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
- InputMask( QObject *parent = 0, const char *name = 0 );
+ InputMask( TQObject *tqparent = 0, const char *name = 0 );
~InputMask();
- QString mask() const;
- void setMask( const QString &mask );
+ TQString tqmask() const;
+ void setMask( const TQString &tqmask );
- QString formatText( const QString &txt );
+ TQString formatText( const TQString &txt );
private:
- void parseInputMask( const QString &maskFields );
- bool isValidInput( QChar key, QChar mask ) const;
- QString maskString( uint pos, const QString &str, bool clear = FALSE ) const;
- QString clearString( uint pos, uint len ) const;
- QString stripString( const QString &str ) const;
- int findInMask( int pos, bool forward, bool findSeparator, QChar searchChar = QChar() ) const;
+ void parseInputMask( const TQString &tqmaskFields );
+ bool isValidInput( TQChar key, TQChar tqmask ) const;
+ TQString tqmaskString( uint pos, const TQString &str, bool clear = FALSE ) const;
+ TQString clearString( uint pos, uint len ) const;
+ TQString stripString( const TQString &str ) const;
+ int findInMask( int pos, bool forward, bool findSeparator, TQChar searchChar = TQChar() ) const;
private:
- QString m_text;
+ TQString m_text;
int m_maxLength;
- QChar m_blank;
- QString m_mask;
+ TQChar m_blank;
+ TQString m_tqmask;
struct MaskInputData
{
enum Casemode { NoCaseMode, Upper, Lower };
- QChar maskChar; // either the separator char or the inputmask
+ TQChar tqmaskChar; // either the separator char or the inputtqmask
bool separator;
Casemode caseMode;
};
- MaskInputData *m_maskData;
+ MaskInputData *m_tqmaskData;
};
}
diff --git a/kugar/lib/mfieldobject.cpp b/kugar/lib/mfieldobject.cpp
index c2d60203..b0918c8c 100644
--- a/kugar/lib/mfieldobject.cpp
+++ b/kugar/lib/mfieldobject.cpp
@@ -54,30 +54,30 @@ MFieldObject::~MFieldObject()
{}
/** Returns the bound data field name */
-QString MFieldObject::getFieldName()
+TQString MFieldObject::getFieldName()
{
return fieldName;
}
/** Sets the bound data field */
-void MFieldObject::setFieldName( const QString field )
+void MFieldObject::setFieldName( const TQString field )
{
fieldName = field;
}
/** Sets the field's data string */
-void MFieldObject::setText( const QString txt )
+void MFieldObject::setText( const TQString txt )
{
int ret;
- QDate d;
+ TQDate d;
int pos;
- QString month, day, year;
- QRegExp regexp( "[0-9][0-9](-|//)[0-9][0-9](-|//)[0-9][0-9][0-9][0-9]" );
+ TQString month, day, year;
+ TQRegExp regexp( "[0-9][0-9](-|//)[0-9][0-9](-|//)[0-9][0-9][0-9][0-9]" );
// Check for empty string
if ( txt.isEmpty() && dataType == MFieldObject::Date )
{
- text = QString::null;
+ text = TQString();
return ;
}
@@ -115,7 +115,7 @@ void MFieldObject::setText( const QString txt )
day = txt.mid( 3, 2 );
d.setYMD( year.toInt(), month.toInt(), day.toInt() );
- // d = QDate::fromString(txt, Qt::LocalDate);
+ // d = TQDate::fromString(txt, Qt::LocalDate);
text = MUtil::formatDate( d, format );
}
else
@@ -126,24 +126,24 @@ void MFieldObject::setText( const QString txt )
bool ok;
text.setNum( txt.toDouble( &ok ), 'f', prec );
if( !ok )
- text = QString::null;
+ text = TQString();
else
{
if ( comma )
formatCommas();
formatNegValue();
- text = QString( currency + text );
+ text = TQString( currency + text );
}
break;
}
}
-QString MFieldObject::getInputMask() const
+TQString MFieldObject::getInputMask() const
{
- return m_inputMask->mask();
+ return m_inputMask->tqmask();
}
-void MFieldObject::setInputMask( const QString &inputMask )
+void MFieldObject::setInputMask( const TQString &inputMask )
{
m_inputMask->setMask( inputMask );
}
@@ -171,7 +171,7 @@ void MFieldObject::setPrecision( int p )
}
/** Sets the field's currency symbol */
-void MFieldObject::setCurrency( const QChar c )
+void MFieldObject::setCurrency( const TQChar c )
{
if ( c.isNull() )
currency = 36;
@@ -203,8 +203,8 @@ void MFieldObject::formatNegValue()
/** Formats the string representation of a number with comma separators */
void MFieldObject::formatCommas()
{
- // text = text.replace(".", ",");
- QString tmp;
+ // text = text.tqreplace(".", ",");
+ TQString tmp;
int i, j;
int offset;
@@ -215,7 +215,7 @@ void MFieldObject::formatCommas()
offset = 0;
// Look for decimal point
- int pos = text.findRev( "." );
+ int pos = text.tqfindRev( "." );
// If a decimal was not found, start at end of string
if ( pos == -1 )
diff --git a/kugar/lib/mfieldobject.h b/kugar/lib/mfieldobject.h
index 8832414f..d04fca39 100644
--- a/kugar/lib/mfieldobject.h
+++ b/kugar/lib/mfieldobject.h
@@ -9,7 +9,7 @@
#ifndef MFIELDOBJECT_H
#define MFIELDOBJECT_H
-#include <qregexp.h>
+#include <tqregexp.h>
#include "mlabelobject.h"
@@ -40,7 +40,7 @@ public:
protected:
/** Field name */
- QString fieldName;
+ TQString fieldName;
/** Field data type */
int dataType;
/** Field date format */
@@ -48,23 +48,23 @@ protected:
/** Field precision */
int precision;
/** Field currency symbol */
- QChar currency;
+ TQChar currency;
/** Field's negative value color */
- QColor negativeValueColor;
+ TQColor negativeValueColor;
/** Field's original color */
- QColor saveColor;
+ TQColor saveColor;
/** Field's comma flag */
int comma;
- /** Input mask */
- QString inputMask;
+ /** Input tqmask */
+ TQString inputMask;
public:
/** Returns the bound data field name */
- QString getFieldName();
+ TQString getFieldName();
/** Sets the bound data field */
- void setFieldName( const QString field );
+ void setFieldName( const TQString field );
/** Sets the field's data string - default is an empty string*/
- void setText( const QString txt );
+ void setText( const TQString txt );
/** Sets the field's data type */
void setDataType( int t );
/** Sets the field's date formatting */
@@ -72,14 +72,14 @@ public:
/** Sets the field's precision */
void setPrecision( int p );
/** Sets the field's currency symbol */
- void setCurrency( const QChar c );
+ void setCurrency( const TQChar c );
/** Sets the object's negative value color - default is red*/
void setNegValueColor( int r, int g, int b );
/** Sets if object should delimit numeric values with commas */
void setCommaSeparator( int c );
- QString getInputMask() const;
- void setInputMask( const QString &inputMask );
+ TQString getInputMask() const;
+ void setInputMask( const TQString &inputMask );
private:
/** Formats a string representation of a negative number using the negative value color */
diff --git a/kugar/lib/mlabelobject.cpp b/kugar/lib/mlabelobject.cpp
index bc01c22d..6a0db974 100644
--- a/kugar/lib/mlabelobject.cpp
+++ b/kugar/lib/mlabelobject.cpp
@@ -9,7 +9,7 @@
***************************************************************************/
//#include <kglobalsettings.h>
-#include <qfont.h>
+#include <tqfont.h>
#include "mlabelobject.h"
@@ -23,13 +23,13 @@ MLabelObject::MLabelObject() : MReportObject(), xMargin( 0 ), yMargin( 0 )
text = "";
// Set the default font
- QFont defaultFont;
+ TQFont defaultFont;
fontFamily = defaultFont.family();
fontSize = 10;
fontWeight = MLabelObject::Normal;
fontItalic = false;
- // Set the default alignment
+ // Set the default tqalignment
hAlignment = MLabelObject::Left;
vAlignment = MLabelObject::Top;
wordWrap = false;
@@ -62,13 +62,13 @@ MLabelObject::~MLabelObject()
{}
/** Sets the label's text string */
-void MLabelObject::setText( const QString txt )
+void MLabelObject::setText( const TQString txt )
{
text = txt;
}
/** Sets the label's text font */
-void MLabelObject::setFont( const QString family, int size, int weight, bool italic )
+void MLabelObject::setFont( const TQString family, int size, int weight, bool italic )
{
fontFamily = family;
fontSize = size;
@@ -76,13 +76,13 @@ void MLabelObject::setFont( const QString family, int size, int weight, bool ita
fontItalic = italic;
}
-/** Sets the label's horizontal alignment */
+/** Sets the label's horizontal tqalignment */
void MLabelObject::setHorizontalAlignment( int a )
{
hAlignment = a;
}
-/** Sets the label's vertical alignment */
+/** Sets the label's vertical tqalignment */
void MLabelObject::setVerticalAlignment( int a )
{
vAlignment = a;
@@ -95,10 +95,10 @@ void MLabelObject::setWordWrap( bool state )
}
/** Draws the label using the specificed painter & x/y-offsets */
-void MLabelObject::draw( QPainter* p, int xoffset, int yoffset )
+void MLabelObject::draw( TQPainter* p, int xoffset, int yoffset )
{
- QFont font( fontFamily, fontSize, fontWeight, fontItalic );
- QPen textPen( foregroundColor, 0, QPen::NoPen );
+ TQFont font( fontFamily, fontSize, fontWeight, fontItalic );
+ TQPen textPen( foregroundColor, 0, TQPen::NoPen );
int tf;
@@ -111,39 +111,39 @@ void MLabelObject::draw( QPainter* p, int xoffset, int yoffset )
// Set the font
p->setFont( font );
- QFontMetrics fm = p->fontMetrics();
+ TQFontMetrics fm = p->fontMetrics();
- // Set the text alignment flags
+ // Set the text tqalignment flags
- // Horizontal
+ //Qt::Horizontal
switch ( hAlignment )
{
case MLabelObject::Left:
- tf = QPainter::AlignLeft;
+ tf = TQPainter::AlignLeft;
break;
case MLabelObject::Center:
- tf = QPainter::AlignHCenter;
+ tf = TQPainter::AlignHCenter;
break;
case MLabelObject::Right:
- tf = QPainter::AlignRight;
+ tf = TQPainter::AlignRight;
}
- // Vertical
+ //Qt::Vertical
switch ( vAlignment )
{
case MLabelObject::Top:
- tf = tf | QPainter::AlignTop;
+ tf = tf | TQPainter::AlignTop;
break;
case MLabelObject::Bottom:
- tf = tf | QPainter::AlignBottom;
+ tf = tf | TQPainter::AlignBottom;
break;
case MLabelObject::Middle:
- tf = tf | QPainter::AlignVCenter;
+ tf = tf | TQPainter::AlignVCenter;
}
// Word wrap
if ( wordWrap )
- tf = tf | QPainter::WordBreak;
+ tf = tf | TQPainter::WordBreak;
// Draw the text
p->setPen( textPen );
@@ -165,7 +165,7 @@ void MLabelObject::copy( const MLabelObject* mLabelObject )
fontWeight = mLabelObject->fontWeight;
fontItalic = mLabelObject->fontItalic;
- // Copy the label's alignment data
+ // Copy the label's tqalignment data
vAlignment = mLabelObject->vAlignment;
hAlignment = mLabelObject->hAlignment;
wordWrap = mLabelObject->wordWrap;
diff --git a/kugar/lib/mlabelobject.h b/kugar/lib/mlabelobject.h
index 7f4a5164..2b35f233 100644
--- a/kugar/lib/mlabelobject.h
+++ b/kugar/lib/mlabelobject.h
@@ -9,8 +9,8 @@
#ifndef MLABELOBJECT_H
#define MLABELOBJECT_H
-#include <qstring.h>
-#include <qfontmetrics.h>
+#include <tqstring.h>
+#include <tqfontmetrics.h>
#include "mreportobject.h"
@@ -27,9 +27,9 @@ class MLabelObject : public MReportObject
public:
/** Font weight constants */
enum FontWeight { Light = 25, Normal = 50, DemiBold = 63, Bold = 75, Black = 87 };
- /** Horizontal alignment constants */
+ /**Qt::Horizontal tqalignment constants */
enum HAlignment { Left = 0, Center, Right };
- /** Vertial alignment constants */
+ /** Vertial tqalignment constants */
enum VAlignment { Top = 0, Middle, Bottom };
/** Constructor */
@@ -43,18 +43,18 @@ public:
protected:
/** Label text */
- QString text;
+ TQString text;
/** Label text font family */
- QString fontFamily;
+ TQString fontFamily;
/** Label text font size in points */
int fontSize;
/** Label text font weight */
int fontWeight;
/** Label text font italic flag */
bool fontItalic;
- /** Lable text horizontal alignment */
+ /** Lable text horizontal tqalignment */
int hAlignment;
- /** Label text vertical alignment */
+ /** Label text vertical tqalignment */
int vAlignment;
/** Label text word wrap flag */
bool wordWrap;
@@ -67,17 +67,17 @@ private:
public:
/** Sets the label's text string - default is an empty string*/
- virtual void setText( const QString txt );
+ virtual void setText( const TQString txt );
/** Sets the label's text font - default is Times,10,Normal,false */
- void setFont( const QString family, int size, int weight, bool italic );
- /** Sets the label's horizontal alignment -default is Left */
+ void setFont( const TQString family, int size, int weight, bool italic );
+ /** Sets the label's horizontal tqalignment -default is Left */
void setHorizontalAlignment( int a );
- /** Sets the label's vertical alignment - default is Top */
+ /** Sets the label's vertical tqalignment - default is Top */
void setVerticalAlignment( int a );
/** Sets the label's word wrap flag - default is false */
void setWordWrap( bool state );
/** Draws the label using the specificed painter & x/y-offsets */
- void draw( QPainter* p, int xoffset, int yoffset );
+ void draw( TQPainter* p, int xoffset, int yoffset );
private:
/** Copies member data from one object to another.
diff --git a/kugar/lib/mlineobject.cpp b/kugar/lib/mlineobject.cpp
index dba41078..2a4a0bc9 100644
--- a/kugar/lib/mlineobject.cpp
+++ b/kugar/lib/mlineobject.cpp
@@ -12,9 +12,9 @@ namespace Kugar
{
/** Constructor */
-MLineObject::MLineObject() : QObject()
+MLineObject::MLineObject() : TQObject()
{
- // Set the object's default geometry
+ // Set the object's default tqgeometry
xpos1 = 0;
ypos1 = 0;
xpos2 = 0;
@@ -27,7 +27,7 @@ MLineObject::MLineObject() : QObject()
}
/** Copy constructor */
-MLineObject::MLineObject( const MLineObject& mLineObject ) /*: QObject((QObject &) mLineObject)*/
+MLineObject::MLineObject( const MLineObject& mLineObject ) /*: TQObject((TQObject &) mLineObject)*/
{
copy( &mLineObject );
}
@@ -42,7 +42,7 @@ MLineObject MLineObject::operator=( const MLineObject& mLineObject )
copy( &mLineObject );
// Copy the base class's data
- //((QObject &) *this) = mLineObject;
+ //((TQObject &) *this) = mLineObject;
return *this;
}
@@ -79,15 +79,15 @@ void MLineObject::setWidth( int width )
}
/** Draws the object to the specified painter & x/y offsets */
-void MLineObject::draw( QPainter* p, int xoffset, int yoffset )
+void MLineObject::draw( TQPainter* p, int xoffset, int yoffset )
{
drawBase( p, xoffset, yoffset );
}
/** Draws the base object to the specified painter & x/y offsets */
-void MLineObject::drawBase( QPainter* p, int xoffset, int yoffset )
+void MLineObject::drawBase( TQPainter* p, int xoffset, int yoffset )
{
- QPen linePen( penColor, penWidth, ( QPen::PenStyle ) penStyle );
+ TQPen linePen( penColor, penWidth, ( TQPen::PenStyle ) penStyle );
// Set the offsets
int xcalc1 = xpos1 + xoffset;
@@ -104,7 +104,7 @@ void MLineObject::drawBase( QPainter* p, int xoffset, int yoffset )
Used by the copy constructor and assignment operator */
void MLineObject::copy( const MLineObject* mLineObject )
{
- // Copy the object's geometry
+ // Copy the object's tqgeometry
xpos1 = mLineObject->xpos1;
ypos1 = mLineObject->ypos1;
xpos2 = mLineObject->xpos2;
diff --git a/kugar/lib/mlineobject.h b/kugar/lib/mlineobject.h
index f3260ddd..3ee686c0 100644
--- a/kugar/lib/mlineobject.h
+++ b/kugar/lib/mlineobject.h
@@ -9,10 +9,10 @@
#ifndef MLINEOBJECT_H
#define MLINEOBJECT_H
-#include <qobject.h>
-#include <qpainter.h>
-#include <qpaintdevice.h>
-#include <qcolor.h>
+#include <tqobject.h>
+#include <tqpainter.h>
+#include <tqpaintdevice.h>
+#include <tqcolor.h>
/**Kugar report line object
*@author Mutiny Bay Software
@@ -21,7 +21,7 @@
namespace Kugar
{
-class MLineObject : public QObject
+class MLineObject : public TQObject
{
public:
@@ -51,7 +51,7 @@ protected:
/** Object's width */
int penWidth;
/** Object's color */
- QColor penColor;
+ TQColor penColor;
/** Object's style */
int penStyle;
@@ -65,11 +65,11 @@ public:
/** Sets the object's color */
void setColor( int r, int g, int b );
/** Draws the object to the specified painter & x/y offsets */
- virtual void draw( QPainter* p, int xoffset, int yoffset );
+ virtual void draw( TQPainter* p, int xoffset, int yoffset );
protected:
/** Draws the object to the specified painter & x/y offsets */
- void drawBase( QPainter* p, int xoffset, int yoffset );
+ void drawBase( TQPainter* p, int xoffset, int yoffset );
private:
/** Copies member data from one object to another.
diff --git a/kugar/lib/mpagecollection.cpp b/kugar/lib/mpagecollection.cpp
index 3359f4b4..22618656 100644
--- a/kugar/lib/mpagecollection.cpp
+++ b/kugar/lib/mpagecollection.cpp
@@ -15,7 +15,7 @@ namespace Kugar
{
/** Constructor */
-MPageCollection::MPageCollection( QObject *parent ) : QObject( parent )
+MPageCollection::MPageCollection( TQObject *tqparent ) : TQObject( tqparent )
{
// Set page list to AutoDelete
pages.setAutoDelete( true );
@@ -29,7 +29,7 @@ MPageCollection::MPageCollection( QObject *parent ) : QObject( parent )
}
/** Copy constructor */
-MPageCollection::MPageCollection( const MPageCollection& mPageCollection ) /*: QObject((QObject &) mPageCollection)*/
+MPageCollection::MPageCollection( const MPageCollection& mPageCollection ) /*: TQObject((TQObject &) mPageCollection)*/
{
copy( &mPageCollection );
}
@@ -44,7 +44,7 @@ MPageCollection MPageCollection::operator=( const MPageCollection& mPageCollecti
copy( &mPageCollection );
// Copy the base class's data
- //((QObject &) *this) = mPageCollection;
+ //((TQObject &) *this) = mPageCollection;
return *this;
}
@@ -65,13 +65,13 @@ void MPageCollection::clear()
/** Appends a new page to the page collection */
void MPageCollection::appendPage()
{
- pages.append( new QPicture() );
+ pages.append( new TQPicture() );
}
/** Gets the current page in the page collection,
* the current page may be null
*/
-QPicture* MPageCollection::getCurrentPage()
+TQPicture* MPageCollection::getCurrentPage()
{
return pages.current();
}
@@ -79,7 +79,7 @@ QPicture* MPageCollection::getCurrentPage()
/** Gets the first page in the page collection,
* returns NULL if the list is empty
*/
-QPicture* MPageCollection::getFirstPage()
+TQPicture* MPageCollection::getFirstPage()
{
return pages.first();
}
@@ -87,7 +87,7 @@ QPicture* MPageCollection::getFirstPage()
/** Gets the next page in the page collection,
* returns NULL if the end of the list has been reached
*/
-QPicture* MPageCollection::getNextPage()
+TQPicture* MPageCollection::getNextPage()
{
return pages.next();
}
@@ -95,7 +95,7 @@ QPicture* MPageCollection::getNextPage()
/** Get the previous page in the page collection,
* returns NULL if the beginning of the list has been reached
*/
-QPicture* MPageCollection::getPreviousPage()
+TQPicture* MPageCollection::getPreviousPage()
{
return pages.prev();
}
@@ -103,7 +103,7 @@ QPicture* MPageCollection::getPreviousPage()
/** Gets the last page in the page collection,
* returns NULL if the list is empty
*/
-QPicture* MPageCollection::getLastPage()
+TQPicture* MPageCollection::getLastPage()
{
return pages.last();
}
@@ -133,7 +133,7 @@ void MPageCollection::setPageOrientation( int o )
}
/** Sets the page dimensions */
-void MPageCollection::setPageDimensions( QSize dim )
+void MPageCollection::setPageDimensions( TQSize dim )
{
dimensions = dim;
}
@@ -151,7 +151,7 @@ int MPageCollection::pageOrientation()
}
/** Returns the page dimensions */
-QSize MPageCollection::pageDimensions()
+TQSize MPageCollection::pageDimensions()
{
return dimensions;
}
diff --git a/kugar/lib/mpagecollection.h b/kugar/lib/mpagecollection.h
index 8b1c84aa..c4b78cee 100644
--- a/kugar/lib/mpagecollection.h
+++ b/kugar/lib/mpagecollection.h
@@ -9,10 +9,10 @@
#ifndef MPAGECOLLECTION_H
#define MPAGECOLLECTION_H
-#include <qobject.h>
-#include <qptrlist.h>
-#include <qpicture.h>
-#include <qsize.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
+#include <tqpicture.h>
+#include <tqsize.h>
/**Kugar report page collection
*@author Mutiny Bay Software
@@ -21,12 +21,12 @@
namespace Kugar
{
-class MPageCollection : public QObject
+class MPageCollection : public TQObject
{
public:
/** Constructor */
- MPageCollection( QObject *parent );
+ MPageCollection( TQObject *tqparent );
/** Copy constructor */
MPageCollection( const MPageCollection& mPageCollection );
/** Assignment operator */
@@ -36,9 +36,9 @@ public:
private:
/** The report page list */
- QPtrList<QPicture> pages;
+ TQPtrList<TQPicture> pages;
/** Page dimensions */
- QSize dimensions;
+ TQSize dimensions;
/** Page size */
int size;
/** Page orientation */
@@ -54,23 +54,23 @@ public:
/** Gets the current page in the page collection,
* the current page may be null
*/
- QPicture* getCurrentPage();
+ TQPicture* getCurrentPage();
/** Gets the first page in the page collection,
* returns NULL if the list is empty
*/
- QPicture* getFirstPage();
+ TQPicture* getFirstPage();
/** Get the previous page in the page collection,
* returns NULL if the beginning of the list has been reached
*/
- QPicture* getPreviousPage();
+ TQPicture* getPreviousPage();
/** Gets the next page in the page collection,
* returns NULL if the end of the list has been reached
*/
- QPicture* getNextPage();
+ TQPicture* getNextPage();
/** Gets the last page in the page collection,
* returns NULL if the list empty
*/
- QPicture* getLastPage();
+ TQPicture* getLastPage();
/** Get the index of the current page */
int getCurrentIndex();
@@ -82,13 +82,13 @@ public:
/** Sets the page orientation */
void setPageOrientation( int o );
/** Sets the page dimensions */
- void setPageDimensions( QSize dim );
+ void setPageDimensions( TQSize dim );
/** Returns the page size */
int pageSize();
/** Returns the page orientation */
int pageOrientation();
/** Returns the page dimensions */
- QSize pageDimensions();
+ TQSize pageDimensions();
/** Returns the number of pages in the page collection */
int pageCount();
diff --git a/kugar/lib/mpagedisplay.cpp b/kugar/lib/mpagedisplay.cpp
index c3a5d587..75ff2999 100644
--- a/kugar/lib/mpagedisplay.cpp
+++ b/kugar/lib/mpagedisplay.cpp
@@ -12,7 +12,7 @@ namespace Kugar
{
/** Constructor */
-MPageDisplay::MPageDisplay( QWidget *parent, const char *name ) : QWidget( parent, name )
+MPageDisplay::MPageDisplay( TQWidget *tqparent, const char *name ) : TQWidget( tqparent, name )
{
buffer.resize( 1, 1 );
}
@@ -22,21 +22,21 @@ MPageDisplay::~MPageDisplay()
{}
/** Sets the report page image */
-void MPageDisplay::setPage( QPicture* image )
+void MPageDisplay::setPage( TQPicture* image )
{
buffer.fill( white );
- QPainter p( &buffer );
+ TQPainter p( &buffer );
image->play( &p );
}
/** Display object's paint event */
-void MPageDisplay::paintEvent( QPaintEvent* event )
+void MPageDisplay::paintEvent( TQPaintEvent* event )
{
bitBlt( this, 0, 0, &buffer );
}
/** Sets the page display dimensions */
-void MPageDisplay::setPageDimensions( QSize size )
+void MPageDisplay::setPageDimensions( TQSize size )
{
buffer.resize( size );
resize( size );
@@ -45,7 +45,7 @@ void MPageDisplay::setPageDimensions( QSize size )
// Return the preferred size of the display.
-QSize MPageDisplay::sizeHint() const
+TQSize MPageDisplay::tqsizeHint() const
{
return buffer.size();
}
@@ -53,9 +53,9 @@ QSize MPageDisplay::sizeHint() const
// Return the size policy.
-QSizePolicy MPageDisplay::sizePolicy() const
+TQSizePolicy MPageDisplay::sizePolicy() const
{
- return QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
+ return TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed );
}
}
diff --git a/kugar/lib/mpagedisplay.h b/kugar/lib/mpagedisplay.h
index ffaa4921..db4f7f74 100644
--- a/kugar/lib/mpagedisplay.h
+++ b/kugar/lib/mpagedisplay.h
@@ -9,11 +9,11 @@
#ifndef MPAGEDISPLAY_H
#define MPAGEDISPLAY_H
-#include <qwidget.h>
-#include <qpainter.h>
-#include <qpixmap.h>
-#include <qpicture.h>
-#include <qsize.h>
+#include <tqwidget.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
+#include <tqpicture.h>
+#include <tqsize.h>
/**Kugar page display widget
*@author Mutiny Bay Software
@@ -22,31 +22,32 @@
namespace Kugar
{
-class MPageDisplay : public QWidget
+class MPageDisplay : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
/** Constructor */
- MPageDisplay( QWidget *parent = 0, const char *name = 0 );
+ MPageDisplay( TQWidget *tqparent = 0, const char *name = 0 );
/** Destructor */
virtual ~MPageDisplay();
private:
/** Page Widget's image buffer */
- QPixmap buffer;
+ TQPixmap buffer;
public:
/** Sets the page image */
- void setPage( QPicture* image );
+ void setPage( TQPicture* image );
/** Sets the page display dimensions */
- void setPageDimensions( QSize size );
+ void setPageDimensions( TQSize size );
- QSize sizeHint() const;
- QSizePolicy sizePolicy() const;
+ TQSize tqsizeHint() const;
+ TQSizePolicy sizePolicy() const;
protected:
/** Page widget's's paint event */
- void paintEvent( QPaintEvent* event );
+ void paintEvent( TQPaintEvent* event );
};
diff --git a/kugar/lib/mreportdetail.cpp b/kugar/lib/mreportdetail.cpp
index 6fa4bc53..eb593408 100644
--- a/kugar/lib/mreportdetail.cpp
+++ b/kugar/lib/mreportdetail.cpp
@@ -66,7 +66,7 @@ bool MReportDetail::getRepeat() const
}
/** Draws the detail section to the selected painter & x/y-offsets */
-void MReportDetail::draw( QPainter* p, int xoffset, int yoffset )
+void MReportDetail::draw( TQPainter* p, int xoffset, int yoffset )
{
MFieldObject * field;
@@ -91,7 +91,7 @@ void MReportDetail::addField( MFieldObject* field )
}
/** Sets the data for the field at the specified index */
-void MReportDetail::setFieldData( int idx, QString data )
+void MReportDetail::setFieldData( int idx, TQString data )
{
MFieldObject * field = fields.at( idx );
@@ -105,7 +105,7 @@ int MReportDetail::getFieldCount()
}
/** Returns the name of the bound field for field object at the given index */
-QString MReportDetail::getFieldName( int idx )
+TQString MReportDetail::getFieldName( int idx )
{
MFieldObject * field = fields.at( idx );
diff --git a/kugar/lib/mreportdetail.h b/kugar/lib/mreportdetail.h
index ee2e9222..7aa8a1b7 100644
--- a/kugar/lib/mreportdetail.h
+++ b/kugar/lib/mreportdetail.h
@@ -36,7 +36,7 @@ protected:
/** Sections's repeat on new pages */
bool repeat;
/** Section's field collection */
- QPtrList<MFieldObject> fields;
+ TQPtrList<MFieldObject> fields;
public:
/** Sets whether to repeat the detail on new pages */
@@ -44,15 +44,15 @@ public:
/** Sets whether to repeat the detail on new pages */
bool getRepeat() const;
/** Draws the detail section to the specified painter & x/y-offsets */
- void draw( QPainter* p, int xoffset, int yoffset );
+ void draw( TQPainter* p, int xoffset, int yoffset );
/** Adds a new field object to the section's field collection */
void addField( MFieldObject* field );
/** Sets the data for the field at the specified index */
- void setFieldData( int idx, QString data );
+ void setFieldData( int idx, TQString data );
/** Returns the number of fields in the detail section */
int getFieldCount();
/** Returns the name of the bound field for field object at the given index */
- QString getFieldName( int idx );
+ TQString getFieldName( int idx );
/** Frees all resources allocated by the report section */
void clear();
diff --git a/kugar/lib/mreportengine.cpp b/kugar/lib/mreportengine.cpp
index fd4a2ce2..654e1fff 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() )
{
diff --git a/kugar/lib/mreportengine.h b/kugar/lib/mreportengine.h
index c8280c1d..33b651cc 100644
--- a/kugar/lib/mreportengine.h
+++ b/kugar/lib/mreportengine.h
@@ -11,13 +11,13 @@
#ifndef MREPORTENGINE_H
#define MREPORTENGINE_H
-#include <qobject.h>
-#include <qpicture.h>
-#include <qpaintdevicemetrics.h>
-#include <qsize.h>
-#include <qmemarray.h>
-#include <qdom.h>
-#include <qguardedptr.h>
+#include <tqobject.h>
+#include <tqpicture.h>
+#include <tqpaintdevicemetrics.h>
+#include <tqsize.h>
+#include <tqmemarray.h>
+#include <tqdom.h>
+#include <tqguardedptr.h>
#include "mlineobject.h"
#include "mlabelobject.h"
@@ -34,9 +34,10 @@
namespace Kugar
{
-class MReportEngine : public QObject
+class MReportEngine : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
enum PageOrientation { Portrait, Landscape };
@@ -53,11 +54,11 @@ public:
MReportEngine operator=( const MReportEngine& mReportEngine );
virtual ~MReportEngine();
- bool setReportData( const QString & );
- bool setReportData( QIODevice * );
- bool setReportData( const QDomDocument& );
- bool setReportTemplate( const QString & );
- bool setReportTemplate( QIODevice * );
+ bool setReportData( const TQString & );
+ bool setReportData( TQIODevice * );
+ bool setReportData( const TQDomDocument& );
+ bool setReportTemplate( const TQString & );
+ bool setReportTemplate( TQIODevice * );
int getRenderSteps()
{
return records.length() / 2;
@@ -70,24 +71,24 @@ public slots:
void slotCancelRendering();
signals:
- void signalRenderStatus( int );
- void preferedTemplate( const QString & );
+ void signalRendertqStatus( int );
+ void preferedTemplate( const TQString & );
protected:
void recalcDimensions();
- void recalcAttribute( const QString& name, QDomNamedNodeMap attributes );
+ void recalcAttribute( const TQString& name, TQDomNamedNodeMap attributes );
private:
MPageCollection *m_pageCollection;
bool m_needRegeneration;
/** Report data document */
- QDomDocument rd;
+ TQDomDocument rd;
/** Report template document */
- QDomDocument rt;
+ TQDomDocument rt;
/** Report painter */
- QPainter p;
+ TQPainter p;
/** Report page size */
int pageSize;
@@ -115,11 +116,11 @@ private:
/** Page header */
MReportSection pHeader;
/** Detail headers */
- QPtrList<MReportSection> dHeaders;
+ TQPtrList<MReportSection> dHeaders;
/** Detail sections */
- QPtrList<MReportDetail> details;
+ TQPtrList<MReportDetail> details;
/** Detail footers */
- QPtrList<MReportSection> dFooters;
+ TQPtrList<MReportSection> dFooters;
/** Page footer */
MReportSection pFooter;
/** Report footer */
@@ -135,17 +136,17 @@ private:
/** Current page number */
int currPage;
/** Current report date */
- QDate currDate;
+ TQDate currDate;
/** Grand total array */
- QPtrList<QMemArray<double> > grandTotal;
+ TQPtrList<TQMemArray<double> > grandTotal;
/** Cancel rendering flag */
bool cancelRender;
int m_refCount;
private:
// The set of records being rendered.
- QDomNodeList records;
+ TQDomNodeList records;
/** Clears report formatting */
void clearFormatting();
/** Starts a new page of the report */
@@ -164,33 +165,33 @@ private:
void drawReportFooter( MPageCollection* pages );
/** Gets the metrics for the selected page size */
- QSize getPageMetrics( int size, int orientation );
+ TQSize getPageMetrics( int size, int orientation );
void initData();
void initTemplate();
- /** Sets the main layout attributes for the report */
- void setReportAttributes( QDomNode* report );
+ /** Sets the main tqlayout attributes for the report */
+ void setReportAttributes( TQDomNode* report );
int scaleDeltaWidth( int width ) const;
int scaleDeltaHeight( int width ) const;
- /** Sets the layout attributes for the given report section */
- void setSectionAttributes( MReportSection* section, QDomNode* report );
- /** Sets the layout attributes for the detail headers and footers */
- void setDetMiscAttributes( MReportSection* section, QDomNode* report );
- /** Sets the layout attributes for the detail section */
- void setDetailAttributes( QDomNode* report );
- /** Sets a line's layout attributes */
- void setLineAttributes( MLineObject* line, QDomNamedNodeMap* attr );
- /** Sets a label's layout attributes */
- void setLabelAttributes( MLabelObject* label, QDomNamedNodeMap* attr );
- /** Sets a special field's layout attributes */
- void setSpecialAttributes( MSpecialObject* field, QDomNamedNodeMap* attr );
- /** Sets a field's layout attributes */
- void setFieldAttributes( MFieldObject* field, QDomNamedNodeMap* attr );
- /** Sets a calculated field's layout attributes */
- void setCalculatedFieldAttributes( MCalcObject* field, QDomNamedNodeMap* attr );
+ /** Sets the tqlayout attributes for the given report section */
+ void setSectionAttributes( MReportSection* section, TQDomNode* report );
+ /** Sets the tqlayout attributes for the detail headers and footers */
+ void setDetMiscAttributes( MReportSection* section, TQDomNode* report );
+ /** Sets the tqlayout attributes for the detail section */
+ void setDetailAttributes( TQDomNode* report );
+ /** Sets a line's tqlayout attributes */
+ void setLineAttributes( MLineObject* line, TQDomNamedNodeMap* attr );
+ /** Sets a label's tqlayout attributes */
+ void setLabelAttributes( MLabelObject* label, TQDomNamedNodeMap* attr );
+ /** Sets a special field's tqlayout attributes */
+ void setSpecialAttributes( MSpecialObject* field, TQDomNamedNodeMap* attr );
+ /** Sets a field's tqlayout attributes */
+ void setFieldAttributes( MFieldObject* field, TQDomNamedNodeMap* attr );
+ /** Sets a calculated field's tqlayout attributes */
+ void setCalculatedFieldAttributes( MCalcObject* field, TQDomNamedNodeMap* attr );
/** Copies member data from one object to another.
* Used by the copy constructor and assignment operator
diff --git a/kugar/lib/mreportobject.cpp b/kugar/lib/mreportobject.cpp
index d7e065f5..7fec9dd9 100644
--- a/kugar/lib/mreportobject.cpp
+++ b/kugar/lib/mreportobject.cpp
@@ -14,9 +14,9 @@ namespace Kugar
{
/** Constructor */
-MReportObject::MReportObject() : QObject()
+MReportObject::MReportObject() : TQObject()
{
- // Set the object's default geometry
+ // Set the object's default tqgeometry
xpos = 0;
ypos = 0;
width = 40;
@@ -38,7 +38,7 @@ MReportObject::MReportObject() : QObject()
}
/** Copy constructor */
-MReportObject::MReportObject( const MReportObject& mReportObject ) /*: QObject((QObject &) mReportObject)*/
+MReportObject::MReportObject( const MReportObject& mReportObject ) /*: TQObject((TQObject &) mReportObject)*/
{
copy( &mReportObject );
}
@@ -53,7 +53,7 @@ MReportObject MReportObject::operator=( const MReportObject& mReportObject )
copy( &mReportObject );
// Copy the base class's data
- //((QObject &) *this) = mReportObject;
+ //((TQObject &) *this) = mReportObject;
return *this;
}
@@ -63,16 +63,16 @@ MReportObject::~MReportObject()
{}
/** Draws the object to the specified painter & x/y offsets */
-void MReportObject::draw( QPainter* p, int xoffset, int yoffset )
+void MReportObject::draw( TQPainter* p, int xoffset, int yoffset )
{
drawBase( p, xoffset, yoffset );
}
/** Draws the base object to the specified painter & x/y offsets */
-void MReportObject::drawBase( QPainter* p, int xoffset, int yoffset )
+void MReportObject::drawBase( TQPainter* p, int xoffset, int yoffset )
{
- QBrush bgBrush( backgroundColor );
- QPen borderPen( borderColor, borderWidth, ( QPen::PenStyle ) borderStyle );
+ TQBrush bgBrush( backgroundColor );
+ TQPen borderPen( borderColor, borderWidth, ( TQPen::PenStyle ) borderStyle );
// Set the offsets
int xcalc = xpos + xoffset;
@@ -80,7 +80,7 @@ void MReportObject::drawBase( QPainter* p, int xoffset, int yoffset )
// Set background in specified color
p->setBrush( bgBrush );
- p->setPen( Qt::NoPen );
+ p->setPen( TQt::NoPen );
p->drawRect( xcalc, ycalc, width, height );
// Set border
@@ -99,7 +99,7 @@ void MReportObject::drawBase( QPainter* p, int xoffset, int yoffset )
}
else
{
- p->setPen( QPen( QColor( 255, 255, 255 ), 1, QPen::SolidLine ) );
+ p->setPen( TQPen( TQColor( 255, 255, 255 ), 1, TQPen::SolidLine ) );
p->drawRect( xcalc, ycalc, width, height );
}
}
@@ -166,7 +166,7 @@ void MReportObject::setBorderStyle( int style )
Used by the copy constructor and assignment operator */
void MReportObject::copy( const MReportObject* mReportObject )
{
- // Copy the object's geometry
+ // Copy the object's tqgeometry
xpos = mReportObject->xpos;
ypos = mReportObject->ypos;
width = mReportObject->width;
diff --git a/kugar/lib/mreportobject.h b/kugar/lib/mreportobject.h
index ce28cf75..c85ca80a 100644
--- a/kugar/lib/mreportobject.h
+++ b/kugar/lib/mreportobject.h
@@ -11,10 +11,10 @@
#ifndef MREPORTOBJECT_H
#define MREPORTOBJECT_H
-#include <qobject.h>
-#include <qpainter.h>
-#include <qpaintdevice.h>
-#include <qcolor.h>
+#include <tqobject.h>
+#include <tqpainter.h>
+#include <tqpaintdevice.h>
+#include <tqcolor.h>
/**Kugar report object baseclass
*@author Mutiny Bay Software
@@ -23,7 +23,7 @@
namespace Kugar
{
-class MReportObject : public QObject
+class MReportObject : public TQObject
{
public:
@@ -51,12 +51,12 @@ protected:
int height;
/** Object's background color */
- QColor backgroundColor;
+ TQColor backgroundColor;
/** Object's foreground color */
- QColor foregroundColor;
+ TQColor foregroundColor;
/** Object's border color */
- QColor borderColor;
+ TQColor borderColor;
/** Object's border width */
int borderWidth;
/** Object's border style */
@@ -72,7 +72,7 @@ protected:
public:
/** Draws the object to the specified painter & x/y offsets */
- virtual void draw( QPainter* p, int xoffset, int yoffset );
+ virtual void draw( TQPainter* p, int xoffset, int yoffset );
/** Sets the object's position and size */
void setGeometry( int x, int y, int w, int h );
/** Sets the object's position */
@@ -112,7 +112,7 @@ public:
protected:
/** Draws the base object to the specified painter & x/y offsets */
- void drawBase( QPainter* p, int xoffset, int yoffset );
+ void drawBase( TQPainter* p, int xoffset, int yoffset );
private:
/** Copies member data from one object to another.
diff --git a/kugar/lib/mreportsection.cpp b/kugar/lib/mreportsection.cpp
index 9712407a..1184d773 100644
--- a/kugar/lib/mreportsection.cpp
+++ b/kugar/lib/mreportsection.cpp
@@ -17,14 +17,14 @@ namespace Kugar
/** Constructor */
MReportSection::MReportSection()
{
- // Set geometry
+ // Set tqgeometry
height = 50;
// Set print frequency
frequency = MReportSection::EveryPage;
// Set special field data
- reportDate = QDate::currentDate();
+ reportDate = TQDate::tqcurrentDate();
pageNumber = 0;
// Set the line list to AutoDelete
@@ -38,7 +38,7 @@ MReportSection::MReportSection()
}
/** Copy constructor */
-MReportSection::MReportSection( const MReportSection& mReportSection ) /*: QObject((QObject &) mReportSection)*/
+MReportSection::MReportSection( const MReportSection& mReportSection ) /*: TQObject((TQObject &) mReportSection)*/
{
copy( &mReportSection );
}
@@ -53,7 +53,7 @@ MReportSection MReportSection::operator=( const MReportSection& mReportSection )
copy( &mReportSection );
// Copy the base class's data
- //((QObject &) *this) = mReportSection;
+ //((TQObject &) *this) = mReportSection;
return *this;
}
@@ -146,7 +146,7 @@ void MReportSection::setPageNumber( int page )
}
/** Set the current date - used by special fields */
-void MReportSection::setReportDate( QDate date )
+void MReportSection::setReportDate( TQDate date )
{
reportDate = date;
}
@@ -164,7 +164,7 @@ int MReportSection::printFrequency()
}
/** Returns the name of the bound field for the calculated field object at the given index */
-QString MReportSection::getCalcFieldName( int idx )
+TQString MReportSection::getCalcFieldName( int idx )
{
MCalcObject * field = calculatedFields.at( idx );
@@ -172,7 +172,7 @@ QString MReportSection::getCalcFieldName( int idx )
}
/** Sets the data for the specified calculated field */
-void MReportSection::setCalcFieldData( int idx, QString data )
+void MReportSection::setCalcFieldData( int idx, TQString data )
{
MCalcObject * field = calculatedFields.at( idx );
@@ -180,7 +180,7 @@ void MReportSection::setCalcFieldData( int idx, QString data )
}
/** Sets the data for the all calculated fields - list size must number of calculated fields */
-void MReportSection::setCalcFieldData( QPtrList<QMemArray<double> >* values )
+void MReportSection::setCalcFieldData( TQPtrList<TQMemArray<double> >* values )
{
MCalcObject * field;
int i = 0;
@@ -191,19 +191,19 @@ void MReportSection::setCalcFieldData( QPtrList<QMemArray<double> >* values )
switch ( field->getCalculationType() )
{
case MCalcObject::Count:
- field->setText( QString::number( MUtil::count( values->at( i ) ) ) );
+ field->setText( TQString::number( MUtil::count( values->at( i ) ) ) );
break;
case MCalcObject::Sum:
- field->setText( QString::number( MUtil::sum( values->at( i ) ), 'f', 2 ) );
+ field->setText( TQString::number( MUtil::sum( values->at( i ) ), 'f', 2 ) );
break;
case MCalcObject::Average:
- field->setText( QString::number( MUtil::average( values->at( i ) ) ) );
+ field->setText( TQString::number( MUtil::average( values->at( i ) ) ) );
break;
case MCalcObject::Variance:
- field->setText( QString::number( MUtil::variance( values->at( i ) ) ) );
+ field->setText( TQString::number( MUtil::variance( values->at( i ) ) ) );
break;
case MCalcObject::StandardDeviation:
- field->setText( QString::number( MUtil::stdDeviation( values->at( i ) ) ) );
+ field->setText( TQString::number( MUtil::stdDeviation( values->at( i ) ) ) );
break;
}
i++;
@@ -211,7 +211,7 @@ void MReportSection::setCalcFieldData( QPtrList<QMemArray<double> >* values )
}
/** Returns the index of the calculated field object for the given bound field */
-int MReportSection::getCalcFieldIndex( QString field )
+int MReportSection::getCalcFieldIndex( TQString field )
{
MCalcObject * tmpField;
@@ -231,13 +231,13 @@ int MReportSection::getCalcFieldCount()
}
/** Draws the section to the specified painter & x/y-offsets */
-void MReportSection::draw( QPainter* p, int xoffset, int yoffset )
+void MReportSection::draw( TQPainter* p, int xoffset, int yoffset )
{
drawObjects( p, xoffset, yoffset );
}
/** Draws the section base objects to the specified painter & x/y offsets */
-void MReportSection::drawObjects( QPainter* p, int xoffset, int yoffset )
+void MReportSection::drawObjects( TQPainter* p, int xoffset, int yoffset )
{
MLineObject * line;
MLabelObject* label;
@@ -293,7 +293,7 @@ void MReportSection::drawObjects( QPainter* p, int xoffset, int yoffset )
Used by the copy constructor and assignment operator */
void MReportSection::copy( const MReportSection* mReportSection )
{
- // Copy the section's geometry
+ // Copy the section's tqgeometry
height = mReportSection->height;
// Copy the print frequency
@@ -311,7 +311,7 @@ void MReportSection::copy( const MReportSection* mReportSection )
calculatedFields = mReportSection->calculatedFields;
}
-void MReportSection::setFieldData( QString name, QString data )
+void MReportSection::setFieldData( TQString name, TQString data )
{
MFieldObject * field;
for ( field = fields.first(); field != 0; field = fields.next() )
diff --git a/kugar/lib/mreportsection.h b/kugar/lib/mreportsection.h
index 704daf4b..1121e010 100644
--- a/kugar/lib/mreportsection.h
+++ b/kugar/lib/mreportsection.h
@@ -11,8 +11,8 @@
#ifndef MREPORTSECTION_H
#define MREPORTSECTION_H
-#include <qptrlist.h>
-#include <qobject.h>
+#include <tqptrlist.h>
+#include <tqobject.h>
#include "mlineobject.h"
#include "mlabelobject.h"
@@ -27,7 +27,7 @@
namespace Kugar
{
-class MReportSection : public QObject
+class MReportSection : public TQObject
{
public:
@@ -53,18 +53,18 @@ protected:
/** Page number - used by special fields */
int pageNumber;
/** Report date - used by special fields */
- QDate reportDate;
+ TQDate reportDate;
/** Section's line collection */
- QPtrList<MLineObject> lines;
+ TQPtrList<MLineObject> lines;
/** Section's label collection */
- QPtrList<MLabelObject> labels;
+ TQPtrList<MLabelObject> labels;
/** Section's special field collection */
- QPtrList<MSpecialObject> specialFields;
+ TQPtrList<MSpecialObject> specialFields;
/** Section's calculated field collection */
- QPtrList<MCalcObject> calculatedFields;
+ TQPtrList<MCalcObject> calculatedFields;
/** Section's field collection (for use as report variables) */
- QPtrList<MFieldObject> fields;
+ TQPtrList<MFieldObject> fields;
public:
/** Adds a new line object to the section's line collection */
@@ -88,25 +88,25 @@ public:
/** Set the current page number - used by special fields */
void setPageNumber( int page );
/** Set the current date - used by special fields */
- void setReportDate( QDate date );
+ void setReportDate( TQDate date );
/** Sets the print frequency of the section */
void setPrintFrequency( int printFrequency );
/** Returns the print frequency of the section */
int printFrequency();
/** Returns the name of the bound field for the calculated field object at the given index */
- QString getCalcFieldName( int idx );
+ TQString getCalcFieldName( int idx );
/** Returns the index of the calculated field object for the given bound field */
- int getCalcFieldIndex( QString field );
+ int getCalcFieldIndex( TQString field );
/** Sets the data for the specified calculated field */
- void setCalcFieldData( int idx, QString data );
+ void setCalcFieldData( int idx, TQString data );
/** Sets the data for the all calculated fields - list size must match number of calculated fields */
- void setCalcFieldData( QPtrList<QMemArray<double> >* values );
+ void setCalcFieldData( TQPtrList<TQMemArray<double> >* values );
/** Returns the number of calculated fields in the section */
int getCalcFieldCount();
/** Sets the field data */
- void setFieldData( QString name, QString data );
+ void setFieldData( TQString name, TQString data );
/** Draws the section to the specified painter & x/y-offsets */
- virtual void draw( QPainter* p, int xoffset, int yoffset );
+ virtual void draw( TQPainter* p, int xoffset, int yoffset );
/** Frees all resources allocated by the report section */
virtual void clear();
@@ -114,7 +114,7 @@ protected:
/** Frees base resources allocated by the report section */
void clearBase();
/** Draws the section base objects to the specified painter & x/y offsets */
- void drawObjects( QPainter* p, int xoffset, int yoffset );
+ void drawObjects( TQPainter* p, int xoffset, int yoffset );
private:
/** Copies member data from one object to another.
diff --git a/kugar/lib/mreportviewer.cpp b/kugar/lib/mreportviewer.cpp
index da825f7a..c0e91656 100644
--- a/kugar/lib/mreportviewer.cpp
+++ b/kugar/lib/mreportviewer.cpp
@@ -8,7 +8,7 @@
email : cloudtemple@mksat.net
***************************************************************************/
-#include <qapplication.h>
+#include <tqapplication.h>
#include <kmessagebox.h>
#include <kprinter.h>
#include <klocale.h>
@@ -19,14 +19,14 @@ namespace Kugar
{
/** Constructor */
-MReportViewer::MReportViewer( MReportEngine *engine, QWidget *parent, const char *name ) : QWidget( parent, name ), progress( 0 )
+MReportViewer::MReportViewer( MReportEngine *engine, TQWidget *tqparent, const char *name ) : TQWidget( tqparent, name ), progress( 0 )
{
rptEngine = engine;
rptEngine->addRef();
init();
}
-MReportViewer::MReportViewer( QWidget *parent, const char *name ) : QWidget( parent, name ), progress( 0 )
+MReportViewer::MReportViewer( TQWidget *tqparent, const char *name ) : TQWidget( tqparent, name ), progress( 0 )
{
// Create the scrollview
rptEngine = new MReportEngine();
@@ -35,18 +35,18 @@ MReportViewer::MReportViewer( QWidget *parent, const char *name ) : QWidget( par
void MReportViewer::init()
{
- scroller = new QScrollView( this );
+ scroller = new TQScrollView( this );
// Connect the rendering update signal and slot
- connect( rptEngine, SIGNAL( signalRenderStatus( int ) ),
- SLOT( slotRenderProgress( int ) ) );
+ connect( rptEngine, TQT_SIGNAL( signalRendertqStatus( int ) ),
+ TQT_SLOT( slotRenderProgress( int ) ) );
- connect( rptEngine, SIGNAL( preferedTemplate( const QString & ) ),
- SIGNAL( preferedTemplate( const QString & ) ) );
+ connect( rptEngine, TQT_SIGNAL( preferedTemplate( const TQString & ) ),
+ TQT_SIGNAL( preferedTemplate( const TQString & ) ) );
// Get the current color palette
- QPalette p = palette();
- QColorGroup g = p.active();
+ TQPalette p = palette();
+ TQColorGroup g = p.active();
// Set the scroller's background color
scroller->viewport() ->setBackgroundColor( g.mid() );
@@ -72,18 +72,18 @@ MReportViewer::~MReportViewer()
}
/** Report viewer's paint event */
-void MReportViewer::paintEvent( QPaintEvent* event )
+void MReportViewer::paintEvent( TQPaintEvent* event )
{}
/** Report viewer's resize event */
-void MReportViewer::resizeEvent( QResizeEvent* event )
+void MReportViewer::resizeEvent( TQResizeEvent* event )
{
scroller->resize( event->size() );
}
// Set the report's data from an in-line string.
-bool MReportViewer::setReportData( const QString &data )
+bool MReportViewer::setReportData( const TQString &data )
{
return rptEngine -> setReportData( data );
}
@@ -91,7 +91,7 @@ bool MReportViewer::setReportData( const QString &data )
// Set the report's data from an i/o device.
-bool MReportViewer::setReportData( QIODevice *dev )
+bool MReportViewer::setReportData( TQIODevice *dev )
{
return rptEngine -> setReportData( dev );
}
@@ -99,7 +99,7 @@ bool MReportViewer::setReportData( QIODevice *dev )
// Set the report's template from an in-line string.
-bool MReportViewer::setReportTemplate( const QString &tpl )
+bool MReportViewer::setReportTemplate( const TQString &tpl )
{
return rptEngine -> setReportTemplate( tpl );
}
@@ -107,7 +107,7 @@ bool MReportViewer::setReportTemplate( const QString &tpl )
// Set the report's template from an i/o device.
-bool MReportViewer::setReportTemplate( QIODevice *dev )
+bool MReportViewer::setReportTemplate( TQIODevice *dev )
{
return rptEngine -> setReportTemplate( dev );
}
@@ -167,7 +167,7 @@ void MReportViewer::printReport()
/** Shows the first page in the report */
void MReportViewer::slotFirstPage()
{
- QPicture * page;
+ TQPicture * page;
if ( !report )
return ;
@@ -175,14 +175,14 @@ void MReportViewer::slotFirstPage()
if ( ( page = report->getFirstPage() ) != 0 )
{
display->setPage( page );
- display->repaint();
+ display->tqrepaint();
}
}
/** Shows the next page in the report */
void MReportViewer::slotNextPage()
{
- QPicture * page;
+ TQPicture * page;
if ( !report )
return ;
@@ -192,7 +192,7 @@ void MReportViewer::slotNextPage()
if ( ( page = report->getNextPage() ) != 0 )
{
display->setPage( page );
- display->repaint();
+ display->tqrepaint();
}
else
report->setCurrentPage( index );
@@ -201,7 +201,7 @@ void MReportViewer::slotNextPage()
/** Shows the prevoius page in the report */
void MReportViewer::slotPrevPage()
{
- QPicture * page;
+ TQPicture * page;
if ( !report )
return ;
@@ -211,7 +211,7 @@ void MReportViewer::slotPrevPage()
if ( ( page = report->getPreviousPage() ) != 0 )
{
display->setPage( page );
- display->repaint();
+ display->tqrepaint();
}
else
report->setCurrentPage( index );
@@ -220,7 +220,7 @@ void MReportViewer::slotPrevPage()
/** Shows the last page in the report */
void MReportViewer::slotLastPage()
{
- QPicture * page;
+ TQPicture * page;
if ( !report )
return ;
@@ -228,7 +228,7 @@ void MReportViewer::slotLastPage()
if ( ( page = report->getLastPage() ) != 0 )
{
display->setPage( page );
- display->repaint();
+ display->tqrepaint();
}
}
@@ -246,14 +246,14 @@ void MReportViewer::slotRenderProgress( int p )
if ( progress == 0 )
{
totalSteps = rptEngine->getRenderSteps();
- progress = new QProgressDialog( i18n("Creating report..."), i18n("Cancel"),
+ progress = new TQProgressDialog( i18n("Creating report..."), i18n("Cancel"),
totalSteps, this, "progress", true );
progress->setMinimumDuration( M_PROGRESS_DELAY );
}
// Update the dialog
progress->setProgress( p );
- qApp->processEvents();
+ tqApp->processEvents();
// Check if the action was canceled
if ( progress->wasCancelled() )
@@ -273,9 +273,9 @@ void MReportViewer::slotRenderProgress( int p )
// Return the preferred size.
-QSize MReportViewer::sizeHint() const
+TQSize MReportViewer::tqsizeHint() const
{
- return scroller -> sizeHint();
+ return scroller -> tqsizeHint();
}
void MReportViewer::printReport( KPrinter &printer )
@@ -295,8 +295,8 @@ void MReportViewer::printReport( KPrinter &printer )
}
- QPicture* page;
- QPainter painter;
+ TQPicture* page;
+ TQPainter painter;
bool printRev;
// Save the viewer's page index
@@ -320,13 +320,13 @@ void MReportViewer::printReport( KPrinter &printer )
printer.setNumCopies( 1 );
// Setup the progress dialog
- QProgressDialog progress( i18n( "Printing report..." ),
+ TQProgressDialog progress( i18n( "Printing report..." ),
i18n( "Cancel" ),
totalSteps, this, "progress", true );
progress.setMinimumDuration( M_PROGRESS_DELAY );
- QObject::connect( &progress, SIGNAL( cancelled() ), this, SLOT( slotCancelPrinting() ) );
+ TQObject::connect( &progress, TQT_SIGNAL( cancelled() ), this, TQT_SLOT( slotCancelPrinting() ) );
progress.setProgress( 0 );
- qApp->processEvents();
+ tqApp->processEvents();
// Start the printer
painter.begin( &printer );
@@ -340,7 +340,7 @@ void MReportViewer::printReport( KPrinter &printer )
if ( !printer.aborted() )
{
progress.setProgress( currentStep );
- qApp->processEvents();
+ tqApp->processEvents();
if ( printRev )
report->setCurrentPage( ( printCnt == 1 ) ? i : ( printCnt - 1 ) - i );
@@ -379,7 +379,7 @@ void MReportViewer::setupPrinter( KPrinter &printer )
printer.setFullPage( true );
}
-void MReportViewer::printReportSilent( int printFrom, int printTo, int printCopies, QString printerName )
+void MReportViewer::printReportSilent( int printFrom, int printTo, int printCopies, TQString printerName )
{
int cnt = report->pageCount();
if ( printFrom == -1 )
diff --git a/kugar/lib/mreportviewer.h b/kugar/lib/mreportviewer.h
index 1c6f4c03..4927f28d 100644
--- a/kugar/lib/mreportviewer.h
+++ b/kugar/lib/mreportviewer.h
@@ -11,14 +11,14 @@
#ifndef MREPORTVIEWER_H
#define MREPORTVIEWER_H
-#include <qapplication.h>
-#include <qwidget.h>
-#include <qscrollview.h>
-#include <qpixmap.h>
-#include <qpainter.h>
-#include <qpaintdevicemetrics.h>
-#include <qprogressdialog.h>
-#include <qguardedptr.h>
+#include <tqapplication.h>
+#include <tqwidget.h>
+#include <tqscrollview.h>
+#include <tqpixmap.h>
+#include <tqpainter.h>
+#include <tqpaintdevicemetrics.h>
+#include <tqprogressdialog.h>
+#include <tqguardedptr.h>
#include <koffice_export.h>
#include "mreportengine.h"
#include "mpagecollection.h"
@@ -29,7 +29,7 @@
class KPrinter;
/** Application reference, required for event processing */
-extern QApplication *mAppRef;
+extern TQApplication *mAppRef;
/**Kugar QT report viewer widget
*@author Mutiny Bay Software
@@ -38,27 +38,28 @@ extern QApplication *mAppRef;
namespace Kugar
{
-class KUGAR_EXPORT MReportViewer : public QWidget
+class KUGAR_EXPORT MReportViewer : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- MReportViewer( QWidget *parent = 0, const char *name = 0 );
- MReportViewer( MReportEngine* engine, QWidget *parent = 0, const char *name = 0 );
+ MReportViewer( TQWidget *tqparent = 0, const char *name = 0 );
+ MReportViewer( MReportEngine* engine, TQWidget *tqparent = 0, const char *name = 0 );
virtual ~MReportViewer();
- bool setReportData( const QString & );
- bool setReportData( QIODevice * );
- bool setReportTemplate( const QString & );
- bool setReportTemplate( QIODevice * );
+ bool setReportData( const TQString & );
+ bool setReportData( TQIODevice * );
+ bool setReportTemplate( const TQString & );
+ bool setReportTemplate( TQIODevice * );
bool renderReport();
void clearReport();
void printReport();
void printReport( KPrinter &printer );
void setupPrinter( KPrinter &printer );
- void printReportSilent( int printFrom = -1, int printTo = -1, int printCopies = -1, QString printerName = QString::null );
+ void printReportSilent( int printFrom = -1, int printTo = -1, int printCopies = -1, TQString printerName = TQString() );
- QSize sizeHint() const;
+ TQSize tqsizeHint() const;
public slots:
void slotFirstPage();
@@ -67,24 +68,24 @@ public slots:
void slotLastPage();
signals:
- void preferedTemplate( const QString & );
+ void preferedTemplate( const TQString & );
private slots:
void slotCancelPrinting();
void slotRenderProgress( int );
protected:
- void paintEvent( QPaintEvent *event );
- void resizeEvent( QResizeEvent *event );
+ void paintEvent( TQPaintEvent *event );
+ void resizeEvent( TQResizeEvent *event );
- QScrollView *scroller;
+ TQScrollView *scroller;
MPageDisplay *display;
MReportEngine *rptEngine;
- QGuardedPtr<MPageCollection> report;
+ TQGuardedPtr<MPageCollection> report;
KPrinter *printer;
private:
- QProgressDialog* progress;
+ TQProgressDialog* progress;
int totalSteps;
void init();
};
diff --git a/kugar/lib/mspecialobject.cpp b/kugar/lib/mspecialobject.cpp
index c06830fd..74e248d7 100644
--- a/kugar/lib/mspecialobject.cpp
+++ b/kugar/lib/mspecialobject.cpp
@@ -46,7 +46,7 @@ MSpecialObject::~MSpecialObject()
{}
/** Sets the field's data string with a date */
-void MSpecialObject::setText( QDate d )
+void MSpecialObject::setText( TQDate d )
{
text = MUtil::formatDate( d, format );
}
diff --git a/kugar/lib/mspecialobject.h b/kugar/lib/mspecialobject.h
index 58d18ca8..4493abef 100644
--- a/kugar/lib/mspecialobject.h
+++ b/kugar/lib/mspecialobject.h
@@ -9,7 +9,7 @@
#ifndef MSPECIALOBJECT_H
#define MSPECIALOBJECT_H
-#include <qdatetime.h>
+#include <tqdatetime.h>
#include "mlabelobject.h"
@@ -43,7 +43,7 @@ protected:
int format;
public:
/** Sets the field's data string with a date */
- void setText( QDate d );
+ void setText( TQDate d );
/** Sets the field's data string with a page number */
void setText( int page );
/** Sets the field's type */
diff --git a/kugar/lib/mutil.cpp b/kugar/lib/mutil.cpp
index 158d64e1..f70b67bf 100644
--- a/kugar/lib/mutil.cpp
+++ b/kugar/lib/mutil.cpp
@@ -17,10 +17,10 @@ namespace Kugar
{
/** Formats a date using one of the pre-defined formats */
-QString MUtil::formatDate( const QDate& value, int format )
+TQString MUtil::formatDate( const TQDate& value, int format )
{
- QString string;
- QString month, day, year;
+ TQString string;
+ TQString month, day, year;
// Reformat date parts - not necessarily required
month.setNum( value.month() );
@@ -40,40 +40,40 @@ QString MUtil::formatDate( const QDate& value, int format )
switch ( format )
{
case MUtil::MDY_SLASH:
- string = QString( "%1/%2/%3" ).arg( value.month() ).arg( value.day() ).arg( year );
+ string = TQString( "%1/%2/%3" ).tqarg( value.month() ).tqarg( value.day() ).tqarg( year );
break;
case MUtil::MDY_DASH:
- string = QString( "%1-%2-%3" ).arg( value.month() ).arg( value.day() ).arg( year );
+ string = TQString( "%1-%2-%3" ).tqarg( value.month() ).tqarg( value.day() ).tqarg( year );
break;
case MUtil::MMDDY_SLASH:
- string = QString( "%1/%2/%3" ).arg( month ).arg( day ).arg( year );
+ string = TQString( "%1/%2/%3" ).tqarg( month ).tqarg( day ).tqarg( year );
break;
case MUtil::MMDDY_DASH:
- string = QString( "%1-%2-%3" ).arg( month ).arg( day ).arg( year );
+ string = TQString( "%1-%2-%3" ).tqarg( month ).tqarg( day ).tqarg( year );
break;
case MUtil::MDYYYY_SLASH:
- string = QString( "%1/%2/%3" ).arg( value.month() ).arg( value.day() ).arg( value.year() );
+ string = TQString( "%1/%2/%3" ).tqarg( value.month() ).tqarg( value.day() ).tqarg( value.year() );
break;
case MUtil::MDYYYY_DASH:
- string = QString( "%1-%2-%3" ).arg( value.month() ).arg( value.day() ).arg( value.year() );
+ string = TQString( "%1-%2-%3" ).tqarg( value.month() ).tqarg( value.day() ).tqarg( value.year() );
break;
case MUtil::MMDDYYYY_SLASH:
- string = QString( "%1/%2/%3" ).arg( month ).arg( day ).arg( value.year() );
+ string = TQString( "%1/%2/%3" ).tqarg( month ).tqarg( day ).tqarg( value.year() );
break;
case MUtil::MMDDYYYY_DASH:
- string = QString( "%1-%2-%3" ).arg( month ).arg( day ).arg( value.year() );
+ string = TQString( "%1-%2-%3" ).tqarg( month ).tqarg( day ).tqarg( value.year() );
break;
case MUtil::YYYYMD_SLASH:
- string = QString( "%1/%2/%3" ).arg( value.year() ).arg( value.month() ).arg( value.day() );
+ string = TQString( "%1/%2/%3" ).tqarg( value.year() ).tqarg( value.month() ).tqarg( value.day() );
break;
case MUtil::YYYYMD_DASH:
- string = QString( "%1-%2-%3" ).arg( value.year() ).arg( value.month() ).arg( value.day() );
+ string = TQString( "%1-%2-%3" ).tqarg( value.year() ).tqarg( value.month() ).tqarg( value.day() );
break;
case MUtil::DDMMYY_PERIOD:
- string = QString( "%1.%2.%3" ).arg( day ).arg( month ).arg( year );
+ string = TQString( "%1.%2.%3" ).tqarg( day ).tqarg( month ).tqarg( year );
break;
case MUtil::DDMMYYYY_PERIOD:
- string = QString( "%1.%2.%3" ).arg( day ).arg( month ).arg( value.year() );
+ string = TQString( "%1.%2.%3" ).tqarg( day ).tqarg( month ).tqarg( value.year() );
break;
default:
string = value.toString();
@@ -82,13 +82,13 @@ QString MUtil::formatDate( const QDate& value, int format )
}
/** Returns the count for an array of doubles */
-int MUtil::count( QMemArray<double>* values )
+int MUtil::count( TQMemArray<double>* values )
{
return values->size();
}
/** Returns the sum for an array of doubles */
-double MUtil::sum( QMemArray<double>* values )
+double MUtil::sum( TQMemArray<double>* values )
{
double tmpSum = 0.0;
int size = count( values );
@@ -100,13 +100,13 @@ double MUtil::sum( QMemArray<double>* values )
}
/** Returns the average value for an array of doubles */
-double MUtil::average( QMemArray<double>* values )
+double MUtil::average( TQMemArray<double>* values )
{
return sum( values ) / count( values );
}
/** Returns the variance for an array of doubles */
-double MUtil::variance( QMemArray<double>* values )
+double MUtil::variance( TQMemArray<double>* values )
{
double tmpVar = 0.0;
double tmpAvg = average( values );
@@ -119,7 +119,7 @@ double MUtil::variance( QMemArray<double>* values )
}
/** Returns the standard deviation for an array of doubles */
-double MUtil::stdDeviation( QMemArray<double>* values )
+double MUtil::stdDeviation( TQMemArray<double>* values )
{
return sqrt( variance( values ) );
}
diff --git a/kugar/lib/mutil.h b/kugar/lib/mutil.h
index b7aa764f..9003221b 100644
--- a/kugar/lib/mutil.h
+++ b/kugar/lib/mutil.h
@@ -11,10 +11,10 @@
#ifndef MUTIL_H
#define MUTIL_H
-#include <qobject.h>
-#include <qstring.h>
-#include <qdatetime.h>
-#include <qmemarray.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqdatetime.h>
+#include <tqmemarray.h>
/**Kugar utlity class
@@ -39,18 +39,18 @@ public:
};
/** Formats a date using one of the pre-defined formats */
- static QString formatDate( const QDate& value, int format );
+ static TQString formatDate( const TQDate& value, int format );
/** Returns the count for an array of doubles */
- static int count( QMemArray<double>* values );
+ static int count( TQMemArray<double>* values );
/** Returns the sum for an array of doubles */
- static double sum( QMemArray<double>* values );
+ static double sum( TQMemArray<double>* values );
/** Returns the average value for an array of doubles */
- static double average( QMemArray<double>* values );
+ static double average( TQMemArray<double>* values );
/** Returns the variance for an array of doubles */
- static double variance( QMemArray<double>* values );
+ static double variance( TQMemArray<double>* values );
/** Returns the standard deviation for an array of doubles */
- static double stdDeviation( QMemArray<double>* values );
+ static double stdDeviation( TQMemArray<double>* values );
};