diff options
Diffstat (limited to 'kugar/kudesigner_lib/kugartemplate.cpp')
-rw-r--r-- | kugar/kudesigner_lib/kugartemplate.cpp | 48 |
1 files changed, 24 insertions, 24 deletions
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 ) { |