diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-08-02 19:23:46 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-08-02 19:23:46 +0000 |
commit | eba47f8f0637f451e21348187591e1f1fd58ac74 (patch) | |
tree | 448f10b95c656604acc331a3236c1e59bde5c1ad /kview/modules | |
parent | c7e8736c69373f48b0401319757c742e8607431a (diff) | |
download | tdegraphics-eba47f8f0637f451e21348187591e1f1fd58ac74.tar.gz tdegraphics-eba47f8f0637f451e21348187591e1f1fd58ac74.zip |
TQt conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegraphics@1158446 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kview/modules')
24 files changed, 321 insertions, 321 deletions
diff --git a/kview/modules/browser/kmyfileitemlist.cpp b/kview/modules/browser/kmyfileitemlist.cpp index 534e0876..28c3cb08 100644 --- a/kview/modules/browser/kmyfileitemlist.cpp +++ b/kview/modules/browser/kmyfileitemlist.cpp @@ -21,14 +21,14 @@ #include <kfileitem.h> KMyFileItemList::KMyFileItemList() {} -KMyFileItemList::KMyFileItemList( const QPtrList<KFileItem> & l ) : QPtrList<KFileItem>( l ) {} +KMyFileItemList::KMyFileItemList( const TQPtrList<KFileItem> & l ) : TQPtrList<KFileItem>( l ) {} -KMyFileItemList & KMyFileItemList::operator=( const QPtrList<KFileItem> & l ) +KMyFileItemList & KMyFileItemList::operator=( const TQPtrList<KFileItem> & l ) { - return (KMyFileItemList &)QPtrList<KFileItem>::operator=( l ); + return (KMyFileItemList &)TQPtrList<KFileItem>::operator=( l ); } -int KMyFileItemList::compareItems( QPtrCollection::Item item1, QPtrCollection::Item item2 ) +int KMyFileItemList::compareItems( TQPtrCollection::Item item1, TQPtrCollection::Item item2 ) { KFileItem * fileitem1 = static_cast<KFileItem *>( item1 ); KFileItem * fileitem2 = static_cast<KFileItem *>( item2 ); diff --git a/kview/modules/browser/kmyfileitemlist.h b/kview/modules/browser/kmyfileitemlist.h index 052fce53..80f01013 100644 --- a/kview/modules/browser/kmyfileitemlist.h +++ b/kview/modules/browser/kmyfileitemlist.h @@ -20,18 +20,18 @@ #ifndef __kmyfileitemlist_h__ #define __kmyfileitemlist_h__ -#include <qptrlist.h> +#include <tqptrlist.h> class KFileItem; -class KMyFileItemList : public QPtrList<KFileItem> +class KMyFileItemList : public TQPtrList<KFileItem> { public: KMyFileItemList(); - KMyFileItemList( const QPtrList<KFileItem> & ); - KMyFileItemList & operator=( const QPtrList<KFileItem> & ); + KMyFileItemList( const TQPtrList<KFileItem> & ); + KMyFileItemList & operator=( const TQPtrList<KFileItem> & ); protected: - virtual int compareItems( QPtrCollection::Item item1, QPtrCollection::Item item2 ); + virtual int compareItems( TQPtrCollection::Item item1, TQPtrCollection::Item item2 ); }; // vim:sw=4:ts=4 diff --git a/kview/modules/browser/kviewbrowser.cpp b/kview/modules/browser/kviewbrowser.cpp index 6da318b7..936061eb 100644 --- a/kview/modules/browser/kviewbrowser.cpp +++ b/kview/modules/browser/kviewbrowser.cpp @@ -20,7 +20,7 @@ #include "kviewbrowser.h" #include "kmyfileitemlist.h" -#include <qcursor.h> +#include <tqcursor.h> #include <kdirlister.h> #include <kaction.h> @@ -36,7 +36,7 @@ typedef KGenericFactory<KViewBrowser> KViewBrowserFactory; K_EXPORT_COMPONENT_FACTORY( kview_browserplugin, KViewBrowserFactory( "kviewbrowserplugin" ) ) -KViewBrowser::KViewBrowser( QObject* parent, const char* name, const QStringList & ) +KViewBrowser::KViewBrowser( TQObject* parent, const char* name, const TQStringList & ) : Plugin( parent, name ) , m_pDirLister( 0 ) , m_pFileItemList( 0 ) @@ -45,9 +45,9 @@ KViewBrowser::KViewBrowser( QObject* parent, const char* name, const QStringList m_pViewer = static_cast<KImageViewer::Viewer *>( parent ); if( m_pViewer ) { - m_paBack = KStdAction::back ( this, SLOT( slotBack() ), actionCollection(), "previous_image" ); + m_paBack = KStdAction::back ( this, TQT_SLOT( slotBack() ), actionCollection(), "previous_image" ); m_paBack->setShortcut( SHIFT+Key_Left ); - m_paForward = KStdAction::forward( this, SLOT( slotForward() ), actionCollection(), "next_image" ); + m_paForward = KStdAction::forward( this, TQT_SLOT( slotForward() ), actionCollection(), "next_image" ); m_paForward->setShortcut( SHIFT+Key_Right ); m_pExtension = m_pViewer->browserExtension(); } @@ -156,13 +156,13 @@ void KViewBrowser::setupDirLister() m_pDirLister = new KDirLister(); m_pDirLister->setMimeFilter( KImageIO::mimeTypes( KImageIO::Reading ) ); m_pDirLister->setShowingDotFiles( true ); - connect( m_pDirLister, SIGNAL( newItems( const KFileItemList & ) ), SLOT( slotNewItems( const KFileItemList & ) ) ); - connect( m_pDirLister, SIGNAL( deleteItem( KFileItem * ) ), SLOT( slotDeleteItem( KFileItem * ) ) ); + connect( m_pDirLister, TQT_SIGNAL( newItems( const KFileItemList & ) ), TQT_SLOT( slotNewItems( const KFileItemList & ) ) ); + connect( m_pDirLister, TQT_SIGNAL( deleteItem( KFileItem * ) ), TQT_SLOT( slotDeleteItem( KFileItem * ) ) ); } if( m_pDirLister->url() != KURL( m_pViewer->url().directory( true, false ) ) ) { - QApplication::setOverrideCursor( WaitCursor ); - QString url = m_pViewer->url().prettyURL(); + TQApplication::setOverrideCursor( WaitCursor ); + TQString url = m_pViewer->url().prettyURL(); int pos = url.findRev( "/" ); url = url.left( (unsigned int)pos ); kdDebug( 4630 ) << "open KDirLister for " << url << endl; @@ -171,7 +171,7 @@ void KViewBrowser::setupDirLister() kapp->processEvents(); //while( ! m_pFileItemList ) //kapp->processEvents(); - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); } } diff --git a/kview/modules/browser/kviewbrowser.h b/kview/modules/browser/kviewbrowser.h index 3ed918b6..96e8b17f 100644 --- a/kview/modules/browser/kviewbrowser.h +++ b/kview/modules/browser/kviewbrowser.h @@ -34,7 +34,7 @@ class KViewBrowser : public KParts::Plugin { Q_OBJECT public: - KViewBrowser( QObject* parent, const char* name, const QStringList & ); + KViewBrowser( TQObject* parent, const char* name, const TQStringList & ); virtual ~KViewBrowser(); private slots: diff --git a/kview/modules/effects/kvieweffects.cpp b/kview/modules/effects/kvieweffects.cpp index 9295c876..a2e57327 100644 --- a/kview/modules/effects/kvieweffects.cpp +++ b/kview/modules/effects/kvieweffects.cpp @@ -4,7 +4,7 @@ #include "kvieweffects.h" -#include <qobjectlist.h> +#include <tqobjectlist.h> #include <kaction.h> #include <klocale.h> @@ -15,16 +15,16 @@ #include <kdialogbase.h> #include <knuminput.h> #include <kiconeffect.h> -#include <qvbox.h> +#include <tqvbox.h> #include <kcolorbutton.h> #include <kimageeffect.h> -#include <qlabel.h> +#include <tqlabel.h> #include <assert.h> typedef KGenericFactory<KViewEffects> KViewEffectsFactory; K_EXPORT_COMPONENT_FACTORY( kview_effectsplugin, KViewEffectsFactory( "kvieweffectsplugin" ) ) -KViewEffects::KViewEffects( QObject* parent, const char* name, const QStringList & ) +KViewEffects::KViewEffects( TQObject* parent, const char* name, const TQStringList & ) : Plugin( parent, name ) , m_gamma( 0.5 ), m_lastgamma( -1.0 ) , m_opacity( 50 ), m_lastopacity( -1 ) @@ -32,26 +32,26 @@ KViewEffects::KViewEffects( QObject* parent, const char* name, const QStringList , m_color( white ) , m_image( 0 ) { - QObjectList * viewerList = parent->queryList( 0, "KImageViewer Part", false, false ); + TQObjectList * viewerList = parent->queryList( 0, "KImageViewer Part", false, false ); m_pViewer = static_cast<KImageViewer::Viewer *>( viewerList->getFirst() ); delete viewerList; if( m_pViewer ) { KAction * gammaaction = new KAction( i18n( "&Gamma Correction..." ), 0, 0, - this, SLOT( gamma() ), + this, TQT_SLOT( gamma() ), actionCollection(), "plugin_effects_gamma" ); KAction * blendaction = new KAction( i18n( "&Blend Color..." ), 0, 0, - this, SLOT( blend() ), + this, TQT_SLOT( blend() ), actionCollection(), "plugin_effects_blend" ); KAction * intensityaction = new KAction( i18n( "Change &Intensity (Brightness)..." ), 0, 0, - this, SLOT( intensity() ), + this, TQT_SLOT( intensity() ), actionCollection(), "plugin_effects_intensity" ); gammaaction->setEnabled( m_pViewer->canvas()->image() != 0 ); blendaction->setEnabled( m_pViewer->canvas()->image() != 0 ); intensityaction->setEnabled( m_pViewer->canvas()->image() != 0 ); - connect( m_pViewer->widget(), SIGNAL( hasImage( bool ) ), gammaaction, SLOT( setEnabled( bool ) ) ); - connect( m_pViewer->widget(), SIGNAL( hasImage( bool ) ), blendaction, SLOT( setEnabled( bool ) ) ); - connect( m_pViewer->widget(), SIGNAL( hasImage( bool ) ), intensityaction, SLOT( setEnabled( bool ) ) ); + connect( m_pViewer->widget(), TQT_SIGNAL( hasImage( bool ) ), gammaaction, TQT_SLOT( setEnabled( bool ) ) ); + connect( m_pViewer->widget(), TQT_SIGNAL( hasImage( bool ) ), blendaction, TQT_SLOT( setEnabled( bool ) ) ); + connect( m_pViewer->widget(), TQT_SIGNAL( hasImage( bool ) ), intensityaction, TQT_SLOT( setEnabled( bool ) ) ); } else kdWarning( 4630 ) << "no KImageViewer interface found - the effects plugin won't work" << endl; @@ -67,20 +67,20 @@ KViewEffects::~KViewEffects() void KViewEffects::intensity() { KDialogBase dlg( m_pViewer->widget(), "Intensity Dialog", true /*modal*/, i18n( "Change Intensity" ), KDialogBase::Ok | KDialogBase::Try | KDialogBase::Cancel ); - connect( &dlg, SIGNAL( tryClicked() ), this, SLOT( applyIntensity() ) ); + connect( &dlg, TQT_SIGNAL( tryClicked() ), this, TQT_SLOT( applyIntensity() ) ); - QVBox * vbox = new QVBox( &dlg ); + TQVBox * vbox = new TQVBox( &dlg ); vbox->setSpacing( KDialog::spacingHint() ); dlg.setMainWidget( vbox ); KIntNumInput * percent = new KIntNumInput( vbox, "Intensity Input" ); percent->setRange( 0, 100, 1, true ); percent->setValue( m_intensity ); percent->setLabel( i18n( "&Intensity:" ) ); - percent->setSuffix( QString::fromAscii( "%" ) ); - connect( percent, SIGNAL( valueChanged( int ) ), this, SLOT( setIntensity( int ) ) ); + percent->setSuffix( TQString::fromAscii( "%" ) ); + connect( percent, TQT_SIGNAL( valueChanged( int ) ), this, TQT_SLOT( setIntensity( int ) ) ); int result = dlg.exec(); - if( result == QDialog::Accepted ) + if( result == TQDialog::Accepted ) { applyIntensity(); m_pViewer->setModified( true ); @@ -104,7 +104,7 @@ void KViewEffects::applyIntensity() if( m_intensity == m_lastintensity ) return; // nothing to do - QImage * work = workImage(); + TQImage * work = workImage(); if( work ) { KImageEffect::intensity( *work, m_intensity * 0.01 ); @@ -117,24 +117,24 @@ void KViewEffects::applyIntensity() void KViewEffects::blend() { KDialogBase dlg( m_pViewer->widget(), "Blend Color Dialog", true /*modal*/, i18n( "Blend Color" ), KDialogBase::Ok | KDialogBase::Try | KDialogBase::Cancel ); - connect( &dlg, SIGNAL( tryClicked() ), this, SLOT( applyBlend() ) ); + connect( &dlg, TQT_SIGNAL( tryClicked() ), this, TQT_SLOT( applyBlend() ) ); - QVBox * vbox = new QVBox( &dlg ); + TQVBox * vbox = new TQVBox( &dlg ); vbox->setSpacing( KDialog::spacingHint() ); dlg.setMainWidget( vbox ); KIntNumInput * opacity = new KIntNumInput( vbox, "Opacity Input" ); opacity->setRange( 0, 100, 1, true ); opacity->setValue( m_opacity ); opacity->setLabel( i18n( "O&pacity:" ) ); - opacity->setSuffix( QString::fromAscii( "%" ) ); - connect( opacity, SIGNAL( valueChanged( int ) ), this, SLOT( setOpacity( int ) ) ); - QLabel * label = new QLabel( i18n( "Blend c&olor:" ), vbox ); + opacity->setSuffix( TQString::fromAscii( "%" ) ); + connect( opacity, TQT_SIGNAL( valueChanged( int ) ), this, TQT_SLOT( setOpacity( int ) ) ); + TQLabel * label = new TQLabel( i18n( "Blend c&olor:" ), vbox ); KColorButton * color = new KColorButton( m_color, vbox, "Color Input Button" ); label->setBuddy( color ); - connect( color, SIGNAL( changed( const QColor & ) ), this, SLOT( setColor( const QColor & ) ) ); + connect( color, TQT_SIGNAL( changed( const TQColor & ) ), this, TQT_SLOT( setColor( const TQColor & ) ) ); int result = dlg.exec(); - if( result == QDialog::Accepted ) + if( result == TQDialog::Accepted ) { applyBlend(); m_pViewer->setModified( true ); @@ -152,7 +152,7 @@ void KViewEffects::setOpacity( int opacity ) m_opacity = opacity; } -void KViewEffects::setColor( const QColor & color ) +void KViewEffects::setColor( const TQColor & color ) { m_color = color; } @@ -162,7 +162,7 @@ void KViewEffects::applyBlend() if( m_opacity == m_lastopacity ) return; // nothing to do - QImage * work = workImage(); + TQImage * work = workImage(); if( work ) { KImageEffect::blend( m_color, *work, m_opacity * 0.01 ); @@ -175,17 +175,17 @@ void KViewEffects::applyBlend() void KViewEffects::gamma() { KDialogBase dlg( m_pViewer->widget(), "Gamma Correction Dialog", true /*modal*/, i18n( "Gamma Correction" ), KDialogBase::Ok | KDialogBase::Try | KDialogBase::Cancel ); - connect( &dlg, SIGNAL( tryClicked() ), this, SLOT( applyGammaCorrection() ) ); + connect( &dlg, TQT_SIGNAL( tryClicked() ), this, TQT_SLOT( applyGammaCorrection() ) ); // create dialog KDoubleNumInput * gammavalue = new KDoubleNumInput( 0.0, 1.0, 0.5, 0.01, 4, &dlg, "Gamma value input" ); gammavalue->setRange( 0.0, 1.0, 0.01, true ); - connect( gammavalue, SIGNAL( valueChanged( double ) ), this, SLOT( setGammaValue( double ) ) ); + connect( gammavalue, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SLOT( setGammaValue( double ) ) ); gammavalue->setLabel( i18n( "Gamma value:" ) ); dlg.setMainWidget( gammavalue ); int result = dlg.exec(); - if( result == QDialog::Accepted ) + if( result == TQDialog::Accepted ) { // apply gamma correction applyGammaCorrection(); @@ -213,7 +213,7 @@ void KViewEffects::applyGammaCorrection() if( m_gamma == m_lastgamma ) return; // nothing to do - QImage * corrected = workImage(); + TQImage * corrected = workImage(); if( corrected ) { KIconEffect::toGamma( *corrected, m_gamma ); @@ -223,17 +223,17 @@ void KViewEffects::applyGammaCorrection() } } -inline QImage * KViewEffects::workImage() +inline TQImage * KViewEffects::workImage() { if( ! m_image ) { - const QImage * canvasimage = m_pViewer->canvas()->image(); + const TQImage * canvasimage = m_pViewer->canvas()->image(); if( canvasimage ) - m_image = new QImage( *canvasimage ); + m_image = new TQImage( *canvasimage ); } if( m_image ) { - QImage * changed = new QImage( *m_image ); + TQImage * changed = new TQImage( *m_image ); changed->detach(); return changed; } diff --git a/kview/modules/effects/kvieweffects.h b/kview/modules/effects/kvieweffects.h index 0bf92a8e..821b99c8 100644 --- a/kview/modules/effects/kvieweffects.h +++ b/kview/modules/effects/kvieweffects.h @@ -6,7 +6,7 @@ #define KVIEWEFFECTS_H #include <kparts/plugin.h> -#include <qcolor.h> +#include <tqcolor.h> namespace KImageViewer { class Viewer; } @@ -14,7 +14,7 @@ class KViewEffects : public KParts::Plugin { Q_OBJECT public: - KViewEffects( QObject* parent, const char* name, const QStringList & ); + KViewEffects( TQObject* parent, const char* name, const TQStringList & ); virtual ~KViewEffects(); private slots: @@ -24,7 +24,7 @@ private slots: void blend(); void setOpacity( int ); - void setColor( const QColor & ); + void setColor( const TQColor & ); void applyBlend(); void gamma(); @@ -32,14 +32,14 @@ private slots: void applyGammaCorrection(); private: - QImage * workImage(); + TQImage * workImage(); KImageViewer::Viewer * m_pViewer; double m_gamma, m_lastgamma; int m_opacity, m_lastopacity; int m_intensity, m_lastintensity; - QColor m_color; - QImage * m_image; + TQColor m_color; + TQImage * m_image; }; // vim:sw=4:ts=4:cindent diff --git a/kview/modules/presenter/config/kviewpresenterconfig.cpp b/kview/modules/presenter/config/kviewpresenterconfig.cpp index 92dd8627..e44889ed 100644 --- a/kview/modules/presenter/config/kviewpresenterconfig.cpp +++ b/kview/modules/presenter/config/kviewpresenterconfig.cpp @@ -18,9 +18,9 @@ #include "kviewpresenterconfig.h" -#include <qlayout.h> -#include <qcheckbox.h> -#include <qframe.h> +#include <tqlayout.h> +#include <tqcheckbox.h> +#include <tqframe.h> #include <klocale.h> #include <kdialog.h> @@ -28,17 +28,17 @@ #include <kconfig.h> #include <kgenericfactory.h> -typedef KGenericFactory<KViewPresenterConfig, QWidget> KViewPresenterConfigFactory; +typedef KGenericFactory<KViewPresenterConfig, TQWidget> KViewPresenterConfigFactory; K_EXPORT_COMPONENT_FACTORY( kcm_kviewpresenterconfig, KViewPresenterConfigFactory( "kcm_kviewpresenterconfig" ) ) -KViewPresenterConfig::KViewPresenterConfig( QWidget * parent, const char *, const QStringList & args ) +KViewPresenterConfig::KViewPresenterConfig( TQWidget * parent, const char *, const TQStringList & args ) : KCModule( KViewPresenterConfigFactory::instance(), parent, args ) { - QBoxLayout * layout = new QVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() ); + TQBoxLayout * layout = new TQVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() ); layout->setAutoAdd( true ); - m_pCheckBox = new QCheckBox( "This is only for testing...", this ); - connect( m_pCheckBox, SIGNAL( clicked() ), this, SLOT( checkChanged() ) ); + m_pCheckBox = new TQCheckBox( "This is only for testing...", this ); + connect( m_pCheckBox, TQT_SIGNAL( clicked() ), this, TQT_SLOT( checkChanged() ) ); } KViewPresenterConfig::~KViewPresenterConfig() diff --git a/kview/modules/presenter/config/kviewpresenterconfig.h b/kview/modules/presenter/config/kviewpresenterconfig.h index c839690a..ae257cea 100644 --- a/kview/modules/presenter/config/kviewpresenterconfig.h +++ b/kview/modules/presenter/config/kviewpresenterconfig.h @@ -21,13 +21,13 @@ #include <kcmodule.h> -class QCheckBox; +class TQCheckBox; class KViewPresenterConfig : public KCModule { Q_OBJECT public: - KViewPresenterConfig( QWidget * parent, const char * name = 0, const QStringList & args = QStringList() ); + KViewPresenterConfig( TQWidget * parent, const char * name = 0, const TQStringList & args = TQStringList() ); ~KViewPresenterConfig(); virtual void load(); @@ -38,7 +38,7 @@ class KViewPresenterConfig : public KCModule void checkChanged(); private: - QCheckBox * m_pCheckBox; + TQCheckBox * m_pCheckBox; }; // vim:sw=4:ts=4 diff --git a/kview/modules/presenter/imagelistitem.cpp b/kview/modules/presenter/imagelistitem.cpp index 4236dfe7..547de656 100644 --- a/kview/modules/presenter/imagelistitem.cpp +++ b/kview/modules/presenter/imagelistitem.cpp @@ -20,14 +20,14 @@ #include "imagelistitem.h" -#include <qimage.h> +#include <tqimage.h> #include <klistview.h> ImageListItem::ImageListItem( KListView * parent, const KURL & url ) : KListViewItem( parent, parent->lastItem(), url.prettyURL() ) , m_pImage( 0 ) - , m_filename( QString::null ) + , m_filename( TQString::null ) , m_url( url ) { setDragEnabled( true ); @@ -39,13 +39,13 @@ ImageListItem::ImageListItem( KListView * parent, const KURL & url ) { // download file /* - QString extension; - QString fileName = m_url.fileName(); + TQString extension; + TQString fileName = m_url.fileName(); int extensionPos = fileName.findRev( '.' ); if ( extensionPos != -1 ) extension = fileName.mid( extensionPos ); // keep the '.' delete m_pTempFile; - m_pTempFile = new KTempFile( QString::null, extension ); + m_pTempFile = new KTempFile( TQString::null, extension ); m_filename = m_pTempFile->name(); m_pJob = KIO::get( m_url, m_pExtension->urlArgs().reload, false ); @@ -62,15 +62,15 @@ ImageListItem::~ImageListItem() } } -const QImage * ImageListItem::image() const +const TQImage * ImageListItem::image() const { return m_pImage; } -const QString & ImageListItem::file() const +const TQString & ImageListItem::file() const { if( m_url.isLocalFile() ) - return QString::null; + return TQString::null; return m_filename; } diff --git a/kview/modules/presenter/imagelistitem.h b/kview/modules/presenter/imagelistitem.h index 63761af8..ee143a90 100644 --- a/kview/modules/presenter/imagelistitem.h +++ b/kview/modules/presenter/imagelistitem.h @@ -23,9 +23,9 @@ #include <klistview.h> #include <kurl.h> -#include <qstring.h> +#include <tqstring.h> -class QImage; +class TQImage; class ImageListItem : public KListViewItem { @@ -33,15 +33,15 @@ class ImageListItem : public KListViewItem ImageListItem( KListView * parent, const KURL & url ); ~ImageListItem(); - const QImage * image() const; - const QString & file() const; + const TQImage * image() const; + const TQString & file() const; const KURL & url() const; virtual int rtti() const { return 48294; } private: - QImage * m_pImage; - QString m_filename; + TQImage * m_pImage; + TQString m_filename; KURL m_url; }; diff --git a/kview/modules/presenter/kviewpresenter.cpp b/kview/modules/presenter/kviewpresenter.cpp index bbc5e8eb..3cf54d15 100644 --- a/kview/modules/presenter/kviewpresenter.cpp +++ b/kview/modules/presenter/kviewpresenter.cpp @@ -22,13 +22,13 @@ #include "imagelistdialog.h" #include "imagelistitem.h" -#include <qvbox.h> -#include <qobjectlist.h> -#include <qsignalslotimp.h> -#include <qtimer.h> -#include <qevent.h> -#include <qdragobject.h> -#include <qstringlist.h> +#include <tqvbox.h> +#include <tqobjectlist.h> +#include <tqsignalslotimp.h> +#include <tqtimer.h> +#include <tqevent.h> +#include <tqdragobject.h> +#include <tqstringlist.h> #include <kpushbutton.h> #include <kapplication.h> @@ -51,35 +51,35 @@ typedef KGenericFactory<KViewPresenter> KViewPresenterFactory; K_EXPORT_COMPONENT_FACTORY( kview_presenterplugin, KViewPresenterFactory( "kviewpresenterplugin" ) ) -KViewPresenter::KViewPresenter( QObject* parent, const char* name, const QStringList & ) +KViewPresenter::KViewPresenter( TQObject* parent, const char* name, const TQStringList & ) : Plugin( parent, name ) , m_pImageList( new ImageListDialog() ) , m_paFileOpen( 0 ) , m_bDontAdd( false ) , m_pCurrentItem( 0 ) - , m_pSlideshowTimer( new QTimer( this ) ) + , m_pSlideshowTimer( new TQTimer( this ) ) { kdDebug( 4630 ) << k_funcinfo << endl; m_imagelist.setAutoDelete( true ); - QObjectList * viewerList = parent->queryList( 0, "KImageViewer Part", false, false ); + TQObjectList * viewerList = parent->queryList( 0, "KImageViewer Part", false, false ); m_pViewer = static_cast<KImageViewer::Viewer *>( viewerList->getFirst() ); delete viewerList; if( m_pViewer ) { ( void ) new KAction( i18n( "&Image List..." ), 0, 0, - this, SLOT( slotImageList() ), + this, TQT_SLOT( slotImageList() ), actionCollection(), "plugin_presenter_imageList" ); m_paSlideshow = new KToggleAction( i18n( "Start &Slideshow" ), Key_S, actionCollection(), "plugin_presenter_slideshow" ); ( void ) new KAction( i18n( "&Previous Image in List" ), "previous", ALT+Key_Left, - this, SLOT( prev() ), + this, TQT_SLOT( prev() ), actionCollection(), "plugin_presenter_prev" ); ( void ) new KAction( i18n( "&Next Image in List" ), "next", ALT+Key_Right, - this, SLOT( next() ), + this, TQT_SLOT( next() ), actionCollection(), "plugin_presenter_next" ); - connect( m_paSlideshow, SIGNAL( toggled( bool ) ), m_pImageList->m_pSlideshow, SLOT( setOn( bool ) ) ); - connect( m_pImageList->m_pSlideshow, SIGNAL( toggled( bool ) ), m_paSlideshow, SLOT( setChecked( bool ) ) ); + connect( m_paSlideshow, TQT_SIGNAL( toggled( bool ) ), m_pImageList->m_pSlideshow, TQT_SLOT( setOn( bool ) ) ); + connect( m_pImageList->m_pSlideshow, TQT_SIGNAL( toggled( bool ) ), m_paSlideshow, TQT_SLOT( setChecked( bool ) ) ); // search for file_open action KXMLGUIClient * parentClient = static_cast<KXMLGUIClient*>( parent->qt_cast( "KXMLGUIClient" ) ); @@ -89,48 +89,48 @@ KViewPresenter::KViewPresenter( QObject* parent, const char* name, const QString m_paFileClose = parentClient->actionCollection()->action( "file_close" ); } if( m_paFileClose ) - connect( m_paFileClose, SIGNAL( activated() ), this, SLOT( slotClose() ) ); + connect( m_paFileClose, TQT_SIGNAL( activated() ), this, TQT_SLOT( slotClose() ) ); if( m_paFileOpen ) { - disconnect( m_paFileOpen, SIGNAL( activated() ), parent, SLOT( slotOpenFile() ) ); - connect( m_paFileOpen, SIGNAL( activated() ), this, SLOT( slotOpenFiles() ) ); + disconnect( m_paFileOpen, TQT_SIGNAL( activated() ), parent, TQT_SLOT( slotOpenFile() ) ); + connect( m_paFileOpen, TQT_SIGNAL( activated() ), this, TQT_SLOT( slotOpenFiles() ) ); } else { (void) new KAction( i18n( "Open &Multiple Files..." ), "queue", CTRL+SHIFT+Key_O, - this, SLOT( slotOpenFiles() ), + this, TQT_SLOT( slotOpenFiles() ), actionCollection(), "plugin_presenter_openFiles" ); } - connect( m_pViewer, SIGNAL( imageOpened( const KURL & ) ), - SLOT( slotImageOpened( const KURL & ) ) ); + connect( m_pViewer, TQT_SIGNAL( imageOpened( const KURL & ) ), + TQT_SLOT( slotImageOpened( const KURL & ) ) ); } else kdWarning( 4630 ) << "no KImageViewer interface found - the presenter plugin won't work" << endl; //( void )new KViewPresenterConfModule( this ); - connect( m_pImageList->m_pListView, SIGNAL( executed( QListViewItem* ) ), - this, SLOT( changeItem( QListViewItem* ) ) ); - connect( m_pImageList->m_pPrevious, SIGNAL( clicked() ), - this, SLOT( prev() ) ); - connect( m_pImageList->m_pNext, SIGNAL( clicked() ), - this, SLOT( next() ) ); - connect( m_pImageList->m_pListView, SIGNAL( spacePressed( QListViewItem* ) ), - this, SLOT( changeItem( QListViewItem* ) ) ); - connect( m_pImageList->m_pListView, SIGNAL( returnPressed( QListViewItem* ) ), - this, SLOT( changeItem( QListViewItem* ) ) ); - connect( m_pImageList->m_pSlideshow, SIGNAL( toggled( bool ) ), - this, SLOT( slideshow( bool ) ) ); - connect( m_pImageList->m_pInterval, SIGNAL( valueChanged( int ) ), - this, SLOT( setSlideshowInterval( int ) ) ); - connect( m_pImageList->m_pShuffle, SIGNAL( clicked() ), - this, SLOT( shuffle() ) ); - connect( m_pImageList->m_pLoad, SIGNAL( clicked() ), - this, SLOT( loadList() ) ); - connect( m_pImageList->m_pSave, SIGNAL( clicked() ), - this, SLOT( saveList() ) ); - connect( m_pImageList->m_pCloseAll, SIGNAL( clicked() ), - this, SLOT( closeAll() ) ); + connect( m_pImageList->m_pListView, TQT_SIGNAL( executed( TQListViewItem* ) ), + this, TQT_SLOT( changeItem( TQListViewItem* ) ) ); + connect( m_pImageList->m_pPrevious, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( prev() ) ); + connect( m_pImageList->m_pNext, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( next() ) ); + connect( m_pImageList->m_pListView, TQT_SIGNAL( spacePressed( TQListViewItem* ) ), + this, TQT_SLOT( changeItem( TQListViewItem* ) ) ); + connect( m_pImageList->m_pListView, TQT_SIGNAL( returnPressed( TQListViewItem* ) ), + this, TQT_SLOT( changeItem( TQListViewItem* ) ) ); + connect( m_pImageList->m_pSlideshow, TQT_SIGNAL( toggled( bool ) ), + this, TQT_SLOT( slideshow( bool ) ) ); + connect( m_pImageList->m_pInterval, TQT_SIGNAL( valueChanged( int ) ), + this, TQT_SLOT( setSlideshowInterval( int ) ) ); + connect( m_pImageList->m_pShuffle, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( shuffle() ) ); + connect( m_pImageList->m_pLoad, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( loadList() ) ); + connect( m_pImageList->m_pSave, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( saveList() ) ); + connect( m_pImageList->m_pCloseAll, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( closeAll() ) ); // allow drop on the dialog m_pImageList->installEventFilter( this ); @@ -140,8 +140,8 @@ KViewPresenter::KViewPresenter( QObject* parent, const char* name, const QString // grab drops on the main view m_pViewer->widget()->installEventFilter( this ); - connect( m_pSlideshowTimer, SIGNAL( timeout() ), - this, SLOT( next() ) ); + connect( m_pSlideshowTimer, TQT_SIGNAL( timeout() ), + this, TQT_SLOT( next() ) ); } KViewPresenter::~KViewPresenter() @@ -149,46 +149,46 @@ KViewPresenter::~KViewPresenter() kdDebug( 4630 ) << k_funcinfo << endl; if( m_paFileOpen ) { - disconnect( m_paFileOpen, SIGNAL( activated() ), this, SLOT( slotOpenFiles() ) ); + disconnect( m_paFileOpen, TQT_SIGNAL( activated() ), this, TQT_SLOT( slotOpenFiles() ) ); // If the parent() doesn't exist we either leave the "File Open" action // in an unusable state or KView was just shutting down and therefor we // can ignore this. I've only seen the second one happening and to get - // rid of the QObject::connect warning we do the parent() check. + // rid of the TQObject::connect warning we do the parent() check. if( parent() ) - connect( m_paFileOpen, SIGNAL( activated() ), parent(), SLOT( slotOpenFile() ) ); + connect( m_paFileOpen, TQT_SIGNAL( activated() ), parent(), TQT_SLOT( slotOpenFile() ) ); } } -bool KViewPresenter::eventFilter( QObject *obj, QEvent *ev ) +bool KViewPresenter::eventFilter( TQObject *obj, TQEvent *ev ) { if( obj == m_pImageList || obj == m_pImageList->m_pListView || obj == m_pImageList->m_pListView->viewport() || obj == m_pViewer->widget() ) { switch( ev->type() ) { - case QEvent::DragEnter: - case QEvent::DragMove: + case TQEvent::DragEnter: + case TQEvent::DragMove: { // drag enter event in the image list //kdDebug( 4630 ) << "DragEnterEvent in the image list: " << obj->className() << endl; - QDragEnterEvent * e = static_cast<QDragEnterEvent*>( ev ); + TQDragEnterEvent * e = static_cast<TQDragEnterEvent*>( ev ); //for( int i = 0; e->format( i ); ++i ) //kdDebug( 4630 ) << " - " << e->format( i ) << endl; - if( KURLDrag::canDecode( e ) )// || QImageDrag::canDecode( e ) ) + if( KURLDrag::canDecode( e ) )// || TQImageDrag::canDecode( e ) ) { e->accept(); return true; } } - case QEvent::Drop: + case TQEvent::Drop: { // drop event in the image list kdDebug( 4630 ) << "DropEvent in the image list: " << obj->className() << endl; - QDropEvent * e = static_cast<QDropEvent*>( ev ); - QStringList l; - //QImage image; + TQDropEvent * e = static_cast<TQDropEvent*>( ev ); + TQStringList l; + //TQImage image; if( KURLDrag::decodeToUnicodeUris( e, l ) ) { - for( QStringList::const_iterator it = l.begin(); it != l.end(); ++it ) + for( TQStringList::const_iterator it = l.begin(); it != l.end(); ++it ) { ImageInfo * info = new ImageInfo( KURL( *it ) ); if( ! m_imagelist.contains( info ) ) @@ -201,7 +201,7 @@ bool KViewPresenter::eventFilter( QObject *obj, QEvent *ev ) } return true; } - //else if( QImageDrag::decode( e, image ) ) + //else if( TQImageDrag::decode( e, image ) ) //newImage( image ); } default: // do nothing @@ -221,7 +221,7 @@ void KViewPresenter::slotImageOpened( const KURL & url ) if( ! m_imagelist.contains( info ) ) { m_imagelist.inSort( info ); - QListViewItem * item = new ImageListItem( m_pImageList->m_pListView, url ); + TQListViewItem * item = new ImageListItem( m_pImageList->m_pListView, url ); makeCurrent( item ); } else @@ -260,7 +260,7 @@ void KViewPresenter::slotOpenFiles() void KViewPresenter::slotClose() { - QListViewItem * next = m_pCurrentItem->itemBelow() ? m_pCurrentItem->itemBelow() : m_pImageList->m_pListView->firstChild(); + TQListViewItem * next = m_pCurrentItem->itemBelow() ? m_pCurrentItem->itemBelow() : m_pImageList->m_pListView->firstChild(); if( next == m_pCurrentItem ) next = 0; @@ -273,7 +273,7 @@ void KViewPresenter::slotClose() changeItem( next ); } -void KViewPresenter::changeItem( QListViewItem * qitem ) +void KViewPresenter::changeItem( TQListViewItem * qitem ) { kdDebug( 4630 ) << k_funcinfo << endl; if( qitem->rtti() == 48294 ) @@ -281,14 +281,14 @@ void KViewPresenter::changeItem( QListViewItem * qitem ) ImageListItem * item = static_cast<ImageListItem*>( qitem ); if( ! item->url().isEmpty() ) { - if( item->url().isLocalFile() && ! QFile::exists( item->url().path() ) ) + if( item->url().isLocalFile() && ! TQFile::exists( item->url().path() ) ) { kdDebug( 4630 ) << "file doesn't exist. removed." << endl; ImageInfo info( item->url() ); m_imagelist.remove( &info ); if( m_pCurrentItem == item ) { - QListViewItem * next = m_pCurrentItem->itemBelow() ? m_pCurrentItem->itemBelow() : m_pImageList->m_pListView->firstChild(); + TQListViewItem * next = m_pCurrentItem->itemBelow() ? m_pCurrentItem->itemBelow() : m_pImageList->m_pListView->firstChild(); if( next->rtti() != 48294 ) kdWarning( 4630 ) << "unknown ListView item" << endl; else @@ -327,7 +327,7 @@ void KViewPresenter::prev() kdDebug( 4630 ) << k_funcinfo << endl; if( m_pCurrentItem ) { - QListViewItem * prev = m_pCurrentItem->itemAbove() ? m_pCurrentItem->itemAbove() : m_pImageList->m_pListView->lastItem(); + TQListViewItem * prev = m_pCurrentItem->itemAbove() ? m_pCurrentItem->itemAbove() : m_pImageList->m_pListView->lastItem(); if( prev ) changeItem( prev ); } @@ -338,16 +338,16 @@ void KViewPresenter::next() kdDebug( 4630 ) << k_funcinfo << endl; if( m_pCurrentItem ) { - QListViewItem * next = m_pCurrentItem->itemBelow() ? m_pCurrentItem->itemBelow() : m_pImageList->m_pListView->firstChild(); + TQListViewItem * next = m_pCurrentItem->itemBelow() ? m_pCurrentItem->itemBelow() : m_pImageList->m_pListView->firstChild(); if( next ) changeItem( next ); } } -void KViewPresenter::makeCurrent( QListViewItem * item ) +void KViewPresenter::makeCurrent( TQListViewItem * item ) { if( m_pCurrentItem ) - m_pCurrentItem->setPixmap( 0, QPixmap() ); + m_pCurrentItem->setPixmap( 0, TQPixmap() ); if( item->rtti() != 48294 ) kdWarning( 4630 ) << "unknown ListView item" << endl; else @@ -384,8 +384,8 @@ void KViewPresenter::shuffle() { m_pImageList->noSort(); KListView * listview = m_pImageList->m_pListView; - QPtrList<QListViewItem> items; - for( QListViewItem * item = listview->firstChild(); item; item = listview->firstChild() ) + TQPtrList<TQListViewItem> items; + for( TQListViewItem * item = listview->firstChild(); item; item = listview->firstChild() ) { items.append( item ); listview->takeItem( item ); @@ -405,26 +405,26 @@ void KViewPresenter::closeAll() void KViewPresenter::loadList() { - KURL url = KFileDialog::getOpenURL( ":load_list", QString::null, m_pImageList ); + KURL url = KFileDialog::getOpenURL( ":load_list", TQString::null, m_pImageList ); if( url.isEmpty() ) return; - QString tempfile; + TQString tempfile; if( ! KIO::NetAccess::download( url, tempfile, m_pViewer->widget() ) ) { KMessageBox::error( m_pImageList, i18n( "Could not load\n%1" ).arg( url.prettyURL() ) ); return; } - QFile file( tempfile ); + TQFile file( tempfile ); if( file.open( IO_ReadOnly ) ) { - QTextStream t( &file ); + TQTextStream t( &file ); if( t.readLine() == "[KView Image List]" ) { //clear old image list closeAll(); - QStringList list; + TQStringList list; if( ! t.eof() ) m_pViewer->openURL( KURL( t.readLine() ) ); while( ! t.eof() ) @@ -451,12 +451,12 @@ void KViewPresenter::loadList() void KViewPresenter::saveList() { - KURL url = KFileDialog::getSaveURL( ":save_list", QString::null, m_pImageList ); + KURL url = KFileDialog::getSaveURL( ":save_list", TQString::null, m_pImageList ); if( url.isEmpty() ) return; - QString tempfile; + TQString tempfile; if( url.isLocalFile() ) tempfile = url.path(); else @@ -465,13 +465,13 @@ void KViewPresenter::saveList() tempfile = ktempf.name(); } - QFile file( tempfile ); + TQFile file( tempfile ); if( file.open( IO_WriteOnly ) ) { - QTextStream t( &file ); + TQTextStream t( &file ); // write header t << "[KView Image List]" << endl; - QListViewItem * item = m_pImageList->m_pListView->firstChild(); + TQListViewItem * item = m_pImageList->m_pListView->firstChild(); while( item ) { if( item->rtti() == 48294 ) diff --git a/kview/modules/presenter/kviewpresenter.h b/kview/modules/presenter/kviewpresenter.h index 29fc106b..e607f92b 100644 --- a/kview/modules/presenter/kviewpresenter.h +++ b/kview/modules/presenter/kviewpresenter.h @@ -24,14 +24,14 @@ #include <kparts/plugin.h> #include <kurl.h> -#include <qsortedlist.h> +#include <tqsortedlist.h> namespace KImageViewer { class Viewer; } class ImageListDialog; class ImageListItem; -class QListViewItem; -class QTimer; +class TQListViewItem; +class TQTimer; class KToggleAction; class KAction; @@ -39,7 +39,7 @@ class KViewPresenter : public KParts::Plugin { Q_OBJECT public: - KViewPresenter( QObject* parent, const char* name, const QStringList & ); + KViewPresenter( TQObject* parent, const char* name, const TQStringList & ); virtual ~KViewPresenter(); protected: @@ -67,14 +67,14 @@ protected: return url.prettyURL() < i1.url.prettyURL(); } }; - bool eventFilter( QObject *, QEvent * ); + bool eventFilter( TQObject *, TQEvent * ); private slots: void slotImageOpened( const KURL & ); void slotImageList(); void slotOpenFiles(); void slotClose(); - void changeItem( QListViewItem * ); + void changeItem( TQListViewItem * ); void prev(); void next(); void slideshow( bool ); @@ -85,7 +85,7 @@ private slots: void saveList(); private: - void makeCurrent( QListViewItem * ); + void makeCurrent( TQListViewItem * ); KImageViewer::Viewer * m_pViewer; ImageListDialog * m_pImageList; @@ -93,10 +93,10 @@ private: KAction * m_paFileOpen; KAction * m_paFileClose; - QSortedList<ImageInfo> m_imagelist; + TQSortedList<ImageInfo> m_imagelist; bool m_bDontAdd; ImageListItem * m_pCurrentItem; - QTimer * m_pSlideshowTimer; + TQTimer * m_pSlideshowTimer; }; // vim:sw=4:ts=4:cindent diff --git a/kview/modules/presenter/kviewpresenterconfmodule.cpp b/kview/modules/presenter/kviewpresenterconfmodule.cpp index a39ea378..1c79ee15 100644 --- a/kview/modules/presenter/kviewpresenterconfmodule.cpp +++ b/kview/modules/presenter/kviewpresenterconfmodule.cpp @@ -20,16 +20,16 @@ #include "kviewpresenterconfmodule.h" -#include <qlayout.h> -#include <qcheckbox.h> -#include <qframe.h> +#include <tqlayout.h> +#include <tqcheckbox.h> +#include <tqframe.h> #include <klocale.h> #include <kdialog.h> #include <kglobal.h> #include <kconfig.h> -KViewPresenterConfModule::KViewPresenterConfModule( QObject * parent ) +KViewPresenterConfModule::KViewPresenterConfModule( TQObject * parent ) : KPreferencesModule( "kviewpresenter", parent, "KView Presenter Config Module" ) { } @@ -47,12 +47,12 @@ void KViewPresenterConfModule::reset() { } -void KViewPresenterConfModule::createPage( QFrame * page ) +void KViewPresenterConfModule::createPage( TQFrame * page ) { - QBoxLayout * layout = new QVBoxLayout( page, KDialog::marginHint(), KDialog::spacingHint() ); + TQBoxLayout * layout = new TQVBoxLayout( page, KDialog::marginHint(), KDialog::spacingHint() ); layout->setAutoAdd( true ); - m_pCheckBox = new QCheckBox( "This is only for testing...", page ); + m_pCheckBox = new TQCheckBox( "This is only for testing...", page ); } // vim:sw=4:ts=4 diff --git a/kview/modules/presenter/kviewpresenterconfmodule.h b/kview/modules/presenter/kviewpresenterconfmodule.h index dd7e5cf2..6e3dcb46 100644 --- a/kview/modules/presenter/kviewpresenterconfmodule.h +++ b/kview/modules/presenter/kviewpresenterconfmodule.h @@ -23,13 +23,13 @@ #include "kpreferencesmodule.h" -class QCheckBox; +class TQCheckBox; class KViewPresenterConfModule : public KPreferencesModule { Q_OBJECT public: - KViewPresenterConfModule( QObject * parent ); + KViewPresenterConfModule( TQObject * parent ); ~KViewPresenterConfModule(); signals: @@ -38,10 +38,10 @@ class KViewPresenterConfModule : public KPreferencesModule protected: virtual void applyChanges(); virtual void reset(); - virtual void createPage( QFrame * page ); + virtual void createPage( TQFrame * page ); private: - QCheckBox * m_pCheckBox; + TQCheckBox * m_pCheckBox; }; // vim:sw=4:ts=4 diff --git a/kview/modules/scale/kfloatspinbox.cpp b/kview/modules/scale/kfloatspinbox.cpp index e5ce8465..936713f6 100644 --- a/kview/modules/scale/kfloatspinbox.cpp +++ b/kview/modules/scale/kfloatspinbox.cpp @@ -21,7 +21,7 @@ #include "kfloatspinbox.h" #if defined(QT_ACCESSIBILITY_SUPPORT) -#include <qaccessible.h> +#include <tqaccessible.h> #endif #include <knumvalidator.h> @@ -37,12 +37,12 @@ int pow( int a, int b ) return ret; } -KFloatSpinBox::KFloatSpinBox( float minValue, float maxValue, float step, unsigned int precision, QWidget * parent, const char * name ) - : QSpinBox( parent, name ) +KFloatSpinBox::KFloatSpinBox( float minValue, float maxValue, float step, unsigned int precision, TQWidget * parent, const char * name ) + : TQSpinBox( parent, name ) , m_doselection( true ) { setRange( minValue, maxValue, step, precision ); - connect( this, SIGNAL( valueChanged( int ) ), this, SLOT( slotValueChanged( int ) ) ); + connect( this, TQT_SIGNAL( valueChanged( int ) ), this, TQT_SLOT( slotValueChanged( int ) ) ); } KFloatSpinBox::~KFloatSpinBox() @@ -55,7 +55,7 @@ void KFloatSpinBox::setRange( float minValue, float maxValue, float step, unsign m_min = (int)( minValue * m_factor ); m_max = (int)( maxValue * m_factor ); m_step = (int)( step * m_factor ); - QSpinBox::setRange( m_min, m_max ); + TQSpinBox::setRange( m_min, m_max ); setSteps( m_step, m_step * 10 ); if( precision == 0 ) setValidator( new KIntValidator( m_min, m_max, this, 10, "KFloatValidator::KIntValidator" ) ); @@ -65,14 +65,14 @@ void KFloatSpinBox::setRange( float minValue, float maxValue, float step, unsign float KFloatSpinBox::value() const { - float ret = (float)QSpinBox::value() / m_factor; + float ret = (float)TQSpinBox::value() / m_factor; kdDebug( 4630 ) << ret << endl; return ret; } void KFloatSpinBox::setValue( float value ) { - QSpinBox::setValue( (int)( value * m_factor ) ); + TQSpinBox::setValue( (int)( value * m_factor ) ); } void KFloatSpinBox::setValueBlocking( float value ) @@ -84,7 +84,7 @@ void KFloatSpinBox::setValueBlocking( float value ) m_doselection = true; } -QString KFloatSpinBox::mapValueToText( int value ) +TQString KFloatSpinBox::mapValueToText( int value ) { return KGlobal::locale()->formatNumber( (float)value / (float)m_factor, 4 ); } @@ -97,13 +97,13 @@ int KFloatSpinBox::mapTextToValue( bool * ok ) void KFloatSpinBox::valueChange() { if( m_doselection ) - QSpinBox::valueChange(); + TQSpinBox::valueChange(); else { updateDisplay(); emit valueChanged( value() ); #if defined(QT_ACCESSIBILITY_SUPPORT) - QAccessible::updateAccessibility( this, 0, QAccessible::ValueChanged ); + TQAccessible::updateAccessibility( this, 0, TQAccessible::ValueChanged ); #endif } } diff --git a/kview/modules/scale/kfloatspinbox.h b/kview/modules/scale/kfloatspinbox.h index 9407a0f1..6424df38 100644 --- a/kview/modules/scale/kfloatspinbox.h +++ b/kview/modules/scale/kfloatspinbox.h @@ -21,13 +21,13 @@ #ifndef __kfloatspinbox_h_ #define __kfloatspinbox_h_ -#include <qspinbox.h> +#include <tqspinbox.h> class KFloatSpinBox : public QSpinBox { Q_OBJECT public: - KFloatSpinBox( float minValue, float maxValue, float step, unsigned int precision, QWidget * parent = 0, const char * name = 0 ); + KFloatSpinBox( float minValue, float maxValue, float step, unsigned int precision, TQWidget * parent = 0, const char * name = 0 ); virtual ~KFloatSpinBox(); void setRange( float minValue, float maxValue, float step, unsigned int precision ); @@ -43,7 +43,7 @@ class KFloatSpinBox : public QSpinBox virtual void setValueBlocking( float value ); protected: - virtual QString mapValueToText( int value ); + virtual TQString mapValueToText( int value ); virtual int mapTextToValue( bool * ok ); virtual void valueChange(); diff --git a/kview/modules/scale/kview_scale.cpp b/kview/modules/scale/kview_scale.cpp index aa8dec82..29e71b13 100644 --- a/kview/modules/scale/kview_scale.cpp +++ b/kview/modules/scale/kview_scale.cpp @@ -21,8 +21,8 @@ #include "kview_scale.h" #include "scaledlg.h" -#include <qimage.h> -#include <qvbox.h> +#include <tqimage.h> +#include <tqvbox.h> #include <kaction.h> #include <klocale.h> @@ -35,7 +35,7 @@ typedef KGenericFactory<KViewScale> KViewScaleFactory; K_EXPORT_COMPONENT_FACTORY( kview_scale, KViewScaleFactory( "kview_scale" ) ) -KViewScale::KViewScale( QObject* parent, const char* name, const QStringList & ) +KViewScale::KViewScale( TQObject* parent, const char* name, const TQStringList & ) : Plugin( parent, name ) , m_pViewer( 0 ) , m_pCanvas( 0 ) @@ -47,7 +47,7 @@ KViewScale::KViewScale( QObject* parent, const char* name, const QStringList & ) m_pCanvas = m_pViewer->canvas(); (void) new KAction( i18n( "&Scale Image..." ), 0, 0, - this, SLOT( slotScaleDlg() ), + this, TQT_SLOT( slotScaleDlg() ), actionCollection(), "plugin_scale" ); } else @@ -64,36 +64,36 @@ void KViewScale::slotScaleDlg() KDialogBase dlg( m_pViewer->widget(), "KView scale dialog", true, i18n( "Scale Image" ), KDialogBase::Ok|KDialogBase::Cancel ); ScaleDlg widget( m_pCanvas->imageSize(), dlg.makeVBoxMainWidget() ); #if 0 - QVBox * layout = dlg.makeVBoxMainWidget(); + TQVBox * layout = dlg.makeVBoxMainWidget(); - QGroupBox * pixelgroup = new QGroupBox( i18n( "Pixel Dimensions" ), layout ); - QGridLayout * pixelgroupgrid = new QGridLayout( pixelgroup, 1, 1, 0, KDialog::spacingHint() ); + TQGroupBox * pixelgroup = new TQGroupBox( i18n( "Pixel Dimensions" ), layout ); + TQGridLayout * pixelgroupgrid = new TQGridLayout( pixelgroup, 1, 1, 0, KDialog::spacingHint() ); pixelgroupgrid->setSpacing( KDialog::spacingHint() ); pixelgroupgrid->setMargin( KDialog::marginHint() ); - QLabel * label; - QSize imagesize = m_pCanvas->imageSize(); + TQLabel * label; + TQSize imagesize = m_pCanvas->imageSize(); // show original width - label = new QLabel( i18n( "Original width:" ), pixelgroup ); - label->setAlignment( QLabel::AlignRight ); + label = new TQLabel( i18n( "Original width:" ), pixelgroup ); + label->setAlignment( TQLabel::AlignRight ); pixelgroupgrid->addWidget( label, 0, 0 ); - pixelgroupgrid->addWidget( new QLabel( QString::number( imagesize.width() ), pixelgroup ), 0, 1 ); - label = new QLabel( i18n( "Height:" ), pixelgroup ); - label->setAlignment( QLabel::AlignRight ); + pixelgroupgrid->addWidget( new TQLabel( TQString::number( imagesize.width() ), pixelgroup ), 0, 1 ); + label = new TQLabel( i18n( "Height:" ), pixelgroup ); + label->setAlignment( TQLabel::AlignRight ); pixelgroupgrid->addWidget( label, 1, 0 ); - pixelgroupgrid->addWidget( new QLabel( QString::number( imagesize.height() ), pixelgroup ), 1, 1 ); + pixelgroupgrid->addWidget( new TQLabel( TQString::number( imagesize.height() ), pixelgroup ), 1, 1 ); pixelgroupgrid->addRowSpacing( 2, KDialog::spacingHint() ); - label = new QLabel( i18n( "New width:" ), pixelgroup ); - label->setAlignment( QLabel::AlignRight ); + label = new TQLabel( i18n( "New width:" ), pixelgroup ); + label->setAlignment( TQLabel::AlignRight ); pixelgroupgrid->addWidget( label, 3, 0 ); - label = new QLabel( i18n( "Height:" ), pixelgroup ); - label->setAlignment( QLabel::AlignRight ); + label = new TQLabel( i18n( "Height:" ), pixelgroup ); + label->setAlignment( TQLabel::AlignRight ); pixelgroupgrid->addWidget( label, 4, 0 ); - QSpinBox * newwidth = new QSpinBox( 1, 100000, 1, pixelgroup ); + TQSpinBox * newwidth = new TQSpinBox( 1, 100000, 1, pixelgroup ); pixelgroupgrid->addWidget( newwidth, 3, 1 ); - QSpinBox * newheight = new QSpinBox( 1, 100000, 1, pixelgroup ); + TQSpinBox * newheight = new TQSpinBox( 1, 100000, 1, pixelgroup ); pixelgroupgrid->addWidget( newheight, 4, 1 ); KComboBox * newsizeunit = new KComboBox( pixelgroup ); newsizeunit->insertItem( i18n( "px" ) ); @@ -102,34 +102,34 @@ void KViewScale::slotScaleDlg() pixelgroupgrid->addRowSpacing( 5, KDialog::spacingHint() ); - label = new QLabel( i18n( "Ratio X:" ), pixelgroup ); - label->setAlignment( QLabel::AlignRight ); + label = new TQLabel( i18n( "Ratio X:" ), pixelgroup ); + label->setAlignment( TQLabel::AlignRight ); pixelgroupgrid->addWidget( label, 6, 0 ); - label = new QLabel( i18n( "Y:" ), pixelgroup ); - label->setAlignment( QLabel::AlignRight ); + label = new TQLabel( i18n( "Y:" ), pixelgroup ); + label->setAlignment( TQLabel::AlignRight ); pixelgroupgrid->addWidget( label, 7, 0 ); - QSpinBox * ratiox = new QSpinBox( pixelgroup ); - ratiox->setValidator( new QDoubleValidator( 0.0001, 10000, 4, ratiox ) ); + TQSpinBox * ratiox = new TQSpinBox( pixelgroup ); + ratiox->setValidator( new TQDoubleValidator( 0.0001, 10000, 4, ratiox ) ); pixelgroupgrid->addWidget( ratiox, 6, 1 ); - QSpinBox * ratioy = new QSpinBox( pixelgroup ); - ratioy->setValidator( new QDoubleValidator( 0.0001, 10000, 4, ratioy ) ); + TQSpinBox * ratioy = new TQSpinBox( pixelgroup ); + ratioy->setValidator( new TQDoubleValidator( 0.0001, 10000, 4, ratioy ) ); pixelgroupgrid->addWidget( ratioy, 7, 1 ); - pixelgroupgrid->addMultiCellWidget( new QCheckBox( i18n( "Link" ), pixelgroup ), 6, 7, 2, 2, Qt::AlignVCenter ); + pixelgroupgrid->addMultiCellWidget( new TQCheckBox( i18n( "Link" ), pixelgroup ), 6, 7, 2, 2, Qt::AlignVCenter ); - QGroupBox * printgroup = new QGroupBox( i18n( "Print Size && Display Units" ), layout ); - QGridLayout * printgroupgrid = new QGridLayout( printgroup, 1, 1, 0, KDialog::spacingHint() ); + TQGroupBox * printgroup = new TQGroupBox( i18n( "Print Size && Display Units" ), layout ); + TQGridLayout * printgroupgrid = new TQGridLayout( printgroup, 1, 1, 0, KDialog::spacingHint() ); printgroupgrid->setSpacing( KDialog::spacingHint() ); printgroupgrid->setMargin( KDialog::marginHint() ); - label = new QLabel( i18n( "New width:" ), printgroup ); - label->setAlignment( QLabel::AlignRight ); + label = new TQLabel( i18n( "New width:" ), printgroup ); + label->setAlignment( TQLabel::AlignRight ); printgroupgrid->addWidget( label, 0, 0 ); - label = new QLabel( i18n( "Height:" ), printgroup ); - label->setAlignment( QLabel::AlignRight ); + label = new TQLabel( i18n( "Height:" ), printgroup ); + label->setAlignment( TQLabel::AlignRight ); printgroupgrid->addWidget( label, 1, 0 ); - QSpinBox * newwidth2 = new QSpinBox( printgroup ); + TQSpinBox * newwidth2 = new TQSpinBox( printgroup ); printgroupgrid->addWidget( newwidth2, 0, 1 ); - QSpinBox * newheight2 = new QSpinBox( printgroup ); + TQSpinBox * newheight2 = new TQSpinBox( printgroup ); printgroupgrid->addWidget( newheight2, 1, 1 ); KComboBox * newsizeunit2 = new KComboBox( printgroup ); newsizeunit2->insertItem( i18n( "in" ) ); @@ -138,17 +138,17 @@ void KViewScale::slotScaleDlg() printgroupgrid->addRowSpacing( 2, KDialog::spacingHint() ); - label = new QLabel( i18n( "Resolution X:" ), printgroup ); - label->setAlignment( QLabel::AlignRight ); + label = new TQLabel( i18n( "Resolution X:" ), printgroup ); + label->setAlignment( TQLabel::AlignRight ); printgroupgrid->addWidget( label, 3, 0 ); - label = new QLabel( i18n( "Y:" ), printgroup ); - label->setAlignment( QLabel::AlignRight ); + label = new TQLabel( i18n( "Y:" ), printgroup ); + label->setAlignment( TQLabel::AlignRight ); printgroupgrid->addWidget( label, 4, 0 ); - QSpinBox * resx = new QSpinBox( printgroup ); + TQSpinBox * resx = new TQSpinBox( printgroup ); printgroupgrid->addWidget( resx, 3, 1 ); - QSpinBox * resy = new QSpinBox( printgroup ); + TQSpinBox * resy = new TQSpinBox( printgroup ); printgroupgrid->addWidget( resy, 4, 1 ); - printgroupgrid->addMultiCellWidget( new QCheckBox( i18n( "Link" ), printgroup ), 3, 4, 2, 2, Qt::AlignVCenter ); + printgroupgrid->addMultiCellWidget( new TQCheckBox( i18n( "Link" ), printgroup ), 3, 4, 2, 2, Qt::AlignVCenter ); //KComboBox * newsizeunit2 = new KComboBox( printgroup ); //newsizeunit2->insertItem( i18n( "in" ) ); //newsizeunit2->insertItem( i18n( "mm" ) ); @@ -162,12 +162,12 @@ void KViewScale::slotScale() { // retrieve current image kdDebug( 4630 ) << "m_pCanvas = " << m_pCanvas << endl; - const QImage * image = m_pCanvas->image(); + const TQImage * image = m_pCanvas->image(); kdDebug( 4630 ) << "image pointer retrieved" << endl; if( image ) { // scale - QImage newimage = image->smoothScale( 50, 50 ); + TQImage newimage = image->smoothScale( 50, 50 ); // put back (modified) m_pCanvas->setImage( newimage ); m_pViewer->setModified( true ); diff --git a/kview/modules/scale/kview_scale.h b/kview/modules/scale/kview_scale.h index 2022f0ac..3ac45257 100644 --- a/kview/modules/scale/kview_scale.h +++ b/kview/modules/scale/kview_scale.h @@ -32,7 +32,7 @@ class KViewScale : public KParts::Plugin { Q_OBJECT public: - KViewScale( QObject* parent, const char* name, const QStringList & ); + KViewScale( TQObject* parent, const char* name, const TQStringList & ); virtual ~KViewScale(); private slots: diff --git a/kview/modules/scale/scaledlg.cpp b/kview/modules/scale/scaledlg.cpp index 997be86d..929aafcd 100644 --- a/kview/modules/scale/scaledlg.cpp +++ b/kview/modules/scale/scaledlg.cpp @@ -20,13 +20,13 @@ #include "scaledlg.h" -#include <qvbox.h> -#include <qlayout.h> -#include <qlabel.h> -#include <qspinbox.h> -#include <qcheckbox.h> -#include <qgroupbox.h> -#include <qsize.h> +#include <tqvbox.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqspinbox.h> +#include <tqcheckbox.h> +#include <tqgroupbox.h> +#include <tqsize.h> #include <kdebug.h> #include <kcombobox.h> @@ -37,8 +37,8 @@ #define ONEINCHINMM 2.54 -ScaleDlg::ScaleDlg( const QSize & origsize, QVBox * parent, const char * name ) - : QObject( parent, name ) +ScaleDlg::ScaleDlg( const TQSize & origsize, TQVBox * parent, const char * name ) + : TQObject( parent, name ) , m_origsize( origsize ) , m_newsizeunit( 0 ) , m_newsizeunit2( 0 ) @@ -48,66 +48,66 @@ ScaleDlg::ScaleDlg( const QSize & origsize, QVBox * parent, const char * name ) , m_resx( 72 ) , m_resy( 72 ) { - QGroupBox * pixelgroup = new QGroupBox( i18n( "Pixel Dimensions" ), parent ); - QGroupBox * printgroup = new QGroupBox( i18n( "Print Size && Display Units" ), parent ); + TQGroupBox * pixelgroup = new TQGroupBox( i18n( "Pixel Dimensions" ), parent ); + TQGroupBox * printgroup = new TQGroupBox( i18n( "Print Size && Display Units" ), parent ); - QGridLayout * pixelgroupgrid = new QGridLayout( pixelgroup, 1, 1, + TQGridLayout * pixelgroupgrid = new TQGridLayout( pixelgroup, 1, 1, KDialog::marginHint(), KDialog::spacingHint() ); - QGridLayout * printgroupgrid = new QGridLayout( printgroup, 1, 1, + TQGridLayout * printgroupgrid = new TQGridLayout( printgroup, 1, 1, KDialog::marginHint(), KDialog::spacingHint() ); - QLabel * label; + TQLabel * label; pixelgroupgrid->addRowSpacing( 0, KDialog::spacingHint() ); - label = new QLabel( i18n( "Original width:" ), pixelgroup ); - label->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) ); + label = new TQLabel( i18n( "Original width:" ), pixelgroup ); + label->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) ); pixelgroupgrid->addWidget( label, 1, 0 ); - label = new QLabel( i18n( "Height:" ), pixelgroup ); - label->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) ); + label = new TQLabel( i18n( "Height:" ), pixelgroup ); + label->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) ); pixelgroupgrid->addWidget( label, 2, 0 ); pixelgroupgrid->addRowSpacing( 3, KDialog::spacingHint() ); - label = new QLabel( i18n( "New width:" ), pixelgroup ); - label->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) ); + label = new TQLabel( i18n( "New width:" ), pixelgroup ); + label->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) ); pixelgroupgrid->addWidget( label, 4, 0 ); - label = new QLabel( i18n( "Height:" ), pixelgroup ); - label->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) ); + label = new TQLabel( i18n( "Height:" ), pixelgroup ); + label->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) ); pixelgroupgrid->addWidget( label, 5, 0 ); pixelgroupgrid->addRowSpacing( 6, KDialog::spacingHint() ); - label = new QLabel( i18n( "Ratio X:" ), pixelgroup ); - label->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) ); + label = new TQLabel( i18n( "Ratio X:" ), pixelgroup ); + label->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) ); pixelgroupgrid->addWidget( label, 7, 0 ); - label = new QLabel( i18n( "Y:" ), pixelgroup ); - label->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) ); + label = new TQLabel( i18n( "Y:" ), pixelgroup ); + label->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) ); pixelgroupgrid->addWidget( label, 8, 0 ); printgroupgrid->addRowSpacing( 0, KDialog::spacingHint() ); - label = new QLabel( i18n( "New width:" ), printgroup ); - label->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) ); + label = new TQLabel( i18n( "New width:" ), printgroup ); + label->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) ); printgroupgrid->addWidget( label, 1, 0 ); - label = new QLabel( i18n( "Height:" ), printgroup ); - label->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) ); + label = new TQLabel( i18n( "Height:" ), printgroup ); + label->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) ); printgroupgrid->addWidget( label, 2, 0 ); printgroupgrid->addRowSpacing( 3, KDialog::spacingHint() ); - label = new QLabel( i18n( "Resolution X:" ), printgroup ); - label->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) ); + label = new TQLabel( i18n( "Resolution X:" ), printgroup ); + label->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) ); printgroupgrid->addWidget( label, 4, 0 ); - label = new QLabel( i18n( "Y:" ), printgroup ); - label->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) ); + label = new TQLabel( i18n( "Y:" ), printgroup ); + label->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) ); printgroupgrid->addWidget( label, 5, 0 ); - m_pOldWidth = new QLabel( QString::number( origsize.width() ), pixelgroup ); - m_pOldWidth->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) ); + m_pOldWidth = new TQLabel( TQString::number( origsize.width() ), pixelgroup ); + m_pOldWidth->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) ); pixelgroupgrid->addWidget( m_pOldWidth, 1, 1 ); - m_pOldHeight = new QLabel( QString::number( origsize.height() ), pixelgroup ); - m_pOldHeight->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) ); + m_pOldHeight = new TQLabel( TQString::number( origsize.height() ), pixelgroup ); + m_pOldHeight->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) ); pixelgroupgrid->addWidget( m_pOldHeight, 2, 1 ); m_pNewWidth = new KFloatSpinBox( 1.0, 100000.0, 10.0, 0, pixelgroup ); @@ -125,7 +125,7 @@ ScaleDlg::ScaleDlg( const QSize & origsize, QVBox * parent, const char * name ) m_pRatioY = new KFloatSpinBox( 0.0001, 10000.0, 0.1, 4, pixelgroup ); pixelgroupgrid->addWidget( m_pRatioY, 8, 1 ); - m_pLinkRatio = new QCheckBox( i18n( "Link" ), pixelgroup ); + m_pLinkRatio = new TQCheckBox( i18n( "Link" ), pixelgroup ); pixelgroupgrid->addMultiCellWidget( m_pLinkRatio, 7, 8, 2, 2, Qt::AlignVCenter ); m_pNewWidth2 = new KFloatSpinBox( 0.0001, 10000.0, 0.1, 4, printgroup ); @@ -143,7 +143,7 @@ ScaleDlg::ScaleDlg( const QSize & origsize, QVBox * parent, const char * name ) m_pResolutionY = new KFloatSpinBox( 0.0001, 6000.0, 1.0, 4, printgroup ); printgroupgrid->addWidget( m_pResolutionY, 5, 1 ); - m_pLinkResolution = new QCheckBox( i18n( "Link" ), printgroup ); + m_pLinkResolution = new TQCheckBox( i18n( "Link" ), printgroup ); printgroupgrid->addMultiCellWidget( m_pLinkResolution, 4, 5, 2, 2, Qt::AlignVCenter ); m_pResolutionUnit = new KComboBox( printgroup ); m_pResolutionUnit->insertItem( i18n( "pixels/in" ) ); @@ -157,16 +157,16 @@ ScaleDlg::ScaleDlg( const QSize & origsize, QVBox * parent, const char * name ) m_newsizeunit2 = 0; m_resolutionunit = 0; - connect( m_pNewWidth, SIGNAL( valueChanged( float ) ), SLOT( slotNewWidth( float ) ) ); - connect( m_pNewHeight, SIGNAL( valueChanged( float ) ), SLOT( slotNewHeight( float ) ) ); - connect( m_pNewWidth2, SIGNAL( valueChanged( float ) ), SLOT( slotNewWidth2( float ) ) ); - connect( m_pNewHeight2, SIGNAL( valueChanged( float ) ), SLOT( slotNewHeight2( float ) ) ); - connect( m_pResolutionX, SIGNAL( valueChanged( float ) ), SLOT( slotResolutionX( float ) ) ); - connect( m_pResolutionY, SIGNAL( valueChanged( float ) ), SLOT( slotResolutionY( float ) ) ); + connect( m_pNewWidth, TQT_SIGNAL( valueChanged( float ) ), TQT_SLOT( slotNewWidth( float ) ) ); + connect( m_pNewHeight, TQT_SIGNAL( valueChanged( float ) ), TQT_SLOT( slotNewHeight( float ) ) ); + connect( m_pNewWidth2, TQT_SIGNAL( valueChanged( float ) ), TQT_SLOT( slotNewWidth2( float ) ) ); + connect( m_pNewHeight2, TQT_SIGNAL( valueChanged( float ) ), TQT_SLOT( slotNewHeight2( float ) ) ); + connect( m_pResolutionX, TQT_SIGNAL( valueChanged( float ) ), TQT_SLOT( slotResolutionX( float ) ) ); + connect( m_pResolutionY, TQT_SIGNAL( valueChanged( float ) ), TQT_SLOT( slotResolutionY( float ) ) ); - connect( m_pNewSizeUnit, SIGNAL( activated( int ) ), SLOT( slotChangeNewSizeUnit( int ) ) ); - connect( m_pNewSizeUnit2, SIGNAL( activated( int ) ), SLOT( slotChangeNewSizeUnit2( int ) ) ); - connect( m_pResolutionUnit, SIGNAL( activated( int ) ), SLOT( slotChangeResolutionUnit( int ) ) ); + connect( m_pNewSizeUnit, TQT_SIGNAL( activated( int ) ), TQT_SLOT( slotChangeNewSizeUnit( int ) ) ); + connect( m_pNewSizeUnit2, TQT_SIGNAL( activated( int ) ), TQT_SLOT( slotChangeNewSizeUnit2( int ) ) ); + connect( m_pResolutionUnit, TQT_SIGNAL( activated( int ) ), TQT_SLOT( slotChangeResolutionUnit( int ) ) ); } ScaleDlg::~ScaleDlg() diff --git a/kview/modules/scale/scaledlg.h b/kview/modules/scale/scaledlg.h index ac5a6c44..71fa23d5 100644 --- a/kview/modules/scale/scaledlg.h +++ b/kview/modules/scale/scaledlg.h @@ -21,20 +21,20 @@ #ifndef __scaledlg_h_ #define __scaledlg_h_ -#include <qobject.h> +#include <tqobject.h> -class QLabel; +class TQLabel; class KFloatSpinBox; class KComboBox; -class QCheckBox; -class QVBox; -class QSize; +class TQCheckBox; +class TQVBox; +class TQSize; class ScaleDlg : public QObject { Q_OBJECT public: - ScaleDlg( const QSize & originalsize, QVBox * parent, const char * name = 0 ); + ScaleDlg( const TQSize & originalsize, TQVBox * parent, const char * name = 0 ); ~ScaleDlg(); private slots: @@ -49,7 +49,7 @@ class ScaleDlg : public QObject void slotChangeResolutionUnit( int ); private: - QSize m_origsize; + TQSize m_origsize; int m_newsizeunit; int m_newsizeunit2; int m_resolutionunit; @@ -57,21 +57,21 @@ class ScaleDlg : public QObject float m_newwidth, m_newheight; // in Pixel float m_resx, m_resy; // in dpi - QLabel * m_pOldWidth; - QLabel * m_pOldHeight; + TQLabel * m_pOldWidth; + TQLabel * m_pOldHeight; KFloatSpinBox * m_pNewWidth; KFloatSpinBox * m_pNewHeight; KComboBox * m_pNewSizeUnit; KFloatSpinBox * m_pRatioX; KFloatSpinBox * m_pRatioY; - QCheckBox * m_pLinkRatio; + TQCheckBox * m_pLinkRatio; KFloatSpinBox * m_pNewWidth2; KFloatSpinBox * m_pNewHeight2; KComboBox * m_pNewSizeUnit2; KFloatSpinBox * m_pResolutionX; KFloatSpinBox * m_pResolutionY; - QCheckBox * m_pLinkResolution; + TQCheckBox * m_pLinkResolution; KComboBox * m_pResolutionUnit; }; diff --git a/kview/modules/scanner/kviewscanner.cpp b/kview/modules/scanner/kviewscanner.cpp index d1f96e5f..bf99e282 100644 --- a/kview/modules/scanner/kviewscanner.cpp +++ b/kview/modules/scanner/kviewscanner.cpp @@ -20,8 +20,8 @@ #include "kviewscanner.h" -#include <qimage.h> -#include <qobjectlist.h> +#include <tqimage.h> +#include <tqobjectlist.h> #include <kaction.h> #include <kinstance.h> @@ -35,19 +35,19 @@ typedef KGenericFactory<KViewScanner> KViewScannerFactory; K_EXPORT_COMPONENT_FACTORY( kview_scannerplugin, KViewScannerFactory( "kviewscannerplugin" ) ) -KViewScanner::KViewScanner( QObject* parent, const char* name, - const QStringList & ) +KViewScanner::KViewScanner( TQObject* parent, const char* name, + const TQStringList & ) : Plugin( parent, name ), m_pScandlg( 0 ), m_pViewer( 0 ) { - QObjectList * viewerList = parent->queryList( 0, "KImageViewer Part", false, false ); + TQObjectList * viewerList = parent->queryList( 0, "KImageViewer Part", false, false ); m_pViewer = static_cast<KImageViewer::Viewer *>( viewerList->getFirst() ); delete viewerList; if( m_pViewer ) { (void) new KAction( i18n( "&Scan Image..." ), "scanner", 0, - this, SLOT( slotScan() ), + this, TQT_SLOT( slotScan() ), actionCollection(), "plugin_scan" ); } else @@ -67,8 +67,8 @@ void KViewScanner::slotScan() { m_pScandlg->setMinimumSize( 300, 300 ); - connect( m_pScandlg, SIGNAL( finalImage( const QImage &, int ) ), - this, SLOT( slotImgScanned( const QImage & ) ) ); + connect( m_pScandlg, TQT_SIGNAL( finalImage( const TQImage &, int ) ), + this, TQT_SLOT( slotImgScanned( const TQImage & ) ) ); } else { @@ -86,7 +86,7 @@ void KViewScanner::slotScan() m_pScandlg->show(); } -void KViewScanner::slotImgScanned( const QImage & img ) +void KViewScanner::slotImgScanned( const TQImage & img ) { kdDebug( 4630 ) << "received an image from the scanner" << endl; m_pViewer->newImage( img ); diff --git a/kview/modules/scanner/kviewscanner.h b/kview/modules/scanner/kviewscanner.h index cdb32d67..56b59472 100644 --- a/kview/modules/scanner/kviewscanner.h +++ b/kview/modules/scanner/kviewscanner.h @@ -32,14 +32,14 @@ class KViewScanner : public KParts::Plugin { Q_OBJECT public: - KViewScanner( QObject* parent, const char* name, const QStringList & ); + KViewScanner( TQObject* parent, const char* name, const TQStringList & ); virtual ~KViewScanner(); //public slots: private slots: void slotScan(); - void slotImgScanned( const QImage & ); + void slotImgScanned( const TQImage & ); private: KScanDialog * m_pScandlg; diff --git a/kview/modules/template/kviewtemplate.cpp b/kview/modules/template/kviewtemplate.cpp index c8c6dc9d..f8277162 100644 --- a/kview/modules/template/kviewtemplate.cpp +++ b/kview/modules/template/kviewtemplate.cpp @@ -4,7 +4,7 @@ #include "kviewtemplate.h" -#include <qobjectlist.h> +#include <tqobjectlist.h> #include <kaction.h> /*#include <klocale.h>*/ @@ -15,16 +15,16 @@ typedef KGenericFactory<KViewTemplate> KViewTemplateFactory; K_EXPORT_COMPONENT_FACTORY( kview_templateplugin, KViewTemplateFactory( "kviewtemplateplugin" ) ) -KViewTemplate::KViewTemplate( QObject* parent, const char* name, const QStringList & ) +KViewTemplate::KViewTemplate( TQObject* parent, const char* name, const TQStringList & ) : Plugin( parent, name ) { - QObjectList * viewerList = parent->queryList( 0, "KImageViewer Part", false, false ); + TQObjectList * viewerList = parent->queryList( 0, "KImageViewer Part", false, false ); m_pViewer = static_cast<KImageViewer::Viewer *>( viewerList->getFirst() ); delete viewerList; if( m_pViewer ) { (void) new KAction( /*i18n(*/ "&Do Something" /*)*/, 0, 0, - this, SLOT( yourSlot() ), + this, TQT_SLOT( yourSlot() ), actionCollection(), "plugin_template" ); } else diff --git a/kview/modules/template/kviewtemplate.h b/kview/modules/template/kviewtemplate.h index 1d158b05..5d49890e 100644 --- a/kview/modules/template/kviewtemplate.h +++ b/kview/modules/template/kviewtemplate.h @@ -13,7 +13,7 @@ class KViewTemplate : public KParts::Plugin { Q_OBJECT public: - KViewTemplate( QObject* parent, const char* name, const QStringList & ); + KViewTemplate( TQObject* parent, const char* name, const TQStringList & ); virtual ~KViewTemplate(); private slots: |