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

This reverts commit b42866db72.
master
Timothy Pearson 13 years ago
parent b42866db72
commit 667d346fef

@ -41,7 +41,7 @@ AboutWidget::AboutWidget( TQWidget *parent, const char *name )
TQGroupBox *gBox = new TQGroupBox( 1,Qt::Horizontal, this); TQGroupBox *gBox = new TQGroupBox( 1,Qt::Horizontal, this);
gBox->setGeometry( 10, 10, width()-20, height()-20 ); gBox->setGeometry( 10, 10, width()-20, height()-20 );
gBox->setAlignment( AlignHCenter ); gBox->tqsetAlignment( AlignHCenter );
gBox->installEventFilter( this ); gBox->installEventFilter( this );
gBox->setPalette( TQPalette( TQColor( white ) ) ); gBox->setPalette( TQPalette( TQColor( white ) ) );
@ -57,14 +57,14 @@ AboutWidget::AboutWidget( TQWidget *parent, const char *name )
TQLabel *authors = new TQLabel("Kuickshow " KUICKSHOWVERSION TQLabel *authors = new TQLabel("Kuickshow " KUICKSHOWVERSION
" was brought to you by", gBox); " was brought to you by", gBox);
authors->setAlignment( AlignCenter ); authors->tqsetAlignment( AlignCenter );
m_homepage = new KURLWidget("Carsten Pfeiffer", gBox); m_homepage = new KURLWidget("Carsten Pfeiffer", gBox);
m_homepage->setURL( "http://devel-home.kde.org/~pfeiffer/kuickshow/" ); m_homepage->setURL( "http://devel-home.kde.org/~pfeiffer/kuickshow/" );
m_homepage->setAlignment( AlignCenter ); m_homepage->tqsetAlignment( AlignCenter );
TQLabel *copy = new TQLabel("(C) 1998-2006", gBox); TQLabel *copy = new TQLabel("(C) 1998-2006", gBox);
copy->setAlignment( AlignCenter ); copy->tqsetAlignment( AlignCenter );
ImlibWidget *im = new ImlibWidget( 0L, gBox, "KuickShow Logo" ); ImlibWidget *im = new ImlibWidget( 0L, gBox, "KuickShow Logo" );
if ( im->loadImage( file ) ) if ( im->loadImage( file ) )
@ -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->geometry().contains( ev->pos() ) ) { if ( !m_homepage->tqgeometry().contains( ev->pos() ) ) {
deleteLater(); deleteLater();
return true; return true;
} }

@ -19,7 +19,7 @@
#include <tqcheckbox.h> #include <tqcheckbox.h>
#include <tqgroupbox.h> #include <tqgroupbox.h>
#include <tqlabel.h> #include <tqlabel.h>
#include <layout.h> #include <tqlayout.h>
#include <tqvgroupbox.h> #include <tqvgroupbox.h>
#include <kcombobox.h> #include <kcombobox.h>
@ -92,7 +92,7 @@ DefaultsWidget::DefaultsWidget( TQWidget *parent, const char *name)
// -- // --
gbPreview = new TQGroupBox( i18n("Preview"), this ); gbPreview = new TQGroupBox( i18n("Preview"), this );
gbPreview->setAlignment( AlignCenter ); gbPreview->tqsetAlignment( AlignCenter );
lbImOrig = new TQLabel( i18n("Original"), gbPreview ); lbImOrig = new TQLabel( i18n("Original"), gbPreview );
imOrig = new ImlibWidget( 0L, gbPreview, "original image" ); imOrig = new ImlibWidget( 0L, gbPreview, "original image" );
@ -105,13 +105,13 @@ DefaultsWidget::DefaultsWidget( TQWidget *parent, const char *name)
//////////////// ////////////////
// layout management // tqlayout management
TQVBoxLayout *mainLayout = new TQVBoxLayout( this, 0, TQVBoxLayout *mainLayout = new TQVBoxLayout( this, 0,
KDialog::spacingHint(), "main layout" ); KDialog::spacingHint(), "main tqlayout" );
TQVBoxLayout *gbScaleLayout = new TQVBoxLayout( gbScale->layout(), TQVBoxLayout *gbScaleLayout = new TQVBoxLayout( gbScale->tqlayout(),
KDialog::spacingHint()); KDialog::spacingHint());
TQVBoxLayout *gbGeometryLayout = new TQVBoxLayout(gbGeometry->layout(), TQVBoxLayout *gbGeometryLayout = new TQVBoxLayout(gbGeometry->tqlayout(),
KDialog::spacingHint()); KDialog::spacingHint());
TQGridLayout *gbPreviewLayout = new TQGridLayout(gbPreview, 2, 3, 0, TQGridLayout *gbPreviewLayout = new TQGridLayout(gbPreview, 2, 3, 0,
KDialog::spacingHint()); KDialog::spacingHint());

