summaryrefslogtreecommitdiffstats
path: root/kugar
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
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')
-rw-r--r--kugar/kudesigner/kudesigner_doc.cpp76
-rw-r--r--kugar/kudesigner/kudesigner_doc.h27
-rw-r--r--kugar/kudesigner/kudesigner_factory.cpp14
-rw-r--r--kugar/kudesigner/kudesigner_factory.h5
-rw-r--r--kugar/kudesigner/kudesigner_view.cpp164
-rw-r--r--kugar/kudesigner/kudesigner_view.h25
-rw-r--r--kugar/kudesigner/templates/General/A0.ktm2
-rw-r--r--kugar/kudesigner/templates/General/A1.ktm2
-rw-r--r--kugar/kudesigner/templates/General/A2.ktm2
-rw-r--r--kugar/kudesigner/templates/General/A3.ktm2
-rw-r--r--kugar/kudesigner/templates/General/A4.ktm2
-rw-r--r--kugar/kudesigner/templates/General/A5.ktm2
-rw-r--r--kugar/kudesigner/templates/General/A6.ktm2
-rw-r--r--kugar/kudesigner/templates/General/A7.ktm2
-rw-r--r--kugar/kudesigner/templates/General/A8.ktm2
-rw-r--r--kugar/kudesigner/templates/General/A9.ktm2
-rw-r--r--kugar/kudesigner/templates/General/B0.ktm2
-rw-r--r--kugar/kudesigner/templates/General/B1.ktm2
-rw-r--r--kugar/kudesigner/templates/General/B10.ktm2
-rw-r--r--kugar/kudesigner/templates/General/B2.ktm2
-rw-r--r--kugar/kudesigner/templates/General/B3.ktm2
-rw-r--r--kugar/kudesigner/templates/General/B4.ktm2
-rw-r--r--kugar/kudesigner/templates/General/B5.ktm2
-rw-r--r--kugar/kudesigner/templates/General/B6.ktm2
-rw-r--r--kugar/kudesigner/templates/General/B7.ktm2
-rw-r--r--kugar/kudesigner/templates/General/B8.ktm2
-rw-r--r--kugar/kudesigner/templates/General/B9.ktm2
-rw-r--r--kugar/kudesigner/templates/General/C5E.ktm2
-rw-r--r--kugar/kudesigner/templates/General/Comm10E.ktm2
-rw-r--r--kugar/kudesigner/templates/General/DLE.ktm2
-rw-r--r--kugar/kudesigner/templates/General/Executive.ktm2
-rw-r--r--kugar/kudesigner/templates/General/Folio.ktm2
-rw-r--r--kugar/kudesigner/templates/General/Ledger.ktm2
-rw-r--r--kugar/kudesigner/templates/General/Legal.ktm2
-rw-r--r--kugar/kudesigner/templates/General/Letter.ktm2
-rw-r--r--kugar/kudesigner/templates/General/Tabloid.ktm2
-rw-r--r--kugar/kudesigner_lib/band.cpp38
-rw-r--r--kugar/kudesigner_lib/band.h20
-rw-r--r--kugar/kudesigner_lib/box.cpp6
-rw-r--r--kugar/kudesigner_lib/box.h12
-rw-r--r--kugar/kudesigner_lib/calcfield.cpp8
-rw-r--r--kugar/kudesigner_lib/calcfield.h4
-rw-r--r--kugar/kudesigner_lib/canvas.cpp80
-rw-r--r--kugar/kudesigner_lib/canvas.h37
-rw-r--r--kugar/kudesigner_lib/command.cpp22
-rw-r--r--kugar/kudesigner_lib/command.h4
-rw-r--r--kugar/kudesigner_lib/commdefs.cpp8
-rw-r--r--kugar/kudesigner_lib/commdefs.h8
-rw-r--r--kugar/kudesigner_lib/detail.cpp10
-rw-r--r--kugar/kudesigner_lib/detail.h4
-rw-r--r--kugar/kudesigner_lib/detailfooter.cpp8
-rw-r--r--kugar/kudesigner_lib/detailfooter.h4
-rw-r--r--kugar/kudesigner_lib/detailheader.cpp8
-rw-r--r--kugar/kudesigner_lib/detailheader.h4
-rw-r--r--kugar/kudesigner_lib/field.cpp12
-rw-r--r--kugar/kudesigner_lib/field.h4
-rw-r--r--kugar/kudesigner_lib/kugartemplate.cpp48
-rw-r--r--kugar/kudesigner_lib/kugartemplate.h16
-rw-r--r--kugar/kudesigner_lib/label.cpp48
-rw-r--r--kugar/kudesigner_lib/label.h12
-rw-r--r--kugar/kudesigner_lib/line.cpp20
-rw-r--r--kugar/kudesigner_lib/line.h6
-rw-r--r--kugar/kudesigner_lib/pagefooter.cpp8
-rw-r--r--kugar/kudesigner_lib/pagefooter.h4
-rw-r--r--kugar/kudesigner_lib/pageheader.cpp8
-rw-r--r--kugar/kudesigner_lib/pageheader.h6
-rw-r--r--kugar/kudesigner_lib/plugin.cpp4
-rw-r--r--kugar/kudesigner_lib/plugin.h19
-rw-r--r--kugar/kudesigner_lib/propertyserializer.cpp26
-rw-r--r--kugar/kudesigner_lib/propertyserializer.h4
-rw-r--r--kugar/kudesigner_lib/reportfooter.cpp8
-rw-r--r--kugar/kudesigner_lib/reportfooter.h4
-rw-r--r--kugar/kudesigner_lib/reportheader.cpp8
-rw-r--r--kugar/kudesigner_lib/reportheader.h6
-rw-r--r--kugar/kudesigner_lib/reportitem.cpp104
-rw-r--r--kugar/kudesigner_lib/reportitem.h34
-rw-r--r--kugar/kudesigner_lib/section.cpp2
-rw-r--r--kugar/kudesigner_lib/section.h6
-rw-r--r--kugar/kudesigner_lib/specialfield.cpp8
-rw-r--r--kugar/kudesigner_lib/specialfield.h4
-rw-r--r--kugar/kudesigner_lib/structurewidget.cpp68
-rw-r--r--kugar/kudesigner_lib/structurewidget.h11
-rw-r--r--kugar/kudesigner_lib/view.cpp184
-rw-r--r--kugar/kudesigner_lib/view.h61
-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
-rw-r--r--kugar/part/Makefile.am2
-rw-r--r--kugar/part/kugar_factory.cpp18
-rw-r--r--kugar/part/kugar_factory.h9
-rw-r--r--kugar/part/kugar_part.cpp70
-rw-r--r--kugar/part/kugar_part.h25
-rw-r--r--kugar/part/kugar_view.cpp26
-rw-r--r--kugar/part/kugar_view.h9
-rw-r--r--kugar/samples/sample1.ktf2
-rw-r--r--kugar/samples/sample2.ktf2
-rw-r--r--kugar/samples/sample3.ktf2
120 files changed, 1320 insertions, 1306 deletions
diff --git a/kugar/kudesigner/kudesigner_doc.cpp b/kugar/kudesigner/kudesigner_doc.cpp
index eb240a88..0f554866 100644
--- a/kugar/kudesigner/kudesigner_doc.cpp
+++ b/kugar/kudesigner/kudesigner_doc.cpp
@@ -27,29 +27,29 @@
#include <kstandarddirs.h>
#include <kcommand.h>
-#include <qpainter.h>
-#include <qprinter.h>
-#include <qpaintdevicemetrics.h>
-#include <qfileinfo.h>
-#include <qdockwindow.h>
-#include <qdom.h>
-#include <qtextstream.h>
-#include <qtextcodec.h>
+#include <tqpainter.h>
+#include <tqprinter.h>
+#include <tqpaintdevicemetrics.h>
+#include <tqfileinfo.h>
+#include <tqdockwindow.h>
+#include <tqdom.h>
+#include <tqtextstream.h>
+#include <tqtextcodec.h>
#include <canvas.h>
#include <kugartemplate.h>
#include "kudesigner_view.h"
-KudesignerDoc::KudesignerDoc( QWidget *parentWidget, const char *widgetName, QObject* parent, const char* name, bool singleViewMode )
- : KoDocument( parentWidget, widgetName, parent, name, singleViewMode ), m_plugin( 0 ), m_propPos( DockRight ), m_modified( false )
+KudesignerDoc::KudesignerDoc( TQWidget *tqparentWidget, const char *widgetName, TQObject* tqparent, const char* name, bool singleViewMode )
+ : KoDocument( tqparentWidget, widgetName, tqparent, name, singleViewMode ), m_plugin( 0 ), m_propPos( DockRight ), m_modified( false )
{
setInstance( KudesignerFactory::global(), false );
setTemplateType("kudesigner_template");
history = new KoCommandHistory( actionCollection() );
- // connect( history, SIGNAL( documentRestored() ), this, SLOT( slotDocumentRestored() ) );
- // connect( history, SIGNAL( commandExecuted() ), this, SLOT( slotCommandExecuted() ) );
+ // connect( history, TQT_SIGNAL( documentRestored() ), this, TQT_SLOT( slotDocumentRestored() ) );
+ // connect( history, TQT_SIGNAL( commandExecuted() ), this, TQT_SLOT( slotCommandExecuted() ) );
docCanvas = new Kudesigner::Canvas( 100, 100 );
emit canvasChanged( docCanvas );
}
@@ -66,14 +66,14 @@ void KudesignerDoc::addCommand( KCommand *cmd )
/* history->addCommand(cmd);*/
}
-bool KudesignerDoc::initDoc( InitDocFlags flags, QWidget* parentWidget )
+bool KudesignerDoc::initDoc( InitDocFlags flags, TQWidget* tqparentWidget )
{
// If nothing is loaded, do initialize here
bool ok = FALSE;
// TODO if (flags==KoDocument::InitDocEmpty)
- QString file;
+ TQString file;
KoTemplateChooseDia::DialogType dlgtype;
if ( flags != KoDocument::InitDocFileNew )
dlgtype = KoTemplateChooseDia::Everything;
@@ -82,7 +82,7 @@ bool KudesignerDoc::initDoc( InitDocFlags flags, QWidget* parentWidget )
KoTemplateChooseDia::ReturnType ret = KoTemplateChooseDia::choose(
KudesignerFactory::global(), file,
- dlgtype, "kudesigner_template", parentWidget );
+ dlgtype, "kudesigner_template", tqparentWidget );
if ( ret == KoTemplateChooseDia::Template )
{
resetURL();
@@ -98,7 +98,7 @@ bool KudesignerDoc::initDoc( InitDocFlags flags, QWidget* parentWidget )
}
else if ( ret == KoTemplateChooseDia::Empty )
{
- QString fileName( locate( "kudesigner_template", "General/.source/A4.ktm", KudesignerFactory::global() ) );
+ TQString fileName( locate( "kudesigner_template", "General/.source/A4.ktm", KudesignerFactory::global() ) );
resetURL();
ok = loadNativeFormat( fileName );
if ( !ok )
@@ -112,7 +112,7 @@ bool KudesignerDoc::initDoc( InitDocFlags flags, QWidget* parentWidget )
void KudesignerDoc::initEmpty()
{
- QString fileName( locate( "kudesigner_template", "General/.source/A4.ktm", KudesignerFactory::global() ) );
+ TQString fileName( locate( "kudesigner_template", "General/.source/A4.ktm", KudesignerFactory::global() ) );
bool ok = loadNativeFormat( fileName );
if ( !ok )
showLoadingErrorDialog();
@@ -121,12 +121,12 @@ void KudesignerDoc::initEmpty()
setModified(false);
}
-KoView* KudesignerDoc::createViewInstance( QWidget* parent, const char* name )
+KoView* KudesignerDoc::createViewInstance( TQWidget* tqparent, const char* name )
{
- return new KudesignerView( this, parent, name );
+ return new KudesignerView( this, tqparent, name );
}
-bool KudesignerDoc::loadOasis( const QDomDocument&, KoOasisStyles&, const QDomDocument&, KoStore* )
+bool KudesignerDoc::loadOasis( const TQDomDocument&, KoOasisStyles&, const TQDomDocument&, KoStore* )
{
return false;
}
@@ -136,7 +136,7 @@ bool KudesignerDoc::saveOasis( KoStore*, KoXmlWriter* )
return false;
}
-void KudesignerDoc::paintContent( QPainter& painter, const QRect& rect, bool /*transparent*/,
+void KudesignerDoc::paintContent( TQPainter& painter, const TQRect& rect, bool /*transparent*/,
double /*zoomX*/, double /*zoomY*/ )
{
// ####### handle transparency
@@ -167,22 +167,22 @@ int KudesignerDoc::supportedSpecialFormats() const
return SaveAsDirectoryStore | SaveAsFlatXML;
}
-QDomDocument KudesignerDoc::saveXML()
+TQDomDocument KudesignerDoc::saveXML()
{
- QDomDocument doc;
+ TQDomDocument doc;
doc.setContent( docCanvas->kugarTemplate() ->getXml() );
return doc;
}
-bool KudesignerDoc::saveToStream( QIODevice * dev )
+bool KudesignerDoc::saveToStream( TQIODevice * dev )
{
- QTextStream ts( dev );
- ts.setCodec( QTextCodec::codecForName( "UTF-8" ) );
+ TQTextStream ts( dev );
+ ts.setCodec( TQTextCodec::codecForName( "UTF-8" ) );
ts << docCanvas->kugarTemplate() ->getXml();
return true;
}
-void KudesignerDoc::loadPlugin( const QString &name )
+void KudesignerDoc::loadPlugin( const TQString &name )
{
kdDebug() << "Trying to load plugin: " << name << endl;
KuDesignerPlugin *plug = KParts::ComponentFactory::createInstanceFromLibrary<KuDesignerPlugin>( name.utf8(), this );
@@ -212,7 +212,7 @@ KuDesignerPlugin *KudesignerDoc::plugin()
return canvas() ->plugin();
}
-Qt::Dock KudesignerDoc::propertyPosition()
+TQt::Dock KudesignerDoc::propertyPosition()
{
return m_propPos;
}
@@ -233,10 +233,10 @@ bool KudesignerDoc::modified( ) const
return m_modified;
}
-bool KudesignerDoc::loadXML( QIODevice *, const QDomDocument &rt )
+bool KudesignerDoc::loadXML( TQIODevice *, const TQDomDocument &rt )
{
- QDomNode report, rep;
- for ( QDomNode report = rt.firstChild(); !report.isNull(); report = report.nextSibling() )
+ TQDomNode report, rep;
+ for ( TQDomNode report = rt.firstChild(); !report.isNull(); report = report.nextSibling() )
{
if ( report.nodeName() == "KugarTemplate" )
{
@@ -246,12 +246,12 @@ bool KudesignerDoc::loadXML( QIODevice *, const QDomDocument &rt )
}
report = rep;
- QDomNamedNodeMap attributes = report.attributes();
+ TQDomNamedNodeMap attributes = report.attributes();
//getting the page width and height
int height = 297;
int width = 210;
- if ( attributes.namedItem( "PageOrientation" ).nodeValue().toInt() )
+ if ( attributes.namedItem( "PageQt::Orientation" ).nodeValue().toInt() )
{
int temp = height;
height = width;
@@ -259,16 +259,16 @@ bool KudesignerDoc::loadXML( QIODevice *, const QDomDocument &rt )
}
//zooming canvas according to screen resolution
- QPrinter* printer;
+ TQPrinter* printer;
// Set the page size
- printer = new QPrinter();
+ printer = new TQPrinter();
printer->setFullPage( true );
- printer->setPageSize( ( QPrinter::PageSize ) attributes.namedItem( "PageSize" ).nodeValue().toInt() );
- printer->setOrientation( ( QPrinter::Orientation ) attributes.namedItem( "PageOrientation" ).nodeValue().toInt() );
+ printer->setPageSize( ( TQPrinter::PageSize ) attributes.namedItem( "PageSize" ).nodeValue().toInt() );
+ printer->setOrientation( ( TQPrinter::Orientation ) attributes.namedItem( "PageQt::Orientation" ).nodeValue().toInt() );
// Get the page metrics and set appropriate wigth and height
- QPaintDeviceMetrics pdm( printer );
+ TQPaintDeviceMetrics pdm( printer );
width = pdm.width();
height = pdm.height();
diff --git a/kugar/kudesigner/kudesigner_doc.h b/kugar/kudesigner/kudesigner_doc.h
index 71fdde3c..318876d2 100644
--- a/kugar/kudesigner/kudesigner_doc.h
+++ b/kugar/kudesigner/kudesigner_doc.h
@@ -24,10 +24,10 @@
#include <KoCommandHistory.h>
#include "plugin.h"
-class QCanvas;
-class QDomNode;
-class QIODevice;
-class QDomDocument;
+class TQCanvas;
+class TQDomNode;
+class TQIODevice;
+class TQDomDocument;
namespace Kudesigner
{
@@ -37,27 +37,28 @@ class Canvas;
class KudesignerDoc: public KoDocument
{
Q_OBJECT
+ TQ_OBJECT
public:
- KudesignerDoc( QWidget *parentWidget = 0, const char *widgetName = 0, QObject* parent = 0, const char* name = 0, bool singleViewMode = false );
+ KudesignerDoc( TQWidget *tqparentWidget = 0, const char *widgetName = 0, TQObject* tqparent = 0, const char* name = 0, bool singleViewMode = false );
~KudesignerDoc();
- virtual void paintContent( QPainter& painter, const QRect& rect, bool transparent = FALSE, double zoomX = 1.0, double zoomY = 1.0 );
+ virtual void paintContent( TQPainter& painter, const TQRect& rect, bool transparent = FALSE, double zoomX = 1.0, double zoomY = 1.0 );
- virtual bool initDoc( InitDocFlags flags, QWidget* parentWidget );
+ virtual bool initDoc( InitDocFlags flags, TQWidget* tqparentWidget );
- virtual bool loadOasis( const QDomDocument&, KoOasisStyles&, const QDomDocument&, KoStore* );
+ virtual bool loadOasis( const TQDomDocument&, KoOasisStyles&, const TQDomDocument&, KoStore* );
virtual bool saveOasis( KoStore*, KoXmlWriter* );
- virtual bool loadXML( QIODevice *, const QDomDocument & );
- virtual QDomDocument saveXML();
+ virtual bool loadXML( TQIODevice *, const TQDomDocument & );
+ virtual TQDomDocument saveXML();
virtual int supportedSpecialFormats() const;
- virtual bool saveToStream( QIODevice * dev );
+ virtual bool saveToStream( TQIODevice * dev );
Kudesigner::Canvas *canvas();
- void loadPlugin( const QString& name );
+ void loadPlugin( const TQString& name );
KuDesignerPlugin *plugin();
Dock propertyPosition();
void setForcedPropertyEditorPosition( Dock );
@@ -76,7 +77,7 @@ public slots:
virtual void initEmpty();
protected:
- virtual KoView* createViewInstance( QWidget* parent, const char* name );
+ virtual KoView* createViewInstance( TQWidget* tqparent, const char* name );
virtual bool completeSaving( KoStore* store );
virtual bool completeLoading( KoStore* store );
diff --git a/kugar/kudesigner/kudesigner_factory.cpp b/kugar/kudesigner/kudesigner_factory.cpp
index c83cedbf..2c90d1d8 100644
--- a/kugar/kudesigner/kudesigner_factory.cpp
+++ b/kugar/kudesigner/kudesigner_factory.cpp
@@ -29,8 +29,8 @@
KInstance* KudesignerFactory::s_global = 0L;
KAboutData* KudesignerFactory::s_aboutData = 0L;
-KudesignerFactory::KudesignerFactory( QObject* parent, const char* name )
- : KoFactory( parent, name )
+KudesignerFactory::KudesignerFactory( TQObject* tqparent, const char* name )
+ : KoFactory( tqparent, name )
{
global();
}
@@ -43,20 +43,20 @@ KudesignerFactory::~KudesignerFactory()
s_global = 0L;
}
-KParts::Part* KudesignerFactory::createPartObject( QWidget *parentWidget, const char *widgetName, QObject* parent, const char* name, const char* classname, const QStringList & data )
+KParts::Part* KudesignerFactory::createPartObject( TQWidget *tqparentWidget, const char *widgetName, TQObject* tqparent, const char* name, const char* classname, const TQStringList & data )
{
// If classname is "KoDocument", our host is a koffice application
// otherwise, the host wants us as a simple part, so switch to readonly and single view.
bool bWantKoDocument = ( strcmp( classname, "KoDocument" ) == 0 );
- // parentWidget and widgetName are used by KoDocument for the "readonly+singleView" case.
- KudesignerDoc *part = new KudesignerDoc( parentWidget, widgetName, parent, name, !bWantKoDocument );
+ // tqparentWidget and widgetName are used by KoDocument for the "readonly+singleView" case.
+ KudesignerDoc *part = new KudesignerDoc( tqparentWidget, widgetName, tqparent, name, !bWantKoDocument );
if ( !bWantKoDocument )
part->setReadWrite( false );
if ( bWantKoDocument && ( data.count() > 0 ) )
{
- for ( QStringList::const_iterator it = data.begin();it != data.end();++it )
+ for ( TQStringList::const_iterator it = data.begin();it != data.end();++it )
{
if ( ( *it ).startsWith( "plugin=" ) )
{
@@ -64,7 +64,7 @@ KParts::Part* KudesignerFactory::createPartObject( QWidget *parentWidget, const
}
else if ( ( *it ).startsWith( "forcePropertyEditorPosition=" ) )
{
- QString tmp = ( *it ).right( ( *it ).length() - 28 ).upper();
+ TQString tmp = ( *it ).right( ( *it ).length() - 28 ).upper();
kdDebug() << "forced property editor position: " << tmp << endl;
part->setForcedPropertyEditorPosition( tmp == "LEFT" ? DockLeft : DockRight );
}
diff --git a/kugar/kudesigner/kudesigner_factory.h b/kugar/kudesigner/kudesigner_factory.h
index ae660eb5..82eb7bb8 100644
--- a/kugar/kudesigner/kudesigner_factory.h
+++ b/kugar/kudesigner/kudesigner_factory.h
@@ -28,11 +28,12 @@ class KAboutData;
class KUGARDESIGNER_EXPORT KudesignerFactory : public KoFactory
{
Q_OBJECT
+ TQ_OBJECT
public:
- KudesignerFactory( QObject* parent = 0, const char* name = 0 );
+ KudesignerFactory( TQObject* tqparent = 0, const char* name = 0 );
~KudesignerFactory();
- virtual KParts::Part *createPartObject( QWidget *parentWidget = 0, const char *widgetName = 0, QObject *parent = 0, const char *name = 0, const char *classname = "KoDocument", const QStringList &args = QStringList() );
+ virtual KParts::Part *createPartObject( TQWidget *tqparentWidget = 0, const char *widgetName = 0, TQObject *tqparent = 0, const char *name = 0, const char *classname = "KoDocument", const TQStringList &args = TQStringList() );
static KInstance* global();
diff --git a/kugar/kudesigner/kudesigner_view.cpp b/kugar/kudesigner/kudesigner_view.cpp
index 713b8521..4533813d 100644
--- a/kugar/kudesigner/kudesigner_view.cpp
+++ b/kugar/kudesigner/kudesigner_view.cpp
@@ -22,18 +22,18 @@
#include <map>
-#include <qpainter.h>
-#include <qiconset.h>
-#include <qinputdialog.h>
-#include <qevent.h>
-#include <qmainwindow.h>
-#include <qaction.h>
-#include <qlayout.h>
-#include <qdockwindow.h>
-#include <qmenubar.h>
-#include <qmessagebox.h>
-#include <qspinbox.h>
-#include <qlabel.h>
+#include <tqpainter.h>
+#include <tqiconset.h>
+#include <tqinputdialog.h>
+#include <tqevent.h>
+#include <tqmainwindow.h>
+#include <tqaction.h>
+#include <tqlayout.h>
+#include <tqdockwindow.h>
+#include <tqmenubar.h>
+#include <tqmessagebox.h>
+#include <tqspinbox.h>
+#include <tqlabel.h>
#include <kaction.h>
#include <kstdaction.h>
@@ -68,8 +68,8 @@
using namespace Kudesigner;
-KudesignerView::KudesignerView( KudesignerDoc* part, QWidget* parent, const char* name )
- : KoView( part, parent, name ), m_propertyEditor( 0 ), m_doc( part )
+KudesignerView::KudesignerView( KudesignerDoc* part, TQWidget* tqparent, const char* name )
+ : KoView( part, tqparent, name ), m_propertyEditor( 0 ), m_doc( part )
{
setInstance( KudesignerFactory::global() );
if ( !part->isReadWrite() ) // readonly case, e.g. when embedded into konqueror
@@ -77,7 +77,7 @@ KudesignerView::KudesignerView( KudesignerDoc* part, QWidget* parent, const char
else
setXMLFile( "kudesignerui.rc" );
- QVBoxLayout *l = new QVBoxLayout( this, 0, 0 );
+ TQVBoxLayout *l = new TQVBoxLayout( this, 0, 0 );
m_view = new Kudesigner::View( part->canvas(), this );
if ( part->plugin() )
{
@@ -88,13 +88,13 @@ KudesignerView::KudesignerView( KudesignerDoc* part, QWidget* parent, const char
l->addWidget( m_view );
m_view->viewport() ->setFocusProxy( m_view );
- m_view->viewport() ->setFocusPolicy( WheelFocus );
+ m_view->viewport() ->setFocusPolicy( TQ_WheelFocus );
m_view->setFocus();
m_view->itemToInsert = 0;
- QDockWindow *dw1 = new QDockWindow( QDockWindow::OutsideDock, shell() );
- QDockWindow *dw2 = new QDockWindow( QDockWindow::OutsideDock, shell() );
+ TQDockWindow *dw1 = new TQDockWindow( TQDockWindow::OutsideDock, shell() );
+ TQDockWindow *dw2 = new TQDockWindow( TQDockWindow::OutsideDock, shell() );
m_structure = new Kudesigner::StructureWidget( dw1 );
m_propertyEditor = new Editor( dw2 );
dw1->boxLayout() ->addWidget( m_structure, 1 );
@@ -106,8 +106,8 @@ KudesignerView::KudesignerView( KudesignerDoc* part, QWidget* parent, const char
if ( m_doc->plugin() )
{
- // connect( m_propertyEditor, SIGNAL(createPluggedInEditor(QWidget*&, Editor *, Property*, Box *)),
- // m_doc->plugin(), SLOT(createPluggedInEditor(QWidget*&, Editor *, Property*, Box *)));
+ // connect( m_propertyEditor, TQT_SIGNAL(createPluggedInEditor(TQWidget*&, Editor *, Property*, Box *)),
+ // m_doc->plugin(), TQT_SLOT(createPluggedInEditor(TQWidget*&, Editor *, Property*, Box *)));
kdDebug() << "*************Property and plugin have been connected" << endl;
}
@@ -117,33 +117,33 @@ KudesignerView::KudesignerView( KudesignerDoc* part, QWidget* parent, const char
m_structure->setDocument( m_doc->canvas() );
- connect( m_doc, SIGNAL( canvasChanged( Kudesigner::Canvas * ) ),
- m_structure, SLOT( setDocument( Kudesigner::Canvas * ) ) );
- connect( m_doc->canvas(), SIGNAL( structureModified() ),
- m_structure, SLOT( refresh() ) );
+ connect( m_doc, TQT_SIGNAL( canvasChanged( Kudesigner::Canvas * ) ),
+ m_structure, TQT_SLOT( setDocument( Kudesigner::Canvas * ) ) );
+ connect( m_doc->canvas(), TQT_SIGNAL( structureModified() ),
+ m_structure, TQT_SLOT( refresh() ) );
- connect( m_view, SIGNAL( selectionMade( Buffer* ) ),
- this, SLOT( populateProperties( Buffer* ) ) );
+ connect( m_view, TQT_SIGNAL( selectionMade( Buffer* ) ),
+ this, TQT_SLOT( populateProperties( Buffer* ) ) );
- connect( m_view, SIGNAL( selectionClear() ),
- m_propertyEditor, SLOT( clear() ) );
+ connect( m_view, TQT_SIGNAL( selectionClear() ),
+ m_propertyEditor, TQT_SLOT( clear() ) );
- connect( m_view, SIGNAL( changed() ),
- m_doc, SLOT( setModified() ) );
+ connect( m_view, TQT_SIGNAL( changed() ),
+ m_doc, TQT_SLOT( setModified() ) );
- connect( m_view, SIGNAL( selectionMade( Buffer* ) ),
- m_structure, SLOT( selectionMade() ) );
- connect( m_view, SIGNAL( selectionClear() ),
- m_structure, SLOT( selectionClear() ) );
+ connect( m_view, TQT_SIGNAL( selectionMade( Buffer* ) ),
+ m_structure, TQT_SLOT( selectionMade() ) );
+ connect( m_view, TQT_SIGNAL( selectionClear() ),
+ m_structure, TQT_SLOT( selectionClear() ) );
- connect( m_view, SIGNAL( selectedActionProcessed() ), this, SLOT( unselectItemAction() ) );
- connect( m_view, SIGNAL( modificationPerformed() ), part, SLOT( setModified() ) );
- connect( m_view, SIGNAL( itemPlaced( int, int, int, int ) ), this, SLOT( placeItem( int, int, int, int ) ) );
+ connect( m_view, TQT_SIGNAL( selectedActionProcessed() ), this, TQT_SLOT( unselectItemAction() ) );
+ connect( m_view, TQT_SIGNAL( modificationPerformed() ), part, TQT_SLOT( setModified() ) );
+ connect( m_view, TQT_SIGNAL( itemPlaced( int, int, int, int ) ), this, TQT_SLOT( placeItem( int, int, int, int ) ) );
- gridLabel = new QLabel( i18n( "Grid size:" ), shell() );
- gridBox = new QSpinBox( 1, 100, 1, shell() );
+ gridLabel = new TQLabel( i18n( "Grid size:" ), shell() );
+ gridBox = new TQSpinBox( 1, 100, 1, shell() );
gridBox->setValue( 10 );
- connect( gridBox, SIGNAL( valueChanged( int ) ), m_view, SLOT( setGridSize( int ) ) );
+ connect( gridBox, TQT_SIGNAL( valueChanged( int ) ), m_view, TQT_SLOT( setGridSize( int ) ) );
initActions();
@@ -158,9 +158,9 @@ KudesignerView::~KudesignerView()
delete gridBox;
}
-void KudesignerView::paintEvent( QPaintEvent* ev )
+void KudesignerView::paintEvent( TQPaintEvent* ev )
{
- QPainter painter;
+ TQPainter painter;
painter.begin( this );
// ### TODO: Scaling
@@ -171,63 +171,63 @@ void KudesignerView::paintEvent( QPaintEvent* ev )
painter.end();
}
-void KudesignerView::resizeEvent( QResizeEvent* /*_ev*/ )
+void KudesignerView::resizeEvent( TQResizeEvent* /*_ev*/ )
{
m_view->setGeometry( 0, 0, width(), height() );
}
void KudesignerView::initActions()
{
- cutAction = KStdAction::cut( this, SLOT( cut() ), actionCollection() );
- copyAction = KStdAction::copy( this, SLOT( copy() ), actionCollection() );
- pasteAction = KStdAction::paste( this, SLOT( paste() ), actionCollection() );
- selectAllAction = KStdAction::selectAll( this, SLOT( selectAll() ), actionCollection() );
- deleteAction = new KAction( i18n( "Delete" ), "editdelete", 0, this,
- SLOT( deleteItems() ), actionCollection(), "edit_delete" );
+ cutAction = KStdAction::cut( TQT_TQOBJECT(this), TQT_SLOT( cut() ), actionCollection() );
+ copyAction = KStdAction::copy( TQT_TQOBJECT(this), TQT_SLOT( copy() ), actionCollection() );
+ pasteAction = KStdAction::paste( TQT_TQOBJECT(this), TQT_SLOT( paste() ), actionCollection() );
+ selectAllAction = KStdAction::selectAll( TQT_TQOBJECT(this), TQT_SLOT( selectAll() ), actionCollection() );
+ deleteAction = new KAction( i18n( "Delete" ), "editdelete", 0, TQT_TQOBJECT(this),
+ TQT_SLOT( deleteItems() ), actionCollection(), "edit_delete" );
cutAction->setEnabled( false );
copyAction->setEnabled( false );
pasteAction->setEnabled( false );
// deleteAction->setEnabled(false);
- sectionsReportHeader = new KAction( i18n( "Report Header" ), "irh", 0, this,
- SLOT( slotAddReportHeader() ), actionCollection(), "rheader" );
- sectionsReportFooter = new KAction( i18n( "Report Footer" ), "irf", 0, this,
- SLOT( slotAddReportFooter() ), actionCollection(), "rfooter" );
- sectionsPageHeader = new KAction( i18n( "Page Header" ), "iph", 0, this,
- SLOT( slotAddPageHeader() ), actionCollection(), "pheader" );
- sectionsPageFooter = new KAction( i18n( "Page Footer" ), "ipf", 0, this,
- SLOT( slotAddPageFooter() ), actionCollection(), "pfooter" );
- sectionsDetailHeader = new KAction( i18n( "Detail Header" ), "idh", 0, this,
- SLOT( slotAddDetailHeader() ), actionCollection(), "dheader" );
- sectionsDetail = new KAction( i18n( "Detail" ), "id", 0, this,
- SLOT( slotAddDetail() ), actionCollection(), "detail" );
- sectionsDetailFooter = new KAction( i18n( "Detail Footer" ), "idf", 0, this,
- SLOT( slotAddDetailFooter() ), actionCollection(), "dfooter" );
-
- itemsNothing = new KRadioAction( i18n( "Clear Selection" ), "frame_edit", 0, this,
- SLOT( slotAddItemNothing() ), actionCollection(), "nothing" );
+ sectionsReportHeader = new KAction( i18n( "Report Header" ), "irh", 0, TQT_TQOBJECT(this),
+ TQT_SLOT( slotAddReportHeader() ), actionCollection(), "rheader" );
+ sectionsReportFooter = new KAction( i18n( "Report Footer" ), "irf", 0, TQT_TQOBJECT(this),
+ TQT_SLOT( slotAddReportFooter() ), actionCollection(), "rfooter" );
+ sectionsPageHeader = new KAction( i18n( "Page Header" ), "iph", 0, TQT_TQOBJECT(this),
+ TQT_SLOT( slotAddPageHeader() ), actionCollection(), "pheader" );
+ sectionsPageFooter = new KAction( i18n( "Page Footer" ), "ipf", 0, TQT_TQOBJECT(this),
+ TQT_SLOT( slotAddPageFooter() ), actionCollection(), "pfooter" );
+ sectionsDetailHeader = new KAction( i18n( "Detail Header" ), "idh", 0, TQT_TQOBJECT(this),
+ TQT_SLOT( slotAddDetailHeader() ), actionCollection(), "dheader" );
+ sectionsDetail = new KAction( i18n( "Detail" ), "id", 0, TQT_TQOBJECT(this),
+ TQT_SLOT( slotAddDetail() ), actionCollection(), "detail" );
+ sectionsDetailFooter = new KAction( i18n( "Detail Footer" ), "idf", 0, TQT_TQOBJECT(this),
+ TQT_SLOT( slotAddDetailFooter() ), actionCollection(), "dfooter" );
+
+ itemsNothing = new KRadioAction( i18n( "Clear Selection" ), "frame_edit", 0, TQT_TQOBJECT(this),
+ TQT_SLOT( slotAddItemNothing() ), actionCollection(), "nothing" );
itemsNothing->setExclusiveGroup( "itemsToolBar" );
itemsNothing->setChecked( true );
- itemsLabel = new KRadioAction( i18n( "Label" ), "frame_text", 0, this,
- SLOT( slotAddItemLabel() ), actionCollection(), "label" );
+ itemsLabel = new KRadioAction( i18n( "Label" ), "frame_text", 0, TQT_TQOBJECT(this),
+ TQT_SLOT( slotAddItemLabel() ), actionCollection(), "label" );
itemsLabel->setExclusiveGroup( "itemsToolBar" );
- itemsField = new KRadioAction( i18n( "Field" ), "frame_field", 0, this,
- SLOT( slotAddItemField() ), actionCollection(), "field" );
+ itemsField = new KRadioAction( i18n( "Field" ), "frame_field", 0, TQT_TQOBJECT(this),
+ TQT_SLOT( slotAddItemField() ), actionCollection(), "field" );
itemsField->setExclusiveGroup( "itemsToolBar" );
- itemsSpecial = new KRadioAction( i18n( "Special Field" ), "frame_query", 0, this,
- SLOT( slotAddItemSpecial() ), actionCollection(), "special" );
+ itemsSpecial = new KRadioAction( i18n( "Special Field" ), "frame_query", 0, TQT_TQOBJECT(this),
+ TQT_SLOT( slotAddItemSpecial() ), actionCollection(), "special" );
itemsSpecial->setExclusiveGroup( "itemsToolBar" );
- itemsCalculated = new KRadioAction( i18n( "Calculated Field" ), "frame_formula", 0, this,
- SLOT( slotAddItemCalculated() ), actionCollection(), "calcfield" );
+ itemsCalculated = new KRadioAction( i18n( "Calculated Field" ), "frame_formula", 0, TQT_TQOBJECT(this),
+ TQT_SLOT( slotAddItemCalculated() ), actionCollection(), "calcfield" );
itemsCalculated->setExclusiveGroup( "itemsToolBar" );
- itemsLine = new KRadioAction( i18n( "Line" ), "frame_chart", 0, this,
- SLOT( slotAddItemLine() ), actionCollection(), "line" );
+ itemsLine = new KRadioAction( i18n( "Line" ), "frame_chart", 0, TQT_TQOBJECT(this),
+ TQT_SLOT( slotAddItemLine() ), actionCollection(), "line" );
itemsLine->setExclusiveGroup( "itemsToolBar" );
- gridActionLabel = new KWidgetAction( gridLabel, i18n( "Grid Label" ), 0, this,
+ gridActionLabel = new KWidgetAction( gridLabel, i18n( "Grid Label" ), 0, TQT_TQOBJECT(this),
0, actionCollection(), "gridlabel" );
- gridAction = new KWidgetAction( gridBox, i18n( "Grid Size" ), 0, this,
+ gridAction = new KWidgetAction( gridBox, i18n( "Grid Size" ), 0, TQT_TQOBJECT(this),
0, actionCollection(), "gridaction" );
}
@@ -246,7 +246,7 @@ void KudesignerView::guiActivateEvent( KParts::GUIActivateEvent *ev )
void KudesignerView::populateProperties( Buffer *buf )
{
- connect( buf, SIGNAL( propertyChanged() ), m_doc->canvas(), SLOT( changed() ) );
+ connect( buf, TQT_SIGNAL( propertyChanged() ), m_doc->canvas(), TQT_SLOT( changed() ) );
m_propertyEditor->changeSet( buf );
}
@@ -309,7 +309,7 @@ void KudesignerView::slotAddPageFooter()
void KudesignerView::slotAddDetailHeader()
{
bool Ok = false;
- unsigned int level = QInputDialog::getInteger( tr( "Add Detail Header" ), tr( "Enter detail level:" ),
+ unsigned int level = TQInputDialog::getInteger( tr( "Add Detail Header" ), tr( "Enter detail level:" ),
0, 0, 100, 1, &Ok, this );
if ( !Ok )
return ;
@@ -322,7 +322,7 @@ void KudesignerView::slotAddDetailHeader()
void KudesignerView::slotAddDetail()
{
bool Ok = false;
- unsigned int level = QInputDialog::getInteger( tr( "Add Detail" ), tr( "Enter detail level:" ),
+ unsigned int level = TQInputDialog::getInteger( tr( "Add Detail" ), tr( "Enter detail level:" ),
0, 0, 100, 1, &Ok, this );
if ( !Ok )
return ;
@@ -336,7 +336,7 @@ void KudesignerView::slotAddDetail()
void KudesignerView::slotAddDetailFooter()
{
bool Ok = false;
- unsigned int level = QInputDialog::getInteger( tr( "Add Detail Footer" ), tr( "Enter detail level:" ),
+ unsigned int level = TQInputDialog::getInteger( tr( "Add Detail Footer" ), tr( "Enter detail level:" ),
0, 0, 100, 1, &Ok, this );
if ( !Ok )
return ;
diff --git a/kugar/kudesigner/kudesigner_view.h b/kugar/kudesigner/kudesigner_view.h
index e2cd9ed0..2b1cc752 100644
--- a/kugar/kudesigner/kudesigner_view.h
+++ b/kugar/kudesigner/kudesigner_view.h
@@ -22,16 +22,16 @@
#include <KoView.h>
#include <kparts/event.h>
-#include <qdom.h>
+#include <tqdom.h>
#include <set>
-class QLabel;
-class QSpinBox;
-class QAction;
-class QPaintEvent;
-class QDockWindow;
-class QToolBar;
+class TQLabel;
+class TQSpinBox;
+class TQAction;
+class TQPaintEvent;
+class TQDockWindow;
+class TQToolBar;
class KAction;
class KRadioAction;
@@ -57,10 +57,11 @@ class ReportItem;
class KudesignerView: public KoView
{
Q_OBJECT
+ TQ_OBJECT
friend class Kudesigner::View;
public:
- KudesignerView( KudesignerDoc* part, QWidget* parent = 0, const char* name = 0 );
+ KudesignerView( KudesignerDoc* part, TQWidget* tqparent = 0, const char* name = 0 );
virtual ~KudesignerView();
Kudesigner::View *view()
@@ -94,8 +95,8 @@ protected slots:
protected:
void initActions();
- void paintEvent( QPaintEvent* );
- virtual void resizeEvent( QResizeEvent* _ev );
+ void paintEvent( TQPaintEvent* );
+ virtual void resizeEvent( TQResizeEvent* _ev );
virtual void updateReadWrite( bool readwrite );
virtual void guiActivateEvent( KParts::GUIActivateEvent *ev );
@@ -130,8 +131,8 @@ private:
KWidgetAction *gridActionLabel;
KWidgetAction *gridAction;
- QLabel *gridLabel;
- QSpinBox *gridBox;
+ TQLabel *gridLabel;
+ TQSpinBox *gridBox;
KActionCollection *itemsCollection;
KActionCollection *sectionsCollection;
diff --git a/kugar/kudesigner/templates/General/A0.ktm b/kugar/kudesigner/templates/General/A0.ktm
index 6831e87a..57f11a01 100644
--- a/kugar/kudesigner/templates/General/A0.ktm
+++ b/kugar/kudesigner/templates/General/A0.ktm
@@ -2,7 +2,7 @@
<!DOCTYPE KugarTemplate SYSTEM "kugartemplate.dtd">
-<KugarTemplate PageSize="5" PageOrientation="0" TopMargin="20"
+<KugarTemplate PageSize="5" PageQt::Orientation="0" TopMargin="20"
BottomMargin="20" LeftMargin="20" RightMargin="20">
</KugarTemplate>
diff --git a/kugar/kudesigner/templates/General/A1.ktm b/kugar/kudesigner/templates/General/A1.ktm
index 908b2f03..27584722 100644
--- a/kugar/kudesigner/templates/General/A1.ktm
+++ b/kugar/kudesigner/templates/General/A1.ktm
@@ -2,7 +2,7 @@
<!DOCTYPE KugarTemplate SYSTEM "kugartemplate.dtd">
-<KugarTemplate PageSize="6" PageOrientation="0" TopMargin="20"
+<KugarTemplate PageSize="6" PageQt::Orientation="0" TopMargin="20"
BottomMargin="20" LeftMargin="20" RightMargin="20">
</KugarTemplate>
diff --git a/kugar/kudesigner/templates/General/A2.ktm b/kugar/kudesigner/templates/General/A2.ktm
index 4ce84d05..b9ebbed9 100644
--- a/kugar/kudesigner/templates/General/A2.ktm
+++ b/kugar/kudesigner/templates/General/A2.ktm
@@ -2,7 +2,7 @@
<!DOCTYPE KugarTemplate SYSTEM "kugartemplate.dtd">
-<KugarTemplate PageSize="7" PageOrientation="0" TopMargin="20"
+<KugarTemplate PageSize="7" PageQt::Orientation="0" TopMargin="20"
BottomMargin="20" LeftMargin="20" RightMargin="20">
</KugarTemplate>
diff --git a/kugar/kudesigner/templates/General/A3.ktm b/kugar/kudesigner/templates/General/A3.ktm
index 725e7ef6..b5ac9141 100644
--- a/kugar/kudesigner/templates/General/A3.ktm
+++ b/kugar/kudesigner/templates/General/A3.ktm
@@ -2,7 +2,7 @@
<!DOCTYPE KugarTemplate SYSTEM "kugartemplate.dtd">
-<KugarTemplate PageSize="8" PageOrientation="0" TopMargin="20"
+<KugarTemplate PageSize="8" PageQt::Orientation="0" TopMargin="20"
BottomMargin="20" LeftMargin="20" RightMargin="20">
</KugarTemplate>
diff --git a/kugar/kudesigner/templates/General/A4.ktm b/kugar/kudesigner/templates/General/A4.ktm
index 17c2ff4e..cd0c17cc 100644
--- a/kugar/kudesigner/templates/General/A4.ktm
+++ b/kugar/kudesigner/templates/General/A4.ktm
@@ -2,7 +2,7 @@
<!DOCTYPE KugarTemplate SYSTEM "kugartemplate.dtd">
-<KugarTemplate PageSize="0" PageOrientation="0" TopMargin="20"
+<KugarTemplate PageSize="0" PageQt::Orientation="0" TopMargin="20"
BottomMargin="20" LeftMargin="20" RightMargin="20">
</KugarTemplate>
diff --git a/kugar/kudesigner/templates/General/A5.ktm b/kugar/kudesigner/templates/General/A5.ktm
index 64b65b52..133810fb 100644
--- a/kugar/kudesigner/templates/General/A5.ktm
+++ b/kugar/kudesigner/templates/General/A5.ktm
@@ -2,7 +2,7 @@
<!DOCTYPE KugarTemplate SYSTEM "kugartemplate.dtd">
-<KugarTemplate PageSize="9" PageOrientation="0" TopMargin="20"
+<KugarTemplate PageSize="9" PageQt::Orientation="0" TopMargin="20"
BottomMargin="20" LeftMargin="20" RightMargin="20">
</KugarTemplate>
diff --git a/kugar/kudesigner/templates/General/A6.ktm b/kugar/kudesigner/templates/General/A6.ktm
index e69da18e..7aac1ea7 100644
--- a/kugar/kudesigner/templates/General/A6.ktm
+++ b/kugar/kudesigner/templates/General/A6.ktm
@@ -2,7 +2,7 @@
<!DOCTYPE KugarTemplate SYSTEM "kugartemplate.dtd">
-<KugarTemplate PageSize="10" PageOrientation="0" TopMargin="20"
+<KugarTemplate PageSize="10" PageQt::Orientation="0" TopMargin="20"
BottomMargin="20" LeftMargin="20" RightMargin="20">
</KugarTemplate>
diff --git a/kugar/kudesigner/templates/General/A7.ktm b/kugar/kudesigner/templates/General/A7.ktm
index c62e8489..6e93cc62 100644
--- a/kugar/kudesigner/templates/General/A7.ktm
+++ b/kugar/kudesigner/templates/General/A7.ktm
@@ -2,7 +2,7 @@
<!DOCTYPE KugarTemplate SYSTEM "kugartemplate.dtd">
-<KugarTemplate PageSize="11" PageOrientation="0" TopMargin="20"
+<KugarTemplate PageSize="11" PageQt::Orientation="0" TopMargin="20"
BottomMargin="20" LeftMargin="20" RightMargin="20">
</KugarTemplate>
diff --git a/kugar/kudesigner/templates/General/A8.ktm b/kugar/kudesigner/templates/General/A8.ktm
index 6cbd58d4..60a87b5b 100644
--- a/kugar/kudesigner/templates/General/A8.ktm
+++ b/kugar/kudesigner/templates/General/A8.ktm
@@ -2,7 +2,7 @@
<!DOCTYPE KugarTemplate SYSTEM "kugartemplate.dtd">
-<KugarTemplate PageSize="12" PageOrientation="0" TopMargin="20"
+<KugarTemplate PageSize="12" PageQt::Orientation="0" TopMargin="20"
BottomMargin="20" LeftMargin="20" RightMargin="20">
</KugarTemplate>
diff --git a/kugar/kudesigner/templates/General/A9.ktm b/kugar/kudesigner/templates/General/A9.ktm
index f819153f..4f9c7702 100644
--- a/kugar/kudesigner/templates/General/A9.ktm
+++ b/kugar/kudesigner/templates/General/A9.ktm
@@ -2,7 +2,7 @@
<!DOCTYPE KugarTemplate SYSTEM "kugartemplate.dtd">
-<KugarTemplate PageSize="13" PageOrientation="0" TopMargin="20"
+<KugarTemplate PageSize="13" PageQt::Orientation="0" TopMargin="20"
BottomMargin="20" LeftMargin="20" RightMargin="20">
</KugarTemplate>
diff --git a/kugar/kudesigner/templates/General/B0.ktm b/kugar/kudesigner/templates/General/B0.ktm
index 93bb7e00..17e60661 100644
--- a/kugar/kudesigner/templates/General/B0.ktm
+++ b/kugar/kudesigner/templates/General/B0.ktm
@@ -2,7 +2,7 @@
<!DOCTYPE KugarTemplate SYSTEM "kugartemplate.dtd">
-<KugarTemplate PageSize="14" PageOrientation="0" TopMargin="20"
+<KugarTemplate PageSize="14" PageQt::Orientation="0" TopMargin="20"
BottomMargin="20" LeftMargin="20" RightMargin="20">
</KugarTemplate>
diff --git a/kugar/kudesigner/templates/General/B1.ktm b/kugar/kudesigner/templates/General/B1.ktm
index 00512408..0aebed02 100644
--- a/kugar/kudesigner/templates/General/B1.ktm
+++ b/kugar/kudesigner/templates/General/B1.ktm
@@ -2,7 +2,7 @@
<!DOCTYPE KugarTemplate SYSTEM "kugartemplate.dtd">
-<KugarTemplate PageSize="15" PageOrientation="0" TopMargin="20"
+<KugarTemplate PageSize="15" PageQt::Orientation="0" TopMargin="20"
BottomMargin="20" LeftMargin="20" RightMargin="20">
</KugarTemplate>
diff --git a/kugar/kudesigner/templates/General/B10.ktm b/kugar/kudesigner/templates/General/B10.ktm
index 99070c77..24b561c7 100644
--- a/kugar/kudesigner/templates/General/B10.ktm
+++ b/kugar/kudesigner/templates/General/B10.ktm
@@ -2,7 +2,7 @@
<!DOCTYPE KugarTemplate SYSTEM "kugartemplate.dtd">
-<KugarTemplate PageSize="16" PageOrientation="0" TopMargin="20"
+<KugarTemplate PageSize="16" PageQt::Orientation="0" TopMargin="20"
BottomMargin="20" LeftMargin="20" RightMargin="20">
</KugarTemplate>
diff --git a/kugar/kudesigner/templates/General/B2.ktm b/kugar/kudesigner/templates/General/B2.ktm
index c31af4ce..f8de9304 100644
--- a/kugar/kudesigner/templates/General/B2.ktm
+++ b/kugar/kudesigner/templates/General/B2.ktm
@@ -2,7 +2,7 @@
<!DOCTYPE KugarTemplate SYSTEM "kugartemplate.dtd">
-<KugarTemplate PageSize="17" PageOrientation="0" TopMargin="20"
+<KugarTemplate PageSize="17" PageQt::Orientation="0" TopMargin="20"
BottomMargin="20" LeftMargin="20" RightMargin="20">
</KugarTemplate>
diff --git a/kugar/kudesigner/templates/General/B3.ktm b/kugar/kudesigner/templates/General/B3.ktm
index 31bf80db..8b8608d8 100644
--- a/kugar/kudesigner/templates/General/B3.ktm
+++ b/kugar/kudesigner/templates/General/B3.ktm
@@ -2,7 +2,7 @@
<!DOCTYPE KugarTemplate SYSTEM "kugartemplate.dtd">
-<KugarTemplate PageSize="18" PageOrientation="0" TopMargin="20"
+<KugarTemplate PageSize="18" PageQt::Orientation="0" TopMargin="20"
BottomMargin="20" LeftMargin="20" RightMargin="20">
</KugarTemplate>
diff --git a/kugar/kudesigner/templates/General/B4.ktm b/kugar/kudesigner/templates/General/B4.ktm
index aeac2cfa..f954c76f 100644
--- a/kugar/kudesigner/templates/General/B4.ktm
+++ b/kugar/kudesigner/templates/General/B4.ktm
@@ -2,7 +2,7 @@
<!DOCTYPE KugarTemplate SYSTEM "kugartemplate.dtd">
-<KugarTemplate PageSize="19" PageOrientation="0" TopMargin="20"
+<KugarTemplate PageSize="19" PageQt::Orientation="0" TopMargin="20"
BottomMargin="20" LeftMargin="20" RightMargin="20">
</KugarTemplate>
diff --git a/kugar/kudesigner/templates/General/B5.ktm b/kugar/kudesigner/templates/General/B5.ktm
index 9de7d62b..d57ce02d 100644
--- a/kugar/kudesigner/templates/General/B5.ktm
+++ b/kugar/kudesigner/templates/General/B5.ktm
@@ -2,7 +2,7 @@
<!DOCTYPE KugarTemplate SYSTEM "kugartemplate.dtd">
-<KugarTemplate PageSize="1" PageOrientation="0" TopMargin="20"
+<KugarTemplate PageSize="1" PageQt::Orientation="0" TopMargin="20"
BottomMargin="20" LeftMargin="20" RightMargin="20">
</KugarTemplate>
diff --git a/kugar/kudesigner/templates/General/B6.ktm b/kugar/kudesigner/templates/General/B6.ktm
index 48e21a22..fc7525a4 100644
--- a/kugar/kudesigner/templates/General/B6.ktm
+++ b/kugar/kudesigner/templates/General/B6.ktm
@@ -2,7 +2,7 @@
<!DOCTYPE KugarTemplate SYSTEM "kugartemplate.dtd">
-<KugarTemplate PageSize="20" PageOrientation="0" TopMargin="20"
+<KugarTemplate PageSize="20" PageQt::Orientation="0" TopMargin="20"
BottomMargin="20" LeftMargin="20" RightMargin="20">
</KugarTemplate>
diff --git a/kugar/kudesigner/templates/General/B7.ktm b/kugar/kudesigner/templates/General/B7.ktm
index 61e59b66..9255b34f 100644
--- a/kugar/kudesigner/templates/General/B7.ktm
+++ b/kugar/kudesigner/templates/General/B7.ktm
@@ -2,7 +2,7 @@
<!DOCTYPE KugarTemplate SYSTEM "kugartemplate.dtd">
-<KugarTemplate PageSize="21" PageOrientation="0" TopMargin="20"
+<KugarTemplate PageSize="21" PageQt::Orientation="0" TopMargin="20"
BottomMargin="20" LeftMargin="20" RightMargin="20">
</KugarTemplate>
diff --git a/kugar/kudesigner/templates/General/B8.ktm b/kugar/kudesigner/templates/General/B8.ktm
index b7fb2b57..448cd402 100644
--- a/kugar/kudesigner/templates/General/B8.ktm
+++ b/kugar/kudesigner/templates/General/B8.ktm
@@ -2,7 +2,7 @@
<!DOCTYPE KugarTemplate SYSTEM "kugartemplate.dtd">
-<KugarTemplate PageSize="22" PageOrientation="0" TopMargin="20"
+<KugarTemplate PageSize="22" PageQt::Orientation="0" TopMargin="20"
BottomMargin="20" LeftMargin="20" RightMargin="20">
</KugarTemplate>
diff --git a/kugar/kudesigner/templates/General/B9.ktm b/kugar/kudesigner/templates/General/B9.ktm
index 5c71ef55..671b5631 100644
--- a/kugar/kudesigner/templates/General/B9.ktm
+++ b/kugar/kudesigner/templates/General/B9.ktm
@@ -2,7 +2,7 @@
<!DOCTYPE KugarTemplate SYSTEM "kugartemplate.dtd">
-<KugarTemplate PageSize="23" PageOrientation="0" TopMargin="20"
+<KugarTemplate PageSize="23" PageQt::Orientation="0" TopMargin="20"
BottomMargin="20" LeftMargin="20" RightMargin="20">
</KugarTemplate>
diff --git a/kugar/kudesigner/templates/General/C5E.ktm b/kugar/kudesigner/templates/General/C5E.ktm
index 5d120ec3..34c91c46 100644
--- a/kugar/kudesigner/templates/General/C5E.ktm
+++ b/kugar/kudesigner/templates/General/C5E.ktm
@@ -2,7 +2,7 @@
<!DOCTYPE KugarTemplate SYSTEM "kugartemplate.dtd">
-<KugarTemplate PageSize="24" PageOrientation="0" TopMargin="20"
+<KugarTemplate PageSize="24" PageQt::Orientation="0" TopMargin="20"
BottomMargin="20" LeftMargin="20" RightMargin="20">
</KugarTemplate>
diff --git a/kugar/kudesigner/templates/General/Comm10E.ktm b/kugar/kudesigner/templates/General/Comm10E.ktm
index 7a6e512e..c73c9f49 100644
--- a/kugar/kudesigner/templates/General/Comm10E.ktm
+++ b/kugar/kudesigner/templates/General/Comm10E.ktm
@@ -2,7 +2,7 @@
<!DOCTYPE KugarTemplate SYSTEM "kugartemplate.dtd">
-<KugarTemplate PageSize="25" PageOrientation="0" TopMargin="20"
+<KugarTemplate PageSize="25" PageQt::Orientation="0" TopMargin="20"
BottomMargin="20" LeftMargin="20" RightMargin="20">
</KugarTemplate>
diff --git a/kugar/kudesigner/templates/General/DLE.ktm b/kugar/kudesigner/templates/General/DLE.ktm
index 66875800..ea217fad 100644
--- a/kugar/kudesigner/templates/General/DLE.ktm
+++ b/kugar/kudesigner/templates/General/DLE.ktm
@@ -2,7 +2,7 @@
<!DOCTYPE KugarTemplate SYSTEM "kugartemplate.dtd">
-<KugarTemplate PageSize="26" PageOrientation="0" TopMargin="20"
+<KugarTemplate PageSize="26" PageQt::Orientation="0" TopMargin="20"
BottomMargin="20" LeftMargin="20" RightMargin="20">
</KugarTemplate>
diff --git a/kugar/kudesigner/templates/General/Executive.ktm b/kugar/kudesigner/templates/General/Executive.ktm
index 9fe71873..e5b08181 100644
--- a/kugar/kudesigner/templates/General/Executive.ktm
+++ b/kugar/kudesigner/templates/General/Executive.ktm
@@ -2,7 +2,7 @@
<!DOCTYPE KugarTemplate SYSTEM "kugartemplate.dtd">
-<KugarTemplate PageSize="4" PageOrientation="0" TopMargin="20"
+<KugarTemplate PageSize="4" PageQt::Orientation="0" TopMargin="20"
BottomMargin="20" LeftMargin="20" RightMargin="20">
</KugarTemplate>
diff --git a/kugar/kudesigner/templates/General/Folio.ktm b/kugar/kudesigner/templates/General/Folio.ktm
index 832a1d59..32a7b7fc 100644
--- a/kugar/kudesigner/templates/General/Folio.ktm
+++ b/kugar/kudesigner/templates/General/Folio.ktm
@@ -2,7 +2,7 @@
<!DOCTYPE KugarTemplate SYSTEM "kugartemplate.dtd">
-<KugarTemplate PageSize="27" PageOrientation="0" TopMargin="20"
+<KugarTemplate PageSize="27" PageQt::Orientation="0" TopMargin="20"
BottomMargin="20" LeftMargin="20" RightMargin="20">
</KugarTemplate>
diff --git a/kugar/kudesigner/templates/General/Ledger.ktm b/kugar/kudesigner/templates/General/Ledger.ktm
index db605f13..34e7fad2 100644
--- a/kugar/kudesigner/templates/General/Ledger.ktm
+++ b/kugar/kudesigner/templates/General/Ledger.ktm
@@ -2,7 +2,7 @@
<!DOCTYPE KugarTemplate SYSTEM "kugartemplate.dtd">
-<KugarTemplate PageSize="28" PageOrientation="0" TopMargin="20"
+<KugarTemplate PageSize="28" PageQt::Orientation="0" TopMargin="20"
BottomMargin="20" LeftMargin="20" RightMargin="20">
</KugarTemplate>
diff --git a/kugar/kudesigner/templates/General/Legal.ktm b/kugar/kudesigner/templates/General/Legal.ktm
index 85953bb8..0edb0446 100644
--- a/kugar/kudesigner/templates/General/Legal.ktm
+++ b/kugar/kudesigner/templates/General/Legal.ktm
@@ -2,7 +2,7 @@
<!DOCTYPE KugarTemplate SYSTEM "kugartemplate.dtd">
-<KugarTemplate PageSize="3" PageOrientation="0" TopMargin="20"
+<KugarTemplate PageSize="3" PageQt::Orientation="0" TopMargin="20"
BottomMargin="20" LeftMargin="20" RightMargin="20">
</KugarTemplate>
diff --git a/kugar/kudesigner/templates/General/Letter.ktm b/kugar/kudesigner/templates/General/Letter.ktm
index d6838210..cd0047eb 100644
--- a/kugar/kudesigner/templates/General/Letter.ktm
+++ b/kugar/kudesigner/templates/General/Letter.ktm
@@ -2,7 +2,7 @@
<!DOCTYPE KugarTemplate SYSTEM "kugartemplate.dtd">
-<KugarTemplate PageSize="2" PageOrientation="0" TopMargin="20"
+<KugarTemplate PageSize="2" PageQt::Orientation="0" TopMargin="20"
BottomMargin="20" LeftMargin="20" RightMargin="20">
</KugarTemplate>
diff --git a/kugar/kudesigner/templates/General/Tabloid.ktm b/kugar/kudesigner/templates/General/Tabloid.ktm
index 5bccc107..f22445d4 100644
--- a/kugar/kudesigner/templates/General/Tabloid.ktm
+++ b/kugar/kudesigner/templates/General/Tabloid.ktm
@@ -2,7 +2,7 @@
<!DOCTYPE KugarTemplate SYSTEM "kugartemplate.dtd">
-<KugarTemplate PageSize="29" PageOrientation="0" TopMargin="20"
+<KugarTemplate PageSize="29" PageQt::Orientation="0" TopMargin="20"
BottomMargin="20" LeftMargin="20" RightMargin="20">
</KugarTemplate>
diff --git a/kugar/kudesigner_lib/band.cpp b/kugar/kudesigner_lib/band.cpp
index 0b3225f6..09e62dbe 100644
--- a/kugar/kudesigner_lib/band.cpp
+++ b/kugar/kudesigner_lib/band.cpp
@@ -18,9 +18,9 @@ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
*/
#include "band.h"
-#include <qcanvas.h>
-#include <qrect.h>
-#include <qpainter.h>
+#include <tqcanvas.h>
+#include <tqrect.h>
+#include <tqpainter.h>
#include <kglobalsettings.h>
@@ -34,7 +34,7 @@ namespace Kudesigner
Band::~Band()
{
- for ( QCanvasItemList::Iterator it = items.begin(); it != items.end(); ++it )
+ for ( TQCanvasItemList::Iterator it = items.begin(); it != items.end(); ++it )
{
// (*it)->hide();
m_canvas->selected.remove( static_cast<Box*>( *it ) );
@@ -44,7 +44,7 @@ Band::~Band()
items.clear();
}
-void Band::draw( QPainter &painter )
+void Band::draw( TQPainter &painter )
{
setX( m_canvas->kugarTemplate() ->props[ "LeftMargin" ].value().toInt() );
setSize( m_canvas->kugarTemplate() ->width()
@@ -61,7 +61,7 @@ void Band::arrange( int base, bool destructive )
setY( base );
if ( !destructive )
return ;
- for ( QCanvasItemList::Iterator it = items.begin(); it != items.end(); ++it )
+ for ( TQCanvasItemList::Iterator it = items.begin(); it != items.end(); ++it )
{
( *it ) ->moveBy( 0, diff );
// ( (CanvasReportItem *)(*it) )->updateGeomProps();
@@ -74,48 +74,48 @@ void Band::arrange( int base, bool destructive )
int Band::minHeight()
{
int result = static_cast<int>( y() + 10 );
- for ( QCanvasItemList::Iterator it = items.begin(); it != items.end(); ++it )
+ for ( TQCanvasItemList::Iterator it = items.begin(); it != items.end(); ++it )
{
- result = QMAX( result, static_cast<int>( static_cast<QCanvasRectangle*>( *it ) ->y() +
- static_cast<QCanvasRectangle*>( *it ) ->height() ) );
+ result = TQMAX( result, static_cast<int>( static_cast<TQCanvasRectangle*>( *it ) ->y() +
+ static_cast<TQCanvasRectangle*>( *it ) ->height() ) );
}
return result - static_cast<int>( y() );
}
-QString Band::getXml()
+TQString Band::getXml()
{
- QString result = "";
+ TQString result = "";
for ( Set::Iterator it( props ); it.current(); ++it )
{
- result += " " + QString(it.currentKey()) + "=" + "\"" + PropertySerializer::toString( it.current() ) + "\"";
+ result += " " + TQString(it.currentKey()) + "=" + "\"" + PropertySerializer::toString( it.current() ) + "\"";
}
result += ">\n";
- for ( QCanvasItemList::Iterator it = items.begin(); it != items.end(); ++it )
+ for ( TQCanvasItemList::Iterator it = items.begin(); it != items.end(); ++it )
{
result += static_cast<ReportItem*>( *it ) ->getXml();
}
return result;
}
-int Band::isInHolder( const QPoint p )
+int Band::isInHolder( const TQPoint p )
{
- if ( bottomMiddleResizableRect().contains( p ) )
+ if ( bottomMiddleResizableRect().tqcontains( p ) )
return ( ResizeBottom );
return ResizeNothing;
}
-void Band::drawHolders( QPainter &painter )
+void Band::drawHolders( TQPainter &painter )
{
- painter.setPen( QColor( 0, 0, 0 ) );
+ painter.setPen( TQColor( 0, 0, 0 ) );
painter.setBrush( KGlobalSettings::highlightColor() );
painter.drawRect( bottomMiddleResizableRect() );
}
-QRect Band::bottomMiddleResizableRect()
+TQRect Band::bottomMiddleResizableRect()
{
- return QRect( ( int ) ( x() + width() / 2 - HolderSize / 2. ), ( int ) ( y() + height() - HolderSize ), HolderSize, HolderSize );
+ return TQRect( ( int ) ( x() + width() / 2 - HolderSize / 2. ), ( int ) ( y() + height() - HolderSize ), HolderSize, HolderSize );
}
void Band::updateGeomProps()
diff --git a/kugar/kudesigner_lib/band.h b/kugar/kudesigner_lib/band.h
index 6e93bb50..c45cc18e 100644
--- a/kugar/kudesigner_lib/band.h
+++ b/kugar/kudesigner_lib/band.h
@@ -22,10 +22,10 @@
#include "commdefs.h"
#include "section.h"
-class QCanvasItemList;
-class QPainter;
-class QRect;
-class QPoint;
+class TQCanvasItemList;
+class TQPainter;
+class TQRect;
+class TQPoint;
namespace Kudesigner
{
@@ -44,17 +44,17 @@ public:
{
return Rtti_Band;
}
- virtual void draw( QPainter &painter );
- virtual QString getXml();
- virtual int isInHolder( const QPoint );
- virtual void drawHolders( QPainter & );
+ virtual void draw( TQPainter &painter );
+ virtual TQString getXml();
+ virtual int isInHolder( const TQPoint );
+ virtual void drawHolders( TQPainter & );
int minHeight();
- QRect bottomMiddleResizableRect();
+ TQRect bottomMiddleResizableRect();
void arrange( int base, bool destructive = TRUE );
virtual void updateGeomProps();
- QCanvasItemList items;
+ TQCanvasItemList items;
};
}
diff --git a/kugar/kudesigner_lib/box.cpp b/kugar/kudesigner_lib/box.cpp
index f80f9a5f..7a0c58ac 100644
--- a/kugar/kudesigner_lib/box.cpp
+++ b/kugar/kudesigner_lib/box.cpp
@@ -16,7 +16,7 @@
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
-#include <qcanvas.h>
+#include <tqcanvas.h>
#include "box.h"
#include "canvas.h"
@@ -35,9 +35,9 @@ void Box::scale( int scale )
setSize( width() * scale, height() * scale );
}
-void Box::draw( QPainter &painter )
+void Box::draw( TQPainter &painter )
{
- QCanvasRectangle::draw( painter );
+ TQCanvasRectangle::draw( painter );
}
}
diff --git a/kugar/kudesigner_lib/box.h b/kugar/kudesigner_lib/box.h
index 38df93dd..623d509b 100644
--- a/kugar/kudesigner_lib/box.h
+++ b/kugar/kudesigner_lib/box.h
@@ -31,13 +31,13 @@ namespace Kudesigner
class Canvas;
-class Box: public QCanvasRectangle
+class Box: public TQCanvasRectangle
{
public:
enum ResizeType {ResizeNothing = 0, ResizeLeft = 1, ResizeTop = 2, ResizeRight = 4, ResizeBottom = 8};
Box( int x, int y, int width, int height, Canvas *canvas ) :
- QCanvasRectangle( x, y, width, height, ( QCanvas* ) canvas ), m_canvas( canvas )
+ TQCanvasRectangle( x, y, width, height, ( TQCanvas* ) canvas ), m_canvas( canvas )
{
setSelected( false );
}
@@ -47,19 +47,19 @@ public:
{
return Rtti_Box;
}
- virtual void draw( QPainter &painter );
- virtual QString getXml()
+ virtual void draw( TQPainter &painter );
+ virtual TQString getXml()
{
return "";
}
void scale( int scale );
- virtual int isInHolder( const QPoint )
+ virtual int isInHolder( const TQPoint )
{
return ResizeNothing;
}
- virtual void drawHolders( QPainter & )
+ virtual void drawHolders( TQPainter & )
{}
virtual void updateGeomProps()
diff --git a/kugar/kudesigner_lib/calcfield.cpp b/kugar/kudesigner_lib/calcfield.cpp
index bccf7d96..16941b7b 100644
--- a/kugar/kudesigner_lib/calcfield.cpp
+++ b/kugar/kudesigner_lib/calcfield.cpp
@@ -20,7 +20,7 @@
#include <klocale.h>
-#include <qmap.h>
+#include <tqmap.h>
#include <koproperty/property.h>
@@ -30,7 +30,7 @@ namespace Kudesigner
CalculatedField::CalculatedField( int x, int y, int width, int height, Canvas *canvas ) :
Field( x, y, width, height, canvas, false )
{
- QMap<QString, QString> m;
+ TQMap<TQString, TQString> m;
props.setGroupDescription( "Calculation", i18n( "Calculation" ) );
m[ i18n( "Count" ) ] = "0";
@@ -43,12 +43,12 @@ CalculatedField::CalculatedField( int x, int y, int width, int height, Canvas *c
registerAs( Rtti_Calculated );
}
-void CalculatedField::draw( QPainter &painter )
+void CalculatedField::draw( TQPainter &painter )
{
Field::draw( painter );
}
-QString CalculatedField::getXml()
+TQString CalculatedField::getXml()
{
return "\t\t<CalculatedField" + ReportItem::getXml() + " />\n";
}
diff --git a/kugar/kudesigner_lib/calcfield.h b/kugar/kudesigner_lib/calcfield.h
index 326e9ba4..d28df49f 100644
--- a/kugar/kudesigner_lib/calcfield.h
+++ b/kugar/kudesigner_lib/calcfield.h
@@ -33,8 +33,8 @@ public:
{
return Rtti_Calculated;
}
- virtual QString getXml();
- virtual void draw( QPainter &painter );
+ virtual TQString getXml();
+ virtual void draw( TQPainter &painter );
virtual void updateGeomProps()
{
Field::updateGeomProps();
diff --git a/kugar/kudesigner_lib/canvas.cpp b/kugar/kudesigner_lib/canvas.cpp
index e4cfb30f..d56e425d 100644
--- a/kugar/kudesigner_lib/canvas.cpp
+++ b/kugar/kudesigner_lib/canvas.cpp
@@ -18,8 +18,8 @@
*/
#include "canvas.h"
-#include <qdom.h>
-#include <qstringlist.h>
+#include <tqdom.h>
+#include <tqstringlist.h>
#include <koproperty/property.h>
@@ -49,7 +49,7 @@ namespace Kudesigner
{
Canvas::Canvas( int w, int h /*, Canvas *doc*/ )
- : QCanvas( w, h ), m_plugin( 0 ), m_kugarTemplate( 0 ) //, m_doc(doc)
+ : TQCanvas( w, h ), m_plugin( 0 ), m_kugarTemplate( 0 ) //, m_doc(doc)
{
}
@@ -63,8 +63,8 @@ void Canvas::scaleCanvas( int scale )
resize( width() * scale, height() * scale );
//scale all child items if they are textbox's
- /* QCanvasItemList l=this->allItems();
- for (QCanvasItemList::Iterator it=l.begin(); it!=l.end(); ++it)
+ /* TQCanvasItemList l=this->allItems();
+ for (TQCanvasItemList::Iterator it=l.begin(); it!=l.end(); ++it)
{
if ((*it)->rtti() == Rtti_TextBox)
{
@@ -74,7 +74,7 @@ void Canvas::scaleCanvas( int scale )
}*/
}
-void Canvas::drawForeground ( QPainter & painter, const QRect & /*clip*/ )
+void Canvas::drawForeground ( TQPainter & painter, const TQRect & /*clip*/ )
{
//kdDebug()<<"Canvas::drawForeGround"<<endl;
// qWarning("drawForeground ");
@@ -110,7 +110,7 @@ void Canvas::unselectAll()
void Canvas::selectAll()
{
- for ( QCanvasItemList::Iterator it = allItems().begin(); it != allItems().end(); ++it )
+ for ( TQCanvasItemList::Iterator it = allItems().begin(); it != allItems().end(); ++it )
{
if ( ( ( *it ) ->rtti() > 2001 ) && ( ( *it ) ->isVisible() ) )
selectItem( static_cast<Box*>( *it ) );
@@ -147,28 +147,28 @@ void Canvas::setKugarTemplate( KugarTemplate *kugarTemplate )
m_kugarTemplate = kugarTemplate;
}
-bool Canvas::loadXML( const QDomNode &report )
+bool Canvas::loadXML( const TQDomNode &report )
{
- QDomNamedNodeMap attributes = report.attributes();
+ TQDomNamedNodeMap attributes = report.attributes();
//creating KugarTemplate object
KugarTemplate *templ = new KugarTemplate( 0, 0, width(), height(), this );
templ->show();
templ->props[ "PageSize" ].setValue( attributes.namedItem( "PageSize" ).nodeValue() );
- templ->props[ "PageOrientation" ].setValue( attributes.namedItem( "PageOrientation" ).nodeValue() );
+ templ->props[ "PageQt::Orientation" ].setValue( attributes.namedItem( "PageQt::Orientation" ).nodeValue() );
templ->props[ "TopMargin" ].setValue( attributes.namedItem( "TopMargin" ).nodeValue().toInt() );
templ->props[ "BottomMargin" ].setValue( attributes.namedItem( "BottomMargin" ).nodeValue().toInt() );
templ->props[ "LeftMargin" ].setValue( attributes.namedItem( "LeftMargin" ).nodeValue().toInt() );
templ->props[ "RightMargin" ].setValue( attributes.namedItem( "RightMargin" ).nodeValue().toInt() );
// 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++ )
{
- QDomNode child = children.item( j );
+ TQDomNode child = tqchildren.item( j );
- if ( child.nodeType() == QDomNode::ElementNode )
+ if ( child.nodeType() == TQDomNode::ElementNode )
{
if ( child.nodeName() == "ReportHeader" )
setReportHeaderAttributes( &child );
@@ -190,8 +190,8 @@ bool Canvas::loadXML( const QDomNode &report )
}
}
templ->arrangeSections( FALSE );
- QCanvasItemList l = allItems();
- for ( QCanvasItemList::Iterator it = l.begin(); it != l.end(); ++it )
+ TQCanvasItemList l = allItems();
+ for ( TQCanvasItemList::Iterator it = l.begin(); it != l.end(); ++it )
{
( *it ) ->show();
}
@@ -200,9 +200,9 @@ bool Canvas::loadXML( const QDomNode &report )
return true;
}
-void Canvas::setReportHeaderAttributes( QDomNode *node )
+void Canvas::setReportHeaderAttributes( TQDomNode *node )
{
- QDomNamedNodeMap attributes = node->attributes();
+ TQDomNamedNodeMap attributes = node->attributes();
ReportHeader *rh = new ReportHeader( kugarTemplate() ->props[ "LeftMargin" ].value().toInt(),
0, kugarTemplate() ->width() - kugarTemplate() ->props[ "RightMargin" ].value().toInt() -
@@ -213,9 +213,9 @@ void Canvas::setReportHeaderAttributes( QDomNode *node )
addReportItems( node, rh );
}
-void Canvas::setReportFooterAttributes( QDomNode *node )
+void Canvas::setReportFooterAttributes( TQDomNode *node )
{
- QDomNamedNodeMap attributes = node->attributes();
+ TQDomNamedNodeMap attributes = node->attributes();
ReportFooter *rf = new ReportFooter( kugarTemplate() ->props[ "LeftMargin" ].value().toInt(),
0, kugarTemplate() ->width() - kugarTemplate() ->props[ "RightMargin" ].value().toInt() -
@@ -226,9 +226,9 @@ void Canvas::setReportFooterAttributes( QDomNode *node )
addReportItems( node, rf );
}
-void Canvas::setPageHeaderAttributes( QDomNode *node )
+void Canvas::setPageHeaderAttributes( TQDomNode *node )
{
- QDomNamedNodeMap attributes = node->attributes();
+ TQDomNamedNodeMap attributes = node->attributes();
PageHeader *ph = new PageHeader( kugarTemplate() ->props[ "LeftMargin" ].value().toInt(),
0, kugarTemplate() ->width() - kugarTemplate() ->props[ "RightMargin" ].value().toInt() -
@@ -239,9 +239,9 @@ void Canvas::setPageHeaderAttributes( QDomNode *node )
addReportItems( node, ph );
}
-void Canvas::setPageFooterAttributes( QDomNode *node )
+void Canvas::setPageFooterAttributes( TQDomNode *node )
{
- QDomNamedNodeMap attributes = node->attributes();
+ TQDomNamedNodeMap attributes = node->attributes();
PageFooter *pf = new PageFooter( kugarTemplate() ->props[ "LeftMargin" ].value().toInt(),
0, kugarTemplate() ->width() - kugarTemplate() ->props[ "RightMargin" ].value().toInt() -
@@ -252,9 +252,9 @@ void Canvas::setPageFooterAttributes( QDomNode *node )
addReportItems( node, pf );
}
-void Canvas::setDetailHeaderAttributes( QDomNode *node )
+void Canvas::setDetailHeaderAttributes( TQDomNode *node )
{
- QDomNamedNodeMap attributes = node->attributes();
+ TQDomNamedNodeMap attributes = node->attributes();
DetailHeader *dh = new DetailHeader( kugarTemplate() ->props[ "LeftMargin" ].value().toInt(),
0, kugarTemplate() ->width() - kugarTemplate() ->props[ "RightMargin" ].value().toInt() -
@@ -267,9 +267,9 @@ void Canvas::setDetailHeaderAttributes( QDomNode *node )
addReportItems( node, dh );
}
-void Canvas::setDetailAttributes( QDomNode *node )
+void Canvas::setDetailAttributes( TQDomNode *node )
{
- QDomNamedNodeMap attributes = node->attributes();
+ TQDomNamedNodeMap attributes = node->attributes();
Detail *d = new Detail( kugarTemplate() ->props[ "LeftMargin" ].value().toInt(),
0, kugarTemplate() ->width() - kugarTemplate() ->props[ "RightMargin" ].value().toInt() -
@@ -278,14 +278,14 @@ void Canvas::setDetailAttributes( QDomNode *node )
attributes.namedItem( "Level" ).nodeValue().toInt(), this );
d->props[ "Level" ].setValue( attributes.namedItem( "Level" ).nodeValue().toInt() );
d->props[ "Height" ].setValue( attributes.namedItem( "Height" ).nodeValue().toInt() );
- d->props[ "Repeat" ].setValue( QVariant( attributes.namedItem( "Repeat" ).nodeValue() == "true", 3 ) );
+ d->props[ "Repeat" ].setValue( TQVariant( attributes.namedItem( "Repeat" ).nodeValue() == "true", 3 ) );
kugarTemplate() ->details[ attributes.namedItem( "Level" ).nodeValue().toInt() ].second = d;
addReportItems( node, d );
}
-void Canvas::setDetailFooterAttributes( QDomNode *node )
+void Canvas::setDetailFooterAttributes( TQDomNode *node )
{
- QDomNamedNodeMap attributes = node->attributes();
+ TQDomNamedNodeMap attributes = node->attributes();
DetailFooter *df = new DetailFooter( kugarTemplate() ->props[ "LeftMargin" ].value().toInt(),
0, kugarTemplate() ->width() - kugarTemplate() ->props[ "RightMargin" ].value().toInt() -
@@ -299,15 +299,15 @@ void Canvas::setDetailFooterAttributes( QDomNode *node )
}
-void Canvas::addReportItems( QDomNode *node, Band *section )
+void Canvas::addReportItems( TQDomNode *node, Band *section )
{
- QDomNodeList children = node->childNodes();
- int childCount = children.length();
+ TQDomNodeList tqchildren = node->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" )
{
@@ -354,14 +354,14 @@ void Canvas::addReportItems( QDomNode *node, Band *section )
}
}
-void Canvas::setReportItemAttributes( QDomNode *node, ReportItem *item )
+void Canvas::setReportItemAttributes( TQDomNode *node, ReportItem *item )
{
- QDomNamedNodeMap attributes = node->attributes();
+ TQDomNamedNodeMap attributes = node->attributes();
for ( unsigned int i = 0; i < attributes.count(); i++ )
{
- QString propertyName = attributes.item( i ).nodeName();
- QString propertyValue = attributes.item( i ).nodeValue();
+ TQString propertyName = attributes.item( i ).nodeName();
+ TQString propertyValue = attributes.item( i ).nodeValue();
item->props[ propertyName.utf8() ].setValue(
PropertySerializer::fromString( &item->props[ propertyName.utf8() ], propertyValue ) );
diff --git a/kugar/kudesigner_lib/canvas.h b/kugar/kudesigner_lib/canvas.h
index fda6aa7d..49b33728 100644
--- a/kugar/kudesigner_lib/canvas.h
+++ b/kugar/kudesigner_lib/canvas.h
@@ -19,13 +19,13 @@
#ifndef MYCANVAS_H
#define MYCANVAS_H
-#include <qcanvas.h>
-#include <qvaluelist.h>
+#include <tqcanvas.h>
+#include <tqvaluelist.h>
#include "box.h"
-class QDomNode;
-class QIODevice;
+class TQDomNode;
+class TQIODevice;
class KuDesignerPlugin;
namespace Kudesigner
@@ -35,11 +35,12 @@ class KugarTemplate;
class Band;
class ReportItem;
-typedef QValueList<Box*> BoxList;
+typedef TQValueList<Box*> BoxList;
-class Canvas: public QCanvas
+class Canvas: public TQCanvas
{
Q_OBJECT
+ TQ_OBJECT
public:
Canvas( int w, int h );
~Canvas();
@@ -61,7 +62,7 @@ public:
void setStructureModified() { emit structureModified(); }
// void deleteSelected();
- virtual bool loadXML( const QDomNode &report );
+ virtual bool loadXML( const TQDomNode &report );
public slots:
void changed();
@@ -71,17 +72,17 @@ signals:
void structureModified();
protected:
- virtual void drawForeground( QPainter &painter, const QRect &clip );
-
- void setReportItemAttributes( QDomNode *node, ReportItem *item );
- void addReportItems( QDomNode *node, Band *section );
- void setReportHeaderAttributes( QDomNode *node );
- void setReportFooterAttributes( QDomNode *node );
- void setPageHeaderAttributes( QDomNode *node );
- void setPageFooterAttributes( QDomNode *node );
- void setDetailHeaderAttributes( QDomNode *node );
- void setDetailAttributes( QDomNode *node );
- void setDetailFooterAttributes( QDomNode *node );
+ virtual void drawForeground( TQPainter &painter, const TQRect &clip );
+
+ void setReportItemAttributes( TQDomNode *node, ReportItem *item );
+ void addReportItems( TQDomNode *node, Band *section );
+ void setReportHeaderAttributes( TQDomNode *node );
+ void setReportFooterAttributes( TQDomNode *node );
+ void setPageHeaderAttributes( TQDomNode *node );
+ void setPageFooterAttributes( TQDomNode *node );
+ void setDetailHeaderAttributes( TQDomNode *node );
+ void setDetailAttributes( TQDomNode *node );
+ void setDetailFooterAttributes( TQDomNode *node );
private:
// KudesignerDoc *m_doc;
diff --git a/kugar/kudesigner_lib/command.cpp b/kugar/kudesigner_lib/command.cpp
index 1644868a..e65f9f71 100644
--- a/kugar/kudesigner_lib/command.cpp
+++ b/kugar/kudesigner_lib/command.cpp
@@ -51,7 +51,7 @@ namespace Kudesigner
//AddDetailFooterCommand
AddDetailFooterCommand::AddDetailFooterCommand( int level, Canvas *doc )
- : KNamedCommand( QObject::tr( "Insert Detail Footer Section" ) ), m_level( level ), m_doc( doc )
+ : KNamedCommand( TQObject::tr( "Insert Detail Footer Section" ) ), m_level( level ), m_doc( doc )
{}
void AddDetailFooterCommand::execute()
@@ -75,7 +75,7 @@ void AddDetailFooterCommand::unexecute()
//AddDetailCommand
AddDetailCommand::AddDetailCommand( int level, Canvas *doc )
- : KNamedCommand( QObject::tr( "Insert Detail Section" ) ), m_level( level ), m_doc( doc )
+ : KNamedCommand( TQObject::tr( "Insert Detail Section" ) ), m_level( level ), m_doc( doc )
{}
void AddDetailCommand::execute()
@@ -99,7 +99,7 @@ void AddDetailCommand::unexecute()
//AddDetailHeaderCommand
AddDetailHeaderCommand::AddDetailHeaderCommand( int level, Canvas *doc )
- : KNamedCommand( QObject::tr( "Insert Detail Header Section" ) ), m_level( level ), m_doc( doc )
+ : KNamedCommand( TQObject::tr( "Insert Detail Header Section" ) ), m_level( level ), m_doc( doc )
{}
void AddDetailHeaderCommand::execute()
@@ -123,7 +123,7 @@ void AddDetailHeaderCommand::unexecute()
//AddPageFooterCommand
AddPageFooterCommand::AddPageFooterCommand( Canvas *doc )
- : KNamedCommand( QObject::tr( "Insert Page Footer Section" ) ), m_doc( doc )
+ : KNamedCommand( TQObject::tr( "Insert Page Footer Section" ) ), m_doc( doc )
{}
void AddPageFooterCommand::execute()
@@ -146,7 +146,7 @@ void AddPageFooterCommand::unexecute()
//AddPageHeaderCommand
AddPageHeaderCommand::AddPageHeaderCommand( Canvas *doc )
- : KNamedCommand( QObject::tr( "Insert Page Header Section" ) ), m_doc( doc )
+ : KNamedCommand( TQObject::tr( "Insert Page Header Section" ) ), m_doc( doc )
{}
void AddPageHeaderCommand::execute()
@@ -169,7 +169,7 @@ void AddPageHeaderCommand::unexecute()
//AddReportFooterCommand
AddReportFooterCommand::AddReportFooterCommand( Canvas *doc )
- : KNamedCommand( QObject::tr( "Insert Report Footer Section" ) ), m_doc( doc )
+ : KNamedCommand( TQObject::tr( "Insert Report Footer Section" ) ), m_doc( doc )
{}
void AddReportFooterCommand::execute()
@@ -192,7 +192,7 @@ void AddReportFooterCommand::unexecute()
//AddReportHeaderCommand
AddReportHeaderCommand::AddReportHeaderCommand( Canvas *doc )
- : KNamedCommand( QObject::tr( "Insert Report Header Section" ) ), m_doc( doc )
+ : KNamedCommand( TQObject::tr( "Insert Report Header Section" ) ), m_doc( doc )
{}
void AddReportHeaderCommand::execute()
@@ -215,7 +215,7 @@ void AddReportHeaderCommand::unexecute()
//AddReportItemCommand
AddReportItemCommand::AddReportItemCommand( Canvas *doc, View *rc, int x, int y, RttiValues section, int sectionLevel ) :
- KNamedCommand( QObject::tr( "Insert Report Item" ) ), m_doc( doc ), m_rc( rc ), m_x( x ), m_y( y ), m_section( section ), m_sectionLevel( sectionLevel )
+ KNamedCommand( TQObject::tr( "Insert Report Item" ) ), m_doc( doc ), m_rc( rc ), m_x( x ), m_y( y ), m_section( section ), m_sectionLevel( sectionLevel )
{
m_rtti = m_rc->itemToInsert;
setName( "Insert " + Kudesigner::rttiName( m_rc->itemToInsert ) );
@@ -269,15 +269,15 @@ void AddReportItemCommand::unexecute()
}
}
-DeleteReportItemsCommand::DeleteReportItemsCommand( Canvas * doc, QValueList< Box* > & items )
- : KNamedCommand( QObject::tr( "Delete Report Item(s)" ) ), m_doc( doc ), m_items( items )
+DeleteReportItemsCommand::DeleteReportItemsCommand( Canvas * doc, TQValueList< Box* > & items )
+ : KNamedCommand( TQObject::tr( "Delete Report Item(s)" ) ), m_doc( doc ), m_items( items )
{}
void DeleteReportItemsCommand::execute( )
{
m_doc->unselectAll();
- for ( QValueList< Box* >::iterator it = m_items.begin(); it != m_items.end(); ++it )
+ for ( TQValueList< Box* >::iterator it = m_items.begin(); it != m_items.end(); ++it )
{
Box *b = *it;
m_doc->kugarTemplate() ->removeReportItem( b );
diff --git a/kugar/kudesigner_lib/command.h b/kugar/kudesigner_lib/command.h
index 6c040a85..a49ebb89 100644
--- a/kugar/kudesigner_lib/command.h
+++ b/kugar/kudesigner_lib/command.h
@@ -169,13 +169,13 @@ private:
class DeleteReportItemsCommand: public KNamedCommand
{
public:
- DeleteReportItemsCommand( Canvas *doc, QValueList<Box*>& items );
+ DeleteReportItemsCommand( Canvas *doc, TQValueList<Box*>& items );
virtual void execute();
virtual void unexecute();
private:
Canvas *m_doc;
- QValueList<Box*> m_items;
+ TQValueList<Box*> m_items;
};
}
diff --git a/kugar/kudesigner_lib/commdefs.cpp b/kugar/kudesigner_lib/commdefs.cpp
index 44a40bf9..298c3ecc 100644
--- a/kugar/kudesigner_lib/commdefs.cpp
+++ b/kugar/kudesigner_lib/commdefs.cpp
@@ -19,14 +19,14 @@
#include <klocale.h>
-#include <qsettings.h>
+#include <tqsettings.h>
#include "commdefs.h"
namespace Kudesigner
{
-QString rttiName( int rtti )
+TQString rttiName( int rtti )
{
switch ( rtti )
{
@@ -51,7 +51,7 @@ int Config::m_gridSize = 10;
void Config::setGridSize( int gridSize )
{
- QSettings settings;
+ TQSettings settings;
settings.writeEntry( "/kudesigner/gridSize", gridSize );
m_gridSize = gridSize;
}
@@ -61,7 +61,7 @@ int Config::gridSize()
static bool confRead = false;
if ( !confRead )
{
- QSettings settings;
+ TQSettings settings;
m_gridSize = settings.readNumEntry( "/kudesigner/gridSize", 10 );
confRead = true;
}
diff --git a/kugar/kudesigner_lib/commdefs.h b/kugar/kudesigner_lib/commdefs.h
index 1143043d..9d2a2bd5 100644
--- a/kugar/kudesigner_lib/commdefs.h
+++ b/kugar/kudesigner_lib/commdefs.h
@@ -19,9 +19,9 @@
#ifndef COMMDEFS_H
#define COMMDEFS_H
-#include <qapplication.h>
-#include <qcanvas.h>
-#include <qstringlist.h>
+#include <tqapplication.h>
+#include <tqcanvas.h>
+#include <tqstringlist.h>
namespace Kudesigner
{
@@ -47,7 +47,7 @@ enum RttiValues {
Rtti_Line = 2006
};
-QString rttiName( int rtti );
+TQString rttiName( int rtti );
class Config
{
diff --git a/kugar/kudesigner_lib/detail.cpp b/kugar/kudesigner_lib/detail.cpp
index 9dbf4b62..db3765f8 100644
--- a/kugar/kudesigner_lib/detail.cpp
+++ b/kugar/kudesigner_lib/detail.cpp
@@ -20,7 +20,7 @@
#include <klocale.h>
-#include <qpainter.h>
+#include <tqpainter.h>
#include <koproperty/property.h>
@@ -32,19 +32,19 @@ Detail::Detail( int x, int y, int width, int height, int level, Canvas *canvas )
{
props.addProperty( new Property( "Height", 50, i18n( "Height" ), i18n( "Height" ), KoProperty::Integer ), "Detail" );
props.addProperty( new Property( "Level", 0, i18n( "Level" ), i18n( "Detail Level" ), KoProperty::Integer ), "Detail" );
- props.addProperty( new Property( "Repeat", QVariant( false, 3 ), i18n( "Repeat" ), i18n( "Repeat After Page Break" ), KoProperty::Boolean ), "Detail" );
+ props.addProperty( new Property( "Repeat", TQVariant( false, 3 ), i18n( "Repeat" ), i18n( "Repeat After Page Break" ), KoProperty::Boolean ), "Detail" );
registerAs( Rtti_Detail );
}
-void Detail::draw( QPainter &painter )
+void Detail::draw( TQPainter &painter )
{
- QString str = QString( "%1 %2" ).arg( i18n( "Detail" ) ).arg( props[ "Level" ].value().toInt() );
+ TQString str = TQString( "%1 %2" ).tqarg( i18n( "Detail" ) ).tqarg( props[ "Level" ].value().toInt() );
painter.drawText( rect(), AlignVCenter | AlignLeft, str );
Band::draw( painter );
}
-QString Detail::getXml()
+TQString Detail::getXml()
{
return "\t<Detail" + Band::getXml() + "\t</Detail>\n\n";
}
diff --git a/kugar/kudesigner_lib/detail.h b/kugar/kudesigner_lib/detail.h
index 6837578c..c8727e0e 100644
--- a/kugar/kudesigner_lib/detail.h
+++ b/kugar/kudesigner_lib/detail.h
@@ -34,8 +34,8 @@ public:
{
return Rtti_Detail;
}
- virtual void draw( QPainter &painter );
- virtual QString getXml();
+ virtual void draw( TQPainter &painter );
+ virtual TQString getXml();
};
}
diff --git a/kugar/kudesigner_lib/detailfooter.cpp b/kugar/kudesigner_lib/detailfooter.cpp
index 0b9b041c..14b5e13f 100644
--- a/kugar/kudesigner_lib/detailfooter.cpp
+++ b/kugar/kudesigner_lib/detailfooter.cpp
@@ -20,7 +20,7 @@
#include <klocale.h>
-#include <qpainter.h>
+#include <tqpainter.h>
#include <koproperty/property.h>
@@ -34,14 +34,14 @@ DetailFooter::DetailFooter( int x, int y, int width, int height, int level, Canv
props.addProperty( new Property( "Level", 0, i18n( "Level" ), i18n( "Detail Level" ), KoProperty::Integer ), "Detail" );
}
-void DetailFooter::draw( QPainter &painter )
+void DetailFooter::draw( TQPainter &painter )
{
- QString str = QString( "%1 %2" ).arg( i18n( "Detail Footer" ) ).arg( props[ "Level" ].value().toInt() );
+ TQString str = TQString( "%1 %2" ).tqarg( i18n( "Detail Footer" ) ).tqarg( props[ "Level" ].value().toInt() );
painter.drawText( rect(), AlignVCenter | AlignLeft, str );
Band::draw( painter );
}
-QString DetailFooter::getXml()
+TQString DetailFooter::getXml()
{
return "\t<DetailFooter" + Band::getXml() + "\t</DetailFooter>\n\n";
}
diff --git a/kugar/kudesigner_lib/detailfooter.h b/kugar/kudesigner_lib/detailfooter.h
index b7815105..c43fc4da 100644
--- a/kugar/kudesigner_lib/detailfooter.h
+++ b/kugar/kudesigner_lib/detailfooter.h
@@ -34,8 +34,8 @@ public:
{
return Rtti_DetailFooter;
}
- virtual void draw( QPainter &painter );
- virtual QString getXml();
+ virtual void draw( TQPainter &painter );
+ virtual TQString getXml();
};
}
diff --git a/kugar/kudesigner_lib/detailheader.cpp b/kugar/kudesigner_lib/detailheader.cpp
index 89fdb42e..071dea72 100644
--- a/kugar/kudesigner_lib/detailheader.cpp
+++ b/kugar/kudesigner_lib/detailheader.cpp
@@ -20,7 +20,7 @@
#include <klocale.h>
-#include <qpainter.h>
+#include <tqpainter.h>
#include <koproperty/property.h>
@@ -34,14 +34,14 @@ DetailHeader::DetailHeader( int x, int y, int width, int height, int level, Canv
props.addProperty( new Property( "Level", 0, i18n( "Level" ), i18n( "Detail Level" ), KoProperty::Integer ), "Detail" );
}
-void DetailHeader::draw( QPainter &painter )
+void DetailHeader::draw( TQPainter &painter )
{
- QString str = QString( "%1 %2" ).arg( i18n( "Detail Header" ) ).arg( props[ "Level" ].value().toInt() );
+ TQString str = TQString( "%1 %2" ).tqarg( i18n( "Detail Header" ) ).tqarg( props[ "Level" ].value().toInt() );
painter.drawText( rect(), AlignVCenter | AlignLeft, str );
Band::draw( painter );
}
-QString DetailHeader::getXml()
+TQString DetailHeader::getXml()
{
return "\t<DetailHeader" + Band::getXml() + "\t</DetailHeader>\n\n";
}
diff --git a/kugar/kudesigner_lib/detailheader.h b/kugar/kudesigner_lib/detailheader.h
index f08152d5..89c16992 100644
--- a/kugar/kudesigner_lib/detailheader.h
+++ b/kugar/kudesigner_lib/detailheader.h
@@ -34,8 +34,8 @@ public:
{
return Rtti_DetailHeader;
}
- virtual void draw( QPainter &painter );
- virtual QString getXml();
+ virtual void draw( TQPainter &painter );
+ virtual TQString getXml();
};
}
diff --git a/kugar/kudesigner_lib/field.cpp b/kugar/kudesigner_lib/field.cpp
index c029f8e4..c9a5b480 100644
--- a/kugar/kudesigner_lib/field.cpp
+++ b/kugar/kudesigner_lib/field.cpp
@@ -31,7 +31,7 @@ namespace Kudesigner
Field::Field( int x, int y, int width, int height, Canvas *canvas, bool reg )
: Label( x, y, width, height, canvas )
{
- QMap<QString, QString> m;
+ TQMap<TQString, TQString> m;
props.setGroupDescription( "Field", i18n( "Field" ) );
@@ -67,7 +67,7 @@ Field::Field( int x, int y, int width, int height, Canvas *canvas, bool reg )
//TODO: make currency locale-aware
props.addProperty( new Property( "Currency", 32, i18n( "Currency" ), i18n( "Currency Symbol" ), KoProperty::Symbol ), "Field" );
- props.addProperty( new Property( "NegValueColor", QColor( 0, 0, 0 ), i18n( "Negative Value Color" ), i18n( "Negative Value Color" ), KoProperty::Color ), "Field" );
+ props.addProperty( new Property( "NegValueColor", TQColor( 0, 0, 0 ), i18n( "Negative Value Color" ), i18n( "Negative Value Color" ), KoProperty::Color ), "Field" );
props.addProperty( new Property( "CommaSeparator", 44, i18n( "Comma Separator" ), i18n( "Comma Separator" ), KoProperty::Symbol ), "Field" );
@@ -77,14 +77,14 @@ Field::Field( int x, int y, int width, int height, Canvas *canvas, bool reg )
registerAs( Rtti_Field );
}
-void Field::draw( QPainter &painter )
+void Field::draw( TQPainter &painter )
{
props[ "Text" ].setValue( "[" + props[ "Field" ].value().toString() + "]" );
Label::draw( painter );
props[ "Text" ].setValue( "" );
}
-QString Field::getXml()
+TQString Field::getXml()
{
return "\t\t<Field" + ReportItem::getXml() + " />\n";
}
@@ -92,8 +92,8 @@ QString Field::getXml()
void Field::fastProperty()
{
bool accepted;
- QString sValue = props[ "Field" ].value().toString();
- QString sText = KLineEditDlg::getText( i18n( "Change Field" ),
+ TQString sValue = props[ "Field" ].value().toString();
+ TQString sText = KLineEditDlg::getText( i18n( "Change Field" ),
"Enter field name:", sValue , &accepted );
if ( accepted )
diff --git a/kugar/kudesigner_lib/field.h b/kugar/kudesigner_lib/field.h
index 43f0d73f..12e337df 100644
--- a/kugar/kudesigner_lib/field.h
+++ b/kugar/kudesigner_lib/field.h
@@ -33,8 +33,8 @@ public:
{
return Rtti_Field;
}
- virtual QString getXml();
- virtual void draw( QPainter &painter );
+ virtual TQString getXml();
+ virtual void draw( TQPainter &painter );
virtual void updateGeomProps()
{
Label::updateGeomProps();
diff --git a/kugar/kudesigner_lib/kugartemplate.cpp b/kugar/kudesigner_lib/kugartemplate.cpp
index 500bc419..deffdcc6 100644
--- a/kugar/kudesigner_lib/kugartemplate.cpp
+++ b/kugar/kudesigner_lib/kugartemplate.cpp
@@ -20,10 +20,10 @@ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
#include <klocale.h>
-#include <qcanvas.h>
-#include <qpainter.h>
-#include <qprinter.h>
-#include <qpaintdevicemetrics.h>
+#include <tqcanvas.h>
+#include <tqpainter.h>
+#include <tqprinter.h>
+#include <tqpaintdevicemetrics.h>
#include <koproperty/property.h>
@@ -60,7 +60,7 @@ KugarTemplate::KugarTemplate( int x, int y, int width, int height, Canvas *canva
props.setGroupDescription( "DocumentSettings", i18n( "Document Settings" ) );
- QMap<QString, QString> m;
+ TQMap<TQString, TQString> m;
m[ "A4" ] = "0";
m[ "B5" ] = "1";
m[ "Letter" ] = "2";
@@ -97,7 +97,7 @@ KugarTemplate::KugarTemplate( int x, int y, int width, int height, Canvas *canva
m[ i18n( "Portrait" ) ] = "0";
m[ i18n( "Landscape" ) ] = "1";
- props.addProperty( new Property( "PageOrientation", m.values(), m.keys(), "0", i18n( "Page Orientation" ), i18n( "Page Orientation" ) ), "DocumentSettings" );
+ props.addProperty( new Property( "PageQt::Orientation", m.values(), m.keys(), "0", i18n( "Page Qt::Orientation" ), i18n( "Page Qt::Orientation" ) ), "DocumentSettings" );
m.clear();
props.addProperty( new Property( "TopMargin", 0, i18n( "Top Margin" ), i18n( "Top Margin" ), KoProperty::Integer ), "DocumentSettings" );
@@ -129,17 +129,17 @@ KugarTemplate::~KugarTemplate()
delete reportFooter;
}
-void KugarTemplate::draw( QPainter &painter )
+void KugarTemplate::draw( TQPainter &painter )
{
updatePaperProps();
- painter.setPen( QPen( QColor( 160, 160, 160 ), 0, Qt::SolidLine ) );
- QPoint p1( ( int ) ( x() + props[ "LeftMargin" ].value().toInt() ),
+ painter.setPen( TQPen( TQColor( 160, 160, 160 ), 0, TQt::SolidLine ) );
+ TQPoint p1( ( int ) ( x() + props[ "LeftMargin" ].value().toInt() ),
( int ) ( y() + props[ "TopMargin" ].value().toInt() ) );
- QPoint p2( ( int ) ( x() + props[ "LeftMargin" ].value().toInt() ),
+ TQPoint p2( ( int ) ( x() + props[ "LeftMargin" ].value().toInt() ),
( int ) y() + height() - props[ "BottomMargin" ].value().toInt() );
- QPoint p3( ( int ) x() + width() - props[ "RightMargin" ].value().toInt(),
+ TQPoint p3( ( int ) x() + width() - props[ "RightMargin" ].value().toInt(),
( int ) y() + height() - props[ "BottomMargin" ].value().toInt() );
- QPoint p4( ( int ) x() + width() - props[ "RightMargin" ].value().toInt(),
+ TQPoint p4( ( int ) x() + width() - props[ "RightMargin" ].value().toInt(),
( int ) ( y() + props[ "TopMargin" ].value().toInt() ) );
painter.moveTo( p1 );
painter.lineTo( p2 );
@@ -171,16 +171,16 @@ void KugarTemplate::draw( QPainter &painter )
void KugarTemplate::updatePaperProps()
{
- QPrinter * printer;
+ TQPrinter * printer;
// Set the page size
- printer = new QPrinter();
+ printer = new TQPrinter();
printer->setFullPage( true );
- printer->setPageSize( ( QPrinter::PageSize ) props[ "PageSize" ].value().toInt() );
- printer->setOrientation( ( QPrinter::Orientation ) props[ "PageOrientation" ].value().toInt() );
+ printer->setPageSize( ( TQPrinter::PageSize ) props[ "PageSize" ].value().toInt() );
+ printer->setOrientation( ( TQPrinter::Orientation ) props[ "PageQt::Orientation" ].value().toInt() );
// Get the page metrics and set appropriate wigth and height
- QPaintDeviceMetrics pdm( printer );
+ TQPaintDeviceMetrics pdm( printer );
canvas() ->resize( pdm.width(), pdm.height() );
setSize( pdm.width(), pdm.height() );
@@ -249,23 +249,23 @@ void KugarTemplate::arrangeSections( bool destructive )
}
}
-QString KugarTemplate::getXml()
+TQString KugarTemplate::getXml()
{
- QString result = "";
+ TQString result = "";
result += "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n";
result += "<!DOCTYPE KugarTemplate SYSTEM \"kugartemplate.dtd\">\n\n";
result += "<KugarTemplate";
for ( Set::Iterator it( props ); it.current(); ++it )
{
- QString attribute = it.currentKey();
- QString value = PropertySerializer::toString( it.current() );
+ TQString attribute = it.currentKey();
+ TQString value = PropertySerializer::toString( it.current() );
if ( !attribute.isEmpty() && !value.isEmpty() )
result += " " + attribute + "=" + "\"" + value + "\"";
}
- result += " PageWidth=\"" + QString::number( width() )
- + "\" PageHeight=\"" + QString::number( height() ) + "\"";
+ result += " PageWidth=\"" + TQString::number( width() )
+ + "\" PageHeight=\"" + TQString::number( height() ) + "\"";
result += ">\n";
@@ -297,7 +297,7 @@ QString KugarTemplate::getXml()
return result;
}
-bool KugarTemplate::removeReportItem( QCanvasItem *item )
+bool KugarTemplate::removeReportItem( TQCanvasItem *item )
{
if ( item->rtti() > 2000 )
{
diff --git a/kugar/kudesigner_lib/kugartemplate.h b/kugar/kudesigner_lib/kugartemplate.h
index baaf5206..72ae45c3 100644
--- a/kugar/kudesigner_lib/kugartemplate.h
+++ b/kugar/kudesigner_lib/kugartemplate.h
@@ -24,7 +24,7 @@
#include "commdefs.h"
#include "section.h"
-class QPainter;
+class TQPainter;
namespace Kudesigner
{
@@ -39,7 +39,7 @@ class PageHeader;
class PageFooter;
class Canvas;
-typedef QPair< QPair<DetailHeader*, DetailFooter*>, Detail*> DetailBand;
+typedef TQPair< TQPair<DetailHeader*, DetailFooter*>, Detail*> DetailBand;
class KugarTemplate: public Section
{
@@ -51,24 +51,24 @@ public:
{
return Rtti_KugarTemplate;
}
- virtual void draw( QPainter &painter );
+ virtual void draw( TQPainter &painter );
void arrangeSections( bool destructive = true );
void updatePaperProps();
- QString fileName() const
+ TQString fileName() const
{
return m_reportFileName;
}
- void setFileName( const QString &fName )
+ void setFileName( const TQString &fName )
{
m_reportFileName = fName;
}
- virtual QString getXml();
+ virtual TQString getXml();
void removeSection( Band *section, DetailHeader **header, DetailFooter **footer );
- bool removeReportItem( QCanvasItem *item );
+ bool removeReportItem( TQCanvasItem *item );
Band *band( Kudesigner::RttiValues type, int level = -1 );
@@ -80,7 +80,7 @@ public:
unsigned int detailsCount;
private:
- QString m_reportFileName;
+ TQString m_reportFileName;
};
}
diff --git a/kugar/kudesigner_lib/label.cpp b/kugar/kudesigner_lib/label.cpp
index d77e484e..27226774 100644
--- a/kugar/kudesigner_lib/label.cpp
+++ b/kugar/kudesigner_lib/label.cpp
@@ -21,8 +21,8 @@
#include <klocale.h>
#include <klineeditdlg.h>
-#include <qmap.h>
-#include <qpainter.h>
+#include <tqmap.h>
+#include <tqpainter.h>
#include <kdebug.h>
#include <klocale.h>
@@ -37,7 +37,7 @@ namespace Kudesigner
Label::Label( int x, int y, int width, int height, Canvas *canvas )
: ReportItem( x, y, width, height, canvas )
{
- QMap<QString, QString> m;
+ TQMap<TQString, TQString> m;
props.addProperty( new Property( "Text", i18n( "Text" ), i18n( "Text to Display" ), i18n( "Text" ), KoProperty::String ) );
@@ -50,28 +50,28 @@ Label::Label( int x, int y, int width, int height, Canvas *canvas )
props.addProperty( new Property( "Height", height, i18n( "Height" ), i18n( "Height" ), KoProperty::Integer ), "Geometry" );
- props.addProperty( new Property( "BackgroundColor", QColor( 255, 255, 255 ), i18n( "Background Color" ), i18n( "Background Color" ), KoProperty::Color ) );
+ props.addProperty( new Property( "BackgroundColor", TQColor( 255, 255, 255 ), i18n( "Background Color" ), i18n( "Background Color" ), KoProperty::Color ) );
- props.addProperty( new Property( "ForegroundColor", QColor( 0, 0, 0 ), i18n( "Foreground Color" ), i18n( "Foreground Color" ), KoProperty::Color ) );
+ props.addProperty( new Property( "ForegroundColor", TQColor( 0, 0, 0 ), i18n( "Foreground Color" ), i18n( "Foreground Color" ), KoProperty::Color ) );
props.setGroupDescription( "BorderStyle", i18n( "Border Style" ) );
- props.addProperty( new Property( "BorderColor", QColor( 0, 0, 0 ), i18n( "Color" ), i18n( "Border Color" ), KoProperty::Color ), "BorderStyle" );
+ props.addProperty( new Property( "BorderColor", TQColor( 0, 0, 0 ), i18n( "Color" ), i18n( "Border Color" ), KoProperty::Color ), "BorderStyle" );
props.addProperty( new Property( "BorderWidth", 1, i18n( "Width" ), i18n( "Border Width" ), KoProperty::Integer ), "BorderStyle" );
props.addProperty( new Property( "BorderStyle", 1, i18n( "Line" ), i18n( "Border Style" ), KoProperty::LineStyle ), "BorderStyle" );
props.setGroupDescription( "DrawBorder", i18n( "Border" ) );
- props.addProperty( new Property( "DrawTop", QVariant( false, 3 ), i18n( "Top" ), i18n( "Draw Top Border" ), KoProperty::Boolean ), "DrawBorder" );
- props.addProperty( new Property( "DrawBottom", QVariant( false, 3 ), i18n( "Bottom" ), i18n( "Draw Bottom Border" ), KoProperty::Boolean ), "DrawBorder" );
- props.addProperty( new Property( "DrawLeft", QVariant( false, 3 ), i18n( "Left" ), i18n( "Draw Left Border" ), KoProperty::Boolean ), "DrawBorder" );
- props.addProperty( new Property( "DrawRight", QVariant( false, 3 ), i18n( "Right" ), i18n( "Draw Right Border" ), KoProperty::Boolean ), "DrawBorder" );
+ props.addProperty( new Property( "DrawTop", TQVariant( false, 3 ), i18n( "Top" ), i18n( "Draw Top Border" ), KoProperty::Boolean ), "DrawBorder" );
+ props.addProperty( new Property( "DrawBottom", TQVariant( false, 3 ), i18n( "Bottom" ), i18n( "Draw Bottom Border" ), KoProperty::Boolean ), "DrawBorder" );
+ props.addProperty( new Property( "DrawLeft", TQVariant( false, 3 ), i18n( "Left" ), i18n( "Draw Left Border" ), KoProperty::Boolean ), "DrawBorder" );
+ props.addProperty( new Property( "DrawRight", TQVariant( false, 3 ), i18n( "Right" ), i18n( "Draw Right Border" ), KoProperty::Boolean ), "DrawBorder" );
props.setGroupDescription( "Font", i18n( "Font" ) );
- props.addProperty( new Property( "FontFamily", QApplication::font(), i18n( "Family" ), i18n( "Font Family" ), KoProperty::Font ), "Font" );
+ props.addProperty( new Property( "FontFamily", TQFont(TQApplication::font()), i18n( "Family" ), i18n( "Font Family" ), KoProperty::Font ), "Font" );
- props.addProperty( new Property( "FontSize", QApplication::font().pointSize(), i18n( "Size" ), i18n( "Font Size" ), KoProperty::Integer ), "Font" );
+ props.addProperty( new Property( "FontSize", TQApplication::font().pointSize(), i18n( "Size" ), i18n( "Font Size" ), KoProperty::Integer ), "Font" );
m[ i18n( "Light" ) ] = "25";
m[ i18n( "Normal" ) ] = "50";
@@ -90,7 +90,7 @@ Label::Label( int x, int y, int width, int height, Canvas *canvas )
m[ i18n( "Center" ) ] = "1";
m[ i18n( "Right" ) ] = "2";
props.addProperty( new Property( "HAlignment", m.values(), m.keys(),
- QString( "" ).isRightToLeft() ? "2" : "0", i18n( "HAlignment" ), i18n( "HAlignment" ) ) );
+ TQString( "" ).isRightToLeft() ? "2" : "0", i18n( "HAlignment" ), i18n( "HAlignment" ) ) );
m.clear();
m[ i18n( "Top" ) ] = "0";
@@ -153,20 +153,20 @@ int Label::getTextWrap()
}
}
-QFont Label::getFont()
+TQFont Label::getFont()
{
- return QFont( props[ "FontFamily" ].value().toString(),
+ return TQFont( props[ "FontFamily" ].value().toString(),
props[ "FontSize" ].value().toInt(),
props[ "FontWeight" ].value().toInt(),
props[ "FontItalic" ].value().toInt() );
}
-QPen Label::getPenForText()
+TQPen Label::getPenForText()
{
- return QPen( QColor( props[ "ForegroundColor" ].value().toColor() ) );
+ return TQPen( TQColor( props[ "ForegroundColor" ].value().toColor() ) );
}
-QPen Label::getPenForShape()
+TQPen Label::getPenForShape()
{
PenStyle style = SolidLine;
switch ( props[ "BorderStyle" ].value().toInt() )
@@ -190,16 +190,16 @@ QPen Label::getPenForShape()
style = DashDotDotLine;
break;
}
- return QPen( QColor( props[ "BorderColor" ].value().toColor() ),
+ return TQPen( TQColor( props[ "BorderColor" ].value().toColor() ),
props[ "BorderWidth" ].value().toInt(), style );
}
-QBrush Label::getBrush()
+TQBrush Label::getBrush()
{
- return QBrush( QColor( props[ "BackgroundColor" ].value().toColor() ) );
+ return TQBrush( TQColor( props[ "BackgroundColor" ].value().toColor() ) );
}
-void Label::draw( QPainter &painter )
+void Label::draw( TQPainter &painter )
{
//update dimensions
if ( !section() )
@@ -236,7 +236,7 @@ void Label::draw( QPainter &painter )
// CanvasReportItem::draw(painter);
}
-QString Label::getXml()
+TQString Label::getXml()
{
return "\t\t<Label" + ReportItem::getXml() + " />\n";
}
@@ -245,7 +245,7 @@ void Label::fastProperty()
{
bool accepted;
- QString sText = KLineEditDlg::getText( i18n( "Change Label" ),
+ TQString sText = KLineEditDlg::getText( i18n( "Change Label" ),
"Enter label name:", props[ "Text" ].value().toString(),
&accepted );
diff --git a/kugar/kudesigner_lib/label.h b/kugar/kudesigner_lib/label.h
index b777353a..7003c96b 100644
--- a/kugar/kudesigner_lib/label.h
+++ b/kugar/kudesigner_lib/label.h
@@ -33,17 +33,17 @@ public:
{
return Rtti_Label;
}
- virtual QString getXml();
+ virtual TQString getXml();
int getTextAlignment();
int getTextWrap();
- QFont getFont();
- QPen getPenForText();
- QPen getPenForShape();
- QBrush getBrush();
+ TQFont getFont();
+ TQPen getPenForText();
+ TQPen getPenForShape();
+ TQBrush getBrush();
- virtual void draw( QPainter &painter );
+ virtual void draw( TQPainter &painter );
virtual void updateGeomProps()
{
ReportItem::updateGeomProps();
diff --git a/kugar/kudesigner_lib/line.cpp b/kugar/kudesigner_lib/line.cpp
index 75631b1b..caff18a1 100644
--- a/kugar/kudesigner_lib/line.cpp
+++ b/kugar/kudesigner_lib/line.cpp
@@ -20,7 +20,7 @@
#include <klocale.h>
-#include <qpainter.h>
+#include <tqpainter.h>
#include <koproperty/property.h>
@@ -41,19 +41,19 @@ Line::Line( int x, int y, int width, int height, Canvas *canvas ) :
props.addProperty( new Property( "Y2", y + height, i18n( "Y2" ), i18n( "Y2" ), KoProperty::Integer ), "Line" );
- props.addProperty( new Property( "Color", QColor( 0, 0, 0 ), i18n( "Color" ), i18n( "Color" ), KoProperty::Color ), "Line" );
+ props.addProperty( new Property( "Color", TQColor( 0, 0, 0 ), i18n( "Color" ), i18n( "Color" ), KoProperty::Color ), "Line" );
props.addProperty( new Property( "Width", 1, i18n( "Width" ), i18n( "Width" ), KoProperty::Integer ), "Line" );
props.addProperty( new Property( "Style", 1, i18n( "Line Style" ), i18n( "Line Style" ), KoProperty::LineStyle ), "Line" );
}
-QString Line::getXml()
+TQString Line::getXml()
{
return "\t\t<Line" + ReportItem::getXml() + " />\n";
}
-QPen Line::getPenForShape()
+TQPen Line::getPenForShape()
{
PenStyle style = SolidLine;
switch ( props[ "Style" ].value().toInt() )
@@ -77,11 +77,11 @@ QPen Line::getPenForShape()
style = DashDotDotLine;
break;
}
- return QPen( QColor( props[ "Color" ].value().toColor() ),
+ return TQPen( TQColor( props[ "Color" ].value().toColor() ),
props[ "Width" ].value().toInt(), style );
}
-void Line::draw( QPainter &painter )
+void Line::draw( TQPainter &painter )
{
//update dimensions
if ( !section() )
@@ -93,14 +93,14 @@ void Line::draw( QPainter &painter )
//draw border and background
painter.setPen( getPenForShape() );
- painter.setBrush( QColor( 0, 0, 0 ) );
+ painter.setBrush( TQColor( 0, 0, 0 ) );
painter.drawLine( props[ "X1" ].value().toInt() + ( int ) section() ->x(),
props[ "Y1" ].value().toInt() + ( int ) section() ->y(),
props[ "X2" ].value().toInt() + ( int ) section() ->x(),
props[ "Y2" ].value().toInt() + ( int ) section() ->y() );
- painter.setPen( QColor( 0, 0, 0 ) );
- painter.setBrush( QColor( 0, 0, 0 ) );
+ painter.setPen( TQColor( 0, 0, 0 ) );
+ painter.setBrush( TQColor( 0, 0, 0 ) );
// painter.drawRect(topLeftResizableRect());
// painter.drawRect(topRightResizableRect());
// painter.drawRect(bottomLeftResizableRect());
@@ -113,7 +113,7 @@ void Line::setSection( Band *section )
{
props[ "X1" ].setValue( ( int ) ( x() - section->x() ) );
props[ "Y1" ].setValue( ( int ) ( y() - section->y() ) );
- parentSection = section;
+ tqparentSection = section;
}
void Line::updateGeomProps()
diff --git a/kugar/kudesigner_lib/line.h b/kugar/kudesigner_lib/line.h
index 0da1eec5..01518c22 100644
--- a/kugar/kudesigner_lib/line.h
+++ b/kugar/kudesigner_lib/line.h
@@ -33,14 +33,14 @@ public:
{
return Rtti_Line;
}
- virtual QString getXml();
- virtual void draw( QPainter &painter );
+ virtual TQString getXml();
+ virtual void draw( TQPainter &painter );
virtual void updateGeomProps();
virtual void setSection( Band *section );
private:
- QPen getPenForShape();
+ TQPen getPenForShape();
};
}
diff --git a/kugar/kudesigner_lib/pagefooter.cpp b/kugar/kudesigner_lib/pagefooter.cpp
index 9091f31b..b4e30fed 100644
--- a/kugar/kudesigner_lib/pagefooter.cpp
+++ b/kugar/kudesigner_lib/pagefooter.cpp
@@ -20,7 +20,7 @@
#include <klocale.h>
-#include <qpainter.h>
+#include <tqpainter.h>
#include <koproperty/property.h>
@@ -31,7 +31,7 @@ PageFooter::PageFooter( int x, int y, int width, int height, Canvas *canvas ) :
Band( x, y, width, height, canvas )
{
props.addProperty( new Property( "Height", 50, i18n( "Height" ), i18n( "Height" ), KoProperty::Integer ), "Section" );
- QMap<QString, QString> m;
+ TQMap<TQString, TQString> m;
m[ i18n( "First Page" ) ] = "0";
m[ i18n( "Every Page" ) ] = "1";
@@ -40,13 +40,13 @@ PageFooter::PageFooter( int x, int y, int width, int height, Canvas *canvas ) :
props.addProperty( new Property( "PrintFrequency", m.values(), m.keys(), "1", i18n( "Print Frequency" ), i18n( "Print Frequency" ) ), "Section" );
}
-void PageFooter::draw( QPainter &painter )
+void PageFooter::draw( TQPainter &painter )
{
painter.drawText( rect(), AlignVCenter | AlignLeft, i18n( "Page Footer" ) );
Band::draw( painter );
}
-QString PageFooter::getXml()
+TQString PageFooter::getXml()
{
return "\t<PageFooter" + Band::getXml() + "\t</PageFooter>\n\n";
}
diff --git a/kugar/kudesigner_lib/pagefooter.h b/kugar/kudesigner_lib/pagefooter.h
index b24d6a77..189ad5cf 100644
--- a/kugar/kudesigner_lib/pagefooter.h
+++ b/kugar/kudesigner_lib/pagefooter.h
@@ -34,8 +34,8 @@ public:
{
return Rtti_PageFooter;
}
- virtual void draw( QPainter &painter );
- virtual QString getXml();
+ virtual void draw( TQPainter &painter );
+ virtual TQString getXml();
};
}
diff --git a/kugar/kudesigner_lib/pageheader.cpp b/kugar/kudesigner_lib/pageheader.cpp
index 710dd210..b2b76167 100644
--- a/kugar/kudesigner_lib/pageheader.cpp
+++ b/kugar/kudesigner_lib/pageheader.cpp
@@ -20,7 +20,7 @@
#include <klocale.h>
-#include <qpainter.h>
+#include <tqpainter.h>
#include <koproperty/property.h>
@@ -31,7 +31,7 @@ PageHeader::PageHeader( int x, int y, int width, int height, Canvas *canvas ) :
Band( x, y, width, height, canvas )
{
props.addProperty( new Property( "Height", 50, i18n( "Height" ), i18n( "Height" ), KoProperty::Integer ), "Section" );
- QMap<QString, QString> m;
+ TQMap<TQString, TQString> m;
m[ i18n( "First Page" ) ] = "0";
m[ i18n( "Every Page" ) ] = "1";
@@ -40,14 +40,14 @@ PageHeader::PageHeader( int x, int y, int width, int height, Canvas *canvas ) :
props.addProperty( new Property( "PrintFrequency", m.values(), m.keys(), "1", i18n( "Print Frequency" ), i18n( "Print Frequency" ) ), "Section" );
}
-void PageHeader::draw( QPainter &painter )
+void PageHeader::draw( TQPainter &painter )
{
painter.drawText( rect(), AlignVCenter | AlignLeft,
i18n( "Page Header" ) );
Band::draw( painter );
}
-QString PageHeader::getXml()
+TQString PageHeader::getXml()
{
return "\t<PageHeader" + Band::getXml() + "\t</PageHeader>\n\n";
}
diff --git a/kugar/kudesigner_lib/pageheader.h b/kugar/kudesigner_lib/pageheader.h
index 577957b0..b4c8a7c8 100644
--- a/kugar/kudesigner_lib/pageheader.h
+++ b/kugar/kudesigner_lib/pageheader.h
@@ -22,7 +22,7 @@
#include "commdefs.h"
#include "band.h"
-class QPainter;
+class TQPainter;
namespace Kudesigner
{
@@ -31,12 +31,12 @@ class PageHeader: public Band
{
public:
PageHeader( int x, int y, int width, int height, Canvas *canvas );
- virtual void draw( QPainter &painter );
+ virtual void draw( TQPainter &painter );
virtual int rtti() const
{
return Rtti_PageHeader;
}
- virtual QString getXml();
+ virtual TQString getXml();
};
}
diff --git a/kugar/kudesigner_lib/plugin.cpp b/kugar/kudesigner_lib/plugin.cpp
index 711c485f..880fc37f 100644
--- a/kugar/kudesigner_lib/plugin.cpp
+++ b/kugar/kudesigner_lib/plugin.cpp
@@ -17,11 +17,11 @@
#include "plugin.h"
-KuDesignerPlugin::KuDesignerPlugin( QObject *parent, const char *name, const QStringList& ) : QObject( parent, name )
+KuDesignerPlugin::KuDesignerPlugin( TQObject *tqparent, const char *name, const TQStringList& ) : TQObject( tqparent, name )
{}
KuDesignerPlugin::~KuDesignerPlugin()
{}
-void KuDesignerPlugin::createPluggedInEditor( QWidget *&/*retVal*/, Editor */*editor*/,
+void KuDesignerPlugin::createPluggedInEditor( TQWidget *&/*retVal*/, Editor */*editor*/,
Property */*property*/, Box */*cb*/ )
{}
diff --git a/kugar/kudesigner_lib/plugin.h b/kugar/kudesigner_lib/plugin.h
index d4363cfc..ce912275 100644
--- a/kugar/kudesigner_lib/plugin.h
+++ b/kugar/kudesigner_lib/plugin.h
@@ -18,30 +18,31 @@
#ifndef _KUGAR_DESIGNER_PLUGIN_H_
#define _KUGAR_DESIGNER_PLUGIN_H_
-#include <qobject.h>
+#include <tqobject.h>
#include <koproperty/property.h>
#include <koproperty/editor.h>
#include <box.h>
-class QString;
-class QWidget;
+class TQString;
+class TQWidget;
class CanvasReportItem;
class KoStore;
using namespace KoProperty;
using namespace Kudesigner;
-class KuDesignerPlugin: public QObject
+class KuDesignerPlugin: public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
- KuDesignerPlugin( QObject *parent, const char* name, const QStringList& args );
+ KuDesignerPlugin( TQObject *tqparent, const char* name, const TQStringList& args );
virtual ~KuDesignerPlugin();
virtual bool acceptsDrops()
{
return false;
}
- virtual bool dragMove( QDragMoveEvent *, Box */*cb*/ )
+ virtual bool dragMove( TQDragMoveEvent *, Box */*cb*/ )
{
return false;
}
@@ -49,11 +50,11 @@ public:
{
;
}
- virtual void modifyItemPropertyOnSave( CanvasReportItem */*item*/, const Property & /*p*/ , QString &/*propertyName*/, QString &/*propertyValue*/ )
+ virtual void modifyItemPropertyOnSave( CanvasReportItem */*item*/, const Property & /*p*/ , TQString &/*propertyName*/, TQString &/*propertyValue*/ )
{
;
}
- virtual void modifyItemPropertyOnLoad( CanvasReportItem */*item*/, const Property & /*p*/, QString &/*propertyName*/, QString &/*propertyValue*/ )
+ virtual void modifyItemPropertyOnLoad( CanvasReportItem */*item*/, const Property & /*p*/, TQString &/*propertyName*/, TQString &/*propertyValue*/ )
{
;
}
@@ -67,7 +68,7 @@ public:
}
public slots:
- virtual void createPluggedInEditor( QWidget *& retVal, Editor *editor,
+ virtual void createPluggedInEditor( TQWidget *& retVal, Editor *editor,
Property *property, Box * );
};
diff --git a/kugar/kudesigner_lib/propertyserializer.cpp b/kugar/kudesigner_lib/propertyserializer.cpp
index dc3e91e6..32ebe470 100644
--- a/kugar/kudesigner_lib/propertyserializer.cpp
+++ b/kugar/kudesigner_lib/propertyserializer.cpp
@@ -20,8 +20,8 @@
***************************************************************************/
#include "propertyserializer.h"
-#include <qcolor.h>
-#include <qfont.h>
+#include <tqcolor.h>
+#include <tqfont.h>
#include <kdebug.h>
@@ -34,13 +34,13 @@ PropertySerializer::PropertySerializer()
PropertySerializer::~PropertySerializer()
{}
-QString PropertySerializer::toString( Property *prop )
+TQString PropertySerializer::toString( Property *prop )
{
- QVariant val = prop->value();
+ TQVariant val = prop->value();
switch ( prop->type() )
{
case KoProperty::Color:
- return QString( "%1,%2,%3" ).arg( val.toColor().red() ).arg( val.toColor().green() ).arg( val.toColor().blue() );
+ return TQString( "%1,%2,%3" ).tqarg( val.toColor().red() ).tqarg( val.toColor().green() ).tqarg( val.toColor().blue() );
case KoProperty::Boolean:
return val.toBool() ? "true" : "false";
case KoProperty::Font:
@@ -50,26 +50,26 @@ QString PropertySerializer::toString( Property *prop )
}
}
-QVariant PropertySerializer::fromString( Property *prop, const QString &str )
+TQVariant PropertySerializer::fromString( Property *prop, const TQString &str )
{
switch ( prop->type() )
{
case KoProperty::Color:
- return QVariant( QColor( str.section( ',', 0, 0 ).toInt(),
+ return TQVariant( TQColor( str.section( ',', 0, 0 ).toInt(),
str.section( ',', 1, 1 ).toInt(),
str.section( ',', 2, 2 ).toInt() ) );
case KoProperty::Integer:
- return QVariant( str.toInt() );
+ return TQVariant( str.toInt() );
case KoProperty::Boolean:
- return QVariant( str == "true", 3 );
+ return TQVariant( str == "true", 3 );
case KoProperty::Font:
- return QVariant( QFont( str ) );
+ return TQVariant( TQFont( str ) );
case KoProperty::LineStyle:
- return QVariant( str.toInt() );
+ return TQVariant( str.toInt() );
case KoProperty::Symbol:
- return QVariant( str.at( 0 ).latin1() );
+ return TQVariant( str.tqat( 0 ).latin1() );
default:
- return QVariant( str );
+ return TQVariant( str );
}
}
diff --git a/kugar/kudesigner_lib/propertyserializer.h b/kugar/kudesigner_lib/propertyserializer.h
index 4851946f..f4c921bf 100644
--- a/kugar/kudesigner_lib/propertyserializer.h
+++ b/kugar/kudesigner_lib/propertyserializer.h
@@ -37,8 +37,8 @@ public:
PropertySerializer();
~PropertySerializer();
- static QString toString( Property *prop );
- static QVariant fromString( Property *prop, const QString &str );
+ static TQString toString( Property *prop );
+ static TQVariant fromString( Property *prop, const TQString &str );
};
}
diff --git a/kugar/kudesigner_lib/reportfooter.cpp b/kugar/kudesigner_lib/reportfooter.cpp
index 222757ad..abed8a21 100644
--- a/kugar/kudesigner_lib/reportfooter.cpp
+++ b/kugar/kudesigner_lib/reportfooter.cpp
@@ -20,7 +20,7 @@
#include <klocale.h>
-#include <qpainter.h>
+#include <tqpainter.h>
#include <koproperty/property.h>
@@ -32,7 +32,7 @@ ReportFooter::ReportFooter( int x, int y, int width, int height, Canvas *canvas
{
props.addProperty( new Property( "Height", 50, i18n( "Height" ), i18n( "Height" ), KoProperty::Integer ), "Section" );
- QMap<QString, QString> m;
+ TQMap<TQString, TQString> m;
m[ i18n( "First Page" ) ] = "0";
m[ i18n( "Every Page" ) ] = "1";
@@ -41,14 +41,14 @@ ReportFooter::ReportFooter( int x, int y, int width, int height, Canvas *canvas
props.addProperty( new Property( "PrintFrequency", m.values(), m.keys(), "2", i18n( "Print Frequency" ), i18n( "Print Frequency" ) ), "Section" );
}
-void ReportFooter::draw( QPainter &painter )
+void ReportFooter::draw( TQPainter &painter )
{
painter.drawText( rect(), AlignVCenter | AlignLeft,
i18n( "Report Footer" ) );
Band::draw( painter );
}
-QString ReportFooter::getXml()
+TQString ReportFooter::getXml()
{
return "\t<ReportFooter" + Band::getXml() + "\t</ReportFooter>\n\n";
}
diff --git a/kugar/kudesigner_lib/reportfooter.h b/kugar/kudesigner_lib/reportfooter.h
index d6011a65..96cbd566 100644
--- a/kugar/kudesigner_lib/reportfooter.h
+++ b/kugar/kudesigner_lib/reportfooter.h
@@ -34,8 +34,8 @@ public:
{
return Rtti_ReportFooter;
}
- virtual void draw( QPainter &painter );
- virtual QString getXml();
+ virtual void draw( TQPainter &painter );
+ virtual TQString getXml();
};
}
diff --git a/kugar/kudesigner_lib/reportheader.cpp b/kugar/kudesigner_lib/reportheader.cpp
index a3311be9..aef6351b 100644
--- a/kugar/kudesigner_lib/reportheader.cpp
+++ b/kugar/kudesigner_lib/reportheader.cpp
@@ -20,7 +20,7 @@
#include <klocale.h>
-#include <qpainter.h>
+#include <tqpainter.h>
#include <koproperty/property.h>
@@ -31,7 +31,7 @@ ReportHeader::ReportHeader( int x, int y, int width, int height, Canvas *canvas
Band( x, y, width, height, canvas )
{
props.addProperty( new Property( "Height", 50, i18n( "Height" ), i18n( "Height" ), KoProperty::Integer ), "Section" );
- QMap<QString, QString> m;
+ TQMap<TQString, TQString> m;
m[ i18n( "First Page" ) ] = "0";
m[ i18n( "Every Page" ) ] = "1";
@@ -40,13 +40,13 @@ ReportHeader::ReportHeader( int x, int y, int width, int height, Canvas *canvas
props.addProperty( new Property( "PrintFrequency", m.values(), m.keys(), "0", i18n( "Print Frequency" ), i18n( "Print Frequency" ) ), "Section" );
}
-void ReportHeader::draw( QPainter &painter )
+void ReportHeader::draw( TQPainter &painter )
{
painter.drawText( rect(), AlignVCenter | AlignLeft, i18n( "Report Header" ) );
Band::draw( painter );
}
-QString ReportHeader::getXml()
+TQString ReportHeader::getXml()
{
return "\t<ReportHeader" + Band::getXml() + "\t</ReportHeader>\n\n";
}
diff --git a/kugar/kudesigner_lib/reportheader.h b/kugar/kudesigner_lib/reportheader.h
index e8c4a38b..6ce6ad70 100644
--- a/kugar/kudesigner_lib/reportheader.h
+++ b/kugar/kudesigner_lib/reportheader.h
@@ -22,7 +22,7 @@
#include "commdefs.h"
#include "band.h"
-class QPainter;
+class TQPainter;
namespace Kudesigner
{
@@ -35,8 +35,8 @@ public:
{
return Rtti_ReportHeader;
}
- virtual void draw( QPainter &painter );
- virtual QString getXml();
+ virtual void draw( TQPainter &painter );
+ virtual TQString getXml();
};
}
diff --git a/kugar/kudesigner_lib/reportitem.cpp b/kugar/kudesigner_lib/reportitem.cpp
index 077bc1fe..c986c970 100644
--- a/kugar/kudesigner_lib/reportitem.cpp
+++ b/kugar/kudesigner_lib/reportitem.cpp
@@ -21,9 +21,9 @@
#include <klocale.h>
#include <kglobalsettings.h>
-#include <qrect.h>
-#include <qpainter.h>
-#include <qregexp.h>
+#include <tqrect.h>
+#include <tqpainter.h>
+#include <tqregexp.h>
#include <koproperty/property.h>
@@ -36,44 +36,44 @@
namespace Kudesigner
{
-QRect ReportItem::topLeftResizableRect()
+TQRect ReportItem::topLeftResizableRect()
{
- return QRect( ( int ) x(), ( int ) y(), HolderSize, HolderSize );
+ return TQRect( ( int ) x(), ( int ) y(), HolderSize, HolderSize );
}
-QRect ReportItem::bottomLeftResizableRect()
+TQRect ReportItem::bottomLeftResizableRect()
{
- return QRect( ( int ) x(), ( int ) ( y() + height() - HolderSize ), HolderSize, HolderSize );
+ return TQRect( ( int ) x(), ( int ) ( y() + height() - HolderSize ), HolderSize, HolderSize );
}
-QRect ReportItem::topRightResizableRect()
+TQRect ReportItem::topRightResizableRect()
{
- return QRect( ( int ) ( x() + width() - HolderSize ), ( int ) y(), HolderSize, HolderSize );
+ return TQRect( ( int ) ( x() + width() - HolderSize ), ( int ) y(), HolderSize, HolderSize );
}
-QRect ReportItem::bottomRightResizableRect()
+TQRect ReportItem::bottomRightResizableRect()
{
- return QRect( ( int ) ( x() + width() - HolderSize ), ( int ) ( y() + height() - HolderSize ), HolderSize, HolderSize );
+ return TQRect( ( int ) ( x() + width() - HolderSize ), ( int ) ( y() + height() - HolderSize ), HolderSize, HolderSize );
}
-QRect ReportItem::topMiddleResizableRect()
+TQRect ReportItem::topMiddleResizableRect()
{
- return QRect( ( int ) ( x() + width() / 2 - HolderSize / 2. ), ( int ) y(), HolderSize, HolderSize );
+ return TQRect( ( int ) ( x() + width() / 2 - HolderSize / 2. ), ( int ) y(), HolderSize, HolderSize );
}
-QRect ReportItem::bottomMiddleResizableRect()
+TQRect ReportItem::bottomMiddleResizableRect()
{
- return QRect( ( int ) ( x() + width() / 2 - HolderSize / 2. ), ( int ) ( y() + height() - HolderSize ), HolderSize, HolderSize );
+ return TQRect( ( int ) ( x() + width() / 2 - HolderSize / 2. ), ( int ) ( y() + height() - HolderSize ), HolderSize, HolderSize );
}
-QRect ReportItem::leftMiddleResizableRect()
+TQRect ReportItem::leftMiddleResizableRect()
{
- return QRect( ( int ) x(), ( int ) ( y() + height() / 2 - HolderSize / 2. ), HolderSize, HolderSize );
+ return TQRect( ( int ) x(), ( int ) ( y() + height() / 2 - HolderSize / 2. ), HolderSize, HolderSize );
}
-QRect ReportItem::rightMiddleResizableRect()
+TQRect ReportItem::rightMiddleResizableRect()
{
- return QRect( ( int ) ( x() + width() - HolderSize ), ( int ) ( y() + height() / 2 - HolderSize / 2. ), HolderSize, HolderSize );
+ return TQRect( ( int ) ( x() + width() - HolderSize ), ( int ) ( y() + height() / 2 - HolderSize / 2. ), HolderSize, HolderSize );
}
void ReportItem::updateGeomProps()
@@ -88,67 +88,67 @@ void ReportItem::updateGeomProps()
Band *ReportItem::section()
{
- return parentSection;
+ return tqparentSection;
}
void ReportItem::setSection( Band *section )
{
props[ "X" ].setValue( ( int ) ( x() - section->x() ) );
props[ "Y" ].setValue( ( int ) ( y() - section->y() ) );
- parentSection = section;
+ tqparentSection = section;
}
void ReportItem::setSectionUndestructive( Band *section )
{
- parentSection = section;
+ tqparentSection = section;
}
-QString ReportItem::getXml()
+TQString ReportItem::getXml()
{
- QString result = "";
+ TQString result = "";
int i = 1;
for ( Set::Iterator it( props ); it.current(); ++it )
{
if ( !( i % 3 ) )
result += "\n\t\t ";
- result += " " + QString(it.currentKey()) + "=" + "\"" + escape( PropertySerializer::toString( it.current() ) ) + "\"";
+ result += " " + TQString(it.currentKey()) + "=" + "\"" + escape( PropertySerializer::toString( it.current() ) ) + "\"";
i++;
}
return result;
}
-int ReportItem::isInHolder( const QPoint p )
+int ReportItem::isInHolder( const TQPoint p )
{
- if ( topLeftResizableRect().contains( p ) )
+ if ( topLeftResizableRect().tqcontains( p ) )
return ( ResizeTop | ResizeLeft );
- if ( bottomLeftResizableRect().contains( p ) )
+ if ( bottomLeftResizableRect().tqcontains( p ) )
return ( ResizeBottom | ResizeLeft );
- if ( leftMiddleResizableRect().contains( p ) )
+ if ( leftMiddleResizableRect().tqcontains( p ) )
return ( ResizeLeft );
- if ( bottomMiddleResizableRect().contains( p ) )
+ if ( bottomMiddleResizableRect().tqcontains( p ) )
return ( ResizeBottom );
- if ( topMiddleResizableRect().contains( p ) )
+ if ( topMiddleResizableRect().tqcontains( p ) )
return ( ResizeTop );
- if ( topRightResizableRect().contains( p ) )
+ if ( topRightResizableRect().tqcontains( p ) )
return ( ResizeTop | ResizeRight );
- if ( bottomRightResizableRect().contains( p ) )
+ if ( bottomRightResizableRect().tqcontains( p ) )
return ( ResizeBottom | ResizeRight );
- if ( rightMiddleResizableRect().contains( p ) )
+ if ( rightMiddleResizableRect().tqcontains( p ) )
return ( ResizeRight );
return ResizeNothing;
}
-void ReportItem::drawHolders( QPainter &painter )
+void ReportItem::drawHolders( TQPainter &painter )
{
- painter.setPen( QColor( 0, 0, 0 ) );
+ painter.setPen( TQColor( 0, 0, 0 ) );
painter.setBrush( KGlobalSettings::highlightColor() );
- QCanvasItemList list = collisions( false );
- QCanvasItemList::iterator it = list.begin();
+ TQCanvasItemList list = collisions( false );
+ TQCanvasItemList::iterator it = list.begin();
for ( ; it != list.end(); ++it )
{
switch ( ( *it )->rtti() )
@@ -163,7 +163,7 @@ void ReportItem::drawHolders( QPainter &painter )
if ( section() != item->section() )
continue;
if ( intersects( item ) )
- painter.setBrush( Qt::red );
+ painter.setBrush( TQt::red );
break;
}
default:
@@ -172,7 +172,7 @@ void ReportItem::drawHolders( QPainter &painter )
}
if ( props["Height"].value().toInt() > section()->props["Height"].value().toInt() )
- painter.setBrush( Qt::red );
+ painter.setBrush( TQt::red );
painter.drawRect( topLeftResizableRect() );
painter.drawRect( topRightResizableRect() );
@@ -186,8 +186,8 @@ void ReportItem::drawHolders( QPainter &painter )
bool ReportItem::intersects( ReportItem *item )
{
- QRect r1;
- QRect r2;
+ TQRect r1;
+ TQRect r2;
if ( rtti() == Rtti_Line /*line*/ )
{
@@ -199,12 +199,12 @@ bool ReportItem::intersects( ReportItem *item )
//TODO I'm not sure of a good fix for this, but for now I'm assuming lines
// in reports are either horizontal or vertical.
if ( x1 == x2 )
- r1 = QRect( x1, y1, x2 + width, y2 );
+ r1 = TQRect( x1, y1, x2 + width, y2 );
else if ( y1 == y2 )
- r1 = QRect( x1, y1, x2, y2 + width );
+ r1 = TQRect( x1, y1, x2, y2 + width );
}
else
- r1 = QRect( props["X"].value().toInt(), props["Y"].value().toInt(),
+ r1 = TQRect( props["X"].value().toInt(), props["Y"].value().toInt(),
props["Width"].value().toInt(), props["Height"].value().toInt() );
if ( item->rtti() == Rtti_Line /*line*/ )
@@ -217,12 +217,12 @@ bool ReportItem::intersects( ReportItem *item )
//TODO I'm not sure of a good fix for this, but for now I'm assuming lines
// in reports are either horizontal or vertical.
if ( x1 == x2 )
- r2 = QRect( x1, y1, x2 + width, y2 );
+ r2 = TQRect( x1, y1, x2 + width, y2 );
else if ( y1 == y2 )
- r2 = QRect( x1, y1, x2, y2 + width );
+ r2 = TQRect( x1, y1, x2, y2 + width );
}
else
- r2 = QRect( item->props["X"].value().toInt(), item->props["Y"].value().toInt(),
+ r2 = TQRect( item->props["X"].value().toInt(), item->props["Y"].value().toInt(),
item->props["Width"].value().toInt(), item->props["Height"].value().toInt() );
bool intersects = r1.intersects( r2 );
@@ -236,11 +236,11 @@ bool ReportItem::intersects( ReportItem *item )
return intersects;
}
-QString ReportItem::escape( QString string )
+TQString ReportItem::escape( TQString string )
{
- string.replace( QRegExp( "&" ), "&amp;" );
- string.replace( QRegExp( "<" ), "&lt;" );
- string.replace( QRegExp( ">" ), "&gt;" );
+ string.tqreplace( TQRegExp( "&" ), "&amp;" );
+ string.tqreplace( TQRegExp( "<" ), "&lt;" );
+ string.tqreplace( TQRegExp( ">" ), "&gt;" );
return string;
}
diff --git a/kugar/kudesigner_lib/reportitem.h b/kugar/kudesigner_lib/reportitem.h
index bfee4bd7..5d10545c 100644
--- a/kugar/kudesigner_lib/reportitem.h
+++ b/kugar/kudesigner_lib/reportitem.h
@@ -22,8 +22,8 @@
#include "commdefs.h"
#include "box.h"
-class QString;
-class QStringList;
+class TQString;
+class TQStringList;
namespace Kudesigner
{
@@ -37,7 +37,7 @@ public:
: Box( x, y, width, height, canvas )
{
setZ( 20 );
- parentSection = 0;
+ tqparentSection = 0;
}
virtual int rtti() const
{
@@ -45,36 +45,36 @@ public:
}
virtual void updateGeomProps();
- virtual void draw( QPainter &painter )
+ virtual void draw( TQPainter &painter )
{
Box::draw( painter );
}
- virtual QString getXml();
+ virtual TQString getXml();
- QRect topLeftResizableRect();
- QRect bottomLeftResizableRect();
- QRect topRightResizableRect();
- QRect bottomRightResizableRect();
- QRect topMiddleResizableRect();
- QRect bottomMiddleResizableRect();
- QRect leftMiddleResizableRect();
- QRect rightMiddleResizableRect();
+ TQRect topLeftResizableRect();
+ TQRect bottomLeftResizableRect();
+ TQRect topRightResizableRect();
+ TQRect bottomRightResizableRect();
+ TQRect topMiddleResizableRect();
+ TQRect bottomMiddleResizableRect();
+ TQRect leftMiddleResizableRect();
+ TQRect rightMiddleResizableRect();
virtual Band *section();
virtual void setSection( Band *section );
virtual void setSectionUndestructive( Band *section );
- virtual int isInHolder( const QPoint p );
- virtual void drawHolders( QPainter &painter );
+ virtual int isInHolder( const TQPoint p );
+ virtual void drawHolders( TQPainter &painter );
virtual void fastProperty()
{ }
;
bool intersects( ReportItem *item );
- QString escape( QString string );
+ TQString escape( TQString string );
protected:
friend class View;
- Band *parentSection;
+ Band *tqparentSection;
};
}
diff --git a/kugar/kudesigner_lib/section.cpp b/kugar/kudesigner_lib/section.cpp
index 1ec5bc59..7a721133 100644
--- a/kugar/kudesigner_lib/section.cpp
+++ b/kugar/kudesigner_lib/section.cpp
@@ -29,7 +29,7 @@ Section::Section( int x, int y, int width, int height, Canvas *canvas )
props.setGroupDescription( "Section", i18n( "Section" ) );
}
-void Section::draw( QPainter &painter )
+void Section::draw( TQPainter &painter )
{
Box::draw( painter );
}
diff --git a/kugar/kudesigner_lib/section.h b/kugar/kudesigner_lib/section.h
index e321f78f..c8a3bcfc 100644
--- a/kugar/kudesigner_lib/section.h
+++ b/kugar/kudesigner_lib/section.h
@@ -22,7 +22,7 @@ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
#include "commdefs.h"
#include "box.h"
-class QPainter;
+class TQPainter;
namespace Kudesigner
{
@@ -32,11 +32,11 @@ class Section: public Box
public:
Section( int x, int y, int width, int height, Canvas *canvas );
- virtual QString getXml()
+ virtual TQString getXml()
{
return "";
}
- virtual void draw( QPainter &painter );
+ virtual void draw( TQPainter &painter );
virtual int rtti() const
{
return Rtti_Section;
diff --git a/kugar/kudesigner_lib/specialfield.cpp b/kugar/kudesigner_lib/specialfield.cpp
index 5e404066..d18c0e17 100644
--- a/kugar/kudesigner_lib/specialfield.cpp
+++ b/kugar/kudesigner_lib/specialfield.cpp
@@ -28,7 +28,7 @@ namespace Kudesigner
SpecialField::SpecialField( int x, int y, int width, int height, Canvas *canvas )
: Label( x, y, width, height, canvas )
{
- QMap<QString, QString> m;
+ TQMap<TQString, TQString> m;
props.setGroupDescription( "SpecialField", i18n( "Special Field" ) );
@@ -53,15 +53,15 @@ SpecialField::SpecialField( int x, int y, int width, int height, Canvas *canvas
props.addProperty( new Property( "DateFormat", m.values(), m.keys(), "11", i18n( "Date Format" ), i18n( "Date Format" ) ), "SpecialField" );
}
-void SpecialField::draw( QPainter &painter )
+void SpecialField::draw( TQPainter &painter )
{
props[ "Text" ].setValue( "[" +
- QString( props[ "Type" ].value().toInt() ? i18n( "PageNo" ) : i18n( "Date" ) )
+ TQString( props[ "Type" ].value().toInt() ? i18n( "PageNo" ) : i18n( "Date" ) )
+ "]" );
Label::draw( painter );
}
-QString SpecialField::getXml()
+TQString SpecialField::getXml()
{
return "\t\t<Special" + ReportItem::getXml() + " />\n";
}
diff --git a/kugar/kudesigner_lib/specialfield.h b/kugar/kudesigner_lib/specialfield.h
index d1dd2be6..904639ae 100644
--- a/kugar/kudesigner_lib/specialfield.h
+++ b/kugar/kudesigner_lib/specialfield.h
@@ -33,8 +33,8 @@ public:
{
return Rtti_Special;
}
- virtual QString getXml();
- virtual void draw( QPainter &painter );
+ virtual TQString getXml();
+ virtual void draw( TQPainter &painter );
virtual void updateGeomProps()
{
Label::updateGeomProps();
diff --git a/kugar/kudesigner_lib/structurewidget.cpp b/kugar/kudesigner_lib/structurewidget.cpp
index 7f986ffb..e629beca 100644
--- a/kugar/kudesigner_lib/structurewidget.cpp
+++ b/kugar/kudesigner_lib/structurewidget.cpp
@@ -20,8 +20,8 @@
***************************************************************************/
#include "structurewidget.h"
-#include <qpainter.h>
-#include <qcanvas.h>
+#include <tqpainter.h>
+#include <tqcanvas.h>
#include <koproperty/property.h>
@@ -45,11 +45,11 @@ using namespace KoProperty;
class StructureItem: public KListViewItem
{
public:
- StructureItem( KListView *parent, const QString &name )
- : KListViewItem( parent, name ), m_bold( false )
+ StructureItem( KListView *tqparent, const TQString &name )
+ : KListViewItem( tqparent, name ), m_bold( false )
{}
- StructureItem( KListViewItem *parent, const QString &name )
- : KListViewItem( parent, name ), m_bold( false )
+ StructureItem( KListViewItem *tqparent, const TQString &name )
+ : KListViewItem( tqparent, name ), m_bold( false )
{}
void setBold( bool b )
{
@@ -60,11 +60,11 @@ public:
return m_bold;
}
- virtual void paintCell( QPainter *p, const QColorGroup &cg, int column, int width, int align )
+ virtual void paintCell( TQPainter *p, const TQColorGroup &cg, int column, int width, int align )
{
if ( m_bold )
{
- QFont f = p->font();
+ TQFont f = p->font();
f.setWeight( 75 );
p->setFont( f );
}
@@ -75,13 +75,13 @@ private:
bool m_bold;
};
-StructureWidget::StructureWidget( QWidget* parent, const char* name )
- : KListView( parent, name )
+StructureWidget::StructureWidget( TQWidget* tqparent, const char* name )
+ : KListView( tqparent, name )
{
setFullWidth( true );
addColumn( tr( "Report Structure" ) );
setSorting( -1 );
- connect( this, SIGNAL( clicked( QListViewItem* ) ), this, SLOT( selectItem( QListViewItem* ) ) );
+ connect( this, TQT_SIGNAL( clicked( TQListViewItem* ) ), this, TQT_SLOT( selectItem( TQListViewItem* ) ) );
}
void StructureWidget::refresh()
@@ -116,33 +116,33 @@ void StructureWidget::refreshSection( Kudesigner::Band *section, StructureItem *
{
if ( !section )
return ;
- QString name;
+ TQString name;
switch ( section->rtti() )
{
case Kudesigner::Rtti_ReportHeader:
- name = tr( "Report Header" );
+ name = tqtr( "Report Header" );
break;
case Kudesigner::Rtti_ReportFooter:
- name = tr( "Report Footer" );
+ name = tqtr( "Report Footer" );
break;
case Kudesigner::Rtti_PageFooter:
- name = tr( "Page Footer" );
+ name = tqtr( "Page Footer" );
break;
case Kudesigner::Rtti_PageHeader:
- name = tr( "Page Header" );
+ name = tqtr( "Page Header" );
break;
case Kudesigner::Rtti_Detail:
- name = tr( "Detail" );
+ name = tqtr( "Detail" );
break;
case Kudesigner::Rtti_DetailHeader:
- name = tr( "Detail Header" );
+ name = tqtr( "Detail Header" );
break;
case Kudesigner::Rtti_DetailFooter:
- name = tr( "Detail Footer" );
+ name = tqtr( "Detail Footer" );
break;
}
if ( level > 0 )
- name += tr( " (level %1)" ).arg( level );
+ name += tqtr( " (level %1)" ).tqarg( level );
StructureItem *item = new StructureItem( root, name );
m_items[ section ] = item;
@@ -154,32 +154,32 @@ void StructureWidget::refreshSectionContents( Kudesigner::Band *section, Structu
if ( !section )
return ;
- for ( QCanvasItemList::iterator it = section->items.begin(); it != section->items.end(); ++it )
+ for ( TQCanvasItemList::iterator it = section->items.begin(); it != section->items.end(); ++it )
{
Kudesigner::Box *box = static_cast<Kudesigner::Box*>( *it );
if ( !box )
continue;
- QString name = tr( "<unknown>" );
+ TQString name = tr( "<unknown>" );
int idx;
switch ( box->rtti() )
{
case Kudesigner::Rtti_Label:
- name = tr( "Label: %1" ).arg( box->props[ "Text" ].value().toString() );
+ name = tqtr( "Label: %1" ).tqarg( box->props[ "Text" ].value().toString() );
break;
case Kudesigner::Rtti_Field:
- name = tr( "Field: %1" ).arg( box->props[ "Field" ].value().toString() );
+ name = tqtr( "Field: %1" ).tqarg( box->props[ "Field" ].value().toString() );
break;
case Kudesigner::Rtti_Calculated:
- name = tr( "Calculated Field: %1" ).arg( box->props[ "Field" ].value().toString() );
+ name = tqtr( "Calculated Field: %1" ).tqarg( box->props[ "Field" ].value().toString() );
break;
case Kudesigner::Rtti_Special:
- idx = box->props[ "Type" ].listData()->keys.findIndex(
+ idx = box->props[ "Type" ].listData()->keys.tqfindIndex(
box->props[ "Type" ].value().toInt() );
- name = tr( "Special Field: %1" ).arg( box->props[ "Type" ].listData()->keys[ idx ].toString() );
+ name = tqtr( "Special Field: %1" ).tqarg( box->props[ "Type" ].listData()->keys[ idx ].toString() );
break;
case Kudesigner::Rtti_Line:
- name = tr( "Line" );
+ name = tqtr( "Line" );
break;
}
@@ -194,11 +194,11 @@ void StructureWidget::selectionMade()
BoxList sel = m_doc->selected;
for ( BoxList::iterator it = sel.begin(); it != sel.end(); ++it )
{
- if ( m_items.contains( *it ) )
+ if ( m_items.tqcontains( *it ) )
{
StructureItem * item = static_cast<StructureItem*>( m_items[ *it ] );
item->setBold( true );
- item->repaint();
+ item->tqrepaint();
m_selected.append( item );
}
}
@@ -206,21 +206,21 @@ void StructureWidget::selectionMade()
void StructureWidget::selectionClear()
{
- for ( QValueList<StructureItem*>::iterator it = m_selected.begin(); it != m_selected.end(); ++it )
+ for ( TQValueList<StructureItem*>::iterator it = m_selected.begin(); it != m_selected.end(); ++it )
{
if ( ( *it ) == 0 )
continue;
( *it ) ->setBold( false );
- ( *it ) ->repaint();
+ ( *it ) ->tqrepaint();
}
m_selected.clear();
}
-void StructureWidget::selectItem( QListViewItem *item )
+void StructureWidget::selectItem( TQListViewItem *item )
{
if ( !item )
return ;
- int idx = m_items.values().findIndex( static_cast<StructureItem*>( item ) );
+ int idx = m_items.values().tqfindIndex( static_cast<StructureItem*>( item ) );
if ( idx == -1 )
return ;
Kudesigner::Box *box = m_items.keys() [ idx ];
diff --git a/kugar/kudesigner_lib/structurewidget.h b/kugar/kudesigner_lib/structurewidget.h
index 2601ac1f..1bb3302f 100644
--- a/kugar/kudesigner_lib/structurewidget.h
+++ b/kugar/kudesigner_lib/structurewidget.h
@@ -22,7 +22,7 @@
#define KUDESIGNERSTRUCTUREWIDGET_H
#include <klistview.h>
-#include <qmap.h>
+#include <tqmap.h>
class KudesignerDoc;
@@ -37,15 +37,16 @@ class StructureItem;
class StructureWidget: public KListView
{
Q_OBJECT
+ TQ_OBJECT
public:
- StructureWidget( QWidget* parent = 0, const char* name = 0 );
+ StructureWidget( TQWidget* tqparent = 0, const char* name = 0 );
public slots:
void refresh();
void selectionMade();
void selectionClear();
- void selectItem( QListViewItem *item );
+ void selectItem( TQListViewItem *item );
void setDocument( Kudesigner::Canvas *doc );
private:
@@ -53,8 +54,8 @@ private:
void refreshSectionContents( Kudesigner::Band *section, StructureItem *root );
Kudesigner::Canvas *m_doc;
- QMap<Kudesigner::Box*, StructureItem*> m_items;
- QValueList<StructureItem*> m_selected;
+ TQMap<Kudesigner::Box*, StructureItem*> m_items;
+ TQValueList<StructureItem*> m_selected;
};
}
diff --git a/kugar/kudesigner_lib/view.cpp b/kugar/kudesigner_lib/view.cpp
index b2684ee1..a74bbd61 100644
--- a/kugar/kudesigner_lib/view.cpp
+++ b/kugar/kudesigner_lib/view.cpp
@@ -20,17 +20,17 @@
#include <math.h>
-#include <qwmatrix.h>
-#include <qevent.h>
-#include <qpoint.h>
-#include <qcanvas.h>
-#include <qaction.h>
-#include <qcursor.h>
-#include <qpainter.h>
-#include <qbitmap.h>
-#include <qimage.h>
-
-#include <qprinter.h>
+#include <tqwmatrix.h>
+#include <tqevent.h>
+#include <tqpoint.h>
+#include <tqcanvas.h>
+#include <tqaction.h>
+#include <tqcursor.h>
+#include <tqpainter.h>
+#include <tqbitmap.h>
+#include <tqimage.h>
+
+#include <tqprinter.h>
#include <kdebug.h>
#include <koproperty/property.h>
@@ -54,47 +54,47 @@
namespace Kudesigner
{
-void SelectionRect::draw( QPainter & painter )
+void SelectionRect::draw( TQPainter & painter )
{
- // painter.setPen(Qt::NoPen);
+ // painter.setPen(TQt::NoPen);
- /* QPrinter pr;
+ /* TQPrinter pr;
if ( pr.setup() ) {
- QPainter p(&pr);
+ TQPainter p(&pr);
m_canvas->drawArea( m_canvas->rect(), &p );
} */
/* kdDebug(31000) << "creating pixmap" << endl;
- QPixmap mp(rect().size());
+ TQPixmap mp(rect().size());
kdDebug(31000) << "creating painter" << endl;
- QPainter p(&mp);
+ TQPainter p(&mp);
kdDebug(31000) << "filling pixmap" << endl;
m_canvas->drawArea(m_canvas->rect(), &p);
kdDebug(31000) << "converting to image" << endl;
- QImage im = mp.convertToImage();
+ TQImage im = mp.convertToImage();
if (!im.isNull())
{
kdDebug(31000) << "do dither" << endl;
- mp.convertFromImage(im, Qt::OrderedAlphaDither);
+ mp.convertFromImage(im, TQt::OrderedAlphaDither);
kdDebug(31000) << "creating brush" << endl;
- QBrush br(KGlobalSettings::highlightColor(),Qt::CustomPattern);
+ TQBrush br(KGlobalSettings::highlightColor(),TQt::CustomPattern);
br.setPixmap(mp);
painter.setBrush(br);
}
kdDebug(31000) << "drawing" << endl;*/
// painter.drawRect(rect());
- QPen pen( QColor( 0, 0, 0 ), 0, Qt::DotLine );
+ TQPen pen( TQColor( 0, 0, 0 ), 0, TQt::DotLine );
painter.setPen( pen );
- painter.setBrush( QBrush( NoBrush ) );
+ painter.setBrush( TQBrush( NoBrush ) );
painter.drawRect( rect() );
- // QCanvasRectangle::draw(painter);
+ // TQCanvasRectangle::draw(painter);
}
-View::View( Canvas *canvas, QWidget *parent, const char *name, WFlags f ) :
- QCanvasView( canvas, parent, name, f ), selectionBuf( 0 ), m_plugin( 0 ), m_canvas( canvas )
+View::View( Canvas *canvas, TQWidget *tqparent, const char *name, WFlags f ) :
+ TQCanvasView( canvas, tqparent, name, f ), selectionBuf( 0 ), m_plugin( 0 ), m_canvas( canvas )
{
itemToInsert = 0;
moving = 0;
@@ -104,12 +104,12 @@ View::View( Canvas *canvas, QWidget *parent, const char *name, WFlags f ) :
selectionRect = new SelectionRect( 0, 0, 0, 0, canvas );
- connect( m_canvas, SIGNAL( itemSelected() ), this, SLOT( selectItem() ) );
+ connect( m_canvas, TQT_SIGNAL( itemSelected() ), this, TQT_SLOT( selectItem() ) );
}
-void View::deleteItem( QCanvasItemList &l )
+void View::deleteItem( TQCanvasItemList &l )
{
- for ( QCanvasItemList::Iterator it = l.begin(); it != l.end(); ++it )
+ for ( TQCanvasItemList::Iterator it = l.begin(); it != l.end(); ++it )
{
m_canvas->unselectItem( static_cast<Kudesigner::Box*>( *it ) );
if ( m_canvas->kugarTemplate() ->removeReportItem( *it ) )
@@ -117,10 +117,10 @@ void View::deleteItem( QCanvasItemList &l )
}
}
-void View::editItem( QCanvasItemList & /* l */ )
+void View::editItem( TQCanvasItemList & /* l */ )
{
//display editor for report items or sections
- /* for (QCanvasItemList::Iterator it=l.begin(); it!=l.end(); ++it)
+ /* for (TQCanvasItemList::Iterator it=l.begin(); it!=l.end(); ++it)
{
if ((*it)->rtti() >= 1800) //for my own report items
{
@@ -141,15 +141,15 @@ void View::editItem( QCanvasItemList & /* l */ )
}*/
}
-void View::selectItemFromList( QCanvasItemList &l )
+void View::selectItemFromList( TQCanvasItemList &l )
{
//display editor for report items or sections
- for ( QCanvasItemList::Iterator it = l.begin(); it != l.end(); ++it )
+ for ( TQCanvasItemList::Iterator it = l.begin(); it != l.end(); ++it )
{
if ( ( *it ) ->rtti() >= 1800 ) //include bands and the template itself
{
Kudesigner::Box * b = static_cast<Kudesigner::Box*>( *it );
- if ( !m_canvas->selected.contains( b ) )
+ if ( !m_canvas->selected.tqcontains( b ) )
{
m_canvas->unselectAll();
m_canvas->selectItem( b, false );
@@ -158,7 +158,7 @@ void View::selectItemFromList( QCanvasItemList &l )
// selected->drawHolders();
return ;
}
- if ( m_canvas->selected.contains( b ) )
+ if ( m_canvas->selected.tqcontains( b ) )
{
if ( m_canvas->selected.count() > 1 )
{
@@ -175,9 +175,9 @@ void View::selectItemFromList( QCanvasItemList &l )
}
-void View::placeItem( QCanvasItemList &l, QMouseEvent *e )
+void View::placeItem( TQCanvasItemList &l, TQMouseEvent *e )
{
- for ( QCanvasItemList::Iterator it = l.begin(); it != l.end(); ++it )
+ for ( TQCanvasItemList::Iterator it = l.begin(); it != l.end(); ++it )
{
if ( ( ( *it ) ->rtti() > 1800 ) && ( ( ( *it ) ->rtti() < 2000 ) ) )
{
@@ -197,7 +197,7 @@ void View::placeItem( QCanvasItemList &l, QMouseEvent *e )
}
-bool View::startResizing( QMouseEvent * /*e*/, QPoint &p )
+bool View::startResizing( TQMouseEvent * /*e*/, TQPoint &p )
{
if ( m_canvas->selected.count() == 0 )
return false;
@@ -240,13 +240,13 @@ bool View::startResizing( QMouseEvent * /*e*/, QPoint &p )
else
if ( cbx->rtti() >= Rtti_ReportHeader )
{
- resizing_constraint = QRect( 0, 0, 1000, 1000 );
+ resizing_constraint = TQRect( 0, 0, 1000, 1000 );
resizing_minSize.setWidth( 0 );
resizing_minSize.setHeight( static_cast<Band*>( cbx ) ->minHeight() );
}
else
{
- resizing_constraint = QRect( 0, 0, 1000, 1000 );
+ resizing_constraint = TQRect( 0, 0, 1000, 1000 );
resizing_minSize.setWidth( 0 );
resizing_minSize.setHeight( 10 );
}
@@ -256,11 +256,11 @@ bool View::startResizing( QMouseEvent * /*e*/, QPoint &p )
return false;
}
-void View::startMoveOrResizeOrSelectItem( QCanvasItemList &l,
- QMouseEvent * /*e*/, QPoint &p )
+void View::startMoveOrResizeOrSelectItem( TQCanvasItemList &l,
+ TQMouseEvent * /*e*/, TQPoint &p )
{
//allow user to move any item except for page rectangle
- for ( QCanvasItemList::Iterator it = l.begin(); it != l.end(); ++it )
+ for ( TQCanvasItemList::Iterator it = l.begin(); it != l.end(); ++it )
{
Kudesigner::Box *cb = static_cast<Kudesigner::Box*>( *it );
if ( cb->rtti() >= 1700 ) //> 2001)
@@ -290,10 +290,10 @@ void View::startMoveOrResizeOrSelectItem( QCanvasItemList &l,
// qWarning("3");
}
-void View::contentsMousePressEvent( QMouseEvent* e )
+void View::contentsMousePressEvent( TQMouseEvent* e )
{
- QPoint p = inverseWorldMatrix().QWMatrix::map( e->pos() );
- QCanvasItemList l = m_canvas->collisions( p );
+ TQPoint p = inverseWorldMatrix().TQWMatrix::map( e->pos() );
+ TQCanvasItemList l = m_canvas->collisions( p );
//if there is a request for properties or for delete operation
//perform that and do not take care about mouse buttons
@@ -328,7 +328,7 @@ void View::contentsMousePressEvent( QMouseEvent* e )
*/
switch ( e->button() )
{
- case LeftButton:
+ case Qt::LeftButton:
if ( itemToInsert )
{
// qWarning("placing item");
@@ -350,19 +350,19 @@ void View::contentsMousePressEvent( QMouseEvent* e )
}
}
-void View::contentsMouseReleaseEvent( QMouseEvent* e )
+void View::contentsMouseReleaseEvent( TQMouseEvent* e )
{
selectionRect->setSize( 0, 0 );
selectionRect->setX( 0 );
selectionRect->setY( 0 );
selectionRect->hide();
- QPoint p = inverseWorldMatrix().QWMatrix::map( e->pos() );
- QCanvasItemList l = m_canvas->collisions( p );
+ TQPoint p = inverseWorldMatrix().TQWMatrix::map( e->pos() );
+ TQCanvasItemList l = m_canvas->collisions( p );
switch ( e->button() )
{
- case LeftButton:
+ case Qt::LeftButton:
if ( selectionStarted )
finishSelection();
break;
@@ -425,7 +425,7 @@ void View::fixMaxValues( double &pos, double size, double maxv, double &offset )
}
}
-#ifdef Q_WS_WIN
+#ifdef TQ_WS_WIN
double rint( double x )
{
if ( fabs( x - floor( x ) ) < fabs( x - ceil( x ) ) )
@@ -453,20 +453,20 @@ void View::stickDimToGrid( double x, double y, double &w, double &h )
h = ny - y;
}
-void View::contentsMouseMoveEvent( QMouseEvent* e )
+void View::contentsMouseMoveEvent( TQMouseEvent* e )
{
- QPoint p = inverseWorldMatrix().map( e->pos() );
+ TQPoint p = inverseWorldMatrix().map( e->pos() );
- /* QCanvasItemList l=m_canvas->collisions(p);
- setCursor(QCursor(Qt::ArrowCursor));
+ /* TQCanvasItemList l=m_canvas->collisions(p);
+ setCursor(TQCursor(TQt::ArrowCursor));
unsetCursor();
- for (QCanvasItemList::Iterator it=l.begin(); it!=l.end(); ++it)
+ for (TQCanvasItemList::Iterator it=l.begin(); it!=l.end(); ++it)
{
if ((*it)->rtti() > 2000)
{
CanvasReportItem *item = (CanvasReportItem*)(*it);
- if (item->bottomRightResizableRect().contains(e->pos()))
- setCursor(QCursor(Qt::SizeFDiagCursor));
+ if (item->bottomRightResizableRect().tqcontains(e->pos()))
+ setCursor(TQCursor(TQt::SizeFDiagCursor));
}
}*/
@@ -474,10 +474,10 @@ void View::contentsMouseMoveEvent( QMouseEvent* e )
{
double newXPos = moving->x() + p.x() - moving_start.x();
double newYPos = moving->y() + p.y() - moving_start.y();
- fixMinValues( newYPos, moving->parentSection->y(), moving_offsetY );
- fixMinValues( newXPos, moving->parentSection->x(), moving_offsetX );
- fixMaxValues( newYPos, moving->height(), moving->parentSection->y() + moving->parentSection->height(), moving_offsetY );
- fixMaxValues( newXPos, moving->width(), moving->parentSection->x() + moving->parentSection->width(), moving_offsetX );
+ fixMinValues( newYPos, moving->tqparentSection->y(), moving_offsetY );
+ fixMinValues( newXPos, moving->tqparentSection->x(), moving_offsetX );
+ fixMaxValues( newYPos, moving->height(), moving->tqparentSection->y() + moving->tqparentSection->height(), moving_offsetY );
+ fixMaxValues( newXPos, moving->width(), moving->tqparentSection->x() + moving->tqparentSection->width(), moving_offsetX );
double sx = newXPos;
double sy = newYPos;
@@ -487,7 +487,7 @@ void View::contentsMouseMoveEvent( QMouseEvent* e )
moving->move( newXPos, newYPos );
/* attempt to prevent item collisions
- QCanvasItemList l=m_canvas->collisions(moving->rect());
+ TQCanvasItemList l=m_canvas->collisions(moving->rect());
if (l.count() > 2)
{
moving->moveBy(-(p.x() - moving_start.x()),
@@ -496,14 +496,14 @@ void View::contentsMouseMoveEvent( QMouseEvent* e )
return;
}*/
// moving_start = p;
- moving_start = QPoint( p.x() + ( int ) ( newXPos - sx ), p.y() + ( int ) ( newYPos - sy ) );
+ moving_start = TQPoint( p.x() + ( int ) ( newXPos - sx ), p.y() + ( int ) ( newYPos - sy ) );
moving->updateGeomProps();
m_canvas->update();
emit modificationPerformed();
}
if ( resizing )
{
- QCanvasRectangle * r = ( QCanvasRectangle * ) resizing;
+ TQCanvasRectangle * r = ( TQCanvasRectangle * ) resizing;
double newXPos = r->x();
double newYPos = r->y();
double h = r->height();
@@ -561,7 +561,7 @@ void View::contentsMouseMoveEvent( QMouseEvent* e )
int dx = ( int ) ( newXPos - sx );
int dy = ( int ) ( newYPos - sy );
- // moving_start = QPoint(p.x() + dx, p.y() + dy);
+ // moving_start = TQPoint(p.x() + dx, p.y() + dy);
w -= dx;
h -= dy;
// moving_start = p;
@@ -572,7 +572,7 @@ void View::contentsMouseMoveEvent( QMouseEvent* e )
int dw = ( int ) ( w - sw );
int dh = ( int ) ( h - sh );
- moving_start = QPoint( p.x() + dx + dw, p.y() + dy + dh );
+ moving_start = TQPoint( p.x() + dx + dw, p.y() + dy + dh );
r->setSize( ( int ) w, ( int ) h );
resizing->updateGeomProps();
@@ -584,10 +584,10 @@ void View::contentsMouseMoveEvent( QMouseEvent* e )
selectionRect->setSize( ( int ) ( e->pos().x() - selectionRect->x() ),
( int ) ( e->pos().y() - selectionRect->y() ) );
m_canvas->unselectAll();
- QCanvasItemList l = m_canvas->collisions( selectionRect->rect() );
- for ( QCanvasItemList::Iterator it = l.begin(); it != l.end(); ++it )
+ TQCanvasItemList l = m_canvas->collisions( selectionRect->rect() );
+ for ( TQCanvasItemList::Iterator it = l.begin(); it != l.end(); ++it )
{
- QRect r;
+ TQRect r;
int left = selectionRect->rect().left();
int right = selectionRect->rect().right();
int top = selectionRect->rect().top();
@@ -598,7 +598,7 @@ void View::contentsMouseMoveEvent( QMouseEvent* e )
r.setBottom( top < bottom ? bottom : top );
if ( ( ( *it ) ->rtti() > 2001 ) &&
- ( r.contains( static_cast<Kudesigner::Box*>( *it ) ->rect() ) ) )
+ ( r.tqcontains( static_cast<Kudesigner::Box*>( *it ) ->rect() ) ) )
{
m_canvas->selectItem( static_cast<Kudesigner::Box*>( *it ) );
m_canvas->update();
@@ -609,11 +609,11 @@ void View::contentsMouseMoveEvent( QMouseEvent* e )
/* selectionRect->setSize(e->pos().x() - selectionRect->x(),
e->pos().y() - selectionRect->y());
unselectAll();
- QCanvasItemList l = m_canvas->collisions(selectionRect->rect());
- for (QCanvasItemList::Iterator it=l.begin(); it!=l.end(); ++it)
+ TQCanvasItemList l = m_canvas->collisions(selectionRect->rect());
+ for (TQCanvasItemList::Iterator it=l.begin(); it!=l.end(); ++it)
{
if ( ((*it)->rtti() > 2001) &&
- (selectionRect->rect().contains(((CanvasKudesigner::Box*)(*it))->rect())) )
+ (selectionRect->rect().tqcontains(((CanvasKudesigner::Box*)(*it))->rect())) )
{
selectItem((CanvasKudesigner::Box*)(*it));
m_canvas->update();
@@ -623,7 +623,7 @@ void View::contentsMouseMoveEvent( QMouseEvent* e )
}
-void View::contentsMouseDoubleClickEvent( QMouseEvent *e )
+void View::contentsMouseDoubleClickEvent( TQMouseEvent *e )
{
ReportItem * item = 0L;
if ( e->button() == Qt::LeftButton && m_canvas->selected.count() == 1 )
@@ -642,15 +642,15 @@ void View::setRequest( RequestType r )
switch ( r )
{
case RequestProps:
- QApplication::restoreOverrideCursor();
- QApplication::setOverrideCursor( Qt::PointingHandCursor );
+ TQApplication::restoreOverrideCursor();
+ TQApplication::setOverrideCursor( TQt::PointingHandCursor );
break;
case RequestDelete:
- QApplication::restoreOverrideCursor();
- QApplication::setOverrideCursor( Qt::ForbiddenCursor );
+ TQApplication::restoreOverrideCursor();
+ TQApplication::setOverrideCursor( TQt::ForbiddenCursor );
break;
case RequestNone:
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
break;
}
request = r;
@@ -658,7 +658,7 @@ void View::setRequest( RequestType r )
void View::clearRequest()
{
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
request = RequestNone;
emit selectedEditActionProcessed();
}
@@ -716,12 +716,12 @@ void View::setPlugin( KuDesignerPlugin *plugin )
m_plugin = plugin;
}
-void View::contentsDragMoveEvent( QDragMoveEvent * event )
+void View::contentsDragMoveEvent( TQDragMoveEvent * event )
{
//perhaps this could be optimized a little bit
if ( !m_plugin )
return ;
- QCanvasItemList l = m_canvas->collisions( event->pos() );
+ TQCanvasItemList l = m_canvas->collisions( event->pos() );
/* kdDebug()<<l.count()<<endl;*/
if ( l.count() < 2 )
{
@@ -736,12 +736,12 @@ void View::contentsDragMoveEvent( QDragMoveEvent * event )
event->ignore();
}
-void View::contentsDragEnterEvent ( QDragEnterEvent * /*event*/ )
+void View::contentsDragEnterEvent ( TQDragEnterEvent * /*event*/ )
{
// event->accept();
}
-void View::keyPressEvent( QKeyEvent *e )
+void View::keyPressEvent( TQKeyEvent *e )
{
kdDebug(31000) << k_funcinfo << endl;
@@ -751,7 +751,7 @@ void View::keyPressEvent( QKeyEvent *e )
switch ( e->key() )
{
- case Qt::Key_Delete:
+ case TQt::Key_Delete:
kdDebug(31000) << "Deleting selection" << endl;
/* unselectItem(item);
( (MyCanvas*) m_canvas )->templ->removeReportItem( item );
@@ -769,12 +769,12 @@ void View::keyPressEvent( QKeyEvent *e )
return ;
/* Adjust height with - and + */
- case Qt::Key_Minus:
- case Qt::Key_Plus:
+ case TQt::Key_Minus:
+ case TQt::Key_Plus:
{
int size = item->props[ "FontSize" ].value().toInt();
- if ( e->key() == Qt::Key_Minus )
+ if ( e->key() == TQt::Key_Minus )
size--;
else
size++;
@@ -808,7 +808,7 @@ void View::selectItem( )
{
CanvasKudesigner::Box *b;
- QPtrList<CanvasKudesigner::Box> list = m_canvas->selected;
+ TQPtrList<CanvasKudesigner::Box> list = m_canvas->selected;
unselectAll();
for (b = list.first(); b; b = list.next())
@@ -822,10 +822,10 @@ void View::setCanvas( Canvas *canvas )
{
if ( selectionRect )
delete selectionRect;
- QCanvasView::setCanvas( ( QCanvas* ) canvas );
+ TQCanvasView::setCanvas( ( TQCanvas* ) canvas );
m_canvas = canvas;
selectionRect = new SelectionRect( 0, 0, 0, 0, m_canvas );
- connect( m_canvas, SIGNAL( itemSelected() ), this, SLOT( selectItem() ) );
+ connect( m_canvas, TQT_SIGNAL( itemSelected() ), this, TQT_SLOT( selectItem() ) );
clearRequest();
}
diff --git a/kugar/kudesigner_lib/view.h b/kugar/kudesigner_lib/view.h
index 8ca5a9d4..5b4ebe40 100644
--- a/kugar/kudesigner_lib/view.h
+++ b/kugar/kudesigner_lib/view.h
@@ -19,16 +19,16 @@
#ifndef VIEW_H
#define VIEW_H
-#include <qcanvas.h>
-#include <qpainter.h>
-#include <qptrlist.h>
+#include <tqcanvas.h>
+#include <tqpainter.h>
+#include <tqptrlist.h>
#include <koproperty/property.h>
class KuDesignerPlugin;
-class QMouseEvent;
-class QCanvasItemList;
+class TQMouseEvent;
+class TQCanvasItemList;
namespace KoProperty
{
@@ -45,21 +45,22 @@ class Box;
class Canvas;
class Band;
-class SelectionRect: public QCanvasRectangle
+class SelectionRect: public TQCanvasRectangle
{
public:
SelectionRect( int x, int y, int width, int height, Canvas *canvas ) :
- QCanvasRectangle( x, y, width, height, ( QCanvas* ) canvas )
+ TQCanvasRectangle( x, y, width, height, ( TQCanvas* ) canvas )
{}
- virtual void draw( QPainter & painter );
+ virtual void draw( TQPainter & painter );
};
-class View: public QCanvasView
+class View: public TQCanvasView
{
Q_OBJECT
+ TQ_OBJECT
public:
- View( Canvas *canvas, QWidget *parent, const char *name = 0, WFlags f = 0 );
+ View( Canvas *canvas, TQWidget *tqparent, const char *name = 0, WFlags f = 0 );
int itemToInsert;
@@ -76,23 +77,23 @@ public:
void setCanvas( Canvas *canvas );
protected:
- void contentsMousePressEvent( QMouseEvent* );
- void contentsMouseReleaseEvent( QMouseEvent* );
- void contentsMouseMoveEvent( QMouseEvent* );
- void contentsMouseDoubleClickEvent( QMouseEvent * );
-
- void contentsDragEnterEvent ( QDragEnterEvent * );
- void contentsDragMoveEvent ( QDragMoveEvent * );
- // void contentsDragLeaveEvent ( QDragLeaveEvent * );
- // void contentsDropEvent ( QDropEvent * );
- void keyPressEvent( QKeyEvent * );
-
- void startMoveOrResizeOrSelectItem( QCanvasItemList &l, QMouseEvent *e, QPoint &p );
- bool startResizing( QMouseEvent *e, QPoint &p );
- void placeItem( QCanvasItemList &l, QMouseEvent *e );
- void editItem( QCanvasItemList &l );
- void deleteItem( QCanvasItemList &l );
- void selectItemFromList( QCanvasItemList &l );
+ void contentsMousePressEvent( TQMouseEvent* );
+ void contentsMouseReleaseEvent( TQMouseEvent* );
+ void contentsMouseMoveEvent( TQMouseEvent* );
+ void contentsMouseDoubleClickEvent( TQMouseEvent * );
+
+ void contentsDragEnterEvent ( TQDragEnterEvent * );
+ void contentsDragMoveEvent ( TQDragMoveEvent * );
+ // void contentsDragLeaveEvent ( TQDragLeaveEvent * );
+ // void contentsDropEvent ( TQDropEvent * );
+ void keyPressEvent( TQKeyEvent * );
+
+ void startMoveOrResizeOrSelectItem( TQCanvasItemList &l, TQMouseEvent *e, TQPoint &p );
+ bool startResizing( TQMouseEvent *e, TQPoint &p );
+ void placeItem( TQCanvasItemList &l, TQMouseEvent *e );
+ void editItem( TQCanvasItemList &l );
+ void deleteItem( TQCanvasItemList &l );
+ void selectItemFromList( TQCanvasItemList &l );
void stickToGrid( double &x, double &y );
void stickDimToGrid( double x, double y, double &X, double &Y );
@@ -101,11 +102,11 @@ private:
Buffer *selectionBuf;
ReportItem *moving;
- QPoint moving_start;
+ TQPoint moving_start;
double moving_offsetY;
double moving_offsetX;
- QRect resizing_constraint;
- QSize resizing_minSize;
+ TQRect resizing_constraint;
+ TQSize resizing_minSize;
int resizing_type;
class Box *resizing;
bool selectionStarted;
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 @@
***************************************************************************/
-#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 @@
***************************************************************************/
-#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 );
};
diff --git a/kugar/part/Makefile.am b/kugar/part/Makefile.am
index 65abd539..9d204553 100644
--- a/kugar/part/Makefile.am
+++ b/kugar/part/Makefile.am
@@ -29,7 +29,7 @@ CLEANFILES = kugarpart_meta_unload.cpp
kdeinit_LTLIBRARIES = kugar.la
bin_PROGRAMS =
kugar_la_SOURCES = main.cpp
-kugar_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN)
+kugar_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN) $(LIB_QT)
kugar_la_LIBADD = $(LIB_KOFFICECORE)
kde_services_DATA = kugarpart.desktop
diff --git a/kugar/part/kugar_factory.cpp b/kugar/part/kugar_factory.cpp
index 19db5a96..69d16f21 100644
--- a/kugar/part/kugar_factory.cpp
+++ b/kugar/part/kugar_factory.cpp
@@ -29,7 +29,7 @@ K_EXPORT_COMPONENT_FACTORY( libkugarpart, KugarFactory )
// The factory ctor.
-KugarFactory::KugarFactory( QObject *parent, const char* name ) : KoFactory( parent, name )
+KugarFactory::KugarFactory( TQObject *tqparent, const char* name ) : KoFactory( tqparent, name )
{
global();
}
@@ -65,27 +65,27 @@ KAboutData *KugarFactory::aboutData()
// Create a new part.
-KParts::Part* KugarFactory::createPartObject( QWidget *parentWidget, const char *widgetName,
- QObject* parent, const char* name, const char* classname, const QStringList & data )
+KParts::Part* KugarFactory::createPartObject( TQWidget *tqparentWidget, const char *widgetName,
+ TQObject* tqparent, const char* name, const char* classname, const TQStringList & data )
{
- QString forcedUserTemplate;
- for ( QStringList::const_iterator it = data.begin();it != data.end();++it )
+ TQString forcedUserTemplate;
+ for ( TQStringList::const_iterator it = data.begin();it != data.end();++it )
{
- QString tmp = ( *it );
+ TQString tmp = ( *it );
if ( tmp.startsWith( "template=" ) )
forcedUserTemplate = tmp.right( tmp.length() - 9 );
}
bool bWantKoDocument = ( strcmp( classname, "KoDocument" ) == 0 );
- // parentWidget and widgetName are used by KoDocument for the "readonly+singleView" case.
- KugarPart *part = new KugarPart( parentWidget, widgetName, parent, name, !bWantKoDocument );
+ // tqparentWidget and widgetName are used by KoDocument for the "readonly+singleView" case.
+ KugarPart *part = new KugarPart( tqparentWidget, widgetName, tqparent, name, !bWantKoDocument );
// if ( !bWantKoDocument )
part->setReadWrite( false );
part->setForcedUserTemplate( forcedUserTemplate );
return part;
- //return ( new KugarPart(parentWidget,name,forcedUserTemplate));
+ //return ( new KugarPart(tqparentWidget,name,forcedUserTemplate));
}
diff --git a/kugar/part/kugar_factory.h b/kugar/part/kugar_factory.h
index 70ad6317..1acb2920 100644
--- a/kugar/part/kugar_factory.h
+++ b/kugar/part/kugar_factory.h
@@ -16,13 +16,14 @@ class KInstance;
class KugarFactory : public KoFactory
{
Q_OBJECT
+ TQ_OBJECT
public:
- KugarFactory( QObject* parent = 0, const char* name = 0 );
+ KugarFactory( TQObject* tqparent = 0, const char* name = 0 );
~KugarFactory();
- virtual KParts::Part *createPartObject( QWidget *parentWidget = 0, const char *widgetName = 0,
- QObject *parent = 0, const char *name = 0, const char *classname = "KoDocument",
- const QStringList &args = QStringList() );
+ virtual KParts::Part *createPartObject( TQWidget *tqparentWidget = 0, const char *widgetName = 0,
+ TQObject *tqparent = 0, const char *name = 0, const char *classname = "KoDocument",
+ const TQStringList &args = TQStringList() );
static KInstance* global();
diff --git a/kugar/part/kugar_part.cpp b/kugar/part/kugar_part.cpp
index 158f26db..fa6644e2 100644
--- a/kugar/part/kugar_part.cpp
+++ b/kugar/part/kugar_part.cpp
@@ -12,10 +12,10 @@
#include <kstdaction.h>
#include <kmessagebox.h>
#include <kio/netaccess.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <kglobal.h>
#include <kiconloader.h>
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kfiledialog.h>
#include <kdebug.h>
#include <KoStore.h>
@@ -30,15 +30,15 @@
#include <KoFilterManager.h>
-KugarPart::KugarPart( QWidget *parentWidget, const char *widgetName,
- QObject* parent, const char* name, bool singleViewMode )
- : KoDocument( parentWidget, widgetName, parent, name, singleViewMode ),
+KugarPart::KugarPart( TQWidget *tqparentWidget, const char *widgetName,
+ TQObject* tqparent, const char* name, bool singleViewMode )
+ : KoDocument( tqparentWidget, widgetName, tqparent, name, singleViewMode ),
m_templateOk( false )
{
setInstance( KugarFactory::global(), false );
m_reportEngine = new Kugar::MReportEngine();
- connect( m_reportEngine, SIGNAL( preferedTemplate( const QString & ) ),
- SLOT( slotPreferredTemplate( const QString & ) ) );
+ connect( m_reportEngine, TQT_SIGNAL( preferedTemplate( const TQString & ) ),
+ TQT_SLOT( slotPreferredTemplate( const TQString & ) ) );
}
KugarPart::~KugarPart()
@@ -47,8 +47,8 @@ KugarPart::~KugarPart()
// closeURL();
}
-bool KugarPart::loadOasis( const QDomDocument&, KoOasisStyles&,
- const QDomDocument&, KoStore* )
+bool KugarPart::loadOasis( const TQDomDocument&, KoOasisStyles&,
+ const TQDomDocument&, KoStore* )
{
return false;
}
@@ -58,14 +58,14 @@ bool KugarPart::saveOasis( KoStore*, KoXmlWriter* )
return false;
}
-bool KugarPart::loadXML( QIODevice *file, const QDomDocument & /*doc*/ )
+bool KugarPart::loadXML( TQIODevice *file, const TQDomDocument & /*doc*/ )
{
m_docURL = url();
bool ok = true;
if ( file )
{
file->reset();
- m_reportData=QString(file->readAll());
+ m_reportData=TQString(file->readAll());
if ( m_reportData.length() != 0 )
{
@@ -76,7 +76,7 @@ bool KugarPart::loadXML( QIODevice *file, const QDomDocument & /*doc*/ )
m_reportEngine->renderReport();
if ( ok )
{
- QPtrList<KoView> vs = views();
+ TQPtrList<KoView> vs = views();
if ( vs.count() )
{
for ( KoView * v = vs.first();v;v = vs.next() )
@@ -89,34 +89,34 @@ bool KugarPart::loadXML( QIODevice *file, const QDomDocument & /*doc*/ )
}
}
if ( !ok )
- KMessageBox::sorry( 0, i18n( "Invalid data file %1" ).arg( m_file ) );
+ KMessageBox::sorry( 0, i18n( "Invalid data file %1" ).tqarg( m_file ) );
}
else
{
ok = false;
- KMessageBox::sorry( 0, i18n( "The zero sized data file %1 can't be rendered" ).arg( m_file ) );
+ KMessageBox::sorry( 0, i18n( "The zero sized data file %1 can't be rendered" ).tqarg( m_file ) );
}
}
else
{
ok = false;
- KMessageBox::sorry( 0, i18n( "Unable to open data file: %1" ).arg( m_file ) );
+ KMessageBox::sorry( 0, i18n( "Unable to open data file: %1" ).tqarg( m_file ) );
}
return ok;
}
-bool KugarPart::initDoc( InitDocFlags /*flags*/, QWidget* /*parentWidget*/ )
+bool KugarPart::initDoc( InitDocFlags /*flags*/, TQWidget* /*tqparentWidget*/ )
{
- QString filename;
+ TQString filename;
bool ok = false;
KFileDialog *dialog =
- new KFileDialog( QString::null, QString::null, 0L, "file dialog", true );
+ new KFileDialog( TQString(), TQString(), 0L, "file dialog", true );
dialog->setMimeFilter( KoFilterManager::mimeFilter( KoDocument::readNativeFormatMimeType(),
KoFilterManager::Import ) );
- if ( dialog->exec() != QDialog::Accepted )
+ if ( dialog->exec() != TQDialog::Accepted )
{
delete dialog;
return false;
@@ -138,25 +138,25 @@ bool KugarPart::initDoc( InitDocFlags /*flags*/, QWidget* /*parentWidget*/ )
return TRUE;
}
-KoView* KugarPart::createViewInstance( QWidget* parent, const char* name )
+KoView* KugarPart::createViewInstance( TQWidget* tqparent, const char* name )
{
- KugarView * v = new KugarView( this, parent, name );
+ KugarView * v = new KugarView( this, tqparent, name );
if ( m_templateOk )
v->renderReport();
return v;
}
-void KugarPart::slotPreferredTemplate( const QString &tpl )
+void KugarPart::slotPreferredTemplate( const TQString &tpl )
{
KURL url( tpl );
- QString localtpl;
+ TQString localtpl;
bool isTemp = false;
if ( !url.isValid() )
{
/* kdDebug() << "mailformed url" << endl;*/
- if ( tpl.find( '/' ) >= 0 )
+ if ( tpl.tqfind( '/' ) >= 0 )
{
if ( tpl.startsWith( "." ) )
{
@@ -166,14 +166,14 @@ void KugarPart::slotPreferredTemplate( const QString &tpl )
if ( KIO::NetAccess::download( tmpURL, localtpl ) )
isTemp = true;
else
- KMessageBox::sorry( 0, i18n( "Unable to download template file: %1" ).arg( url.prettyURL() ) );
+ KMessageBox::sorry( 0, i18n( "Unable to download template file: %1" ).tqarg( url.prettyURL() ) );
}
else
localtpl = tpl;
}
else
{
- QString former_localtpl = localtpl;
+ TQString former_localtpl = localtpl;
localtpl = kapp -> dirs() -> findResource( "data", "kugar/templates/" + tpl );
if ( localtpl.isEmpty() )
{
@@ -183,7 +183,7 @@ void KugarPart::slotPreferredTemplate( const QString &tpl )
if ( KIO::NetAccess::download( tmpURL, localtpl ) )
isTemp = true;
else
- KMessageBox::sorry( 0, i18n( "Unable to download template file: %1" ).arg( url.prettyURL() ) );
+ KMessageBox::sorry( 0, i18n( "Unable to download template file: %1" ).tqarg( url.prettyURL() ) );
}
}
}
@@ -192,13 +192,13 @@ void KugarPart::slotPreferredTemplate( const QString &tpl )
if ( KIO::NetAccess::download( url, localtpl ) )
isTemp = true;
else
- KMessageBox::sorry( 0, i18n( "Unable to download template file: %1" ).arg( url.prettyURL() ) );
+ KMessageBox::sorry( 0, i18n( "Unable to download template file: %1" ).tqarg( url.prettyURL() ) );
}
/* kdDebug() << "localtpl: " << localtpl.latin1() << endl;*/
if ( !localtpl.isEmpty() )
{
- QFile f( localtpl );
+ TQFile f( localtpl );
if ( f.open( IO_ReadOnly ) )
{
@@ -214,8 +214,8 @@ void KugarPart::slotPreferredTemplate( const QString &tpl )
{
/* kdDebug() << "RawXML" << endl;*/
f.open( IO_ReadOnly );
- if ( !m_reportEngine -> setReportTemplate( &f ) )
- KMessageBox::sorry( 0, i18n( "Invalid template file: %1" ).arg( localtpl ) );
+ if ( !m_reportEngine -> setReportTemplate( TQT_TQIODEVICE(&f) ) )
+ KMessageBox::sorry( 0, i18n( "Invalid template file: %1" ).tqarg( localtpl ) );
else
{
m_templateOk = true;
@@ -229,13 +229,13 @@ void KugarPart::slotPreferredTemplate( const QString &tpl )
if ( tmpStore->open( "maindoc.xml" ) )
{
if ( !m_reportEngine -> setReportTemplate( tmpStore->device() ) )
- KMessageBox::sorry( 0, i18n( "%1 is not a valid Kugar Designer template file." ).arg( localtpl ) );
+ KMessageBox::sorry( 0, i18n( "%1 is not a valid Kugar Designer template file." ).tqarg( localtpl ) );
else
m_templateOk = true;
tmpStore->close();
}
else
- KMessageBox::sorry( 0, i18n( "%1 is not a valid Kugar Designer template file." ).arg( localtpl ) );
+ KMessageBox::sorry( 0, i18n( "%1 is not a valid Kugar Designer template file." ).tqarg( localtpl ) );
delete tmpStore;
}
@@ -244,12 +244,12 @@ void KugarPart::slotPreferredTemplate( const QString &tpl )
else
{
f.close();
- KMessageBox::sorry( 0, i18n( "Couldn't read the beginning of the template file: %1" ).arg( localtpl ) );
+ KMessageBox::sorry( 0, i18n( "Couldn't read the beginning of the template file: %1" ).tqarg( localtpl ) );
}
}
else
- KMessageBox::sorry( 0, i18n( "Unable to open template file: %1" ).arg( localtpl ) );
+ KMessageBox::sorry( 0, i18n( "Unable to open template file: %1" ).tqarg( localtpl ) );
if ( isTemp )
KIO::NetAccess::removeTempFile( localtpl );
diff --git a/kugar/part/kugar_part.h b/kugar/part/kugar_part.h
index 3f54e42c..cc778bf8 100644
--- a/kugar/part/kugar_part.h
+++ b/kugar/part/kugar_part.h
@@ -17,23 +17,24 @@ class KugarBrowserExtension;
class KugarPart: public KoDocument
{
Q_OBJECT
+ TQ_OBJECT
public:
- KugarPart( QWidget *parentWidget = 0, const char *widgetName = 0,
- QObject* parent = 0,
+ KugarPart( TQWidget *tqparentWidget = 0, const char *widgetName = 0,
+ TQObject* tqparent = 0,
const char* name = 0, bool singleViewMode = false );
virtual ~KugarPart();
- virtual bool initDoc( InitDocFlags flags, QWidget* parentWidget = 0 );
+ virtual bool initDoc( InitDocFlags flags, TQWidget* tqparentWidget = 0 );
- virtual bool loadOasis( const QDomDocument&, KoOasisStyles&,
- const QDomDocument&, KoStore* );
+ virtual bool loadOasis( const TQDomDocument&, KoOasisStyles&,
+ const TQDomDocument&, KoStore* );
virtual bool saveOasis( KoStore*, KoXmlWriter* );
- virtual bool loadXML( QIODevice *, const QDomDocument & );
- // virtual QDomDocument saveXML();
+ virtual bool loadXML( TQIODevice *, const TQDomDocument & );
+ // virtual TQDomDocument saveXML();
- virtual void paintContent( QPainter&, const QRect&,
+ virtual void paintContent( TQPainter&, const TQRect&,
bool /*transparent*/ = false,
double /*zoomX*/ = 1.0, double /*zoomY*/ = 1.0 )
{
@@ -46,19 +47,19 @@ public:
}
protected:
- virtual KoView* createViewInstance( QWidget* parent, const char* name );
+ virtual KoView* createViewInstance( TQWidget* tqparent, const char* name );
public slots:
- void setForcedUserTemplate( const QString &/*name*/ )
+ void setForcedUserTemplate( const TQString &/*name*/ )
{
;
}
private slots:
- void slotPreferredTemplate( const QString & );
+ void slotPreferredTemplate( const TQString & );
private:
- QString m_reportData;
+ TQString m_reportData;
Kugar::MReportEngine *m_reportEngine;
bool m_templateOk;
KURL m_docURL;
diff --git a/kugar/part/kugar_view.cpp b/kugar/part/kugar_view.cpp
index 14a32bca..28f0d871 100644
--- a/kugar/part/kugar_view.cpp
+++ b/kugar/part/kugar_view.cpp
@@ -12,10 +12,10 @@
#include <kstdaction.h>
#include <kmessagebox.h>
#include <kio/netaccess.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <kglobal.h>
#include <kiconloader.h>
-#include <qlayout.h>
+#include <tqlayout.h>
#if defined(HAVE_CONFIG_H)
#include "config.h"
@@ -28,15 +28,15 @@
// The view ctor.
-KugarView::KugarView( KugarPart *part, QWidget *parent, const char *name )
- : KoView( part, parent, name )
+KugarView::KugarView( KugarPart *part, TQWidget *tqparent, const char *name )
+ : KoView( part, tqparent, name )
{
setInstance( KugarFactory::global() );
- ( new QVBoxLayout( this ) ) ->setAutoAdd( true );
+ ( new TQVBoxLayout( this ) ) ->setAutoAdd( true );
view = new Kugar::MReportViewer( part->reportEngine(), this );
- view -> setFocusPolicy( QWidget::ClickFocus );
+ view -> setFocusPolicy( TQ_ClickFocus );
view -> show();
// setWidget(view);
@@ -46,10 +46,10 @@ KugarView::KugarView( KugarPart *part, QWidget *parent, const char *name )
// Define the actions.
- KStdAction::prior( view, SLOT( slotPrevPage() ), actionCollection(), "kuPrevPage" );
- KStdAction::next( view, SLOT( slotNextPage() ), actionCollection(), "kuNextPage" );
- KStdAction::firstPage( view, SLOT( slotFirstPage() ), actionCollection(), "kuFirstPage" );
- KStdAction::lastPage( view, SLOT( slotLastPage() ), actionCollection(), "kuLastPage" );
+ KStdAction::prior( TQT_TQOBJECT(view), TQT_SLOT( slotPrevPage() ), actionCollection(), "kuPrevPage" );
+ KStdAction::next( TQT_TQOBJECT(view), TQT_SLOT( slotNextPage() ), actionCollection(), "kuNextPage" );
+ KStdAction::firstPage( TQT_TQOBJECT(view), TQT_SLOT( slotFirstPage() ), actionCollection(), "kuFirstPage" );
+ KStdAction::lastPage( TQT_TQOBJECT(view), TQT_SLOT( slotLastPage() ), actionCollection(), "kuLastPage" );
setXMLFile( "kugarpart.rc" );
@@ -80,7 +80,7 @@ void KugarView::print( KPrinter &printer )
bool KugarPart::openFile()
{
bool ok = false;
- QFile f( m_file );
+ TQFile f( m_file );
if ( f.open( IO_ReadOnly ) )
{
@@ -90,12 +90,12 @@ bool KugarPart::openFile()
ok = true;
}
else
- KMessageBox::sorry( this, i18n( "Invalid data file: %1" ).arg( m_file ) );
+ KMessageBox::sorry( this, i18n( "Invalid data file: %1" ).tqarg( m_file ) );
f.close();
}
else
- KMessageBox::sorry( this, i18n( "Unable to open data file: %1" ).arg( m_file ) );
+ KMessageBox::sorry( this, i18n( "Unable to open data file: %1" ).tqarg( m_file ) );
return ok;
}
diff --git a/kugar/part/kugar_view.h b/kugar/part/kugar_view.h
index a6838737..b29ea624 100644
--- a/kugar/part/kugar_view.h
+++ b/kugar/part/kugar_view.h
@@ -15,12 +15,13 @@ class KugarPart;
class KugarView: public KoView
{
Q_OBJECT
+ TQ_OBJECT
public:
- KugarView( KugarPart *part, QWidget *parent, const char *name );
+ KugarView( KugarPart *part, TQWidget *tqparent, const char *name );
virtual ~KugarView();
- void setForcedUserTemplate( const QString &name );
+ void setForcedUserTemplate( const TQString &name );
void updateReadWrite( bool )
{
@@ -29,7 +30,7 @@ public:
bool renderReport();
- bool setReportTemplate( const QString &data )
+ bool setReportTemplate( const TQString &data )
{
return view -> setReportTemplate( data );
}
@@ -47,7 +48,7 @@ public:
private:
Kugar::MReportViewer *view;
- QString m_forcedUserTemplate;
+ TQString m_forcedUserTemplate;
};
#endif
diff --git a/kugar/samples/sample1.ktf b/kugar/samples/sample1.ktf
index 5cba258d..79c5d019 100644
--- a/kugar/samples/sample1.ktf
+++ b/kugar/samples/sample1.ktf
@@ -2,7 +2,7 @@
<!DOCTYPE KugarTemplate SYSTEM "kugartemplate.dtd">
-<KugarTemplate PageOrientation="1" TopMargin="40" RightMargin="48" BottomMargin="40" LeftMargin="48" PageSize="2" PageWidth="1100" PageHeight="850">
+<KugarTemplate PageQt::Orientation="1" TopMargin="40" RightMargin="48" BottomMargin="40" LeftMargin="48" PageSize="2" PageWidth="1100" PageHeight="850">
<ReportHeader PrintFrequency="0" Height="70">
<Label VAlignment="1" HAlignment="0"
BorderStyle="0" WordWrap="0" DrawLeft="false"
diff --git a/kugar/samples/sample2.ktf b/kugar/samples/sample2.ktf
index 5c2667c2..cbf2a9af 100644
--- a/kugar/samples/sample2.ktf
+++ b/kugar/samples/sample2.ktf
@@ -2,7 +2,7 @@
<!DOCTYPE KugarTemplate SYSTEM "kugartemplate.dtd">
-<KugarTemplate PageOrientation="1" TopMargin="40" RightMargin="48" BottomMargin="40" LeftMargin="48" PageSize="2" PageWidth="1100" PageHeight="850">
+<KugarTemplate PageQt::Orientation="1" TopMargin="40" RightMargin="48" BottomMargin="40" LeftMargin="48" PageSize="2" PageWidth="1100" PageHeight="850">
<ReportHeader PrintFrequency="0" Height="70">
<Label VAlignment="2" HAlignment="0"
BorderStyle="0" WordWrap="0" DrawLeft="false"
diff --git a/kugar/samples/sample3.ktf b/kugar/samples/sample3.ktf
index 2b4fc6c6..cff61adc 100644
--- a/kugar/samples/sample3.ktf
+++ b/kugar/samples/sample3.ktf
@@ -2,7 +2,7 @@
<!DOCTYPE KugarTemplate SYSTEM "kugartemplate.dtd">
-<KugarTemplate PageOrientation="1" TopMargin="40" RightMargin="48" BottomMargin="40" LeftMargin="48" PageSize="2" PageWidth="1100" PageHeight="850">
+<KugarTemplate PageQt::Orientation="1" TopMargin="40" RightMargin="48" BottomMargin="40" LeftMargin="48" PageSize="2" PageWidth="1100" PageHeight="850">
<ReportHeader PrintFrequency="0" Height="70">
<Label VAlignment="1" HAlignment="0"
BorderStyle="0" WordWrap="0" DrawLeft="false"