From e69e8b1d09fb579316595b4e6a850e717358a8b1 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sun, 19 Jun 2011 19:03:33 +0000 Subject: TQt4 port kdegraphics This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegraphics@1237557 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kview/modules/browser/kviewbrowser.cpp | 8 ++--- kview/modules/browser/kviewbrowser.h | 3 +- kview/modules/effects/kvieweffects.cpp | 6 ++-- kview/modules/effects/kvieweffects.h | 3 +- .../presenter/config/kviewpresenterconfig.cpp | 8 ++--- .../presenter/config/kviewpresenterconfig.h | 3 +- kview/modules/presenter/imagelistdialog.ui | 22 ++++++------ kview/modules/presenter/imagelistdialog.ui.h | 2 +- kview/modules/presenter/imagelistitem.cpp | 12 +++---- kview/modules/presenter/imagelistitem.h | 2 +- kview/modules/presenter/kviewpresenter.cpp | 42 +++++++++++----------- kview/modules/presenter/kviewpresenter.h | 3 +- .../modules/presenter/kviewpresenterconfmodule.cpp | 8 ++--- kview/modules/presenter/kviewpresenterconfmodule.h | 3 +- kview/modules/scale/kfloatspinbox.cpp | 8 ++--- kview/modules/scale/kfloatspinbox.h | 5 +-- kview/modules/scale/kview_scale.cpp | 42 +++++++++++----------- kview/modules/scale/kview_scale.h | 3 +- kview/modules/scale/scaledlg.cpp | 42 +++++++++++----------- kview/modules/scale/scaledlg.h | 5 +-- kview/modules/scanner/kviewscanner.cpp | 6 ++-- kview/modules/scanner/kviewscanner.h | 3 +- kview/modules/template/kviewtemplate.cpp | 6 ++-- kview/modules/template/kviewtemplate.h | 3 +- 24 files changed, 129 insertions(+), 119 deletions(-) (limited to 'kview/modules') diff --git a/kview/modules/browser/kviewbrowser.cpp b/kview/modules/browser/kviewbrowser.cpp index 936061eb..ef4d091a 100644 --- a/kview/modules/browser/kviewbrowser.cpp +++ b/kview/modules/browser/kviewbrowser.cpp @@ -36,13 +36,13 @@ typedef KGenericFactory KViewBrowserFactory; K_EXPORT_COMPONENT_FACTORY( kview_browserplugin, KViewBrowserFactory( "kviewbrowserplugin" ) ) -KViewBrowser::KViewBrowser( TQObject* parent, const char* name, const TQStringList & ) - : Plugin( parent, name ) +KViewBrowser::KViewBrowser( TQObject* tqparent, const char* name, const TQStringList & ) + : Plugin( tqparent, name ) , m_pDirLister( 0 ) , m_pFileItemList( 0 ) , m_bShowCurrent( false ) { - m_pViewer = static_cast( parent ); + m_pViewer = static_cast( tqparent ); if( m_pViewer ) { m_paBack = KStdAction::back ( this, TQT_SLOT( slotBack() ), actionCollection(), "previous_image" ); @@ -163,7 +163,7 @@ void KViewBrowser::setupDirLister() { TQApplication::setOverrideCursor( WaitCursor ); TQString url = m_pViewer->url().prettyURL(); - int pos = url.findRev( "/" ); + int pos = url.tqfindRev( "/" ); url = url.left( (unsigned int)pos ); kdDebug( 4630 ) << "open KDirLister for " << url << endl; m_pDirLister->openURL( KURL( url )); diff --git a/kview/modules/browser/kviewbrowser.h b/kview/modules/browser/kviewbrowser.h index 96e8b17f..ecae29f3 100644 --- a/kview/modules/browser/kviewbrowser.h +++ b/kview/modules/browser/kviewbrowser.h @@ -33,8 +33,9 @@ class KMyFileItemList; class KViewBrowser : public KParts::Plugin { Q_OBJECT + TQ_OBJECT public: - KViewBrowser( TQObject* parent, const char* name, const TQStringList & ); + KViewBrowser( TQObject* tqparent, const char* name, const TQStringList & ); virtual ~KViewBrowser(); private slots: diff --git a/kview/modules/effects/kvieweffects.cpp b/kview/modules/effects/kvieweffects.cpp index a2e57327..c1ac49c2 100644 --- a/kview/modules/effects/kvieweffects.cpp +++ b/kview/modules/effects/kvieweffects.cpp @@ -24,15 +24,15 @@ typedef KGenericFactory KViewEffectsFactory; K_EXPORT_COMPONENT_FACTORY( kview_effectsplugin, KViewEffectsFactory( "kvieweffectsplugin" ) ) -KViewEffects::KViewEffects( TQObject* parent, const char* name, const TQStringList & ) - : Plugin( parent, name ) +KViewEffects::KViewEffects( TQObject* tqparent, const char* name, const TQStringList & ) + : Plugin( tqparent, name ) , m_gamma( 0.5 ), m_lastgamma( -1.0 ) , m_opacity( 50 ), m_lastopacity( -1 ) , m_intensity( 50 ), m_lastintensity( -1 ) , m_color( white ) , m_image( 0 ) { - TQObjectList * viewerList = parent->queryList( 0, "KImageViewer Part", false, false ); + TQObjectList * viewerList = tqparent->queryList( 0, "KImageViewer Part", false, false ); m_pViewer = static_cast( viewerList->getFirst() ); delete viewerList; if( m_pViewer ) diff --git a/kview/modules/effects/kvieweffects.h b/kview/modules/effects/kvieweffects.h index 821b99c8..43c1b16d 100644 --- a/kview/modules/effects/kvieweffects.h +++ b/kview/modules/effects/kvieweffects.h @@ -13,8 +13,9 @@ namespace KImageViewer { class Viewer; } class KViewEffects : public KParts::Plugin { Q_OBJECT + TQ_OBJECT public: - KViewEffects( TQObject* parent, const char* name, const TQStringList & ); + KViewEffects( TQObject* tqparent, const char* name, const TQStringList & ); virtual ~KViewEffects(); private slots: diff --git a/kview/modules/presenter/config/kviewpresenterconfig.cpp b/kview/modules/presenter/config/kviewpresenterconfig.cpp index e44889ed..edcf157d 100644 --- a/kview/modules/presenter/config/kviewpresenterconfig.cpp +++ b/kview/modules/presenter/config/kviewpresenterconfig.cpp @@ -31,11 +31,11 @@ typedef KGenericFactory KViewPresenterConfigFactory; K_EXPORT_COMPONENT_FACTORY( kcm_kviewpresenterconfig, KViewPresenterConfigFactory( "kcm_kviewpresenterconfig" ) ) -KViewPresenterConfig::KViewPresenterConfig( TQWidget * parent, const char *, const TQStringList & args ) - : KCModule( KViewPresenterConfigFactory::instance(), parent, args ) +KViewPresenterConfig::KViewPresenterConfig( TQWidget * tqparent, const char *, const TQStringList & args ) + : KCModule( KViewPresenterConfigFactory::instance(), tqparent, args ) { - TQBoxLayout * layout = new TQVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() ); - layout->setAutoAdd( true ); + TQBoxLayout * tqlayout = new TQVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() ); + tqlayout->setAutoAdd( true ); m_pCheckBox = new TQCheckBox( "This is only for testing...", this ); connect( m_pCheckBox, TQT_SIGNAL( clicked() ), this, TQT_SLOT( checkChanged() ) ); diff --git a/kview/modules/presenter/config/kviewpresenterconfig.h b/kview/modules/presenter/config/kviewpresenterconfig.h index ae257cea..d07c1506 100644 --- a/kview/modules/presenter/config/kviewpresenterconfig.h +++ b/kview/modules/presenter/config/kviewpresenterconfig.h @@ -26,8 +26,9 @@ class TQCheckBox; class KViewPresenterConfig : public KCModule { Q_OBJECT + TQ_OBJECT public: - KViewPresenterConfig( TQWidget * parent, const char * name = 0, const TQStringList & args = TQStringList() ); + KViewPresenterConfig( TQWidget * tqparent, const char * name = 0, const TQStringList & args = TQStringList() ); ~KViewPresenterConfig(); virtual void load(); diff --git a/kview/modules/presenter/imagelistdialog.ui b/kview/modules/presenter/imagelistdialog.ui index 66d9e9b5..2bc7206a 100644 --- a/kview/modules/presenter/imagelistdialog.ui +++ b/kview/modules/presenter/imagelistdialog.ui @@ -60,7 +60,7 @@ m_pListView - + 400 0 @@ -79,7 +79,7 @@ true - + Layout4 @@ -87,7 +87,7 @@ unnamed - + Layout2 @@ -140,7 +140,7 @@ Fixed - + 16 20 @@ -188,7 +188,7 @@ MinimumExpanding - + 20 80 @@ -206,7 +206,7 @@ false - + Layout4 @@ -259,7 +259,7 @@ kio/netaccess.h kurl.h kfiledialog.h - qstring.h + tqstring.h kmessagebox.h imagelistitem.h imagelistdialog.ui.h @@ -267,12 +267,12 @@ class KURL - + init() noSort() - - - + + + kdialog.h klistview.h diff --git a/kview/modules/presenter/imagelistdialog.ui.h b/kview/modules/presenter/imagelistdialog.ui.h index ce97754e..5c391549 100644 --- a/kview/modules/presenter/imagelistdialog.ui.h +++ b/kview/modules/presenter/imagelistdialog.ui.h @@ -1,7 +1,7 @@ /**************************************************************************** ** ui.h extension file, included from the uic-generated form implementation. ** -** If you wish to add, delete or rename slots use Qt Designer which will +** If you wish to add, delete or rename slots use TQt Designer which will ** update this file, preserving your code. Create an init() slot in place of ** a constructor, and a destroy() slot in place of a destructor. *****************************************************************************/ diff --git a/kview/modules/presenter/imagelistitem.cpp b/kview/modules/presenter/imagelistitem.cpp index 547de656..b31c65b2 100644 --- a/kview/modules/presenter/imagelistitem.cpp +++ b/kview/modules/presenter/imagelistitem.cpp @@ -24,10 +24,10 @@ #include -ImageListItem::ImageListItem( KListView * parent, const KURL & url ) - : KListViewItem( parent, parent->lastItem(), url.prettyURL() ) +ImageListItem::ImageListItem( KListView * tqparent, const KURL & url ) + : KListViewItem( tqparent, tqparent->lastItem(), url.prettyURL() ) , m_pImage( 0 ) - , m_filename( TQString::null ) + , m_filename( TQString() ) , m_url( url ) { setDragEnabled( true ); @@ -41,11 +41,11 @@ ImageListItem::ImageListItem( KListView * parent, const KURL & url ) /* TQString extension; TQString fileName = m_url.fileName(); - int extensionPos = fileName.findRev( '.' ); + int extensionPos = fileName.tqfindRev( '.' ); if ( extensionPos != -1 ) extension = fileName.mid( extensionPos ); // keep the '.' delete m_pTempFile; - m_pTempFile = new KTempFile( TQString::null, extension ); + m_pTempFile = new KTempFile( TQString(), extension ); m_filename = m_pTempFile->name(); m_pJob = KIO::get( m_url, m_pExtension->urlArgs().reload, false ); @@ -70,7 +70,7 @@ const TQImage * ImageListItem::image() const const TQString & ImageListItem::file() const { if( m_url.isLocalFile() ) - return TQString::null; + return TQString(); return m_filename; } diff --git a/kview/modules/presenter/imagelistitem.h b/kview/modules/presenter/imagelistitem.h index ee143a90..e54f84a4 100644 --- a/kview/modules/presenter/imagelistitem.h +++ b/kview/modules/presenter/imagelistitem.h @@ -30,7 +30,7 @@ class TQImage; class ImageListItem : public KListViewItem { public: - ImageListItem( KListView * parent, const KURL & url ); + ImageListItem( KListView * tqparent, const KURL & url ); ~ImageListItem(); const TQImage * image() const; diff --git a/kview/modules/presenter/kviewpresenter.cpp b/kview/modules/presenter/kviewpresenter.cpp index 3cf54d15..d85748c1 100644 --- a/kview/modules/presenter/kviewpresenter.cpp +++ b/kview/modules/presenter/kviewpresenter.cpp @@ -51,8 +51,8 @@ typedef KGenericFactory KViewPresenterFactory; K_EXPORT_COMPONENT_FACTORY( kview_presenterplugin, KViewPresenterFactory( "kviewpresenterplugin" ) ) -KViewPresenter::KViewPresenter( TQObject* parent, const char* name, const TQStringList & ) - : Plugin( parent, name ) +KViewPresenter::KViewPresenter( TQObject* tqparent, const char* name, const TQStringList & ) + : Plugin( tqparent, name ) , m_pImageList( new ImageListDialog() ) , m_paFileOpen( 0 ) , m_bDontAdd( false ) @@ -62,7 +62,7 @@ KViewPresenter::KViewPresenter( TQObject* parent, const char* name, const TQStri kdDebug( 4630 ) << k_funcinfo << endl; m_imagelist.setAutoDelete( true ); - TQObjectList * viewerList = parent->queryList( 0, "KImageViewer Part", false, false ); + TQObjectList * viewerList = tqparent->queryList( 0, "KImageViewer Part", false, false ); m_pViewer = static_cast( viewerList->getFirst() ); delete viewerList; if( m_pViewer ) @@ -82,17 +82,17 @@ KViewPresenter::KViewPresenter( TQObject* parent, const char* name, const TQStri connect( m_pImageList->m_pSlideshow, TQT_SIGNAL( toggled( bool ) ), m_paSlideshow, TQT_SLOT( setChecked( bool ) ) ); // search for file_open action - KXMLGUIClient * parentClient = static_cast( parent->qt_cast( "KXMLGUIClient" ) ); - if( parentClient ) + KXMLGUIClient * tqparentClient = static_cast( tqparent->qt_cast( "KXMLGUIClient" ) ); + if( tqparentClient ) { - m_paFileOpen = parentClient->actionCollection()->action( "file_open" ); - m_paFileClose = parentClient->actionCollection()->action( "file_close" ); + m_paFileOpen = tqparentClient->actionCollection()->action( "file_open" ); + m_paFileClose = tqparentClient->actionCollection()->action( "file_close" ); } if( m_paFileClose ) connect( m_paFileClose, TQT_SIGNAL( activated() ), this, TQT_SLOT( slotClose() ) ); if( m_paFileOpen ) { - disconnect( m_paFileOpen, TQT_SIGNAL( activated() ), parent, TQT_SLOT( slotOpenFile() ) ); + disconnect( m_paFileOpen, TQT_SIGNAL( activated() ), tqparent, TQT_SLOT( slotOpenFile() ) ); connect( m_paFileOpen, TQT_SIGNAL( activated() ), this, TQT_SLOT( slotOpenFiles() ) ); } else @@ -150,18 +150,18 @@ KViewPresenter::~KViewPresenter() if( m_paFileOpen ) { disconnect( m_paFileOpen, TQT_SIGNAL( activated() ), this, TQT_SLOT( slotOpenFiles() ) ); - // If the parent() doesn't exist we either leave the "File Open" action + // If the tqparent() 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 TQObject::connect warning we do the parent() check. - if( parent() ) - connect( m_paFileOpen, TQT_SIGNAL( activated() ), parent(), TQT_SLOT( slotOpenFile() ) ); + // rid of the TQObject::connect warning we do the tqparent() check. + if( tqparent() ) + connect( m_paFileOpen, TQT_SIGNAL( activated() ), tqparent(), TQT_SLOT( slotOpenFile() ) ); } } 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() ) + if( TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(m_pImageList) || TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(m_pImageList->m_pListView) || TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(m_pImageList->m_pListView->viewport()) || TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(m_pViewer->widget()) ) { switch( ev->type() ) { @@ -191,7 +191,7 @@ bool KViewPresenter::eventFilter( TQObject *obj, TQEvent *ev ) for( TQStringList::const_iterator it = l.begin(); it != l.end(); ++it ) { ImageInfo * info = new ImageInfo( KURL( *it ) ); - if( ! m_imagelist.contains( info ) ) + if( ! m_imagelist.tqcontains( info ) ) { m_imagelist.inSort( info ); ( void )new ImageListItem( m_pImageList->m_pListView, KURL( *it ) ); @@ -218,7 +218,7 @@ void KViewPresenter::slotImageOpened( const KURL & url ) { kdDebug( 4630 ) << k_funcinfo << "imagelist:" << endl; ImageInfo * info = new ImageInfo( url ); - if( ! m_imagelist.contains( info ) ) + if( ! m_imagelist.tqcontains( info ) ) { m_imagelist.inSort( info ); TQListViewItem * item = new ImageListItem( m_pImageList->m_pListView, url ); @@ -248,7 +248,7 @@ void KViewPresenter::slotOpenFiles() for( ++it; it != urls.end(); ++it ) { ImageInfo * info = new ImageInfo( *it ); - if( ! m_imagelist.contains( info ) ) + if( ! m_imagelist.tqcontains( info ) ) { m_imagelist.inSort( info ); ( void )new ImageListItem( m_pImageList->m_pListView, *it ); @@ -405,14 +405,14 @@ void KViewPresenter::closeAll() void KViewPresenter::loadList() { - KURL url = KFileDialog::getOpenURL( ":load_list", TQString::null, m_pImageList ); + KURL url = KFileDialog::getOpenURL( ":load_list", TQString(), m_pImageList ); if( url.isEmpty() ) return; TQString tempfile; if( ! KIO::NetAccess::download( url, tempfile, m_pViewer->widget() ) ) { - KMessageBox::error( m_pImageList, i18n( "Could not load\n%1" ).arg( url.prettyURL() ) ); + KMessageBox::error( m_pImageList, i18n( "Could not load\n%1" ).tqarg( url.prettyURL() ) ); return; } TQFile file( tempfile ); @@ -431,7 +431,7 @@ void KViewPresenter::loadList() { KURL url ( t.readLine() ); ImageInfo * info = new ImageInfo( url ); - if( ! m_imagelist.contains( info ) ) + if( ! m_imagelist.tqcontains( info ) ) { m_imagelist.inSort( info ); ( void )new ImageListItem( m_pImageList->m_pListView, url ); @@ -442,7 +442,7 @@ void KViewPresenter::loadList() } else { - KMessageBox::error( m_pImageList, i18n( "Wrong format\n%1" ).arg( url.prettyURL() ) ); + KMessageBox::error( m_pImageList, i18n( "Wrong format\n%1" ).tqarg( url.prettyURL() ) ); } file.close(); } @@ -451,7 +451,7 @@ void KViewPresenter::loadList() void KViewPresenter::saveList() { - KURL url = KFileDialog::getSaveURL( ":save_list", TQString::null, m_pImageList ); + KURL url = KFileDialog::getSaveURL( ":save_list", TQString(), m_pImageList ); if( url.isEmpty() ) return; diff --git a/kview/modules/presenter/kviewpresenter.h b/kview/modules/presenter/kviewpresenter.h index e607f92b..ba3198b2 100644 --- a/kview/modules/presenter/kviewpresenter.h +++ b/kview/modules/presenter/kviewpresenter.h @@ -38,8 +38,9 @@ class KAction; class KViewPresenter : public KParts::Plugin { Q_OBJECT + TQ_OBJECT public: - KViewPresenter( TQObject* parent, const char* name, const TQStringList & ); + KViewPresenter( TQObject* tqparent, const char* name, const TQStringList & ); virtual ~KViewPresenter(); protected: diff --git a/kview/modules/presenter/kviewpresenterconfmodule.cpp b/kview/modules/presenter/kviewpresenterconfmodule.cpp index 1c79ee15..ef051c28 100644 --- a/kview/modules/presenter/kviewpresenterconfmodule.cpp +++ b/kview/modules/presenter/kviewpresenterconfmodule.cpp @@ -29,8 +29,8 @@ #include #include -KViewPresenterConfModule::KViewPresenterConfModule( TQObject * parent ) - : KPreferencesModule( "kviewpresenter", parent, "KView Presenter Config Module" ) +KViewPresenterConfModule::KViewPresenterConfModule( TQObject * tqparent ) + : KPreferencesModule( "kviewpresenter", tqparent, "KView Presenter Config Module" ) { } @@ -49,8 +49,8 @@ void KViewPresenterConfModule::reset() void KViewPresenterConfModule::createPage( TQFrame * page ) { - TQBoxLayout * layout = new TQVBoxLayout( page, KDialog::marginHint(), KDialog::spacingHint() ); - layout->setAutoAdd( true ); + TQBoxLayout * tqlayout = new TQVBoxLayout( page, KDialog::marginHint(), KDialog::spacingHint() ); + tqlayout->setAutoAdd( true ); m_pCheckBox = new TQCheckBox( "This is only for testing...", page ); } diff --git a/kview/modules/presenter/kviewpresenterconfmodule.h b/kview/modules/presenter/kviewpresenterconfmodule.h index 6e3dcb46..8ecaa345 100644 --- a/kview/modules/presenter/kviewpresenterconfmodule.h +++ b/kview/modules/presenter/kviewpresenterconfmodule.h @@ -28,8 +28,9 @@ class TQCheckBox; class KViewPresenterConfModule : public KPreferencesModule { Q_OBJECT + TQ_OBJECT public: - KViewPresenterConfModule( TQObject * parent ); + KViewPresenterConfModule( TQObject * tqparent ); ~KViewPresenterConfModule(); signals: diff --git a/kview/modules/scale/kfloatspinbox.cpp b/kview/modules/scale/kfloatspinbox.cpp index 936713f6..428dc2ee 100644 --- a/kview/modules/scale/kfloatspinbox.cpp +++ b/kview/modules/scale/kfloatspinbox.cpp @@ -20,7 +20,7 @@ #include "kfloatspinbox.h" -#if defined(QT_ACCESSIBILITY_SUPPORT) +#if defined(TQT_ACCESSIBILITY_SUPPORT) #include #endif @@ -37,8 +37,8 @@ int pow( int a, int b ) return ret; } -KFloatSpinBox::KFloatSpinBox( float minValue, float maxValue, float step, unsigned int precision, TQWidget * parent, const char * name ) - : TQSpinBox( parent, name ) +KFloatSpinBox::KFloatSpinBox( float minValue, float maxValue, float step, unsigned int precision, TQWidget * tqparent, const char * name ) + : TQSpinBox( tqparent, name ) , m_doselection( true ) { setRange( minValue, maxValue, step, precision ); @@ -102,7 +102,7 @@ void KFloatSpinBox::valueChange() { updateDisplay(); emit valueChanged( value() ); -#if defined(QT_ACCESSIBILITY_SUPPORT) +#if defined(TQT_ACCESSIBILITY_SUPPORT) TQAccessible::updateAccessibility( this, 0, TQAccessible::ValueChanged ); #endif } diff --git a/kview/modules/scale/kfloatspinbox.h b/kview/modules/scale/kfloatspinbox.h index 6424df38..572fc952 100644 --- a/kview/modules/scale/kfloatspinbox.h +++ b/kview/modules/scale/kfloatspinbox.h @@ -23,11 +23,12 @@ #include -class KFloatSpinBox : public QSpinBox +class KFloatSpinBox : public TQSpinBox { Q_OBJECT + TQ_OBJECT public: - KFloatSpinBox( float minValue, float maxValue, float step, unsigned int precision, TQWidget * parent = 0, const char * name = 0 ); + KFloatSpinBox( float minValue, float maxValue, float step, unsigned int precision, TQWidget * tqparent = 0, const char * name = 0 ); virtual ~KFloatSpinBox(); void setRange( float minValue, float maxValue, float step, unsigned int precision ); diff --git a/kview/modules/scale/kview_scale.cpp b/kview/modules/scale/kview_scale.cpp index 29e71b13..39cf9e37 100644 --- a/kview/modules/scale/kview_scale.cpp +++ b/kview/modules/scale/kview_scale.cpp @@ -35,12 +35,12 @@ typedef KGenericFactory KViewScaleFactory; K_EXPORT_COMPONENT_FACTORY( kview_scale, KViewScaleFactory( "kview_scale" ) ) -KViewScale::KViewScale( TQObject* parent, const char* name, const TQStringList & ) - : Plugin( parent, name ) +KViewScale::KViewScale( TQObject* tqparent, const char* name, const TQStringList & ) + : Plugin( tqparent, name ) , m_pViewer( 0 ) , m_pCanvas( 0 ) { - m_pViewer = static_cast( parent ); + m_pViewer = static_cast( tqparent ); if( m_pViewer ) { kdDebug( 4630 ) << "m_pViewer->canvas() = " << m_pViewer->canvas() << endl; @@ -64,9 +64,9 @@ 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 - TQVBox * layout = dlg.makeVBoxMainWidget(); + TQVBox * tqlayout = dlg.makeVBoxMainWidget(); - TQGroupBox * pixelgroup = new TQGroupBox( i18n( "Pixel Dimensions" ), layout ); + TQGroupBox * pixelgroup = new TQGroupBox( i18n( "Pixel Dimensions" ), tqlayout ); TQGridLayout * pixelgroupgrid = new TQGridLayout( pixelgroup, 1, 1, 0, KDialog::spacingHint() ); pixelgroupgrid->setSpacing( KDialog::spacingHint() ); pixelgroupgrid->setMargin( KDialog::marginHint() ); @@ -75,21 +75,21 @@ void KViewScale::slotScaleDlg() // show original width label = new TQLabel( i18n( "Original width:" ), pixelgroup ); - label->setAlignment( TQLabel::AlignRight ); + label->tqsetAlignment( TQLabel::AlignRight ); pixelgroupgrid->addWidget( label, 0, 0 ); pixelgroupgrid->addWidget( new TQLabel( TQString::number( imagesize.width() ), pixelgroup ), 0, 1 ); label = new TQLabel( i18n( "Height:" ), pixelgroup ); - label->setAlignment( TQLabel::AlignRight ); + label->tqsetAlignment( TQLabel::AlignRight ); pixelgroupgrid->addWidget( label, 1, 0 ); pixelgroupgrid->addWidget( new TQLabel( TQString::number( imagesize.height() ), pixelgroup ), 1, 1 ); pixelgroupgrid->addRowSpacing( 2, KDialog::spacingHint() ); label = new TQLabel( i18n( "New width:" ), pixelgroup ); - label->setAlignment( TQLabel::AlignRight ); + label->tqsetAlignment( TQLabel::AlignRight ); pixelgroupgrid->addWidget( label, 3, 0 ); label = new TQLabel( i18n( "Height:" ), pixelgroup ); - label->setAlignment( TQLabel::AlignRight ); + label->tqsetAlignment( TQLabel::AlignRight ); pixelgroupgrid->addWidget( label, 4, 0 ); TQSpinBox * newwidth = new TQSpinBox( 1, 100000, 1, pixelgroup ); pixelgroupgrid->addWidget( newwidth, 3, 1 ); @@ -98,15 +98,15 @@ void KViewScale::slotScaleDlg() KComboBox * newsizeunit = new KComboBox( pixelgroup ); newsizeunit->insertItem( i18n( "px" ) ); newsizeunit->insertItem( i18n( "%" ) ); - pixelgroupgrid->addMultiCellWidget( newsizeunit, 3, 4, 2, 2, Qt::AlignVCenter ); + pixelgroupgrid->addMultiCellWidget( newsizeunit, 3, 4, 2, 2, TQt::AlignVCenter ); pixelgroupgrid->addRowSpacing( 5, KDialog::spacingHint() ); label = new TQLabel( i18n( "Ratio X:" ), pixelgroup ); - label->setAlignment( TQLabel::AlignRight ); + label->tqsetAlignment( TQLabel::AlignRight ); pixelgroupgrid->addWidget( label, 6, 0 ); label = new TQLabel( i18n( "Y:" ), pixelgroup ); - label->setAlignment( TQLabel::AlignRight ); + label->tqsetAlignment( TQLabel::AlignRight ); pixelgroupgrid->addWidget( label, 7, 0 ); TQSpinBox * ratiox = new TQSpinBox( pixelgroup ); ratiox->setValidator( new TQDoubleValidator( 0.0001, 10000, 4, ratiox ) ); @@ -114,18 +114,18 @@ void KViewScale::slotScaleDlg() TQSpinBox * ratioy = new TQSpinBox( pixelgroup ); ratioy->setValidator( new TQDoubleValidator( 0.0001, 10000, 4, ratioy ) ); pixelgroupgrid->addWidget( ratioy, 7, 1 ); - pixelgroupgrid->addMultiCellWidget( new TQCheckBox( i18n( "Link" ), pixelgroup ), 6, 7, 2, 2, Qt::AlignVCenter ); + pixelgroupgrid->addMultiCellWidget( new TQCheckBox( i18n( "Link" ), pixelgroup ), 6, 7, 2, 2, TQt::AlignVCenter ); - TQGroupBox * printgroup = new TQGroupBox( i18n( "Print Size && Display Units" ), layout ); + TQGroupBox * printgroup = new TQGroupBox( i18n( "Print Size && Display Units" ), tqlayout ); TQGridLayout * printgroupgrid = new TQGridLayout( printgroup, 1, 1, 0, KDialog::spacingHint() ); printgroupgrid->setSpacing( KDialog::spacingHint() ); printgroupgrid->setMargin( KDialog::marginHint() ); label = new TQLabel( i18n( "New width:" ), printgroup ); - label->setAlignment( TQLabel::AlignRight ); + label->tqsetAlignment( TQLabel::AlignRight ); printgroupgrid->addWidget( label, 0, 0 ); label = new TQLabel( i18n( "Height:" ), printgroup ); - label->setAlignment( TQLabel::AlignRight ); + label->tqsetAlignment( TQLabel::AlignRight ); printgroupgrid->addWidget( label, 1, 0 ); TQSpinBox * newwidth2 = new TQSpinBox( printgroup ); printgroupgrid->addWidget( newwidth2, 0, 1 ); @@ -134,25 +134,25 @@ void KViewScale::slotScaleDlg() KComboBox * newsizeunit2 = new KComboBox( printgroup ); newsizeunit2->insertItem( i18n( "in" ) ); newsizeunit2->insertItem( i18n( "mm" ) ); - printgroupgrid->addMultiCellWidget( newsizeunit2, 0, 1, 2, 2, Qt::AlignVCenter ); + printgroupgrid->addMultiCellWidget( newsizeunit2, 0, 1, 2, 2, TQt::AlignVCenter ); printgroupgrid->addRowSpacing( 2, KDialog::spacingHint() ); label = new TQLabel( i18n( "Resolution X:" ), printgroup ); - label->setAlignment( TQLabel::AlignRight ); + label->tqsetAlignment( TQLabel::AlignRight ); printgroupgrid->addWidget( label, 3, 0 ); label = new TQLabel( i18n( "Y:" ), printgroup ); - label->setAlignment( TQLabel::AlignRight ); + label->tqsetAlignment( TQLabel::AlignRight ); printgroupgrid->addWidget( label, 4, 0 ); TQSpinBox * resx = new TQSpinBox( printgroup ); printgroupgrid->addWidget( resx, 3, 1 ); TQSpinBox * resy = new TQSpinBox( printgroup ); printgroupgrid->addWidget( resy, 4, 1 ); - printgroupgrid->addMultiCellWidget( new TQCheckBox( i18n( "Link" ), printgroup ), 3, 4, 2, 2, Qt::AlignVCenter ); + printgroupgrid->addMultiCellWidget( new TQCheckBox( i18n( "Link" ), printgroup ), 3, 4, 2, 2, TQt::AlignVCenter ); //KComboBox * newsizeunit2 = new KComboBox( printgroup ); //newsizeunit2->insertItem( i18n( "in" ) ); //newsizeunit2->insertItem( i18n( "mm" ) ); - //printgroupgrid->addMultiCellWidget( newsizeunit2, 0, 1, 2, 2, Qt::AlignVCenter ); + //printgroupgrid->addMultiCellWidget( newsizeunit2, 0, 1, 2, 2, TQt::AlignVCenter ); #endif dlg.exec(); diff --git a/kview/modules/scale/kview_scale.h b/kview/modules/scale/kview_scale.h index 3ac45257..99417425 100644 --- a/kview/modules/scale/kview_scale.h +++ b/kview/modules/scale/kview_scale.h @@ -31,8 +31,9 @@ namespace KImageViewer { class KViewScale : public KParts::Plugin { Q_OBJECT + TQ_OBJECT public: - KViewScale( TQObject* parent, const char* name, const TQStringList & ); + KViewScale( TQObject* tqparent, const char* name, const TQStringList & ); virtual ~KViewScale(); private slots: diff --git a/kview/modules/scale/scaledlg.cpp b/kview/modules/scale/scaledlg.cpp index 929aafcd..8483f763 100644 --- a/kview/modules/scale/scaledlg.cpp +++ b/kview/modules/scale/scaledlg.cpp @@ -37,8 +37,8 @@ #define ONEINCHINMM 2.54 -ScaleDlg::ScaleDlg( const TQSize & origsize, TQVBox * parent, const char * name ) - : TQObject( parent, name ) +ScaleDlg::ScaleDlg( const TQSize & origsize, TQVBox * tqparent, const char * name ) + : TQObject( tqparent, name ) , m_origsize( origsize ) , m_newsizeunit( 0 ) , m_newsizeunit2( 0 ) @@ -48,8 +48,8 @@ ScaleDlg::ScaleDlg( const TQSize & origsize, TQVBox * parent, const char * name , m_resx( 72 ) , m_resy( 72 ) { - TQGroupBox * pixelgroup = new TQGroupBox( i18n( "Pixel Dimensions" ), parent ); - TQGroupBox * printgroup = new TQGroupBox( i18n( "Print Size && Display Units" ), parent ); + TQGroupBox * pixelgroup = new TQGroupBox( i18n( "Pixel Dimensions" ), tqparent ); + TQGroupBox * printgroup = new TQGroupBox( i18n( "Print Size && Display Units" ), tqparent ); TQGridLayout * pixelgroupgrid = new TQGridLayout( pixelgroup, 1, 1, KDialog::marginHint(), KDialog::spacingHint() ); @@ -61,53 +61,53 @@ ScaleDlg::ScaleDlg( const TQSize & origsize, TQVBox * parent, const char * name pixelgroupgrid->addRowSpacing( 0, KDialog::spacingHint() ); label = new TQLabel( i18n( "Original width:" ), pixelgroup ); - label->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) ); + label->tqsetAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) ); pixelgroupgrid->addWidget( label, 1, 0 ); label = new TQLabel( i18n( "Height:" ), pixelgroup ); - label->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) ); + label->tqsetAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) ); pixelgroupgrid->addWidget( label, 2, 0 ); pixelgroupgrid->addRowSpacing( 3, KDialog::spacingHint() ); label = new TQLabel( i18n( "New width:" ), pixelgroup ); - label->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) ); + label->tqsetAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) ); pixelgroupgrid->addWidget( label, 4, 0 ); label = new TQLabel( i18n( "Height:" ), pixelgroup ); - label->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) ); + label->tqsetAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) ); pixelgroupgrid->addWidget( label, 5, 0 ); pixelgroupgrid->addRowSpacing( 6, KDialog::spacingHint() ); label = new TQLabel( i18n( "Ratio X:" ), pixelgroup ); - label->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) ); + label->tqsetAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) ); pixelgroupgrid->addWidget( label, 7, 0 ); label = new TQLabel( i18n( "Y:" ), pixelgroup ); - label->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) ); + label->tqsetAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) ); pixelgroupgrid->addWidget( label, 8, 0 ); printgroupgrid->addRowSpacing( 0, KDialog::spacingHint() ); label = new TQLabel( i18n( "New width:" ), printgroup ); - label->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) ); + label->tqsetAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) ); printgroupgrid->addWidget( label, 1, 0 ); label = new TQLabel( i18n( "Height:" ), printgroup ); - label->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) ); + label->tqsetAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) ); printgroupgrid->addWidget( label, 2, 0 ); printgroupgrid->addRowSpacing( 3, KDialog::spacingHint() ); label = new TQLabel( i18n( "Resolution X:" ), printgroup ); - label->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) ); + label->tqsetAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) ); printgroupgrid->addWidget( label, 4, 0 ); label = new TQLabel( i18n( "Y:" ), printgroup ); - label->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) ); + label->tqsetAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) ); printgroupgrid->addWidget( label, 5, 0 ); m_pOldWidth = new TQLabel( TQString::number( origsize.width() ), pixelgroup ); - m_pOldWidth->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) ); + m_pOldWidth->tqsetAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) ); pixelgroupgrid->addWidget( m_pOldWidth, 1, 1 ); m_pOldHeight = new TQLabel( TQString::number( origsize.height() ), pixelgroup ); - m_pOldHeight->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) ); + m_pOldHeight->tqsetAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) ); pixelgroupgrid->addWidget( m_pOldHeight, 2, 1 ); m_pNewWidth = new KFloatSpinBox( 1.0, 100000.0, 10.0, 0, pixelgroup ); @@ -118,7 +118,7 @@ ScaleDlg::ScaleDlg( const TQSize & origsize, TQVBox * parent, const char * name m_pNewSizeUnit = new KComboBox( pixelgroup ); m_pNewSizeUnit->insertItem( i18n( "px" ) ); m_pNewSizeUnit->insertItem( i18n( "%" ) ); - pixelgroupgrid->addMultiCellWidget( m_pNewSizeUnit, 4, 5, 2, 2, Qt::AlignVCenter ); + pixelgroupgrid->addMultiCellWidget( m_pNewSizeUnit, 4, 5, 2, 2, TQt::AlignVCenter ); m_pRatioX = new KFloatSpinBox( 0.0001, 10000.0, 0.1, 4, pixelgroup ); pixelgroupgrid->addWidget( m_pRatioX, 7, 1 ); @@ -126,7 +126,7 @@ ScaleDlg::ScaleDlg( const TQSize & origsize, TQVBox * parent, const char * name pixelgroupgrid->addWidget( m_pRatioY, 8, 1 ); m_pLinkRatio = new TQCheckBox( i18n( "Link" ), pixelgroup ); - pixelgroupgrid->addMultiCellWidget( m_pLinkRatio, 7, 8, 2, 2, Qt::AlignVCenter ); + pixelgroupgrid->addMultiCellWidget( m_pLinkRatio, 7, 8, 2, 2, TQt::AlignVCenter ); m_pNewWidth2 = new KFloatSpinBox( 0.0001, 10000.0, 0.1, 4, printgroup ); printgroupgrid->addWidget( m_pNewWidth2, 1, 1 ); @@ -136,7 +136,7 @@ ScaleDlg::ScaleDlg( const TQSize & origsize, TQVBox * parent, const char * name m_pNewSizeUnit2 = new KComboBox( printgroup ); m_pNewSizeUnit2->insertItem( i18n( "in" ) ); m_pNewSizeUnit2->insertItem( i18n( "mm" ) ); - printgroupgrid->addMultiCellWidget( m_pNewSizeUnit2, 1, 2, 2, 2, Qt::AlignVCenter ); + printgroupgrid->addMultiCellWidget( m_pNewSizeUnit2, 1, 2, 2, 2, TQt::AlignVCenter ); m_pResolutionX = new KFloatSpinBox( 0.0001, 6000.0, 1.0, 4, printgroup ); printgroupgrid->addWidget( m_pResolutionX, 4, 1 ); @@ -144,11 +144,11 @@ ScaleDlg::ScaleDlg( const TQSize & origsize, TQVBox * parent, const char * name printgroupgrid->addWidget( m_pResolutionY, 5, 1 ); m_pLinkResolution = new TQCheckBox( i18n( "Link" ), printgroup ); - printgroupgrid->addMultiCellWidget( m_pLinkResolution, 4, 5, 2, 2, Qt::AlignVCenter ); + printgroupgrid->addMultiCellWidget( m_pLinkResolution, 4, 5, 2, 2, TQt::AlignVCenter ); m_pResolutionUnit = new KComboBox( printgroup ); m_pResolutionUnit->insertItem( i18n( "pixels/in" ) ); m_pResolutionUnit->insertItem( i18n( "pixels/mm" ) ); - printgroupgrid->addMultiCellWidget( m_pResolutionUnit, 6, 6, 1, 2, Qt::AlignLeft ); + printgroupgrid->addMultiCellWidget( m_pResolutionUnit, 6, 6, 1, 2, TQt::AlignLeft ); m_pNewWidth->setValue( m_origsize.width() ); m_pNewHeight->setValue( m_origsize.height() ); diff --git a/kview/modules/scale/scaledlg.h b/kview/modules/scale/scaledlg.h index 71fa23d5..9c039d8c 100644 --- a/kview/modules/scale/scaledlg.h +++ b/kview/modules/scale/scaledlg.h @@ -30,11 +30,12 @@ class TQCheckBox; class TQVBox; class TQSize; -class ScaleDlg : public QObject +class ScaleDlg : public TQObject { Q_OBJECT + TQ_OBJECT public: - ScaleDlg( const TQSize & originalsize, TQVBox * parent, const char * name = 0 ); + ScaleDlg( const TQSize & originalsize, TQVBox * tqparent, const char * name = 0 ); ~ScaleDlg(); private slots: diff --git a/kview/modules/scanner/kviewscanner.cpp b/kview/modules/scanner/kviewscanner.cpp index bf99e282..9f8b370c 100644 --- a/kview/modules/scanner/kviewscanner.cpp +++ b/kview/modules/scanner/kviewscanner.cpp @@ -35,13 +35,13 @@ typedef KGenericFactory KViewScannerFactory; K_EXPORT_COMPONENT_FACTORY( kview_scannerplugin, KViewScannerFactory( "kviewscannerplugin" ) ) -KViewScanner::KViewScanner( TQObject* parent, const char* name, +KViewScanner::KViewScanner( TQObject* tqparent, const char* name, const TQStringList & ) - : Plugin( parent, name ), + : Plugin( tqparent, name ), m_pScandlg( 0 ), m_pViewer( 0 ) { - TQObjectList * viewerList = parent->queryList( 0, "KImageViewer Part", false, false ); + TQObjectList * viewerList = tqparent->queryList( 0, "KImageViewer Part", false, false ); m_pViewer = static_cast( viewerList->getFirst() ); delete viewerList; if( m_pViewer ) diff --git a/kview/modules/scanner/kviewscanner.h b/kview/modules/scanner/kviewscanner.h index 56b59472..2c5abc77 100644 --- a/kview/modules/scanner/kviewscanner.h +++ b/kview/modules/scanner/kviewscanner.h @@ -31,8 +31,9 @@ namespace KImageViewer { class Viewer; } class KViewScanner : public KParts::Plugin { Q_OBJECT + TQ_OBJECT public: - KViewScanner( TQObject* parent, const char* name, const TQStringList & ); + KViewScanner( TQObject* tqparent, const char* name, const TQStringList & ); virtual ~KViewScanner(); //public slots: diff --git a/kview/modules/template/kviewtemplate.cpp b/kview/modules/template/kviewtemplate.cpp index f8277162..54869912 100644 --- a/kview/modules/template/kviewtemplate.cpp +++ b/kview/modules/template/kviewtemplate.cpp @@ -15,10 +15,10 @@ typedef KGenericFactory KViewTemplateFactory; K_EXPORT_COMPONENT_FACTORY( kview_templateplugin, KViewTemplateFactory( "kviewtemplateplugin" ) ) -KViewTemplate::KViewTemplate( TQObject* parent, const char* name, const TQStringList & ) - : Plugin( parent, name ) +KViewTemplate::KViewTemplate( TQObject* tqparent, const char* name, const TQStringList & ) + : Plugin( tqparent, name ) { - TQObjectList * viewerList = parent->queryList( 0, "KImageViewer Part", false, false ); + TQObjectList * viewerList = tqparent->queryList( 0, "KImageViewer Part", false, false ); m_pViewer = static_cast( viewerList->getFirst() ); delete viewerList; if( m_pViewer ) diff --git a/kview/modules/template/kviewtemplate.h b/kview/modules/template/kviewtemplate.h index 5d49890e..03470b3d 100644 --- a/kview/modules/template/kviewtemplate.h +++ b/kview/modules/template/kviewtemplate.h @@ -12,8 +12,9 @@ namespace KImageViewer { class Viewer; } class KViewTemplate : public KParts::Plugin { Q_OBJECT + TQ_OBJECT public: - KViewTemplate( TQObject* parent, const char* name, const TQStringList & ); + KViewTemplate( TQObject* tqparent, const char* name, const TQStringList & ); virtual ~KViewTemplate(); private slots: -- cgit v1.2.1