summaryrefslogtreecommitdiffstats
path: root/kugar/kudesigner_lib/canvas.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kugar/kudesigner_lib/canvas.cpp')
-rw-r--r--kugar/kudesigner_lib/canvas.cpp80
1 files changed, 40 insertions, 40 deletions
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 ) );