diff options
Diffstat (limited to 'kexi/3rdparty/kolibs/koPageLayout.cpp')
-rw-r--r-- | kexi/3rdparty/kolibs/koPageLayout.cpp | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/kexi/3rdparty/kolibs/koPageLayout.cpp b/kexi/3rdparty/kolibs/koPageLayout.cpp index 4ec985f3..7888ba7d 100644 --- a/kexi/3rdparty/kolibs/koPageLayout.cpp +++ b/kexi/3rdparty/kolibs/koPageLayout.cpp @@ -28,7 +28,7 @@ # include <kodom.h> # include <koxmlns.h> #endif -#include <qdom.h> +#include <tqdom.h> // paper formats ( mm ) #define PG_A3_WIDTH 297.0 @@ -60,21 +60,21 @@ KoGenStyle KoPageLayout::saveOasis() const return style; } -void KoPageLayout::loadOasis(const QDomElement &style) +void KoPageLayout::loadOasis(const TQDomElement &style) { - QDomElement properties( KoDom::namedItemNS( style, KoXmlNS::style, "page-layout-properties" ) ); + TQDomElement properties( KoDom::namedItemNS( style, KoXmlNS::style, "page-tqlayout-properties" ) ); if ( !properties.isNull() ) { - ptWidth = KoUnit::parseValue(properties.attributeNS( KoXmlNS::fo, "page-width", QString::null ) ); - ptHeight = KoUnit::parseValue(properties.attributeNS( KoXmlNS::fo, "page-height", QString::null ) ); - if (properties.attributeNS( KoXmlNS::style, "print-orientation", QString::null)=="portrait") + ptWidth = KoUnit::parseValue(properties.attributeNS( KoXmlNS::fo, "page-width", TQString() ) ); + ptHeight = KoUnit::parseValue(properties.attributeNS( KoXmlNS::fo, "page-height", TQString() ) ); + if (properties.attributeNS( KoXmlNS::style, "print-orientation", TQString())=="portrait") orientation=PG_PORTRAIT; else orientation=PG_LANDSCAPE; - ptRight = KoUnit::parseValue( properties.attributeNS( KoXmlNS::fo, "margin-right", QString::null ) ); - ptBottom = KoUnit::parseValue( properties.attributeNS( KoXmlNS::fo, "margin-bottom", QString::null ) ); - ptLeft = KoUnit::parseValue( properties.attributeNS( KoXmlNS::fo, "margin-left", QString::null ) ); - ptTop = KoUnit::parseValue( properties.attributeNS( KoXmlNS::fo, "margin-top", QString::null ) ); + ptRight = KoUnit::parseValue( properties.attributeNS( KoXmlNS::fo, "margin-right", TQString() ) ); + ptBottom = KoUnit::parseValue( properties.attributeNS( KoXmlNS::fo, "margin-bottom", TQString() ) ); + ptLeft = KoUnit::parseValue( properties.attributeNS( KoXmlNS::fo, "margin-left", TQString() ) ); + ptTop = KoUnit::parseValue( properties.attributeNS( KoXmlNS::fo, "margin-top", TQString() ) ); // guessFormat takes millimeters if ( orientation == PG_LANDSCAPE ) format = KoPageFormat::guessFormat( POINT_TO_MM(ptHeight), POINT_TO_MM(ptWidth) ); @@ -86,16 +86,16 @@ void KoPageLayout::loadOasis(const QDomElement &style) KoPageLayout KoPageLayout::standardLayout() { - KoPageLayout layout; - layout.format = KoPageFormat::defaultFormat(); - layout.orientation = PG_PORTRAIT; - layout.ptWidth = MM_TO_POINT( KoPageFormat::width( layout.format, layout.orientation ) ); - layout.ptHeight = MM_TO_POINT( KoPageFormat::height( layout.format, layout.orientation ) ); - layout.ptLeft = MM_TO_POINT( 20.0 ); - layout.ptRight = MM_TO_POINT( 20.0 ); - layout.ptTop = MM_TO_POINT( 20.0 ); - layout.ptBottom = MM_TO_POINT( 20.0 ); - return layout; + KoPageLayout tqlayout; + tqlayout.format = KoPageFormat::defaultFormat(); + tqlayout.orientation = PG_PORTRAIT; + tqlayout.ptWidth = MM_TO_POINT( KoPageFormat::width( tqlayout.format, tqlayout.orientation ) ); + tqlayout.ptHeight = MM_TO_POINT( KoPageFormat::height( tqlayout.format, tqlayout.orientation ) ); + tqlayout.ptLeft = MM_TO_POINT( 20.0 ); + tqlayout.ptRight = MM_TO_POINT( 20.0 ); + tqlayout.ptTop = MM_TO_POINT( 20.0 ); + tqlayout.ptBottom = MM_TO_POINT( 20.0 ); + return tqlayout; } struct PageFormatInfo @@ -151,12 +151,12 @@ int KoPageFormat::printerPageSize( KoFormat format ) { if ( format == PG_SCREEN ) { - kdWarning() << "You use the page layout SCREEN. Printing in DIN A4 LANDSCAPE." << endl; + kdWarning() << "You use the page tqlayout SCREEN. Printing in DIN A4 LANDSCAPE." << endl; return KPrinter::A4; } else if ( format == PG_CUSTOM ) { - kdWarning() << "The used page layout (CUSTOM) is not supported by KPrinter. Printing in A4." << endl; + kdWarning() << "The used page tqlayout (CUSTOM) is not supported by KPrinter. Printing in A4." << endl; return KPrinter::A4; } else if ( format <= PG_LAST_FORMAT ) @@ -197,18 +197,18 @@ KoFormat KoPageFormat::guessFormat( double width, double height ) return PG_CUSTOM; } -QString KoPageFormat::formatString( KoFormat format ) +TQString KoPageFormat::formatString( KoFormat format ) { if ( format <= PG_LAST_FORMAT ) - return QString::fromLatin1( pageFormatInfo[ format ].shortName ); - return QString::fromLatin1( "A4" ); + return TQString::tqfromLatin1( pageFormatInfo[ format ].shortName ); + return TQString::tqfromLatin1( "A4" ); } -KoFormat KoPageFormat::formatFromString( const QString & string ) +KoFormat KoPageFormat::formatFromString( const TQString & string ) { for ( int i = 0 ; i <= PG_LAST_FORMAT ; ++i ) { - if (string == QString::fromLatin1( pageFormatInfo[ i ].shortName )) + if (string == TQString::tqfromLatin1( pageFormatInfo[ i ].shortName )) return pageFormatInfo[ i ].format; } // We do not know the format name, so we have a custom format @@ -226,16 +226,16 @@ KoFormat KoPageFormat::defaultFormat() return PG_DIN_A4; } -QString KoPageFormat::name( KoFormat format ) +TQString KoPageFormat::name( KoFormat format ) { if ( format <= PG_LAST_FORMAT ) return i18n( pageFormatInfo[ format ].descriptiveName ); return i18n( pageFormatInfo[ PG_DIN_A4 ].descriptiveName ); } -QStringList KoPageFormat::allFormats() +TQStringList KoPageFormat::allFormats() { - QStringList lst; + TQStringList lst; for ( int i = 0 ; i <= PG_LAST_FORMAT ; ++i ) { lst << i18n( pageFormatInfo[ i ].descriptiveName ); |