summaryrefslogtreecommitdiffstats
path: root/kugar/kudesigner_lib
diff options
context:
space:
mode:
Diffstat (limited to 'kugar/kudesigner_lib')
-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
48 files changed, 521 insertions, 517 deletions
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;