Rename a number of old tq methods that are no longer tq specific

pull/1/head
Timothy Pearson 13 years ago
parent ee79084ed7
commit ff87b104ff

@ -31,7 +31,7 @@
#include "KDStream.h" #include "KDStream.h"
#include <tqcolor.h> #include <tqcolor.h>
#include <tqpalette.h> #include <palette.h>
#include <tqcursor.h> #include <tqcursor.h>
#include <tqdatetime.h> #include <tqdatetime.h>
#include <tqfont.h> #include <tqfont.h>
@ -114,7 +114,7 @@ void KDStream::flush()
*/ */
KDStream& KDStream::operator<<( bool b ) KDStream& KDStream::operator<<( bool b )
{ {
_output += ( b ? TQString::tqfromLatin1("true") : TQString::tqfromLatin1("false") ); _output += ( b ? TQString::fromLatin1("true") : TQString::fromLatin1("false") );
return *this; return *this;
} }
@ -123,7 +123,7 @@ KDStream& KDStream::operator<<( bool b )
*/ */
KDStream& KDStream::operator<<( char ch ) KDStream& KDStream::operator<<( char ch )
{ {
_output += TQString::tqfromLatin1("%1").tqarg( ch ); _output += TQString::fromLatin1("%1").arg( ch );
return *this; return *this;
} }
@ -261,7 +261,7 @@ KDStream& KDStream::operator<<( KDSTREAMFUNC func )
*/ */
KDStream& endl( KDStream& stream) KDStream& endl( KDStream& stream)
{ {
stream << TQString::tqfromLatin1("\n"); stream << TQString::fromLatin1("\n");
stream.flush(); stream.flush();
return stream; return stream;
} }
@ -302,20 +302,20 @@ KDStream& KDStream::operator<<( const TQColor& col )
KDStream& KDStream::operator<<( const TQColorGroup& colgrp ) KDStream& KDStream::operator<<( const TQColorGroup& colgrp )
{ {
_output += _output +=
TQString::tqfromLatin1("foreground: ") + TQColor2Str(colgrp.foreground()) + TQString::tqfromLatin1(", ") + TQString::fromLatin1("foreground: ") + TQColor2Str(colgrp.foreground()) + TQString::fromLatin1(", ") +
TQString::tqfromLatin1("button: ") + TQColor2Str(colgrp.button()) + TQString::tqfromLatin1(", ") + TQString::fromLatin1("button: ") + TQColor2Str(colgrp.button()) + TQString::fromLatin1(", ") +
TQString::tqfromLatin1("light: ") + TQColor2Str(colgrp.light()) + TQString::tqfromLatin1(", ") + TQString::fromLatin1("light: ") + TQColor2Str(colgrp.light()) + TQString::fromLatin1(", ") +
TQString::tqfromLatin1("dark: ") + TQColor2Str(colgrp.dark()) + TQString::tqfromLatin1(", ") + TQString::fromLatin1("dark: ") + TQColor2Str(colgrp.dark()) + TQString::fromLatin1(", ") +
TQString::tqfromLatin1("mid: ") + TQColor2Str(colgrp.mid()) + TQString::tqfromLatin1(", ") + TQString::fromLatin1("mid: ") + TQColor2Str(colgrp.mid()) + TQString::fromLatin1(", ") +
TQString::tqfromLatin1("text: ") + TQColor2Str(colgrp.text()) + TQString::tqfromLatin1(", ") + TQString::fromLatin1("text: ") + TQColor2Str(colgrp.text()) + TQString::fromLatin1(", ") +
TQString::tqfromLatin1("base: ") + TQColor2Str(colgrp.base()) + TQString::tqfromLatin1(", ") + TQString::fromLatin1("base: ") + TQColor2Str(colgrp.base()) + TQString::fromLatin1(", ") +
TQString::tqfromLatin1("background: ") + TQColor2Str(colgrp.background()) + TQString::tqfromLatin1(", ") + TQString::fromLatin1("background: ") + TQColor2Str(colgrp.background()) + TQString::fromLatin1(", ") +
TQString::tqfromLatin1("midlight: ") + TQColor2Str(colgrp.midlight()) + TQString::tqfromLatin1(", ") + TQString::fromLatin1("midlight: ") + TQColor2Str(colgrp.midlight()) + TQString::fromLatin1(", ") +
TQString::tqfromLatin1("brightText: ") + TQColor2Str(colgrp.brightText()) + TQString::tqfromLatin1(", ") + TQString::fromLatin1("brightText: ") + TQColor2Str(colgrp.brightText()) + TQString::fromLatin1(", ") +
TQString::tqfromLatin1("buttonText: ") + TQColor2Str(colgrp.buttonText()) + TQString::tqfromLatin1(", ") + TQString::fromLatin1("buttonText: ") + TQColor2Str(colgrp.buttonText()) + TQString::fromLatin1(", ") +
TQString::tqfromLatin1("shadow: ") + TQColor2Str(colgrp.shadow()) + TQString::tqfromLatin1(", ") + TQString::fromLatin1("shadow: ") + TQColor2Str(colgrp.shadow()) + TQString::fromLatin1(", ") +
TQString::tqfromLatin1("highlight: ") + TQColor2Str(colgrp.highlight()) + TQString::tqfromLatin1(", ") + TQString::fromLatin1("highlight: ") + TQColor2Str(colgrp.highlight()) + TQString::fromLatin1(", ") +
TQString::tqfromLatin1("highlightedText: ") + TQColor2Str(colgrp.highlightedText()); TQString::fromLatin1("highlightedText: ") + TQColor2Str(colgrp.highlightedText());
return *this; return *this;
} }
@ -325,9 +325,9 @@ KDStream& KDStream::operator<<( const TQColorGroup& colgrp )
*/ */
KDStream& KDStream::operator<<( const TQPalette& palette ) KDStream& KDStream::operator<<( const TQPalette& palette )
{ {
*this << TQString::tqfromLatin1("active: ") << palette.active() << endl *this << TQString::fromLatin1("active: ") << palette.active() << endl
<< TQString::tqfromLatin1("inactive: ") << palette.inactive() << endl << TQString::fromLatin1("inactive: ") << palette.inactive() << endl
<< TQString::tqfromLatin1("diabled: ") << palette.disabled(); << TQString::fromLatin1("diabled: ") << palette.disabled();
return *this; return *this;
} }
@ -340,23 +340,23 @@ KDStream& KDStream::operator<<( const TQCursor& cursor )
{ {
TQString type; TQString type;
switch ( cursor.tqshape() ) { switch ( cursor.shape() ) {
case TQt::ArrowCursor: type = TQString::tqfromLatin1("ArrowCursor"); break; case TQt::ArrowCursor: type = TQString::fromLatin1("ArrowCursor"); break;
case TQt::UpArrowCursor: type = TQString::tqfromLatin1("UpArrowCursor"); break; case TQt::UpArrowCursor: type = TQString::fromLatin1("UpArrowCursor"); break;
case TQt::CrossCursor: type = TQString::tqfromLatin1("CrossCursor"); break; case TQt::CrossCursor: type = TQString::fromLatin1("CrossCursor"); break;
case TQt::WaitCursor: type = TQString::tqfromLatin1("WaitCursor"); break; case TQt::WaitCursor: type = TQString::fromLatin1("WaitCursor"); break;
case TQt::IbeamCursor: type = TQString::tqfromLatin1("IbeamCursor"); break; case TQt::IbeamCursor: type = TQString::fromLatin1("IbeamCursor"); break;
case TQt::SizeVerCursor: type = TQString::tqfromLatin1("SizeVerCursor"); break; case TQt::SizeVerCursor: type = TQString::fromLatin1("SizeVerCursor"); break;
case TQt::SizeHorCursor: type = TQString::tqfromLatin1("SizeHorCursor"); break; case TQt::SizeHorCursor: type = TQString::fromLatin1("SizeHorCursor"); break;
case TQt::SizeBDiagCursor: type = TQString::tqfromLatin1("SizeBDiagCursor"); break; case TQt::SizeBDiagCursor: type = TQString::fromLatin1("SizeBDiagCursor"); break;
case TQt::SizeFDiagCursor: type = TQString::tqfromLatin1("SizeFDiagCursor"); break; case TQt::SizeFDiagCursor: type = TQString::fromLatin1("SizeFDiagCursor"); break;
case TQt::SizeAllCursor: type = TQString::tqfromLatin1("SizeAllCursor"); break; case TQt::SizeAllCursor: type = TQString::fromLatin1("SizeAllCursor"); break;
case TQt::BlankCursor: type = TQString::tqfromLatin1("BlankCursor"); break; case TQt::BlankCursor: type = TQString::fromLatin1("BlankCursor"); break;
case TQt::SplitVCursor: type = TQString::tqfromLatin1("SplitVCursor"); break; case TQt::SplitVCursor: type = TQString::fromLatin1("SplitVCursor"); break;
case TQt::SplitHCursor: type = TQString::tqfromLatin1("SplitHCursor"); break; case TQt::SplitHCursor: type = TQString::fromLatin1("SplitHCursor"); break;
case TQt::PointingHandCursor: type = TQString::tqfromLatin1("PointingHandCursor"); break; case TQt::PointingHandCursor: type = TQString::fromLatin1("PointingHandCursor"); break;
case TQt::ForbiddenCursor: type = TQString::tqfromLatin1("ForbiddenCursor"); break; case TQt::ForbiddenCursor: type = TQString::fromLatin1("ForbiddenCursor"); break;
case TQt::BitmapCursor: type = TQString::tqfromLatin1("BitmapCursor"); break; case TQt::BitmapCursor: type = TQString::fromLatin1("BitmapCursor"); break;
} }
_output += type; _output += type;
@ -412,19 +412,19 @@ KDStream& KDStream::operator<<( const TQPen& pen )
{ {
TQString style; TQString style;
switch ( pen.style() ) { switch ( pen.style() ) {
case TQt::NoPen: style = TQString::tqfromLatin1("NoPen"); break; case TQt::NoPen: style = TQString::fromLatin1("NoPen"); break;
case TQt::SolidLine: style = TQString::tqfromLatin1("SolidLine"); break; case TQt::SolidLine: style = TQString::fromLatin1("SolidLine"); break;
case TQt::DashLine: style = TQString::tqfromLatin1("DashLine"); break; case TQt::DashLine: style = TQString::fromLatin1("DashLine"); break;
case TQt::DotLine: style = TQString::tqfromLatin1("DotLine"); break; case TQt::DotLine: style = TQString::fromLatin1("DotLine"); break;
case TQt::DashDotLine: style = TQString::tqfromLatin1("DashDotLine"); break; case TQt::DashDotLine: style = TQString::fromLatin1("DashDotLine"); break;
case TQt::DashDotDotLine : style = TQString::tqfromLatin1("DashDotDotLine "); break; case TQt::DashDotDotLine : style = TQString::fromLatin1("DashDotDotLine "); break;
case TQt::MPenStyle : break; // ignore case TQt::MPenStyle : break; // ignore
} }
_output += TQString::tqfromLatin1("TQPen(%1,%2,%3)") _output += TQString::fromLatin1("TQPen(%1,%2,%3)")
.tqarg( pen.width() ) .arg( pen.width() )
.tqarg( TQColor2Str( pen.color() ) ) .arg( TQColor2Str( pen.color() ) )
.tqarg( style ); .arg( style );
return *this; return *this;
} }
@ -433,7 +433,7 @@ KDStream& KDStream::operator<<( const TQPen& pen )
*/ */
KDStream& KDStream::operator<<( const TQPoint& point ) 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; return *this;
} }
@ -442,7 +442,7 @@ KDStream& KDStream::operator<<( const TQPoint& point )
*/ */
KDStream& KDStream::operator<<( const TQSize& size ) 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; return *this;
} }
@ -452,15 +452,15 @@ KDStream& KDStream::operator<<( const TQSize& size )
*/ */
KDStream& KDStream::operator<<( const TQRect& rect ) KDStream& KDStream::operator<<( const TQRect& rect )
{ {
TQString xplus = (rect.x() >= 0) ? TQString::tqfromLatin1("+") : TQString::tqfromLatin1(""); TQString xplus = (rect.x() >= 0) ? TQString::fromLatin1("+") : TQString::fromLatin1("");
TQString yplus = (rect.y() >= 0) ? TQString::tqfromLatin1("+") : TQString::tqfromLatin1(""); TQString yplus = (rect.y() >= 0) ? TQString::fromLatin1("+") : TQString::fromLatin1("");
_output += TQString::tqfromLatin1("%1x%2%3%4%5%6") _output += TQString::fromLatin1("%1x%2%3%4%5%6")
.tqarg( rect.width() ) .arg( rect.width() )
.tqarg( rect.height() ) .arg( rect.height() )
.tqarg( xplus ) .arg( xplus )
.tqarg( rect.x() ) .arg( rect.x() )
.tqarg( yplus ) .arg( yplus )
.tqarg( rect.y() ); .arg( rect.y() );
return *this; return *this;
} }
@ -474,43 +474,43 @@ KDStream& KDStream::operator<<( const TQRect& rect )
TQString KDStream::TQColor2Str( const TQColor& col ) TQString KDStream::TQColor2Str( const TQColor& col )
{ {
if ( col == TQt::black ) if ( col == TQt::black )
return TQString::tqfromLatin1("black"); return TQString::fromLatin1("black");
else if ( col == TQt::white ) else if ( col == TQt::white )
return TQString::tqfromLatin1("white"); return TQString::fromLatin1("white");
else if ( col == TQt::darkGray ) else if ( col == TQt::darkGray )
return TQString::tqfromLatin1("darkGray"); return TQString::fromLatin1("darkGray");
else if ( col == TQt::gray ) else if ( col == TQt::gray )
return TQString::tqfromLatin1("gray"); return TQString::fromLatin1("gray");
else if ( col == TQt::lightGray ) else if ( col == TQt::lightGray )
return TQString::tqfromLatin1("lightGray"); return TQString::fromLatin1("lightGray");
else if ( col == TQt::red ) else if ( col == TQt::red )
return TQString::tqfromLatin1("red"); return TQString::fromLatin1("red");
else if ( col == TQt::green ) else if ( col == TQt::green )
return TQString::tqfromLatin1("green"); return TQString::fromLatin1("green");
else if ( col == TQt::blue ) else if ( col == TQt::blue )
return TQString::tqfromLatin1("blue"); return TQString::fromLatin1("blue");
else if ( col == TQt::cyan ) else if ( col == TQt::cyan )
return TQString::tqfromLatin1("cyan"); return TQString::fromLatin1("cyan");
else if ( col == TQt::magenta ) else if ( col == TQt::magenta )
return TQString::tqfromLatin1("magenta"); return TQString::fromLatin1("magenta");
else if ( col == TQt::yellow ) else if ( col == TQt::yellow )
return TQString::tqfromLatin1("yellow"); return TQString::fromLatin1("yellow");
else if ( col == TQt::darkRed ) else if ( col == TQt::darkRed )
return TQString::tqfromLatin1("darkRed"); return TQString::fromLatin1("darkRed");
else if ( col == TQt::darkGreen ) else if ( col == TQt::darkGreen )
return TQString::tqfromLatin1("darkGreen"); return TQString::fromLatin1("darkGreen");
else if ( col == TQt::darkBlue ) else if ( col == TQt::darkBlue )
return TQString::tqfromLatin1("darkBlue"); return TQString::fromLatin1("darkBlue");
else if ( col == TQt::darkCyan ) else if ( col == TQt::darkCyan )
return TQString::tqfromLatin1("darkCyan"); return TQString::fromLatin1("darkCyan");
else if ( col == TQt::darkMagenta ) else if ( col == TQt::darkMagenta )
return TQString::tqfromLatin1("darkMagenta"); return TQString::fromLatin1("darkMagenta");
else if ( col == TQt::darkYellow ) else if ( col == TQt::darkYellow )
return TQString::tqfromLatin1("darkYellow"); return TQString::fromLatin1("darkYellow");
else if ( col == TQt::color0 ) else if ( col == TQt::color0 )
return TQString::tqfromLatin1("color0"); return TQString::fromLatin1("color0");
else if ( col == TQt::color1 ) else if ( col == TQt::color1 )
return TQString::tqfromLatin1("color1"); return TQString::fromLatin1("color1");
else else
return col.name(); return col.name();
} }
@ -521,17 +521,17 @@ TQString KDStream::TQColor2Str( const TQColor& col )
*/ */
KDStream& KDStream::operator<<( const TQObject& obj ) KDStream& KDStream::operator<<( const TQObject& obj )
{ {
*this << TQString::tqfromLatin1(obj.className()) + TQString::tqfromLatin1("(") + TQString::tqfromLatin1(obj.name()) << TQString::tqfromLatin1("):")<< endl; *this << TQString::fromLatin1(obj.className()) + TQString::fromLatin1("(") + TQString::fromLatin1(obj.name()) << TQString::fromLatin1("):")<< endl;
TQMetaObject* meta = obj.tqmetaObject(); TQMetaObject* meta = obj.metaObject();
TQStrList props = meta->propertyNames(true); TQStrList props = meta->propertyNames(true);
unsigned int maxWidth = 0; unsigned int maxWidth = 0;
for ( TQStrListIterator it(props) ; *it; ++it ) { 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 ) { 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; return *this;
} }
@ -544,7 +544,7 @@ KDStream& KDStream::operator<<( const TQVariant& var)
{ {
switch (var.type() ) 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::Map: *this << var.toMap(); break;
case TQVariant::List: *this << var.toList(); break; case TQVariant::List: *this << var.toList(); break;
case TQVariant::String: *this << var.toString(); 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::Color: *this << var.toColor(); break;
case TQVariant::Palette: *this << var.toPalette(); break; case TQVariant::Palette: *this << var.toPalette(); break;
case TQVariant::ColorGroup: *this << var.toColorGroup(); 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::Point: *this << var.toPoint(); break;
case TQVariant::Image: *this << var.toImage(); break; case TQVariant::Image: *this << var.toImage(); break;
case TQVariant::Int: *this << var.toInt(); 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::Double: *this << var.toDouble(); break;
case TQVariant::CString: *this << var.toCString(); break; case TQVariant::CString: *this << var.toCString(); break;
case TQVariant::PointArray: *this << var.toPointArray(); break; case TQVariant::PointArray: *this << var.toPointArray(); break;
case TQVariant::Region: *this << TQString::tqfromLatin1("-"); break; case TQVariant::Region: *this << TQString::fromLatin1("-"); break;
case TQVariant::Bitmap: *this << TQString::tqfromLatin1("-"); break; case TQVariant::Bitmap: *this << TQString::fromLatin1("-"); break;
case TQVariant::Cursor: *this << var.toCursor(); break; case TQVariant::Cursor: *this << var.toCursor(); break;
case TQVariant::SizePolicy: *this << var.toSizePolicy(); break; case TQVariant::SizePolicy: *this << var.toSizePolicy(); break;
case TQVariant::Date: *this << var.toDate(); break; case TQVariant::Date: *this << var.toDate(); break;
@ -592,24 +592,24 @@ KDStream& KDStream::operator<<( const TQBrush& brush)
TQString style; TQString style;
switch ( brush.style() ) switch ( brush.style() )
{ {
case TQt::NoBrush: style = TQString::tqfromLatin1("NoBrush"); break; case TQt::NoBrush: style = TQString::fromLatin1("NoBrush"); break;
case TQt::SolidPattern: style = TQString::tqfromLatin1("SolidPattern"); break; case TQt::SolidPattern: style = TQString::fromLatin1("SolidPattern"); break;
case TQt::Dense1Pattern: style = TQString::tqfromLatin1("Dense1Pattern"); break; case TQt::Dense1Pattern: style = TQString::fromLatin1("Dense1Pattern"); break;
case TQt::Dense2Pattern: style = TQString::tqfromLatin1("Dense2Pattern"); break; case TQt::Dense2Pattern: style = TQString::fromLatin1("Dense2Pattern"); break;
case TQt::Dense3Pattern: style = TQString::tqfromLatin1("Dense3Pattern"); break; case TQt::Dense3Pattern: style = TQString::fromLatin1("Dense3Pattern"); break;
case TQt::Dense4Pattern: style = TQString::tqfromLatin1("Dense4Pattern"); break; case TQt::Dense4Pattern: style = TQString::fromLatin1("Dense4Pattern"); break;
case TQt::Dense5Pattern: style = TQString::tqfromLatin1("Dense5Pattern"); break; case TQt::Dense5Pattern: style = TQString::fromLatin1("Dense5Pattern"); break;
case TQt::Dense6Pattern: style = TQString::tqfromLatin1("Dense6Pattern"); break; case TQt::Dense6Pattern: style = TQString::fromLatin1("Dense6Pattern"); break;
case TQt::Dense7Pattern: style = TQString::tqfromLatin1("Dense7Pattern"); break; case TQt::Dense7Pattern: style = TQString::fromLatin1("Dense7Pattern"); break;
case TQt::HorPattern: style = TQString::tqfromLatin1("HorPattern"); break; case TQt::HorPattern: style = TQString::fromLatin1("HorPattern"); break;
case TQt::VerPattern: style = TQString::tqfromLatin1("VerPattern"); break; case TQt::VerPattern: style = TQString::fromLatin1("VerPattern"); break;
case TQt::CrossPattern: style = TQString::tqfromLatin1("CrossPattern"); break; case TQt::CrossPattern: style = TQString::fromLatin1("CrossPattern"); break;
case TQt::BDiagPattern: style = TQString::tqfromLatin1("BDiagPattern"); break; case TQt::BDiagPattern: style = TQString::fromLatin1("BDiagPattern"); break;
case TQt::FDiagPattern: style = TQString::tqfromLatin1("FDiagPattern"); break; case TQt::FDiagPattern: style = TQString::fromLatin1("FDiagPattern"); break;
case TQt::DiagCrossPattern: style = TQString::tqfromLatin1("DiagCrossPattern"); break; case TQt::DiagCrossPattern: style = TQString::fromLatin1("DiagCrossPattern"); break;
case TQt::CustomPattern: style = TQString::tqfromLatin1("CustomPattern"); 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; return *this;
} }
@ -624,27 +624,27 @@ KDStream& KDStream::operator<<( const TQSizePolicy& policy)
switch ( policy.horData() ) switch ( policy.horData() )
{ {
case TQSizePolicy::Fixed: hor=TQString::tqfromLatin1("Fixed"); break; case TQSizePolicy::Fixed: hor=TQString::fromLatin1("Fixed"); break;
case TQSizePolicy::Minimum : hor=TQString::tqfromLatin1("Minimum "); break; case TQSizePolicy::Minimum : hor=TQString::fromLatin1("Minimum "); break;
case TQSizePolicy::Maximum: hor=TQString::tqfromLatin1("Maximum"); break; case TQSizePolicy::Maximum: hor=TQString::fromLatin1("Maximum"); break;
case TQSizePolicy::Preferred: hor=TQString::tqfromLatin1("Preferred"); break; case TQSizePolicy::Preferred: hor=TQString::fromLatin1("Preferred"); break;
case TQSizePolicy::MinimumExpanding: hor=TQString::tqfromLatin1("MinimumExpanding"); break; case TQSizePolicy::MinimumExpanding: hor=TQString::fromLatin1("MinimumExpanding"); break;
case TQSizePolicy::Expanding: hor=TQString::tqfromLatin1("Expanding"); break; case TQSizePolicy::Expanding: hor=TQString::fromLatin1("Expanding"); break;
case TQSizePolicy::Ignored: hor=TQString::tqfromLatin1("Ignored"); break; case TQSizePolicy::Ignored: hor=TQString::fromLatin1("Ignored"); break;
} }
switch ( policy.verData() ) switch ( policy.verData() )
{ {
case TQSizePolicy::Fixed: ver=TQString::tqfromLatin1("Fixed"); break; case TQSizePolicy::Fixed: ver=TQString::fromLatin1("Fixed"); break;
case TQSizePolicy::Minimum : ver=TQString::tqfromLatin1("Minimum "); break; case TQSizePolicy::Minimum : ver=TQString::fromLatin1("Minimum "); break;
case TQSizePolicy::Maximum: ver=TQString::tqfromLatin1("Maximum"); break; case TQSizePolicy::Maximum: ver=TQString::fromLatin1("Maximum"); break;
case TQSizePolicy::Preferred: ver=TQString::tqfromLatin1("Preferred"); break; case TQSizePolicy::Preferred: ver=TQString::fromLatin1("Preferred"); break;
case TQSizePolicy::MinimumExpanding: ver=TQString::tqfromLatin1("MinimumExpanding"); break; case TQSizePolicy::MinimumExpanding: ver=TQString::fromLatin1("MinimumExpanding"); break;
case TQSizePolicy::Expanding: ver=TQString::tqfromLatin1("Expanding"); break; case TQSizePolicy::Expanding: ver=TQString::fromLatin1("Expanding"); break;
case TQSizePolicy::Ignored: ver=TQString::tqfromLatin1("Ignored"); break; case TQSizePolicy::Ignored: ver=TQString::fromLatin1("Ignored"); break;
} }
TQString hforw = policy.hasHeightForWidth() ? TQString::tqfromLatin1("true") : TQString::tqfromLatin1("false"); TQString hforw = policy.hasHeightForWidth() ? TQString::fromLatin1("true") : TQString::fromLatin1("false");
_output += TQString::tqfromLatin1("TQSizePolicy(hor=%1,ver=%2, hasHeightForWidth=%3)") _output += TQString::fromLatin1("TQSizePolicy(hor=%1,ver=%2, hasHeightForWidth=%3)")
.tqarg(hor).tqarg(ver).tqarg(hforw); .arg(hor).arg(ver).arg(hforw);
return *this; return *this;
} }
@ -672,8 +672,8 @@ KDStream& KDStream::operator<<( const TQStrList& list )
KDStream& KDStream::operator<<( const TQPixmap& pixmap ) KDStream& KDStream::operator<<( const TQPixmap& pixmap )
{ {
_output += TQString("TQPixmap[null=%1,width=%2,heigth=%3,depth=%4,hasMask=%5,hasAlpha=%6]") _output += TQString("TQPixmap[null=%1,width=%2,heigth=%3,depth=%4,hasMask=%5,hasAlpha=%6]")
.tqarg(pixmap.isNull()).tqarg(pixmap.width()).tqarg(pixmap.height()) .arg(pixmap.isNull()).arg(pixmap.width()).arg(pixmap.height())
.tqarg(pixmap.depth()).tqarg(pixmap.mask() != 0).tqarg(pixmap.hasAlpha() ); .arg(pixmap.depth()).arg(pixmap.mask() != 0).arg(pixmap.hasAlpha() );
return *this; return *this;
} }
@ -681,8 +681,8 @@ KDStream& KDStream::operator<<( const TQPixmap& pixmap )
KDStream& KDStream::operator<<( const TQImage& pixmap ) KDStream& KDStream::operator<<( const TQImage& pixmap )
{ {
_output += TQString("TQImage[null=%1,width=%2,heigth=%3,depth=%4,hasAlpha=%5]") _output += TQString("TQImage[null=%1,width=%2,heigth=%3,depth=%4,hasAlpha=%5]")
.tqarg(pixmap.isNull()).tqarg(pixmap.width()).tqarg(pixmap.height()) .arg(pixmap.isNull()).arg(pixmap.width()).arg(pixmap.height())
.tqarg(pixmap.depth()).tqarg(pixmap.hasAlphaBuffer() ); .arg(pixmap.depth()).arg(pixmap.hasAlphaBuffer() );
return *this; return *this;
} }

@ -24,7 +24,7 @@
// Include files for TQt // Include files for TQt
#include <tqvbox.h> #include <tqvbox.h>
#include <tqlayout.h> #include <layout.h>
#include <tqdir.h> #include <tqdir.h>
#include <tqwidget.h> #include <tqwidget.h>
#include <tqgroupbox.h> #include <tqgroupbox.h>
@ -106,25 +106,25 @@ public:
private: private:
int m_messagetype; 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 ); TQColorGroup _cg( cg );
if ( m_messagetype == KIPI::ErrorMessage ) if ( m_messagetype == KIPI::ErrorMessage )
{ {
_cg.setColor( TQColorGroup::Text, TQt::red ); _cg.setColor( TQColorGroup::Text, TQt::red );
KListViewItem::paintCell( p, _cg, column, width, tqalignment ); KListViewItem::paintCell( p, _cg, column, width, alignment );
return; return;
} }
if ( m_messagetype == KIPI::WarningMessage ) if ( m_messagetype == KIPI::WarningMessage )
{ {
_cg.setColor( TQColorGroup::Text, TQt::darkYellow ); _cg.setColor( TQColorGroup::Text, TQt::darkYellow );
KListViewItem::paintCell( p, _cg, column, width, tqalignment ); KListViewItem::paintCell( p, _cg, column, width, alignment );
return; 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 ); TQFrame *headerFrame = new TQFrame( box );
headerFrame->setFrameStyle(TQFrame::Panel|TQFrame::Sunken); headerFrame->setFrameStyle(TQFrame::Panel|TQFrame::Sunken);
TQHBoxLayout* tqlayout = new TQHBoxLayout( headerFrame ); TQHBoxLayout* layout = new TQHBoxLayout( headerFrame );
tqlayout->setMargin( 2 ); // to make sure the frame gets displayed layout->setMargin( 2 ); // to make sure the frame gets displayed
tqlayout->setSpacing( 0 ); layout->setSpacing( 0 );
TQLabel *pixmapLabelLeft = new TQLabel( headerFrame, "pixmapLabelLeft" ); TQLabel *pixmapLabelLeft = new TQLabel( headerFrame, "pixmapLabelLeft" );
pixmapLabelLeft->setScaledContents( false ); pixmapLabelLeft->setScaledContents( false );
tqlayout->addWidget( pixmapLabelLeft ); layout->addWidget( pixmapLabelLeft );
TQLabel *labelTitle = new TQLabel( caption, headerFrame, "labelTitle" ); TQLabel *labelTitle = new TQLabel( caption, headerFrame, "labelTitle" );
tqlayout->addWidget( labelTitle ); layout->addWidget( labelTitle );
tqlayout->setStretchFactor( labelTitle, 1 ); layout->setStretchFactor( labelTitle, 1 );
TQString dir; TQString dir;
KGlobal::dirs()->addResourceType("kipi_banner_left", KGlobal::dirs()->kde_default("data") + "kipi/data"); KGlobal::dirs()->addResourceType("kipi_banner_left", KGlobal::dirs()->kde_default("data") + "kipi/data");

@ -23,7 +23,7 @@
// TQt includes. // TQt includes.
#include <tqheader.h> #include <tqheader.h>
#include <tqlayout.h> #include <layout.h>
#include <tqpushbutton.h> #include <tqpushbutton.h>
#include <tqlabel.h> #include <tqlabel.h>
#include <tqvgroupbox.h> #include <tqvgroupbox.h>
@ -108,7 +108,7 @@ ImageCollectionSelector::ImageCollectionSelector(TQWidget* parent, Interface* in
TQPushButton* selectAll=box->addButton(i18n("Select All")); TQPushButton* selectAll=box->addButton(i18n("Select All"));
TQPushButton* invertSelection=box->addButton(i18n("Invert Selection")); TQPushButton* invertSelection=box->addButton(i18n("Invert Selection"));
TQPushButton* selectNone=box->addButton(i18n("Select None")); TQPushButton* selectNone=box->addButton(i18n("Select None"));
box->tqlayout(); box->layout();
connect(selectAll, TQT_SIGNAL(clicked()), connect(selectAll, TQT_SIGNAL(clicked()),
this, TQT_SLOT(slotSelectAll()) ); this, TQT_SLOT(slotSelectAll()) );
@ -129,7 +129,7 @@ ImageCollectionSelector::ImageCollectionSelector(TQWidget* parent, Interface* in
{ {
d->_thumbLabel = new TQLabel(rightBox); d->_thumbLabel = new TQLabel(rightBox);
d->_thumbLabel->setFixedSize(TQSize(128,128)); d->_thumbLabel->setFixedSize(TQSize(128,128));
d->_thumbLabel->tqsetAlignment(AlignHCenter | AlignVCenter); d->_thumbLabel->setAlignment(AlignHCenter | AlignVCenter);
} }
else else
{ {

@ -25,7 +25,7 @@
#include <tqguardedptr.h> #include <tqguardedptr.h>
#include <tqlabel.h> #include <tqlabel.h>
#include <tqsplitter.h> #include <tqsplitter.h>
#include <tqlayout.h> #include <layout.h>
#include <tqframe.h> #include <tqframe.h>
#include <tqpushbutton.h> #include <tqpushbutton.h>
#include <tqtimer.h> #include <tqtimer.h>
@ -101,15 +101,15 @@ ImageDialog::ImageDialog(TQWidget* parent, KIPI::Interface* interface,
TQFrame *headerFrame = new TQFrame( box ); TQFrame *headerFrame = new TQFrame( box );
headerFrame->setFrameStyle(TQFrame::Panel|TQFrame::Sunken); headerFrame->setFrameStyle(TQFrame::Panel|TQFrame::Sunken);
TQHBoxLayout* tqlayout = new TQHBoxLayout( headerFrame ); TQHBoxLayout* layout = new TQHBoxLayout( headerFrame );
tqlayout->setMargin( 2 ); // to make sure the frame gets displayed layout->setMargin( 2 ); // to make sure the frame gets displayed
tqlayout->setSpacing( 0 ); layout->setSpacing( 0 );
TQLabel *pixmapLabelLeft = new TQLabel( headerFrame, "pixmapLabelLeft" ); TQLabel *pixmapLabelLeft = new TQLabel( headerFrame, "pixmapLabelLeft" );
pixmapLabelLeft->setScaledContents( false ); pixmapLabelLeft->setScaledContents( false );
tqlayout->addWidget( pixmapLabelLeft ); layout->addWidget( pixmapLabelLeft );
TQLabel *labelTitle = new TQLabel( i18n("Select Image From Album"), headerFrame, "labelTitle" ); TQLabel *labelTitle = new TQLabel( i18n("Select Image From Album"), headerFrame, "labelTitle" );
tqlayout->addWidget( labelTitle ); layout->addWidget( labelTitle );
tqlayout->setStretchFactor( labelTitle, 1 ); layout->setStretchFactor( labelTitle, 1 );
dvlay->addWidget( headerFrame ); dvlay->addWidget( headerFrame );
TQString directory; TQString directory;
@ -156,7 +156,7 @@ ImageDialog::ImageDialog(TQWidget* parent, KIPI::Interface* interface,
d->_imageList->setResizeMode(TQListView::LastColumn); d->_imageList->setResizeMode(TQListView::LastColumn);
d->_preview=new TQLabel(splitter); d->_preview=new TQLabel(splitter);
d->_preview->tqsetAlignment(AlignHCenter | AlignVCenter | WordBreak); d->_preview->setAlignment(AlignHCenter | AlignVCenter | WordBreak);
d->_preview->setFixedWidth(PREVIEW_SIZE); d->_preview->setFixedWidth(PREVIEW_SIZE);
d->_preview->setText(i18n("No image selected")); d->_preview->setText(i18n("No image selected"));

@ -83,7 +83,7 @@ void KIPI::Plugin::setup( TQWidget* widget )
{ {
d->m_defaultWidget = widget; d->m_defaultWidget = widget;
d->m_actions.insert( widget, KActionPtrList() ); 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 ) ); d->m_actionCollection.insert( widget, new KActionCollection( widget, TQT_TQOBJECT(widget), name.latin1(), d->m_instance ) );
} }

@ -33,7 +33,7 @@
#include "interface.h" #include "interface.h"
#include <kconfig.h> #include <kconfig.h>
#include <tqcheckbox.h> #include <tqcheckbox.h>
#include <tqlayout.h> #include <layout.h>
/** /**
\author Renchi Raju \author Renchi Raju
@ -55,9 +55,9 @@
Then plugin plugins into menus could be done with code similiar to this from KimDaBa: Then plugin plugins into menus could be done with code similiar to this from KimDaBa:
\code \code
void slotReplug() { void slotReplug() {
unplugActionList( TQString::tqfromLatin1("file_actions") ); unplugActionList( TQString::fromLatin1("file_actions") );
unplugActionList( TQString::tqfromLatin1("image_actions") ); unplugActionList( TQString::fromLatin1("image_actions") );
unplugActionList( TQString::tqfromLatin1("tool_actions") ); unplugActionList( TQString::fromLatin1("tool_actions") );
TQPtrList<KAction> fileActions; TQPtrList<KAction> fileActions;
TQPtrList<KAction> imageActions; TQPtrList<KAction> imageActions;
@ -94,9 +94,9 @@
} }
// For this to work I need to pass false as second arg for createGUI // For this to work I need to pass false as second arg for createGUI
plugActionList( TQString::tqfromLatin1("file_actions"), fileActions ); plugActionList( TQString::fromLatin1("file_actions"), fileActions );
plugActionList( TQString::tqfromLatin1("image_actions"), imageActions ); plugActionList( TQString::fromLatin1("image_actions"), imageActions );
plugActionList( TQString::tqfromLatin1("tool_actions"), toolsActions ); plugActionList( TQString::fromLatin1("tool_actions"), toolsActions );
} }
\endcode \endcode
@ -206,7 +206,7 @@ PluginLoader::PluginLoader( const TQStringList& ignores, Interface* interface )
KTrader::OfferList offers = KTrader::self()->query("KIPI/Plugin"); KTrader::OfferList offers = KTrader::self()->query("KIPI/Plugin");
KConfig* config = KGlobal::config(); KConfig* config = KGlobal::config();
config->setGroup( TQString::tqfromLatin1( "KIPI/EnabledPlugin" ) ); config->setGroup( TQString::fromLatin1( "KIPI/EnabledPlugin" ) );
KTrader::OfferList::ConstIterator iter; KTrader::OfferList::ConstIterator iter;
for(iter = offers.begin(); iter != offers.end(); ++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 name = service->name();
TQString comment = service->comment(); TQString comment = service->comment();
TQString library = service->library(); 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() ) { if (library.isEmpty() || name.isEmpty() ) {
kdWarning( 51001 ) << "KIPI::PluginLoader: Plugin had an empty name or library file - this should not happen." << endl; 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() void ConfigWidget::apply()
{ {
KConfig* config = KGlobal::config(); KConfig* config = KGlobal::config();
config->setGroup( TQString::tqfromLatin1( "KIPI/EnabledPlugin" ) ); config->setGroup( TQString::fromLatin1( "KIPI/EnabledPlugin" ) );
bool changes = false; bool changes = false;
for( TQValueList<PluginCheckBox*>::Iterator it = d->_boxes.begin(); it != d->_boxes.end(); ++it ) { for( TQValueList<PluginCheckBox*>::Iterator it = d->_boxes.begin(); it != d->_boxes.end(); ++it ) {

@ -22,7 +22,7 @@
// TQt includes. // TQt includes.
#include <tqlayout.h> #include <layout.h>
#include <tqheader.h> #include <tqheader.h>
#include <tqlistview.h> #include <tqlistview.h>
#include <tqdir.h> #include <tqdir.h>
@ -66,10 +66,10 @@ KIPI::UploadWidget::UploadWidget( KIPI::Interface* interface, TQWidget* parent,
{ {
d = new Private; d = new Private;
TQVBoxLayout* tqlayout = new TQVBoxLayout( this, 0 ); TQVBoxLayout* layout = new TQVBoxLayout( this, 0 );
d->m_treeView = new KFileTreeView( this ); d->m_treeView = new KFileTreeView( this );
d->m_treeView->setRootIsDecorated( true ); 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. // Fetch the current album, so we can start out there.
KIPI::ImageCollection album = interface->currentAlbum(); KIPI::ImageCollection album = interface->currentAlbum();
@ -180,7 +180,7 @@ void KIPI::UploadWidget::mkdir()
bool ok; bool ok;
TQString dir = KInputDialog::getText( i18n("Create Directory"), TQString dir = KInputDialog::getText( i18n("Create Directory"),
i18n("<qt>Enter new directory name (to be created as subdir of %1):</qt>") i18n("<qt>Enter new directory name (to be created as subdir of %1):</qt>")
.tqarg(path().prettyURL()), "", &ok, this); .arg(path().prettyURL()), "", &ok, this);
if (!ok) return; if (!ok) return;

Loading…
Cancel
Save