Remove additional unneeded tq method conversions

master
Timothy Pearson 13 years ago
parent 8712ab46f5
commit 28d9c77436

@ -84,7 +84,7 @@ bool AboutWidget::eventFilter( TQObject *o, TQEvent *e )
{ {
if ( e->type() == TQEvent::MouseButtonPress ) { if ( e->type() == TQEvent::MouseButtonPress ) {
TQMouseEvent *ev = TQT_TQMOUSEEVENT( e ); TQMouseEvent *ev = TQT_TQMOUSEEVENT( e );
if ( !m_homepage->tqgeometry().contains( ev->pos() ) ) { if ( !m_homepage->geometry().contains( ev->pos() ) ) {
deleteLater(); deleteLater();
return true; return true;
} }

@ -310,8 +310,8 @@ void ImageWindow::updateGeometry( int imWidth, int imHeight )
TQString caption = i18n( "Filename (Imagewidth x Imageheight)", TQString caption = i18n( "Filename (Imagewidth x Imageheight)",
"%3 (%1 x %2)" ); "%3 (%1 x %2)" );
caption = caption.tqarg( m_kuim->originalWidth() ). caption = caption.arg( m_kuim->originalWidth() ).
tqarg( m_kuim->originalHeight() ).tqarg( m_kuim->url().prettyURL() ); arg( m_kuim->originalHeight() ).arg( m_kuim->url().prettyURL() );
setCaption( kapp->makeStdCaption( caption ) ); setCaption( kapp->makeStdCaption( caption ) );
} }
@ -403,7 +403,7 @@ void ImageWindow::scrollImage( int x, int y, bool restrict )
// XUnmapWindow(); // XUnmapWindow();
// XSetWindowBackgroundPixmap() // XSetWindowBackgroundPixmap()
// resize window to fit image size, center image // resize window to fit image size, center image
// XClearWindow(); // tqrepaint // XClearWindow(); // repaint
// XMapWindow(), XSync(); // XMapWindow(), XSync();
// //
bool ImageWindow::showNextImage( const KURL& url ) bool ImageWindow::showNextImage( const KURL& url )
@ -412,7 +412,7 @@ bool ImageWindow::showNextImage( const KURL& url )
switch ( file->waitForDownload( this ) ) { switch ( file->waitForDownload( this ) ) {
case KuickFile::ERROR: case KuickFile::ERROR:
{ {
TQString tmp = i18n("Unable to download the image from %1.").tqarg(url.prettyURL()); TQString tmp = i18n("Unable to download the image from %1.").arg(url.prettyURL());
emit sigImageError( file, tmp ); emit sigImageError( file, tmp );
return false; return false;
} }
@ -430,7 +430,7 @@ bool ImageWindow::showNextImage( KuickFile *file )
if ( !loadImage( file ) ) { if ( !loadImage( file ) ) {
TQString tmp = i18n("Unable to load the image %1.\n" TQString tmp = i18n("Unable to load the image %1.\n"
"Perhaps the file format is unsupported or " "Perhaps the file format is unsupported or "
"your Imlib is not installed properly.").tqarg(file->url().prettyURL()); "your Imlib is not installed properly.").arg(file->url().prettyURL());
emit sigImageError( file, tmp ); emit sigImageError( file, tmp );
return false; return false;
} }
@ -1203,7 +1203,7 @@ bool ImageWindow::canZoomTo( int newWidth, int newHeight )
return KMessageBox::warningContinueCancel( return KMessageBox::warningContinueCancel(
this, this,
i18n("You are about to view a very large image (%1 x %2 pixels), which can be very resource-consuming and even make your computer hang.\nDo you want to continue?") i18n("You are about to view a very large image (%1 x %2 pixels), which can be very resource-consuming and even make your computer hang.\nDo you want to continue?")
.tqarg( newWidth ).tqarg( newHeight ), .arg( newWidth ).arg( newHeight ),
TQString(), TQString(),
KStdGuiItem::cont(), KStdGuiItem::cont(),
"ImageWindow_confirm_very_large_window" "ImageWindow_confirm_very_large_window"

@ -475,7 +475,7 @@ void ImlibWidget::setBackgroundColor( const TQColor& color )
{ {
myBackgroundColor = color; myBackgroundColor = color;
setPalette( TQPalette( myBackgroundColor )); setPalette( TQPalette( myBackgroundColor ));
tqrepaint( false); // FIXME - false? necessary at all? repaint( false); // FIXME - false? necessary at all?
} }
const TQColor& ImlibWidget::backgroundColor() const const TQColor& ImlibWidget::backgroundColor() const
@ -515,7 +515,7 @@ void ImlibWidget::setBusyCursor()
void ImlibWidget::restoreCursor() void ImlibWidget::restoreCursor()
{ {
if ( cursor().shape() == KCursor::waitCursor().tqshape() ) // only if nobody changed the cursor in the meantime! if ( cursor().shape() == KCursor::waitCursor().shape() ) // only if nobody changed the cursor in the meantime!
setCursor( m_oldCursor ); setCursor( m_oldCursor );
} }

@ -106,8 +106,8 @@ KuickFile::DownloadStatus KuickFile::waitForDownload( TQWidget *parent )
KProgressDialog *dialog = new KProgressDialog( parent ); KProgressDialog *dialog = new KProgressDialog( parent );
dialog->setModal( true ); dialog->setModal( true );
dialog->setCaption( i18n("Downloading %1...").tqarg( m_url.fileName() ) ); dialog->setCaption( i18n("Downloading %1...").arg( m_url.fileName() ) );
dialog->setLabel( i18n("Please wait while downloading\n%1").tqarg( m_url.prettyURL() )); dialog->setLabel( i18n("Please wait while downloading\n%1").arg( m_url.prettyURL() ));
dialog->setAllowCancel( true ); dialog->setAllowCancel( true );
dialog->setAutoClose( true ); dialog->setAutoClose( true );

@ -133,7 +133,7 @@ KuickShow::KuickShow( const char *name )
if ( KMessageBox::warningYesNo( if ( KMessageBox::warningYesNo(
this, this,
i18n("Do you really want to display this 1 image at the same time? This might be quite resource intensive and could overload your computer.<br>If you choose %1, only the first image will be shown.", i18n("Do you really want to display this 1 image at the same time? This might be quite resource intensive and could overload your computer.<br>If you choose %1, only the first image will be shown.",
"Do you really want to display these %n images at the same time? This might be quite resource intensive and could overload your computer.<br>If you choose %1, only the first image will be shown.", numArgs).tqarg(KStdGuiItem::no().plainText()), "Do you really want to display these %n images at the same time? This might be quite resource intensive and could overload your computer.<br>If you choose %1, only the first image will be shown.", numArgs).arg(KStdGuiItem::no().plainText()),
i18n("Display Multiple Images?")) i18n("Display Multiple Images?"))
!= KMessageBox::Yes ) != KMessageBox::Yes )
{ {
@ -253,7 +253,7 @@ void KuickShow::initGUI( const KURL& startDir )
coll, "kuick_print" ); coll, "kuick_print" );
print->setText( i18n("Print Image...") ); print->setText( i18n("Print Image...") );
KAction *configure = new KAction( i18n("Configure %1...").tqarg( KGlobal::instance()->aboutData()->programName() ), "configure", KAction *configure = new KAction( i18n("Configure %1...").arg( KGlobal::instance()->aboutData()->programName() ), "configure",
KShortcut(), KShortcut(),
TQT_TQOBJECT(this), TQT_SLOT( configuration() ), TQT_TQOBJECT(this), TQT_SLOT( configuration() ),
coll, "kuick_configure" ); coll, "kuick_configure" );
@ -552,7 +552,7 @@ bool KuickShow::showImage( const KFileItem *fi,
TQT_TQOBJECT(this), TQT_SLOT (slotTrashCurrentImage (ImageWindow *))); TQT_TQOBJECT(this), TQT_SLOT (slotTrashCurrentImage (ImageWindow *)));
if ( s_viewers.count() == 1 && moveToTopLeft ) { if ( s_viewers.count() == 1 && moveToTopLeft ) {
// we have to move to 0x0 before showing _and_ // we have to move to 0x0 before showing _and_
// after showing, otherwise we get some bogus tqgeometry() // after showing, otherwise we get some bogus geometry()
m_viewer->move( Kuick::workArea().topLeft() ); m_viewer->move( Kuick::workArea().topLeft() );
} }
@ -641,7 +641,7 @@ void KuickShow::performDeleteCurrentImage(TQWidget *parent)
if (KMessageBox::warningContinueCancel( if (KMessageBox::warningContinueCancel(
parent, parent,
i18n("<qt>Do you really want to delete\n <b>'%1'</b>?</qt>").tqarg(item->url().pathOrURL()), i18n("<qt>Do you really want to delete\n <b>'%1'</b>?</qt>").arg(item->url().pathOrURL()),
i18n("Delete File"), i18n("Delete File"),
KStdGuiItem::del(), KStdGuiItem::del(),
"Kuick_delete_current_image") "Kuick_delete_current_image")
@ -666,7 +666,7 @@ void KuickShow::performTrashCurrentImage(TQWidget *parent)
if (KMessageBox::warningContinueCancel( if (KMessageBox::warningContinueCancel(
parent, parent,
i18n("<qt>Do you really want to trash\n <b>'%1'</b>?</qt>").tqarg(item->url().pathOrURL()), i18n("<qt>Do you really want to trash\n <b>'%1'</b>?</qt>").arg(item->url().pathOrURL()),
i18n("Trash File"), i18n("Trash File"),
KGuiItem(i18n("to trash", "&Trash"),"edittrash"), KGuiItem(i18n("to trash", "&Trash"),"edittrash"),
"Kuick_trash_current_image") "Kuick_trash_current_image")

@ -52,7 +52,7 @@ bool Printing::printImage( ImageWindow& imageWin, TQWidget *parent )
KPrinter::addDialogPage( new KuickPrintDialogPage( parent, "kuick page")); KPrinter::addDialogPage( new KuickPrintDialogPage( parent, "kuick page"));
if ( printer.setup( parent, i18n("Print %1").tqarg(printer.docName().section('/', -1)) ) ) if ( printer.setup( parent, i18n("Print %1").arg(printer.docName().section('/', -1)) ) )
{ {
KTempFile tmpFile( TQString(), ".png" ); KTempFile tmpFile( TQString(), ".png" );
if ( tmpFile.status() == 0 ) if ( tmpFile.status() == 0 )
@ -109,7 +109,7 @@ bool Printing::printImageWithTQt( const TQString& filename, KPrinter& printer,
bool shrinkToFit = (printer.option( "app-kuickshow-shrinkToFit" ) != f); bool shrinkToFit = (printer.option( "app-kuickshow-shrinkToFit" ) != f);
TQSize imagesize = image.size(); TQSize imagesize = image.size();
if ( shrinkToFit && (image.width() > w || image.height() > h) ) { if ( shrinkToFit && (image.width() > w || image.height() > h) ) {
imagesize.tqscale( w, h, TQSize::ScaleMin ); imagesize.scale( w, h, TQSize::ScaleMin );
} }
@ -117,28 +117,28 @@ bool Printing::printImageWithTQt( const TQString& filename, KPrinter& printer,
// align image // align image
// //
bool ok = false; bool ok = false;
int tqalignment = printer.option("app-kuickshow-tqalignment").toInt( &ok ); int alignment = printer.option("app-kuickshow-alignment").toInt( &ok );
if ( !ok ) if ( !ok )
tqalignment = TQt::AlignCenter; // default alignment = TQt::AlignCenter; // default
int x = 0; int x = 0;
int y = 0; int y = 0;
// ### need a GUI for this in KuickPrintDialogPage! // ### need a GUI for this in KuickPrintDialogPage!
// x - tqalignment // x - alignment
if ( tqalignment & TQt::AlignHCenter ) if ( alignment & TQt::AlignHCenter )
x = (w - imagesize.width())/2; x = (w - imagesize.width())/2;
else if ( tqalignment & TQt::AlignLeft ) else if ( alignment & TQt::AlignLeft )
x = 0; x = 0;
else if ( tqalignment & TQt::AlignRight ) else if ( alignment & TQt::AlignRight )
x = w - imagesize.width(); x = w - imagesize.width();
// y - tqalignment // y - alignment
if ( tqalignment & TQt::AlignVCenter ) if ( alignment & TQt::AlignVCenter )
y = (h - imagesize.height())/2; y = (h - imagesize.height())/2;
else if ( tqalignment & TQt::AlignTop ) else if ( alignment & TQt::AlignTop )
y = 0; y = 0;
else if ( tqalignment & TQt::AlignBottom ) else if ( alignment & TQt::AlignBottom )
y = h - imagesize.height(); y = h - imagesize.height();
// //
@ -258,7 +258,7 @@ void KuickPrintDialogPage::getOptions( TQMap<TQString,TQString>& opts,
TQString t = "true"; TQString t = "true";
TQString f = "false"; TQString f = "false";
// ### opts["app-kuickshow-tqalignment"] = ; // ### opts["app-kuickshow-alignment"] = ;
opts["app-kuickshow-printFilename"] = m_addFileName->isChecked() ? t : f; opts["app-kuickshow-printFilename"] = m_addFileName->isChecked() ? t : f;
opts["app-kuickshow-blackwhite"] = m_blackwhite->isChecked() ? t : f; opts["app-kuickshow-blackwhite"] = m_blackwhite->isChecked() ? t : f;
opts["app-kuickshow-shrinkToFit"] = m_shrinkToFit->isChecked() ? t : f; opts["app-kuickshow-shrinkToFit"] = m_shrinkToFit->isChecked() ? t : f;

Loading…
Cancel
Save