From ff87b104ff73f32bd8963b412f7c6c7badb62843 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Thu, 15 Dec 2011 15:36:44 -0600 Subject: [PATCH] Rename a number of old tq methods that are no longer tq specific --- libkipi/libkipi/KDStream.cpp | 248 ++++++++++---------- libkipi/libkipi/batchprogressdialog.cpp | 22 +- libkipi/libkipi/imagecollectionselector.cpp | 6 +- libkipi/libkipi/imagedialog.cpp | 16 +- libkipi/libkipi/plugin.cpp | 2 +- libkipi/libkipi/pluginloader.cpp | 20 +- libkipi/libkipi/uploadwidget.cpp | 8 +- 7 files changed, 161 insertions(+), 161 deletions(-) diff --git a/libkipi/libkipi/KDStream.cpp b/libkipi/libkipi/KDStream.cpp index 2f0d4af..520150c 100644 --- a/libkipi/libkipi/KDStream.cpp +++ b/libkipi/libkipi/KDStream.cpp @@ -31,7 +31,7 @@ #include "KDStream.h" #include -#include +#include #include #include #include @@ -114,7 +114,7 @@ void KDStream::flush() */ KDStream& KDStream::operator<<( bool b ) { - _output += ( b ? TQString::tqfromLatin1("true") : TQString::tqfromLatin1("false") ); + _output += ( b ? TQString::fromLatin1("true") : TQString::fromLatin1("false") ); return *this; } @@ -123,7 +123,7 @@ KDStream& KDStream::operator<<( bool b ) */ KDStream& KDStream::operator<<( char ch ) { - _output += TQString::tqfromLatin1("%1").tqarg( ch ); + _output += TQString::fromLatin1("%1").arg( ch ); return *this; } @@ -261,7 +261,7 @@ KDStream& KDStream::operator<<( KDSTREAMFUNC func ) */ KDStream& endl( KDStream& stream) { - stream << TQString::tqfromLatin1("\n"); + stream << TQString::fromLatin1("\n"); stream.flush(); return stream; } @@ -302,20 +302,20 @@ KDStream& KDStream::operator<<( const TQColor& col ) KDStream& KDStream::operator<<( const TQColorGroup& colgrp ) { _output += - TQString::tqfromLatin1("foreground: ") + TQColor2Str(colgrp.foreground()) + TQString::tqfromLatin1(", ") + - TQString::tqfromLatin1("button: ") + TQColor2Str(colgrp.button()) + TQString::tqfromLatin1(", ") + - TQString::tqfromLatin1("light: ") + TQColor2Str(colgrp.light()) + TQString::tqfromLatin1(", ") + - TQString::tqfromLatin1("dark: ") + TQColor2Str(colgrp.dark()) + TQString::tqfromLatin1(", ") + - TQString::tqfromLatin1("mid: ") + TQColor2Str(colgrp.mid()) + TQString::tqfromLatin1(", ") + - TQString::tqfromLatin1("text: ") + TQColor2Str(colgrp.text()) + TQString::tqfromLatin1(", ") + - TQString::tqfromLatin1("base: ") + TQColor2Str(colgrp.base()) + TQString::tqfromLatin1(", ") + - TQString::tqfromLatin1("background: ") + TQColor2Str(colgrp.background()) + TQString::tqfromLatin1(", ") + - TQString::tqfromLatin1("midlight: ") + TQColor2Str(colgrp.midlight()) + TQString::tqfromLatin1(", ") + - TQString::tqfromLatin1("brightText: ") + TQColor2Str(colgrp.brightText()) + TQString::tqfromLatin1(", ") + - TQString::tqfromLatin1("buttonText: ") + TQColor2Str(colgrp.buttonText()) + TQString::tqfromLatin1(", ") + - TQString::tqfromLatin1("shadow: ") + TQColor2Str(colgrp.shadow()) + TQString::tqfromLatin1(", ") + - TQString::tqfromLatin1("highlight: ") + TQColor2Str(colgrp.highlight()) + TQString::tqfromLatin1(", ") + - TQString::tqfromLatin1("highlightedText: ") + TQColor2Str(colgrp.highlightedText()); + TQString::fromLatin1("foreground: ") + TQColor2Str(colgrp.foreground()) + TQString::fromLatin1(", ") + + TQString::fromLatin1("button: ") + TQColor2Str(colgrp.button()) + TQString::fromLatin1(", ") + + TQString::fromLatin1("light: ") + TQColor2Str(colgrp.light()) + TQString::fromLatin1(", ") + + TQString::fromLatin1("dark: ") + TQColor2Str(colgrp.dark()) + TQString::fromLatin1(", ") + + TQString::fromLatin1("mid: ") + TQColor2Str(colgrp.mid()) + TQString::fromLatin1(", ") + + TQString::fromLatin1("text: ") + TQColor2Str(colgrp.text()) + TQString::fromLatin1(", ") + + TQString::fromLatin1("base: ") + TQColor2Str(colgrp.base()) + TQString::fromLatin1(", ") + + TQString::fromLatin1("background: ") + TQColor2Str(colgrp.background()) + TQString::fromLatin1(", ") + + TQString::fromLatin1("midlight: ") + TQColor2Str(colgrp.midlight()) + TQString::fromLatin1(", ") + + TQString::fromLatin1("brightText: ") + TQColor2Str(colgrp.brightText()) + TQString::fromLatin1(", ") + + TQString::fromLatin1("buttonText: ") + TQColor2Str(colgrp.buttonText()) + TQString::fromLatin1(", ") + + TQString::fromLatin1("shadow: ") + TQColor2Str(colgrp.shadow()) + TQString::fromLatin1(", ") + + TQString::fromLatin1("highlight: ") + TQColor2Str(colgrp.highlight()) + TQString::fromLatin1(", ") + + TQString::fromLatin1("highlightedText: ") + TQColor2Str(colgrp.highlightedText()); return *this; } @@ -325,9 +325,9 @@ KDStream& KDStream::operator<<( const TQColorGroup& colgrp ) */ KDStream& KDStream::operator<<( const TQPalette& palette ) { - *this << TQString::tqfromLatin1("active: ") << palette.active() << endl - << TQString::tqfromLatin1("inactive: ") << palette.inactive() << endl - << TQString::tqfromLatin1("diabled: ") << palette.disabled(); + *this << TQString::fromLatin1("active: ") << palette.active() << endl + << TQString::fromLatin1("inactive: ") << palette.inactive() << endl + << TQString::fromLatin1("diabled: ") << palette.disabled(); return *this; } @@ -340,23 +340,23 @@ KDStream& KDStream::operator<<( const TQCursor& cursor ) { TQString type; - switch ( cursor.tqshape() ) { - case TQt::ArrowCursor: type = TQString::tqfromLatin1("ArrowCursor"); break; - case TQt::UpArrowCursor: type = TQString::tqfromLatin1("UpArrowCursor"); break; - case TQt::CrossCursor: type = TQString::tqfromLatin1("CrossCursor"); break; - case TQt::WaitCursor: type = TQString::tqfromLatin1("WaitCursor"); break; - case TQt::IbeamCursor: type = TQString::tqfromLatin1("IbeamCursor"); break; - case TQt::SizeVerCursor: type = TQString::tqfromLatin1("SizeVerCursor"); break; - case TQt::SizeHorCursor: type = TQString::tqfromLatin1("SizeHorCursor"); break; - case TQt::SizeBDiagCursor: type = TQString::tqfromLatin1("SizeBDiagCursor"); break; - case TQt::SizeFDiagCursor: type = TQString::tqfromLatin1("SizeFDiagCursor"); break; - case TQt::SizeAllCursor: type = TQString::tqfromLatin1("SizeAllCursor"); break; - case TQt::BlankCursor: type = TQString::tqfromLatin1("BlankCursor"); break; - case TQt::SplitVCursor: type = TQString::tqfromLatin1("SplitVCursor"); break; - case TQt::SplitHCursor: type = TQString::tqfromLatin1("SplitHCursor"); break; - case TQt::PointingHandCursor: type = TQString::tqfromLatin1("PointingHandCursor"); break; - case TQt::ForbiddenCursor: type = TQString::tqfromLatin1("ForbiddenCursor"); break; - case TQt::BitmapCursor: type = TQString::tqfromLatin1("BitmapCursor"); break; + switch ( cursor.shape() ) { + case TQt::ArrowCursor: type = TQString::fromLatin1("ArrowCursor"); break; + case TQt::UpArrowCursor: type = TQString::fromLatin1("UpArrowCursor"); break; + case TQt::CrossCursor: type = TQString::fromLatin1("CrossCursor"); break; + case TQt::WaitCursor: type = TQString::fromLatin1("WaitCursor"); break; + case TQt::IbeamCursor: type = TQString::fromLatin1("IbeamCursor"); break; + case TQt::SizeVerCursor: type = TQString::fromLatin1("SizeVerCursor"); break; + case TQt::SizeHorCursor: type = TQString::fromLatin1("SizeHorCursor"); break; + case TQt::SizeBDiagCursor: type = TQString::fromLatin1("SizeBDiagCursor"); break; + case TQt::SizeFDiagCursor: type = TQString::fromLatin1("SizeFDiagCursor"); break; + case TQt::SizeAllCursor: type = TQString::fromLatin1("SizeAllCursor"); break; + case TQt::BlankCursor: type = TQString::fromLatin1("BlankCursor"); break; + case TQt::SplitVCursor: type = TQString::fromLatin1("SplitVCursor"); break; + case TQt::SplitHCursor: type = TQString::fromLatin1("SplitHCursor"); break; + case TQt::PointingHandCursor: type = TQString::fromLatin1("PointingHandCursor"); break; + case TQt::ForbiddenCursor: type = TQString::fromLatin1("ForbiddenCursor"); break; + case TQt::BitmapCursor: type = TQString::fromLatin1("BitmapCursor"); break; } _output += type; @@ -412,19 +412,19 @@ KDStream& KDStream::operator<<( const TQPen& pen ) { TQString style; switch ( pen.style() ) { - case TQt::NoPen: style = TQString::tqfromLatin1("NoPen"); break; - case TQt::SolidLine: style = TQString::tqfromLatin1("SolidLine"); break; - case TQt::DashLine: style = TQString::tqfromLatin1("DashLine"); break; - case TQt::DotLine: style = TQString::tqfromLatin1("DotLine"); break; - case TQt::DashDotLine: style = TQString::tqfromLatin1("DashDotLine"); break; - case TQt::DashDotDotLine : style = TQString::tqfromLatin1("DashDotDotLine "); break; + case TQt::NoPen: style = TQString::fromLatin1("NoPen"); break; + case TQt::SolidLine: style = TQString::fromLatin1("SolidLine"); break; + case TQt::DashLine: style = TQString::fromLatin1("DashLine"); break; + case TQt::DotLine: style = TQString::fromLatin1("DotLine"); break; + case TQt::DashDotLine: style = TQString::fromLatin1("DashDotLine"); break; + case TQt::DashDotDotLine : style = TQString::fromLatin1("DashDotDotLine "); break; case TQt::MPenStyle : break; // ignore } - _output += TQString::tqfromLatin1("TQPen(%1,%2,%3)") - .tqarg( pen.width() ) - .tqarg( TQColor2Str( pen.color() ) ) - .tqarg( style ); + _output += TQString::fromLatin1("TQPen(%1,%2,%3)") + .arg( pen.width() ) + .arg( TQColor2Str( pen.color() ) ) + .arg( style ); return *this; } @@ -433,7 +433,7 @@ KDStream& KDStream::operator<<( const TQPen& pen ) */ KDStream& KDStream::operator<<( const TQPoint& point ) { - _output += TQString::tqfromLatin1("(%1,%2)").tqarg(point.x()).tqarg(point.y() ); + _output += TQString::fromLatin1("(%1,%2)").arg(point.x()).arg(point.y() ); return *this; } @@ -442,7 +442,7 @@ KDStream& KDStream::operator<<( const TQPoint& point ) */ KDStream& KDStream::operator<<( const TQSize& size ) { - _output += TQString::tqfromLatin1("%1x%2").tqarg(size.width()).tqarg(size.height()); + _output += TQString::fromLatin1("%1x%2").arg(size.width()).arg(size.height()); return *this; } @@ -452,15 +452,15 @@ KDStream& KDStream::operator<<( const TQSize& size ) */ KDStream& KDStream::operator<<( const TQRect& rect ) { - TQString xplus = (rect.x() >= 0) ? TQString::tqfromLatin1("+") : TQString::tqfromLatin1(""); - TQString yplus = (rect.y() >= 0) ? TQString::tqfromLatin1("+") : TQString::tqfromLatin1(""); - _output += TQString::tqfromLatin1("%1x%2%3%4%5%6") - .tqarg( rect.width() ) - .tqarg( rect.height() ) - .tqarg( xplus ) - .tqarg( rect.x() ) - .tqarg( yplus ) - .tqarg( rect.y() ); + TQString xplus = (rect.x() >= 0) ? TQString::fromLatin1("+") : TQString::fromLatin1(""); + TQString yplus = (rect.y() >= 0) ? TQString::fromLatin1("+") : TQString::fromLatin1(""); + _output += TQString::fromLatin1("%1x%2%3%4%5%6") + .arg( rect.width() ) + .arg( rect.height() ) + .arg( xplus ) + .arg( rect.x() ) + .arg( yplus ) + .arg( rect.y() ); return *this; } @@ -474,43 +474,43 @@ KDStream& KDStream::operator<<( const TQRect& rect ) TQString KDStream::TQColor2Str( const TQColor& col ) { if ( col == TQt::black ) - return TQString::tqfromLatin1("black"); + return TQString::fromLatin1("black"); else if ( col == TQt::white ) - return TQString::tqfromLatin1("white"); + return TQString::fromLatin1("white"); else if ( col == TQt::darkGray ) - return TQString::tqfromLatin1("darkGray"); + return TQString::fromLatin1("darkGray"); else if ( col == TQt::gray ) - return TQString::tqfromLatin1("gray"); + return TQString::fromLatin1("gray"); else if ( col == TQt::lightGray ) - return TQString::tqfromLatin1("lightGray"); + return TQString::fromLatin1("lightGray"); else if ( col == TQt::red ) - return TQString::tqfromLatin1("red"); + return TQString::fromLatin1("red"); else if ( col == TQt::green ) - return TQString::tqfromLatin1("green"); + return TQString::fromLatin1("green"); else if ( col == TQt::blue ) - return TQString::tqfromLatin1("blue"); + return TQString::fromLatin1("blue"); else if ( col == TQt::cyan ) - return TQString::tqfromLatin1("cyan"); + return TQString::fromLatin1("cyan"); else if ( col == TQt::magenta ) - return TQString::tqfromLatin1("magenta"); + return TQString::fromLatin1("magenta"); else if ( col == TQt::yellow ) - return TQString::tqfromLatin1("yellow"); + return TQString::fromLatin1("yellow"); else if ( col == TQt::darkRed ) - return TQString::tqfromLatin1("darkRed"); + return TQString::fromLatin1("darkRed"); else if ( col == TQt::darkGreen ) - return TQString::tqfromLatin1("darkGreen"); + return TQString::fromLatin1("darkGreen"); else if ( col == TQt::darkBlue ) - return TQString::tqfromLatin1("darkBlue"); + return TQString::fromLatin1("darkBlue"); else if ( col == TQt::darkCyan ) - return TQString::tqfromLatin1("darkCyan"); + return TQString::fromLatin1("darkCyan"); else if ( col == TQt::darkMagenta ) - return TQString::tqfromLatin1("darkMagenta"); + return TQString::fromLatin1("darkMagenta"); else if ( col == TQt::darkYellow ) - return TQString::tqfromLatin1("darkYellow"); + return TQString::fromLatin1("darkYellow"); else if ( col == TQt::color0 ) - return TQString::tqfromLatin1("color0"); + return TQString::fromLatin1("color0"); else if ( col == TQt::color1 ) - return TQString::tqfromLatin1("color1"); + return TQString::fromLatin1("color1"); else return col.name(); } @@ -521,17 +521,17 @@ TQString KDStream::TQColor2Str( const TQColor& col ) */ KDStream& KDStream::operator<<( const TQObject& obj ) { - *this << TQString::tqfromLatin1(obj.className()) + TQString::tqfromLatin1("(") + TQString::tqfromLatin1(obj.name()) << TQString::tqfromLatin1("):")<< endl; - TQMetaObject* meta = obj.tqmetaObject(); + *this << TQString::fromLatin1(obj.className()) + TQString::fromLatin1("(") + TQString::fromLatin1(obj.name()) << TQString::fromLatin1("):")<< endl; + TQMetaObject* meta = obj.metaObject(); TQStrList props = meta->propertyNames(true); unsigned int maxWidth = 0; for ( TQStrListIterator it(props) ; *it; ++it ) { - maxWidth = TQMAX( maxWidth, TQString::tqfromLatin1(*it).length() ); + maxWidth = TQMAX( maxWidth, TQString::fromLatin1(*it).length() ); } for ( TQStrListIterator it2(props) ; *it2; ++it2 ) { - *this << TQString::tqfromLatin1(" ") << TQString::tqfromLatin1(*it2).leftJustify(maxWidth) << TQString::tqfromLatin1(": [") << obj.property(*it2) << TQString::tqfromLatin1("]") << endl; + *this << TQString::fromLatin1(" ") << TQString::fromLatin1(*it2).leftJustify(maxWidth) << TQString::fromLatin1(": [") << obj.property(*it2) << TQString::fromLatin1("]") << endl; } return *this; } @@ -544,7 +544,7 @@ KDStream& KDStream::operator<<( const TQVariant& var) { switch (var.type() ) { - case TQVariant::Invalid: *this << TQString::tqfromLatin1("*INVALID*"); break; + case TQVariant::Invalid: *this << TQString::fromLatin1("*INVALID*"); break; case TQVariant::Map: *this << var.toMap(); break; case TQVariant::List: *this << var.toList(); break; case TQVariant::String: *this << var.toString(); break; @@ -558,7 +558,7 @@ KDStream& KDStream::operator<<( const TQVariant& var) case TQVariant::Color: *this << var.toColor(); break; case TQVariant::Palette: *this << var.toPalette(); break; case TQVariant::ColorGroup: *this << var.toColorGroup(); break; - case TQVariant::IconSet: *this << TQString::tqfromLatin1("-"); break; + case TQVariant::IconSet: *this << TQString::fromLatin1("-"); break; case TQVariant::Point: *this << var.toPoint(); break; case TQVariant::Image: *this << var.toImage(); break; case TQVariant::Int: *this << var.toInt(); break; @@ -567,8 +567,8 @@ KDStream& KDStream::operator<<( const TQVariant& var) case TQVariant::Double: *this << var.toDouble(); break; case TQVariant::CString: *this << var.toCString(); break; case TQVariant::PointArray: *this << var.toPointArray(); break; - case TQVariant::Region: *this << TQString::tqfromLatin1("-"); break; - case TQVariant::Bitmap: *this << TQString::tqfromLatin1("-"); break; + case TQVariant::Region: *this << TQString::fromLatin1("-"); break; + case TQVariant::Bitmap: *this << TQString::fromLatin1("-"); break; case TQVariant::Cursor: *this << var.toCursor(); break; case TQVariant::SizePolicy: *this << var.toSizePolicy(); break; case TQVariant::Date: *this << var.toDate(); break; @@ -592,24 +592,24 @@ KDStream& KDStream::operator<<( const TQBrush& brush) TQString style; switch ( brush.style() ) { - case TQt::NoBrush: style = TQString::tqfromLatin1("NoBrush"); break; - case TQt::SolidPattern: style = TQString::tqfromLatin1("SolidPattern"); break; - case TQt::Dense1Pattern: style = TQString::tqfromLatin1("Dense1Pattern"); break; - case TQt::Dense2Pattern: style = TQString::tqfromLatin1("Dense2Pattern"); break; - case TQt::Dense3Pattern: style = TQString::tqfromLatin1("Dense3Pattern"); break; - case TQt::Dense4Pattern: style = TQString::tqfromLatin1("Dense4Pattern"); break; - case TQt::Dense5Pattern: style = TQString::tqfromLatin1("Dense5Pattern"); break; - case TQt::Dense6Pattern: style = TQString::tqfromLatin1("Dense6Pattern"); break; - case TQt::Dense7Pattern: style = TQString::tqfromLatin1("Dense7Pattern"); break; - case TQt::HorPattern: style = TQString::tqfromLatin1("HorPattern"); break; - case TQt::VerPattern: style = TQString::tqfromLatin1("VerPattern"); break; - case TQt::CrossPattern: style = TQString::tqfromLatin1("CrossPattern"); break; - case TQt::BDiagPattern: style = TQString::tqfromLatin1("BDiagPattern"); break; - case TQt::FDiagPattern: style = TQString::tqfromLatin1("FDiagPattern"); break; - case TQt::DiagCrossPattern: style = TQString::tqfromLatin1("DiagCrossPattern"); break; - case TQt::CustomPattern: style = TQString::tqfromLatin1("CustomPattern"); break; + case TQt::NoBrush: style = TQString::fromLatin1("NoBrush"); break; + case TQt::SolidPattern: style = TQString::fromLatin1("SolidPattern"); break; + case TQt::Dense1Pattern: style = TQString::fromLatin1("Dense1Pattern"); break; + case TQt::Dense2Pattern: style = TQString::fromLatin1("Dense2Pattern"); break; + case TQt::Dense3Pattern: style = TQString::fromLatin1("Dense3Pattern"); break; + case TQt::Dense4Pattern: style = TQString::fromLatin1("Dense4Pattern"); break; + case TQt::Dense5Pattern: style = TQString::fromLatin1("Dense5Pattern"); break; + case TQt::Dense6Pattern: style = TQString::fromLatin1("Dense6Pattern"); break; + case TQt::Dense7Pattern: style = TQString::fromLatin1("Dense7Pattern"); break; + case TQt::HorPattern: style = TQString::fromLatin1("HorPattern"); break; + case TQt::VerPattern: style = TQString::fromLatin1("VerPattern"); break; + case TQt::CrossPattern: style = TQString::fromLatin1("CrossPattern"); break; + case TQt::BDiagPattern: style = TQString::fromLatin1("BDiagPattern"); break; + case TQt::FDiagPattern: style = TQString::fromLatin1("FDiagPattern"); break; + case TQt::DiagCrossPattern: style = TQString::fromLatin1("DiagCrossPattern"); break; + case TQt::CustomPattern: style = TQString::fromLatin1("CustomPattern"); break; } - _output += TQString::tqfromLatin1("TQBrush(%1,%2)").tqarg(style).tqarg(TQColor2Str(brush.color())); + _output += TQString::fromLatin1("TQBrush(%1,%2)").arg(style).arg(TQColor2Str(brush.color())); return *this; } @@ -624,27 +624,27 @@ KDStream& KDStream::operator<<( const TQSizePolicy& policy) switch ( policy.horData() ) { - case TQSizePolicy::Fixed: hor=TQString::tqfromLatin1("Fixed"); break; - case TQSizePolicy::Minimum : hor=TQString::tqfromLatin1("Minimum "); break; - case TQSizePolicy::Maximum: hor=TQString::tqfromLatin1("Maximum"); break; - case TQSizePolicy::Preferred: hor=TQString::tqfromLatin1("Preferred"); break; - case TQSizePolicy::MinimumExpanding: hor=TQString::tqfromLatin1("MinimumExpanding"); break; - case TQSizePolicy::Expanding: hor=TQString::tqfromLatin1("Expanding"); break; - case TQSizePolicy::Ignored: hor=TQString::tqfromLatin1("Ignored"); break; + case TQSizePolicy::Fixed: hor=TQString::fromLatin1("Fixed"); break; + case TQSizePolicy::Minimum : hor=TQString::fromLatin1("Minimum "); break; + case TQSizePolicy::Maximum: hor=TQString::fromLatin1("Maximum"); break; + case TQSizePolicy::Preferred: hor=TQString::fromLatin1("Preferred"); break; + case TQSizePolicy::MinimumExpanding: hor=TQString::fromLatin1("MinimumExpanding"); break; + case TQSizePolicy::Expanding: hor=TQString::fromLatin1("Expanding"); break; + case TQSizePolicy::Ignored: hor=TQString::fromLatin1("Ignored"); break; } switch ( policy.verData() ) { - case TQSizePolicy::Fixed: ver=TQString::tqfromLatin1("Fixed"); break; - case TQSizePolicy::Minimum : ver=TQString::tqfromLatin1("Minimum "); break; - case TQSizePolicy::Maximum: ver=TQString::tqfromLatin1("Maximum"); break; - case TQSizePolicy::Preferred: ver=TQString::tqfromLatin1("Preferred"); break; - case TQSizePolicy::MinimumExpanding: ver=TQString::tqfromLatin1("MinimumExpanding"); break; - case TQSizePolicy::Expanding: ver=TQString::tqfromLatin1("Expanding"); break; - case TQSizePolicy::Ignored: ver=TQString::tqfromLatin1("Ignored"); break; + case TQSizePolicy::Fixed: ver=TQString::fromLatin1("Fixed"); break; + case TQSizePolicy::Minimum : ver=TQString::fromLatin1("Minimum "); break; + case TQSizePolicy::Maximum: ver=TQString::fromLatin1("Maximum"); break; + case TQSizePolicy::Preferred: ver=TQString::fromLatin1("Preferred"); break; + case TQSizePolicy::MinimumExpanding: ver=TQString::fromLatin1("MinimumExpanding"); break; + case TQSizePolicy::Expanding: ver=TQString::fromLatin1("Expanding"); break; + case TQSizePolicy::Ignored: ver=TQString::fromLatin1("Ignored"); break; } - TQString hforw = policy.hasHeightForWidth() ? TQString::tqfromLatin1("true") : TQString::tqfromLatin1("false"); - _output += TQString::tqfromLatin1("TQSizePolicy(hor=%1,ver=%2, hasHeightForWidth=%3)") - .tqarg(hor).tqarg(ver).tqarg(hforw); + TQString hforw = policy.hasHeightForWidth() ? TQString::fromLatin1("true") : TQString::fromLatin1("false"); + _output += TQString::fromLatin1("TQSizePolicy(hor=%1,ver=%2, hasHeightForWidth=%3)") + .arg(hor).arg(ver).arg(hforw); return *this; } @@ -672,8 +672,8 @@ KDStream& KDStream::operator<<( const TQStrList& list ) KDStream& KDStream::operator<<( const TQPixmap& pixmap ) { _output += TQString("TQPixmap[null=%1,width=%2,heigth=%3,depth=%4,hasMask=%5,hasAlpha=%6]") - .tqarg(pixmap.isNull()).tqarg(pixmap.width()).tqarg(pixmap.height()) - .tqarg(pixmap.depth()).tqarg(pixmap.mask() != 0).tqarg(pixmap.hasAlpha() ); + .arg(pixmap.isNull()).arg(pixmap.width()).arg(pixmap.height()) + .arg(pixmap.depth()).arg(pixmap.mask() != 0).arg(pixmap.hasAlpha() ); return *this; } @@ -681,8 +681,8 @@ KDStream& KDStream::operator<<( const TQPixmap& pixmap ) KDStream& KDStream::operator<<( const TQImage& pixmap ) { _output += TQString("TQImage[null=%1,width=%2,heigth=%3,depth=%4,hasAlpha=%5]") - .tqarg(pixmap.isNull()).tqarg(pixmap.width()).tqarg(pixmap.height()) - .tqarg(pixmap.depth()).tqarg(pixmap.hasAlphaBuffer() ); + .arg(pixmap.isNull()).arg(pixmap.width()).arg(pixmap.height()) + .arg(pixmap.depth()).arg(pixmap.hasAlphaBuffer() ); return *this; } diff --git a/libkipi/libkipi/batchprogressdialog.cpp b/libkipi/libkipi/batchprogressdialog.cpp index 7ceca4f..ec90a99 100644 --- a/libkipi/libkipi/batchprogressdialog.cpp +++ b/libkipi/libkipi/batchprogressdialog.cpp @@ -24,7 +24,7 @@ // Include files for TQt #include -#include +#include #include #include #include @@ -106,25 +106,25 @@ public: private: int m_messagetype; - void paintCell (TQPainter *p, const TQColorGroup &cg, int column, int width, int tqalignment) + void paintCell (TQPainter *p, const TQColorGroup &cg, int column, int width, int alignment) { TQColorGroup _cg( cg ); if ( m_messagetype == KIPI::ErrorMessage ) { _cg.setColor( TQColorGroup::Text, TQt::red ); - KListViewItem::paintCell( p, _cg, column, width, tqalignment ); + KListViewItem::paintCell( p, _cg, column, width, alignment ); return; } if ( m_messagetype == KIPI::WarningMessage ) { _cg.setColor( TQColorGroup::Text, TQt::darkYellow ); - KListViewItem::paintCell( p, _cg, column, width, tqalignment ); + KListViewItem::paintCell( p, _cg, column, width, alignment ); return; } - KListViewItem::paintCell( p, cg, column, width, tqalignment ); + KListViewItem::paintCell( p, cg, column, width, alignment ); } }; @@ -146,15 +146,15 @@ BatchProgressDialog::BatchProgressDialog( TQWidget *parent, const TQString &capt TQFrame *headerFrame = new TQFrame( box ); headerFrame->setFrameStyle(TQFrame::Panel|TQFrame::Sunken); - TQHBoxLayout* tqlayout = new TQHBoxLayout( headerFrame ); - tqlayout->setMargin( 2 ); // to make sure the frame gets displayed - tqlayout->setSpacing( 0 ); + TQHBoxLayout* layout = new TQHBoxLayout( headerFrame ); + layout->setMargin( 2 ); // to make sure the frame gets displayed + layout->setSpacing( 0 ); TQLabel *pixmapLabelLeft = new TQLabel( headerFrame, "pixmapLabelLeft" ); pixmapLabelLeft->setScaledContents( false ); - tqlayout->addWidget( pixmapLabelLeft ); + layout->addWidget( pixmapLabelLeft ); TQLabel *labelTitle = new TQLabel( caption, headerFrame, "labelTitle" ); - tqlayout->addWidget( labelTitle ); - tqlayout->setStretchFactor( labelTitle, 1 ); + layout->addWidget( labelTitle ); + layout->setStretchFactor( labelTitle, 1 ); TQString dir; KGlobal::dirs()->addResourceType("kipi_banner_left", KGlobal::dirs()->kde_default("data") + "kipi/data"); diff --git a/libkipi/libkipi/imagecollectionselector.cpp b/libkipi/libkipi/imagecollectionselector.cpp index 5defa37..ff18dac 100644 --- a/libkipi/libkipi/imagecollectionselector.cpp +++ b/libkipi/libkipi/imagecollectionselector.cpp @@ -23,7 +23,7 @@ // TQt includes. #include -#include +#include #include #include #include @@ -108,7 +108,7 @@ ImageCollectionSelector::ImageCollectionSelector(TQWidget* parent, Interface* in TQPushButton* selectAll=box->addButton(i18n("Select All")); TQPushButton* invertSelection=box->addButton(i18n("Invert Selection")); TQPushButton* selectNone=box->addButton(i18n("Select None")); - box->tqlayout(); + box->layout(); connect(selectAll, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotSelectAll()) ); @@ -129,7 +129,7 @@ ImageCollectionSelector::ImageCollectionSelector(TQWidget* parent, Interface* in { d->_thumbLabel = new TQLabel(rightBox); d->_thumbLabel->setFixedSize(TQSize(128,128)); - d->_thumbLabel->tqsetAlignment(AlignHCenter | AlignVCenter); + d->_thumbLabel->setAlignment(AlignHCenter | AlignVCenter); } else { diff --git a/libkipi/libkipi/imagedialog.cpp b/libkipi/libkipi/imagedialog.cpp index e1a8ec9..a39dabf 100644 --- a/libkipi/libkipi/imagedialog.cpp +++ b/libkipi/libkipi/imagedialog.cpp @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include #include #include @@ -101,15 +101,15 @@ ImageDialog::ImageDialog(TQWidget* parent, KIPI::Interface* interface, TQFrame *headerFrame = new TQFrame( box ); headerFrame->setFrameStyle(TQFrame::Panel|TQFrame::Sunken); - TQHBoxLayout* tqlayout = new TQHBoxLayout( headerFrame ); - tqlayout->setMargin( 2 ); // to make sure the frame gets displayed - tqlayout->setSpacing( 0 ); + TQHBoxLayout* layout = new TQHBoxLayout( headerFrame ); + layout->setMargin( 2 ); // to make sure the frame gets displayed + layout->setSpacing( 0 ); TQLabel *pixmapLabelLeft = new TQLabel( headerFrame, "pixmapLabelLeft" ); pixmapLabelLeft->setScaledContents( false ); - tqlayout->addWidget( pixmapLabelLeft ); + layout->addWidget( pixmapLabelLeft ); TQLabel *labelTitle = new TQLabel( i18n("Select Image From Album"), headerFrame, "labelTitle" ); - tqlayout->addWidget( labelTitle ); - tqlayout->setStretchFactor( labelTitle, 1 ); + layout->addWidget( labelTitle ); + layout->setStretchFactor( labelTitle, 1 ); dvlay->addWidget( headerFrame ); TQString directory; @@ -156,7 +156,7 @@ ImageDialog::ImageDialog(TQWidget* parent, KIPI::Interface* interface, d->_imageList->setResizeMode(TQListView::LastColumn); d->_preview=new TQLabel(splitter); - d->_preview->tqsetAlignment(AlignHCenter | AlignVCenter | WordBreak); + d->_preview->setAlignment(AlignHCenter | AlignVCenter | WordBreak); d->_preview->setFixedWidth(PREVIEW_SIZE); d->_preview->setText(i18n("No image selected")); diff --git a/libkipi/libkipi/plugin.cpp b/libkipi/libkipi/plugin.cpp index 2b79c5e..65a04fe 100644 --- a/libkipi/libkipi/plugin.cpp +++ b/libkipi/libkipi/plugin.cpp @@ -83,7 +83,7 @@ void KIPI::Plugin::setup( TQWidget* widget ) { d->m_defaultWidget = widget; d->m_actions.insert( widget, KActionPtrList() ); - TQString name = TQString( "action collection for %1" ).tqarg( widget->name() ); + TQString name = TQString( "action collection for %1" ).arg( widget->name() ); d->m_actionCollection.insert( widget, new KActionCollection( widget, TQT_TQOBJECT(widget), name.latin1(), d->m_instance ) ); } diff --git a/libkipi/libkipi/pluginloader.cpp b/libkipi/libkipi/pluginloader.cpp index aeda046..767f6fc 100644 --- a/libkipi/libkipi/pluginloader.cpp +++ b/libkipi/libkipi/pluginloader.cpp @@ -33,7 +33,7 @@ #include "interface.h" #include #include -#include +#include /** \author Renchi Raju @@ -55,9 +55,9 @@ Then plugin plugins into menus could be done with code similiar to this from KimDaBa: \code void slotReplug() { - unplugActionList( TQString::tqfromLatin1("file_actions") ); - unplugActionList( TQString::tqfromLatin1("image_actions") ); - unplugActionList( TQString::tqfromLatin1("tool_actions") ); + unplugActionList( TQString::fromLatin1("file_actions") ); + unplugActionList( TQString::fromLatin1("image_actions") ); + unplugActionList( TQString::fromLatin1("tool_actions") ); TQPtrList fileActions; TQPtrList imageActions; @@ -94,9 +94,9 @@ } // For this to work I need to pass false as second arg for createGUI - plugActionList( TQString::tqfromLatin1("file_actions"), fileActions ); - plugActionList( TQString::tqfromLatin1("image_actions"), imageActions ); - plugActionList( TQString::tqfromLatin1("tool_actions"), toolsActions ); + plugActionList( TQString::fromLatin1("file_actions"), fileActions ); + plugActionList( TQString::fromLatin1("image_actions"), imageActions ); + plugActionList( TQString::fromLatin1("tool_actions"), toolsActions ); } \endcode @@ -206,7 +206,7 @@ PluginLoader::PluginLoader( const TQStringList& ignores, Interface* interface ) KTrader::OfferList offers = KTrader::self()->query("KIPI/Plugin"); KConfig* config = KGlobal::config(); - config->setGroup( TQString::tqfromLatin1( "KIPI/EnabledPlugin" ) ); + config->setGroup( TQString::fromLatin1( "KIPI/EnabledPlugin" ) ); KTrader::OfferList::ConstIterator iter; for(iter = offers.begin(); iter != offers.end(); ++iter) { @@ -215,7 +215,7 @@ PluginLoader::PluginLoader( const TQStringList& ignores, Interface* interface ) TQString name = service->name(); TQString comment = service->comment(); TQString library = service->library(); - TQStringList reqFeatures = service->property( TQString::tqfromLatin1( "X-KIPI-ReqFeatures" ) ).toStringList(); + TQStringList reqFeatures = service->property( TQString::fromLatin1( "X-KIPI-ReqFeatures" ) ).toStringList(); if (library.isEmpty() || name.isEmpty() ) { kdWarning( 51001 ) << "KIPI::PluginLoader: Plugin had an empty name or library file - this should not happen." << endl; @@ -360,7 +360,7 @@ ConfigWidget::~ConfigWidget() void ConfigWidget::apply() { KConfig* config = KGlobal::config(); - config->setGroup( TQString::tqfromLatin1( "KIPI/EnabledPlugin" ) ); + config->setGroup( TQString::fromLatin1( "KIPI/EnabledPlugin" ) ); bool changes = false; for( TQValueList::Iterator it = d->_boxes.begin(); it != d->_boxes.end(); ++it ) { diff --git a/libkipi/libkipi/uploadwidget.cpp b/libkipi/libkipi/uploadwidget.cpp index fe06df2..2460ee0 100644 --- a/libkipi/libkipi/uploadwidget.cpp +++ b/libkipi/libkipi/uploadwidget.cpp @@ -22,7 +22,7 @@ // TQt includes. -#include +#include #include #include #include @@ -66,10 +66,10 @@ KIPI::UploadWidget::UploadWidget( KIPI::Interface* interface, TQWidget* parent, { d = new Private; - TQVBoxLayout* tqlayout = new TQVBoxLayout( this, 0 ); + TQVBoxLayout* layout = new TQVBoxLayout( this, 0 ); d->m_treeView = new KFileTreeView( this ); d->m_treeView->setRootIsDecorated( true ); - tqlayout->addWidget( d->m_treeView ); + layout->addWidget( d->m_treeView ); // Fetch the current album, so we can start out there. KIPI::ImageCollection album = interface->currentAlbum(); @@ -180,7 +180,7 @@ void KIPI::UploadWidget::mkdir() bool ok; TQString dir = KInputDialog::getText( i18n("Create Directory"), i18n("Enter new directory name (to be created as subdir of %1):") - .tqarg(path().prettyURL()), "", &ok, this); + .arg(path().prettyURL()), "", &ok, this); if (!ok) return;