@ -68,7 +68,7 @@ TQString FileCache::tempDir()
KTempDir * FileCache::createTempDir() KTempDir * FileCache::createTempDir()
{ {
TQString tmpName = TQString::fromLatin1( KGlobal::instance()->instanceName() ); TQString tmpName = TQString::tqfromLatin1( KGlobal::instance()->instanceName() );
tmpName.append( TQString::number( getpid() ) ); tmpName.append( TQString::number( getpid() ) );
TQString dirName = locateLocal( "tmp", tmpName ); TQString dirName = locateLocal( "tmp", tmpName );
KTempDir *dir = new KTempDir( dirName ); KTempDir *dir = new KTempDir( dirName );

@ -196,7 +196,7 @@ bool FileWidget::eventFilter( TQObject *o, TQEvent *e )
} }
const TQString& text = k->text(); const TQString& text = k->text();
if ( !text.isEmpty() && text.unicode()->isPrint() ) { if ( !text.isEmpty() && text.tqunicode()->isPrint() ) {
k->accept(); k->accept();
if ( !m_fileFinder ) { if ( !m_fileFinder ) {
@ -448,7 +448,7 @@ void FileWidget::slotFinishedLoading()
emit finished(); emit finished();
} }
TQSize FileWidget::sizeHint() const TQSize FileWidget::tqsizeHint() const
{ {
return TQSize( 300, 300 ); return TQSize( 300, 300 );
} }

@ -71,7 +71,7 @@ protected:
virtual bool eventFilter( TQObject *o, TQEvent * ); virtual bool eventFilter( TQObject *o, TQEvent * );
virtual void resizeEvent( TQResizeEvent * ); virtual void resizeEvent( TQResizeEvent * );
virtual void activatedMenu( const KFileItem *, const TQPoint& ); virtual void activatedMenu( const KFileItem *, const TQPoint& );
virtual TQSize sizeHint() const; virtual TQSize tqsizeHint() const;
private slots: private slots:
void slotReturnPressed( const TQString& text ); void slotReturnPressed( const TQString& text );

@ -18,7 +18,7 @@
#include <tqcheckbox.h> #include <tqcheckbox.h>
#include <tqlabel.h> #include <tqlabel.h>
#include <layout.h> #include <tqlayout.h>
#include <tqtooltip.h> #include <tqtooltip.h>
#include <tqvgroupbox.h> #include <tqvgroupbox.h>
@ -36,8 +36,8 @@
GeneralWidget::GeneralWidget( TQWidget *parent, const char *name ) GeneralWidget::GeneralWidget( TQWidget *parent, const char *name )
: TQWidget( parent, name ) : TQWidget( parent, name )
{ {
TQVBoxLayout *layout = new TQVBoxLayout( this ); TQVBoxLayout *tqlayout = new TQVBoxLayout( this );
layout->setSpacing( KDialog::spacingHint() ); tqlayout->setSpacing( KDialog::spacingHint() );
TQPixmap pixmap = UserIcon( "logo" ); TQPixmap pixmap = UserIcon( "logo" );
KURLLabel *logo = new KURLLabel( this ); KURLLabel *logo = new KURLLabel( this );
@ -50,7 +50,7 @@ GeneralWidget::GeneralWidget( TQWidget *parent, const char *name )
connect( logo, TQT_SIGNAL( leftClickedURL( const TQString & ) ), connect( logo, TQT_SIGNAL( leftClickedURL( const TQString & ) ),
TQT_SLOT( slotURLClicked( const TQString & ) ) ); TQT_SLOT( slotURLClicked( const TQString & ) ) );
layout->addWidget( logo, 0, AlignRight ); tqlayout->addWidget( logo, 0, AlignRight );
cbFullscreen = new TQCheckBox( i18n("Fullscreen mode"), this, "boscreen" ); cbFullscreen = new TQCheckBox( i18n("Fullscreen mode"), this, "boscreen" );
@ -70,17 +70,17 @@ GeneralWidget::GeneralWidget( TQWidget *parent, const char *name )
gridLayout->addWidget( l1, 1, 0 ); gridLayout->addWidget( l1, 1, 0 );
gridLayout->addWidget( editFilter, 1, 1 ); gridLayout->addWidget( editFilter, 1, 1 );
layout->addWidget( cbFullscreen ); tqlayout->addWidget( cbFullscreen );
layout->addWidget( cbPreload ); tqlayout->addWidget( cbPreload );
layout->addWidget( cbLastdir ); tqlayout->addWidget( cbLastdir );
layout->addLayout( gridLayout ); tqlayout->addLayout( gridLayout );
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
TQVGroupBox *gbox2 = new TQVGroupBox( i18n("Quality/Speed"), TQVGroupBox *gbox2 = new TQVGroupBox( i18n("Quality/Speed"),
this, "qualitybox" ); this, "qualitybox" );
layout->addWidget( gbox2 ); tqlayout->addWidget( gbox2 );
layout->addStretch(); tqlayout->addStretch();
cbSmoothScale = new TQCheckBox( i18n("Smooth scaling"), gbox2, "smoothscale" ); cbSmoothScale = new TQCheckBox( i18n("Smooth scaling"), gbox2, "smoothscale" );
cbFastRender = new TQCheckBox( i18n("Fast rendering"), gbox2, "fastrender" ); cbFastRender = new TQCheckBox( i18n("Fast rendering"), gbox2, "fastrender" );

@ -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.arg( m_kuim->originalWidth() ). caption = caption.tqarg( m_kuim->originalWidth() ).
arg( m_kuim->originalHeight() ).arg( m_kuim->url().prettyURL() ); tqarg( m_kuim->originalHeight() ).tqarg( 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(); // repaint // XClearWindow(); // tqrepaint
// 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.").arg(url.prettyURL()); TQString tmp = i18n("Unable to download the image from %1.").tqarg(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.").arg(file->url().prettyURL()); "your Imlib is not installed properly.").tqarg(file->url().prettyURL());
emit sigImageError( file, tmp ); emit sigImageError( file, tmp );
return false; return false;
} }
@ -1128,7 +1128,7 @@ int ImageWindow::desktopWidth( bool totalScreen ) const
{ {
if ( myIsFullscreen || totalScreen ) if ( myIsFullscreen || totalScreen )
{ {
return KGlobalSettings::desktopGeometry(topLevelWidget()).width(); return KGlobalSettings::desktopGeometry(tqtopLevelWidget()).width();
} else } else
return Kuick::workArea().width(); return Kuick::workArea().width();
} }
@ -1137,7 +1137,7 @@ int ImageWindow::desktopWidth( bool totalScreen ) const
int ImageWindow::desktopHeight( bool totalScreen ) const int ImageWindow::desktopHeight( bool totalScreen ) const
{ {
if ( myIsFullscreen || totalScreen ) { if ( myIsFullscreen || totalScreen ) {
return KGlobalSettings::desktopGeometry(topLevelWidget()).height(); return KGlobalSettings::desktopGeometry(tqtopLevelWidget()).height();
} else { } else {
return Kuick::workArea().height(); return Kuick::workArea().height();
} }
@ -1146,7 +1146,7 @@ int ImageWindow::desktopHeight( bool totalScreen ) const
TQSize ImageWindow::maxImageSize() const TQSize ImageWindow::maxImageSize() const
{ {
if ( myIsFullscreen ) { if ( myIsFullscreen ) {
return KGlobalSettings::desktopGeometry(topLevelWidget()).size(); return KGlobalSettings::desktopGeometry(tqtopLevelWidget()).size();
} }
else { else {
return Kuick::workArea().size() - Kuick::frameSize( winId() ); return Kuick::workArea().size() - Kuick::frameSize( winId() );
@ -1193,7 +1193,7 @@ bool ImageWindow::canZoomTo( int newWidth, int newHeight )
if ( !ImlibWidget::canZoomTo( newWidth, newHeight ) ) if ( !ImlibWidget::canZoomTo( newWidth, newHeight ) )
return false; return false;
TQSize desktopSize = KGlobalSettings::desktopGeometry(topLevelWidget()).size(); TQSize desktopSize = KGlobalSettings::desktopGeometry(tqtopLevelWidget()).size();
int desktopArea = desktopSize.width() * desktopSize.height(); int desktopArea = desktopSize.width() * desktopSize.height();
int imageArea = newWidth * newHeight; int imageArea = newWidth * newHeight;
@ -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?")
.arg( newWidth ).arg( newHeight ), .tqarg( newWidth ).tqarg( newHeight ),
TQString(), TQString(),
KStdGuiItem::cont(), KStdGuiItem::cont(),
"ImageWindow_confirm_very_large_window" "ImageWindow_confirm_very_large_window"

@ -29,7 +29,7 @@
#include <tqglobal.h> #include <tqglobal.h>
#include <tqimage.h> #include <tqimage.h>
#include <tqobject.h> #include <tqobject.h>
#include <palette.h> #include <tqpalette.h>
#include <kcursor.h> #include <kcursor.h>
#include <kdebug.h> #include <kdebug.h>
@ -475,7 +475,7 @@ void ImlibWidget::setBackgroundColor( const TQColor& color )
{ {
myBackgroundColor = color; myBackgroundColor = color;
setPalette( TQPalette( myBackgroundColor )); setPalette( TQPalette( myBackgroundColor ));
repaint( false); // FIXME - false? necessary at all? tqrepaint( 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().shape() ) // only if nobody changed the cursor in the meantime! if ( cursor().shape() == KCursor::waitCursor().tqshape() ) // only if nobody changed the cursor in the meantime!
setCursor( m_oldCursor ); setCursor( m_oldCursor );
} }

@ -94,7 +94,7 @@ bool KuickFile::download()
return m_job != 0L; return m_job != 0L;
} }
KuickFile::DownloadStatus KuickFile::waitForDownload( TQWidget *parent ) KuickFile::DownloadtqStatus KuickFile::waitForDownload( TQWidget *parent )
{ {
if ( isAvailable() ) if ( isAvailable() )
return OK; return OK;
@ -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...").arg( m_url.fileName() ) ); dialog->setCaption( i18n("Downloading %1...").tqarg( m_url.fileName() ) );
dialog->setLabel( i18n("Please wait while downloading\n%1").arg( m_url.prettyURL() )); dialog->setLabel( i18n("Please wait while downloading\n%1").tqarg( m_url.prettyURL() ));
dialog->setAllowCancel( true ); dialog->setAllowCancel( true );
dialog->setAutoClose( true ); dialog->setAutoClose( true );
@ -152,7 +152,7 @@ void KuickFile::slotResult( KIO::Job *job )
TQString canceledFile = static_cast<KIO::FileCopyJob*>(job)->destURL().path(); TQString canceledFile = static_cast<KIO::FileCopyJob*>(job)->destURL().path();
TQFile::remove( canceledFile ); TQFile::remove( canceledFile );
m_progress->topLevelWidget()->hide(); m_progress->tqtopLevelWidget()->hide();
} }
else { else {
m_localFile = static_cast<KIO::FileCopyJob*>(job)->destURL().path(); m_localFile = static_cast<KIO::FileCopyJob*>(job)->destURL().path();
@ -162,7 +162,7 @@ void KuickFile::slotResult( KIO::Job *job )
m_progress->setProgress( 100 ); m_progress->setProgress( 100 );
#define BUGGY_VERSION KDE_MAKE_VERSION(3,5,2) #define BUGGY_VERSION KDE_MAKE_VERSION(3,5,2)
if ( KDE::version() <= BUGGY_VERSION ) { if ( KDE::version() <= BUGGY_VERSION ) {
m_progress->topLevelWidget()->hide(); // ### workaround broken KProgressDialog m_progress->tqtopLevelWidget()->hide(); // ### workaround broken KProgressDialog
} }
} }
} }

@ -27,7 +27,7 @@ class KuickFile : public TQObject
TQ_OBJECT TQ_OBJECT
public: public:
enum DownloadStatus enum DownloadtqStatus
{ {
OK = 1, OK = 1,
CANCELED, CANCELED,
@ -72,7 +72,7 @@ public:
* immediately. * immediately.
* @return true when the download has finished or false when the user aborted the dialog * @return true when the download has finished or false when the user aborted the dialog
*/ */
KuickFile::DownloadStatus waitForDownload( TQWidget *parent ); KuickFile::DownloadtqStatus waitForDownload( TQWidget *parent );
// bool needsDownload(); // bool needsDownload();

@ -24,7 +24,7 @@
#include <tqdialog.h> #include <tqdialog.h>
#include <tqglobal.h> #include <tqglobal.h>
#include <tqkeycode.h> #include <tqkeycode.h>
#include <layout.h> #include <tqlayout.h>
#include <tqsize.h> #include <tqsize.h>
#include <tqstring.h> #include <tqstring.h>
@ -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).arg(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).tqarg(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...").arg( KGlobal::instance()->aboutData()->programName() ), "configure", KAction *configure = new KAction( i18n("Configure %1...").tqarg( 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 geometry() // after showing, otherwise we get some bogus tqgeometry()
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>").arg(item->url().pathOrURL()), i18n("<qt>Do you really want to delete\n <b>'%1'</b>?</qt>").tqarg(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>").arg(item->url().pathOrURL()), i18n("<qt>Do you really want to trash\n <b>'%1'</b>?</qt>").tqarg(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")

@ -35,7 +35,7 @@ MainWidget::~MainWidget()
} }
// for now, no layout managers // for now, no tqlayout managers
void MainWidget::resizeEvent( TQResizeEvent * ) void MainWidget::resizeEvent( TQResizeEvent * )
{ {
box->resize( width(), height() ); box->resize( width(), height() );

@ -21,7 +21,7 @@
#include <tqfontmetrics.h> #include <tqfontmetrics.h>
#include <tqgrid.h> #include <tqgrid.h>
#include <tqhbox.h> #include <tqhbox.h>
#include <layout.h> #include <tqlayout.h>
#include <tqimage.h> #include <tqimage.h>
#include <kimageeffect.h> #include <kimageeffect.h>
#include <tqpaintdevicemetrics.h> #include <tqpaintdevicemetrics.h>
@ -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").arg(printer.docName().section('/', -1)) ) ) if ( printer.setup( parent, i18n("Print %1").tqarg(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.scale( w, h, TQSize::ScaleMin ); imagesize.tqscale( 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 alignment = printer.option("app-kuickshow-alignment").toInt( &ok ); int tqalignment = printer.option("app-kuickshow-tqalignment").toInt( &ok );
if ( !ok ) if ( !ok )
alignment = TQt::AlignCenter; // default tqalignment = 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 - alignment // x - tqalignment
if ( alignment & TQt::AlignHCenter ) if ( tqalignment & TQt::AlignHCenter )
x = (w - imagesize.width())/2; x = (w - imagesize.width())/2;
else if ( alignment & TQt::AlignLeft ) else if ( tqalignment & TQt::AlignLeft )
x = 0; x = 0;
else if ( alignment & TQt::AlignRight ) else if ( tqalignment & TQt::AlignRight )
x = w - imagesize.width(); x = w - imagesize.width();
// y - alignment // y - tqalignment
if ( alignment & TQt::AlignVCenter ) if ( tqalignment & TQt::AlignVCenter )
y = (h - imagesize.height())/2; y = (h - imagesize.height())/2;
else if ( alignment & TQt::AlignTop ) else if ( tqalignment & TQt::AlignTop )
y = 0; y = 0;
else if ( alignment & TQt::AlignBottom ) else if ( tqalignment & TQt::AlignBottom )
y = h - imagesize.height(); y = h - imagesize.height();
// //
@ -199,21 +199,21 @@ KuickPrintDialogPage::KuickPrintDialogPage( TQWidget *parent, const char *name )
{ {
setTitle( i18n("Image Settings") ); setTitle( i18n("Image Settings") );
TQVBoxLayout *layout = new TQVBoxLayout( this ); TQVBoxLayout *tqlayout = new TQVBoxLayout( this );
layout->setMargin( KDialog::marginHint() ); tqlayout->setMargin( KDialog::marginHint() );
layout->setSpacing( KDialog::spacingHint() ); tqlayout->setSpacing( KDialog::spacingHint() );
m_addFileName = new TQCheckBox( i18n("Print fi&lename below image"), this); m_addFileName = new TQCheckBox( i18n("Print fi&lename below image"), this);
m_addFileName->setChecked( true ); m_addFileName->setChecked( true );
layout->addWidget( m_addFileName ); tqlayout->addWidget( m_addFileName );
m_blackwhite = new TQCheckBox ( i18n("Print image in &black and white"), this); m_blackwhite = new TQCheckBox ( i18n("Print image in &black and white"), this);
m_blackwhite->setChecked( false ); m_blackwhite->setChecked( false );
layout->addWidget (m_blackwhite ); tqlayout->addWidget (m_blackwhite );
TQVButtonGroup *group = new TQVButtonGroup( i18n("Scaling"), this ); TQVButtonGroup *group = new TQVButtonGroup( i18n("Scaling"), this );
group->setRadioButtonExclusive( true ); group->setRadioButtonExclusive( true );
layout->addWidget( group ); tqlayout->addWidget( group );
// m_shrinkToFit = new TQRadioButton( i18n("Shrink image to &fit, if necessary"), group ); // m_shrinkToFit = new TQRadioButton( i18n("Shrink image to &fit, if necessary"), group );
m_shrinkToFit = new TQCheckBox( i18n("Shrink image to &fit, if necessary"), group ); m_shrinkToFit = new TQCheckBox( i18n("Shrink image to &fit, if necessary"), group );
m_shrinkToFit->setChecked( true ); m_shrinkToFit->setChecked( true );
@ -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-alignment"] = ; // ### opts["app-kuickshow-tqalignment"] = ;
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;

@ -17,7 +17,7 @@
*/ */
#include <tqcheckbox.h> #include <tqcheckbox.h>
#include <layout.h> #include <tqlayout.h>
#include <kdialog.h> #include <kdialog.h>
#include <klocale.h> #include <klocale.h>
@ -31,8 +31,8 @@ SlideShowWidget::SlideShowWidget( TQWidget *parent, const char *name )
{ {
// setTitle( i18n("Slideshow") ); // setTitle( i18n("Slideshow") );
TQVBoxLayout *layout = new TQVBoxLayout( this ); TQVBoxLayout *tqlayout = new TQVBoxLayout( this );
layout->setSpacing( KDialog::spacingHint() ); tqlayout->setSpacing( KDialog::spacingHint() );
m_fullScreen = new TQCheckBox( i18n("Switch to &full-screen"), this ); m_fullScreen = new TQCheckBox( i18n("Switch to &full-screen"), this );
m_startWithCurrent = new TQCheckBox( i18n("S&tart with current image"), this); m_startWithCurrent = new TQCheckBox( i18n("S&tart with current image"), this);
@ -48,11 +48,11 @@ SlideShowWidget::SlideShowWidget( TQWidget *parent, const char *name )
m_cycles->setSpecialValueText( i18n("infinite") ); m_cycles->setSpecialValueText( i18n("infinite") );
m_cycles->setRange( 0, 500 ); m_cycles->setRange( 0, 500 );
layout->addWidget( m_fullScreen ); tqlayout->addWidget( m_fullScreen );
layout->addWidget( m_startWithCurrent ); tqlayout->addWidget( m_startWithCurrent );
layout->addWidget( m_delayTime ); tqlayout->addWidget( m_delayTime );
layout->addWidget( m_cycles ); tqlayout->addWidget( m_cycles );
layout->addStretch( 1 ); tqlayout->addStretch( 1 );
loadSettings( *kdata ); loadSettings( *kdata );
} }

Loading…
Cancel
Save