diff options
Diffstat (limited to 'kview/modules')
25 files changed, 117 insertions, 169 deletions
diff --git a/kview/modules/browser/kmyfileitemlist.h b/kview/modules/browser/kmyfileitemlist.h index 80f01013..a84beb75 100644 --- a/kview/modules/browser/kmyfileitemlist.h +++ b/kview/modules/browser/kmyfileitemlist.h @@ -33,7 +33,4 @@ class KMyFileItemList : public TQPtrList<KFileItem> protected: virtual int compareItems( TQPtrCollection::Item item1, TQPtrCollection::Item item2 ); }; - -// vim:sw=4:ts=4 - #endif diff --git a/kview/modules/browser/kviewbrowser.cpp b/kview/modules/browser/kviewbrowser.cpp index 41fee38b..1ba8823e 100644 --- a/kview/modules/browser/kviewbrowser.cpp +++ b/kview/modules/browser/kviewbrowser.cpp @@ -45,9 +45,9 @@ KViewBrowser::KViewBrowser( TQObject* parent, const char* name, const TQStringLi m_pViewer = static_cast<KImageViewer::Viewer *>( parent ); if( m_pViewer ) { - m_paBack = KStdAction::back ( this, TQT_SLOT( slotBack() ), actionCollection(), "previous_image" ); + m_paBack = KStdAction::back ( this, TQ_SLOT( slotBack() ), actionCollection(), "previous_image" ); m_paBack->setShortcut( SHIFT+Key_Left ); - m_paForward = KStdAction::forward( this, TQT_SLOT( slotForward() ), actionCollection(), "next_image" ); + m_paForward = KStdAction::forward( this, TQ_SLOT( slotForward() ), actionCollection(), "next_image" ); m_paForward->setShortcut( SHIFT+Key_Right ); m_pExtension = m_pViewer->browserExtension(); } @@ -156,8 +156,8 @@ void KViewBrowser::setupDirLister() m_pDirLister = new KDirLister(); m_pDirLister->setMimeFilter( KImageIO::mimeTypes( KImageIO::Reading ) ); m_pDirLister->setShowingDotFiles( true ); - connect( m_pDirLister, TQT_SIGNAL( newItems( const KFileItemList & ) ), TQT_SLOT( slotNewItems( const KFileItemList & ) ) ); - connect( m_pDirLister, TQT_SIGNAL( deleteItem( KFileItem * ) ), TQT_SLOT( slotDeleteItem( KFileItem * ) ) ); + connect( m_pDirLister, TQ_SIGNAL( newItems( const KFileItemList & ) ), TQ_SLOT( slotNewItems( const KFileItemList & ) ) ); + connect( m_pDirLister, TQ_SIGNAL( deleteItem( KFileItem * ) ), TQ_SLOT( slotDeleteItem( KFileItem * ) ) ); } if( m_pDirLister->url() != KURL( m_pViewer->url().directory( true, false ) ) ) { @@ -168,12 +168,10 @@ void KViewBrowser::setupDirLister() kdDebug( 4630 ) << "open KDirLister for " << url << endl; m_pDirLister->openURL( KURL( url )); while( ! m_pDirLister->isFinished() ) - kapp->processEvents(); + tdeApp->processEvents(); //while( ! m_pFileItemList ) - //kapp->processEvents(); + //tdeApp->processEvents(); TQApplication::restoreOverrideCursor(); } } - -// vim:sw=4:ts=4:cindent #include "kviewbrowser.moc" diff --git a/kview/modules/browser/kviewbrowser.h b/kview/modules/browser/kviewbrowser.h index 198c53af..cb0a5c69 100644 --- a/kview/modules/browser/kviewbrowser.h +++ b/kview/modules/browser/kviewbrowser.h @@ -32,7 +32,7 @@ class KMyFileItemList; class KViewBrowser : public KParts::Plugin { - Q_OBJECT + TQ_OBJECT public: KViewBrowser( TQObject* parent, const char* name, const TQStringList & ); @@ -58,6 +58,4 @@ private: TDEAction * m_paBack; TDEAction * m_paForward; }; - -// vim:sw=4:ts=4:cindent #endif diff --git a/kview/modules/effects/kvieweffects.cpp b/kview/modules/effects/kvieweffects.cpp index 803b81e7..fd42504d 100644 --- a/kview/modules/effects/kvieweffects.cpp +++ b/kview/modules/effects/kvieweffects.cpp @@ -38,20 +38,20 @@ KViewEffects::KViewEffects( TQObject* parent, const char* name, const TQStringLi if( m_pViewer ) { TDEAction * gammaaction = new TDEAction( i18n( "&Gamma Correction..." ), 0, 0, - this, TQT_SLOT( gamma() ), + this, TQ_SLOT( gamma() ), actionCollection(), "plugin_effects_gamma" ); TDEAction * blendaction = new TDEAction( i18n( "&Blend Color..." ), 0, 0, - this, TQT_SLOT( blend() ), + this, TQ_SLOT( blend() ), actionCollection(), "plugin_effects_blend" ); TDEAction * intensityaction = new TDEAction( i18n( "Change &Intensity (Brightness)..." ), 0, 0, - this, TQT_SLOT( intensity() ), + this, TQ_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(), 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 ) ) ); + connect( m_pViewer->widget(), TQ_SIGNAL( hasImage( bool ) ), gammaaction, TQ_SLOT( setEnabled( bool ) ) ); + connect( m_pViewer->widget(), TQ_SIGNAL( hasImage( bool ) ), blendaction, TQ_SLOT( setEnabled( bool ) ) ); + connect( m_pViewer->widget(), TQ_SIGNAL( hasImage( bool ) ), intensityaction, TQ_SLOT( setEnabled( bool ) ) ); } else kdWarning( 4630 ) << "no KImageViewer interface found - the effects plugin won't work" << endl; @@ -67,7 +67,7 @@ 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, TQT_SIGNAL( tryClicked() ), this, TQT_SLOT( applyIntensity() ) ); + connect( &dlg, TQ_SIGNAL( tryClicked() ), this, TQ_SLOT( applyIntensity() ) ); TQVBox * vbox = new TQVBox( &dlg ); vbox->setSpacing( KDialog::spacingHint() ); @@ -77,7 +77,7 @@ void KViewEffects::intensity() percent->setValue( m_intensity ); percent->setLabel( i18n( "&Intensity:" ) ); percent->setSuffix( TQString::fromAscii( "%" ) ); - connect( percent, TQT_SIGNAL( valueChanged( int ) ), this, TQT_SLOT( setIntensity( int ) ) ); + connect( percent, TQ_SIGNAL( valueChanged( int ) ), this, TQ_SLOT( setIntensity( int ) ) ); int result = dlg.exec(); if( result == TQDialog::Accepted ) @@ -117,7 +117,7 @@ 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, TQT_SIGNAL( tryClicked() ), this, TQT_SLOT( applyBlend() ) ); + connect( &dlg, TQ_SIGNAL( tryClicked() ), this, TQ_SLOT( applyBlend() ) ); TQVBox * vbox = new TQVBox( &dlg ); vbox->setSpacing( KDialog::spacingHint() ); @@ -127,11 +127,11 @@ void KViewEffects::blend() opacity->setValue( m_opacity ); opacity->setLabel( i18n( "O&pacity:" ) ); opacity->setSuffix( TQString::fromAscii( "%" ) ); - connect( opacity, TQT_SIGNAL( valueChanged( int ) ), this, TQT_SLOT( setOpacity( int ) ) ); + connect( opacity, TQ_SIGNAL( valueChanged( int ) ), this, TQ_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, TQT_SIGNAL( changed( const TQColor & ) ), this, TQT_SLOT( setColor( const TQColor & ) ) ); + connect( color, TQ_SIGNAL( changed( const TQColor & ) ), this, TQ_SLOT( setColor( const TQColor & ) ) ); int result = dlg.exec(); if( result == TQDialog::Accepted ) @@ -175,12 +175,12 @@ 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, TQT_SIGNAL( tryClicked() ), this, TQT_SLOT( applyGammaCorrection() ) ); + connect( &dlg, TQ_SIGNAL( tryClicked() ), this, TQ_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, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SLOT( setGammaValue( double ) ) ); + connect( gammavalue, TQ_SIGNAL( valueChanged( double ) ), this, TQ_SLOT( setGammaValue( double ) ) ); gammavalue->setLabel( i18n( "Gamma value:" ) ); dlg.setMainWidget( gammavalue ); @@ -239,6 +239,4 @@ inline TQImage * KViewEffects::workImage() } return 0; } - -// vim:sw=4:ts=4:cindent #include "kvieweffects.moc" diff --git a/kview/modules/effects/kvieweffects.h b/kview/modules/effects/kvieweffects.h index 461b9c0f..ae817157 100644 --- a/kview/modules/effects/kvieweffects.h +++ b/kview/modules/effects/kvieweffects.h @@ -12,7 +12,7 @@ namespace KImageViewer { class Viewer; } class KViewEffects : public KParts::Plugin { - Q_OBJECT + TQ_OBJECT public: KViewEffects( TQObject* parent, const char* name, const TQStringList & ); @@ -42,6 +42,4 @@ private: TQColor m_color; TQImage * m_image; }; - -// vim:sw=4:ts=4:cindent #endif // KVIEWEFFECTS_H diff --git a/kview/modules/presenter/DESIGN b/kview/modules/presenter/DESIGN index 3b187e78..034a3032 100644 --- a/kview/modules/presenter/DESIGN +++ b/kview/modules/presenter/DESIGN @@ -27,15 +27,15 @@ Presenter Plugin: - keep local copy of downloaded files - delete local copy on destruction - API: - QImage * image(); + TQImage * image(); KURL url(); - QString file(); //returns local filename or QString::null + TQString file(); //returns local filename or TQString::null - when loading an item from the playlist first ask for a - QImage, if that's not available ask for a local file, if + TQImage, if that's not available ask for a local file, if that's also not available take the url. - API: - QImage * image(); - QString file(); + TQImage * image(); + TQString file(); KURL url(); void setRandom(bool); void randomizeList(); diff --git a/kview/modules/presenter/config/kviewpresenterconfig.cpp b/kview/modules/presenter/config/kviewpresenterconfig.cpp index 5cda7ee0..1e1e091c 100644 --- a/kview/modules/presenter/config/kviewpresenterconfig.cpp +++ b/kview/modules/presenter/config/kviewpresenterconfig.cpp @@ -38,7 +38,7 @@ KViewPresenterConfig::KViewPresenterConfig( TQWidget * parent, const char *, con layout->setAutoAdd( true ); m_pCheckBox = new TQCheckBox( "This is only for testing...", this ); - connect( m_pCheckBox, TQT_SIGNAL( clicked() ), this, TQT_SLOT( checkChanged() ) ); + connect( m_pCheckBox, TQ_SIGNAL( clicked() ), this, TQ_SLOT( checkChanged() ) ); } KViewPresenterConfig::~KViewPresenterConfig() @@ -66,7 +66,4 @@ void KViewPresenterConfig::save() void KViewPresenterConfig::defaults() { } - -// vim:sw=4:ts=4 - #include "kviewpresenterconfig.moc" diff --git a/kview/modules/presenter/config/kviewpresenterconfig.h b/kview/modules/presenter/config/kviewpresenterconfig.h index 3ad25c2b..73742259 100644 --- a/kview/modules/presenter/config/kviewpresenterconfig.h +++ b/kview/modules/presenter/config/kviewpresenterconfig.h @@ -25,7 +25,7 @@ class TQCheckBox; class KViewPresenterConfig : public TDECModule { - Q_OBJECT + TQ_OBJECT public: KViewPresenterConfig( TQWidget * parent, const char * name = 0, const TQStringList & args = TQStringList() ); @@ -41,7 +41,4 @@ class KViewPresenterConfig : public TDECModule private: TQCheckBox * m_pCheckBox; }; - -// vim:sw=4:ts=4 - #endif // KVIEWPRESENTERCONFIG_H diff --git a/kview/modules/presenter/imagelistdialog.ui b/kview/modules/presenter/imagelistdialog.ui index 547c0cf0..1f7a2435 100644 --- a/kview/modules/presenter/imagelistdialog.ui +++ b/kview/modules/presenter/imagelistdialog.ui @@ -254,31 +254,26 @@ </connections> <includes> <include location="global" impldecl="in declaration">kdialog.h</include> + <include location="local" impldecl="in implementation">imagelistdialog.ui.h</include> + <include location="local" impldecl="in implementation">imagelistitem.h</include> <include location="global" impldecl="in implementation">kdebug.h</include> <include location="global" impldecl="in implementation">kimageviewer/viewer.h</include> - <include location="global" impldecl="in implementation">tdeio/netaccess.h</include> + <include location="global" impldecl="in implementation">knuminput.h</include> + <include location="global" impldecl="in implementation">kpushbutton.h</include> <include location="global" impldecl="in implementation">kurl.h</include> <include location="global" impldecl="in implementation">tdefiledialog.h</include> - <include location="global" impldecl="in implementation">tqstring.h</include> + <include location="global" impldecl="in implementation">tdeio/netaccess.h</include> + <include location="global" impldecl="in implementation">tdelistview.h</include> <include location="global" impldecl="in implementation">tdemessagebox.h</include> - <include location="local" impldecl="in implementation">imagelistitem.h</include> - <include location="local" impldecl="in implementation">imagelistdialog.ui.h</include> + <include location="global" impldecl="in implementation">tqstring.h</include> </includes> <forwards> <forward>class KURL</forward> </forwards> -<Q_SLOTS> +<slots> <slot access="private" specifier="non virtual">init()</slot> <slot specifier="non virtual">noSort()</slot> -</Q_SLOTS> +</slots> <layoutdefaults spacing="6" margin="11"/> <layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> -<includes> - <include location="global" impldecl="in implementation">knuminput.h</include> - <include location="global" impldecl="in implementation">kpushbutton.h</include> -</includes> -<includehints> - <includehint>kdialog.h</includehint> - <includehint>tdelistview.h</includehint> -</includehints> </UI> diff --git a/kview/modules/presenter/imagelistitem.cpp b/kview/modules/presenter/imagelistitem.cpp index 62ca6e90..d002023d 100644 --- a/kview/modules/presenter/imagelistitem.cpp +++ b/kview/modules/presenter/imagelistitem.cpp @@ -78,5 +78,3 @@ const KURL & ImageListItem::url() const { return m_url; } - -// vim:sw=4:ts=4 diff --git a/kview/modules/presenter/imagelistitem.h b/kview/modules/presenter/imagelistitem.h index 321dcf4d..b10e5cfa 100644 --- a/kview/modules/presenter/imagelistitem.h +++ b/kview/modules/presenter/imagelistitem.h @@ -44,6 +44,4 @@ class ImageListItem : public TDEListViewItem TQString m_filename; KURL m_url; }; - -// vim:sw=4:ts=4 #endif // IMAGELISTITEM_H diff --git a/kview/modules/presenter/kviewpresenter.cpp b/kview/modules/presenter/kviewpresenter.cpp index c7405547..96b3abbb 100644 --- a/kview/modules/presenter/kviewpresenter.cpp +++ b/kview/modules/presenter/kviewpresenter.cpp @@ -60,7 +60,6 @@ KViewPresenter::KViewPresenter( TQObject* parent, const char* name, const TQStri , m_pSlideshowTimer( new TQTimer( this ) ) { kdDebug( 4630 ) << k_funcinfo << endl; - m_imagelist.setAutoDelete( true ); TQObjectList * viewerList = parent->queryList( 0, "KImageViewer Part", false, false ); m_pViewer = static_cast<KImageViewer::Viewer *>( viewerList->getFirst() ); @@ -68,18 +67,18 @@ KViewPresenter::KViewPresenter( TQObject* parent, const char* name, const TQStri if( m_pViewer ) { ( void ) new TDEAction( i18n( "&Image List..." ), 0, 0, - this, TQT_SLOT( slotImageList() ), + this, TQ_SLOT( slotImageList() ), actionCollection(), "plugin_presenter_imageList" ); m_paSlideshow = new TDEToggleAction( i18n( "Start &Slideshow" ), Key_S, actionCollection(), "plugin_presenter_slideshow" ); ( void ) new TDEAction( i18n( "&Previous Image in List" ), "go-previous", ALT+Key_Left, - this, TQT_SLOT( prev() ), + this, TQ_SLOT( prev() ), actionCollection(), "plugin_presenter_prev" ); ( void ) new TDEAction( i18n( "&Next Image in List" ), "go-next", ALT+Key_Right, - this, TQT_SLOT( next() ), + this, TQ_SLOT( next() ), actionCollection(), "plugin_presenter_next" ); - 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 ) ) ); + connect( m_paSlideshow, TQ_SIGNAL( toggled( bool ) ), m_pImageList->m_pSlideshow, TQ_SLOT( setOn( bool ) ) ); + connect( m_pImageList->m_pSlideshow, TQ_SIGNAL( toggled( bool ) ), m_paSlideshow, TQ_SLOT( setChecked( bool ) ) ); // search for file_open action KXMLGUIClient * parentClient = static_cast<KXMLGUIClient*>( parent->tqt_cast( "KXMLGUIClient" ) ); @@ -89,48 +88,48 @@ KViewPresenter::KViewPresenter( TQObject* parent, const char* name, const TQStri m_paFileClose = parentClient->actionCollection()->action( "file_close" ); } if( m_paFileClose ) - connect( m_paFileClose, TQT_SIGNAL( activated() ), this, TQT_SLOT( slotClose() ) ); + connect( m_paFileClose, TQ_SIGNAL( activated() ), this, TQ_SLOT( slotClose() ) ); if( m_paFileOpen ) { - disconnect( m_paFileOpen, TQT_SIGNAL( activated() ), parent, TQT_SLOT( slotOpenFile() ) ); - connect( m_paFileOpen, TQT_SIGNAL( activated() ), this, TQT_SLOT( slotOpenFiles() ) ); + disconnect( m_paFileOpen, TQ_SIGNAL( activated() ), parent, TQ_SLOT( slotOpenFile() ) ); + connect( m_paFileOpen, TQ_SIGNAL( activated() ), this, TQ_SLOT( slotOpenFiles() ) ); } else { (void) new TDEAction( i18n( "Open &Multiple Files..." ), "queue", CTRL+SHIFT+Key_O, - this, TQT_SLOT( slotOpenFiles() ), + this, TQ_SLOT( slotOpenFiles() ), actionCollection(), "plugin_presenter_openFiles" ); } - connect( m_pViewer, TQT_SIGNAL( imageOpened( const KURL & ) ), - TQT_SLOT( slotImageOpened( const KURL & ) ) ); + connect( m_pViewer, TQ_SIGNAL( imageOpened( const KURL & ) ), + TQ_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, 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() ) ); + connect( m_pImageList->m_pListView, TQ_SIGNAL( executed( TQListViewItem* ) ), + this, TQ_SLOT( changeItem( TQListViewItem* ) ) ); + connect( m_pImageList->m_pPrevious, TQ_SIGNAL( clicked() ), + this, TQ_SLOT( prev() ) ); + connect( m_pImageList->m_pNext, TQ_SIGNAL( clicked() ), + this, TQ_SLOT( next() ) ); + connect( m_pImageList->m_pListView, TQ_SIGNAL( spacePressed( TQListViewItem* ) ), + this, TQ_SLOT( changeItem( TQListViewItem* ) ) ); + connect( m_pImageList->m_pListView, TQ_SIGNAL( returnPressed( TQListViewItem* ) ), + this, TQ_SLOT( changeItem( TQListViewItem* ) ) ); + connect( m_pImageList->m_pSlideshow, TQ_SIGNAL( toggled( bool ) ), + this, TQ_SLOT( slideshow( bool ) ) ); + connect( m_pImageList->m_pInterval, TQ_SIGNAL( valueChanged( int ) ), + this, TQ_SLOT( setSlideshowInterval( int ) ) ); + connect( m_pImageList->m_pShuffle, TQ_SIGNAL( clicked() ), + this, TQ_SLOT( shuffle() ) ); + connect( m_pImageList->m_pLoad, TQ_SIGNAL( clicked() ), + this, TQ_SLOT( loadList() ) ); + connect( m_pImageList->m_pSave, TQ_SIGNAL( clicked() ), + this, TQ_SLOT( saveList() ) ); + connect( m_pImageList->m_pCloseAll, TQ_SIGNAL( clicked() ), + this, TQ_SLOT( closeAll() ) ); // allow drop on the dialog m_pImageList->installEventFilter( this ); @@ -140,8 +139,8 @@ KViewPresenter::KViewPresenter( TQObject* parent, const char* name, const TQStri // grab drops on the main view m_pViewer->widget()->installEventFilter( this ); - connect( m_pSlideshowTimer, TQT_SIGNAL( timeout() ), - this, TQT_SLOT( next() ) ); + connect( m_pSlideshowTimer, TQ_SIGNAL( timeout() ), + this, TQ_SLOT( next() ) ); } KViewPresenter::~KViewPresenter() @@ -149,19 +148,19 @@ KViewPresenter::~KViewPresenter() kdDebug( 4630 ) << k_funcinfo << endl; if( m_paFileOpen ) { - disconnect( m_paFileOpen, TQT_SIGNAL( activated() ), this, TQT_SLOT( slotOpenFiles() ) ); + disconnect( m_paFileOpen, TQ_SIGNAL( activated() ), this, TQ_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 TQObject::connect warning we do the parent() check. if( parent() ) - connect( m_paFileOpen, TQT_SIGNAL( activated() ), parent(), TQT_SLOT( slotOpenFile() ) ); + connect( m_paFileOpen, TQ_SIGNAL( activated() ), parent(), TQ_SLOT( slotOpenFile() ) ); } } bool KViewPresenter::eventFilter( TQObject *obj, TQEvent *ev ) { - 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()) ) + if( obj == m_pImageList || obj == m_pImageList->m_pListView || obj == m_pImageList->m_pListView->viewport() || obj == m_pViewer->widget() ) { switch( ev->type() ) { @@ -190,14 +189,12 @@ bool KViewPresenter::eventFilter( TQObject *obj, TQEvent *ev ) { for( TQStringList::const_iterator it = l.begin(); it != l.end(); ++it ) { - ImageInfo * info = new ImageInfo( KURL( *it ) ); + ImageInfo info = ImageInfo( KURL( *it ) ); if( ! m_imagelist.contains( info ) ) { - m_imagelist.inSort( info ); + m_imagelist.append( info ); ( void )new ImageListItem( m_pImageList->m_pListView, KURL( *it ) ); } - else - delete info; } return true; } @@ -217,15 +214,13 @@ void KViewPresenter::slotImageOpened( const KURL & url ) if( ! m_bDontAdd ) { kdDebug( 4630 ) << k_funcinfo << "imagelist:" << endl; - ImageInfo * info = new ImageInfo( url ); + ImageInfo info = ImageInfo( url ); if( ! m_imagelist.contains( info ) ) { - m_imagelist.inSort( info ); + m_imagelist.append( info ); TQListViewItem * item = new ImageListItem( m_pImageList->m_pListView, url ); makeCurrent( item ); } - else - delete info; } } @@ -247,14 +242,12 @@ void KViewPresenter::slotOpenFiles() m_pViewer->openURL( *it ); for( ++it; it != urls.end(); ++it ) { - ImageInfo * info = new ImageInfo( *it ); + ImageInfo info = ImageInfo( *it ); if( ! m_imagelist.contains( info ) ) { - m_imagelist.inSort( info ); + m_imagelist.append( info ); ( void )new ImageListItem( m_pImageList->m_pListView, *it ); } - else - delete info; } } @@ -265,7 +258,7 @@ void KViewPresenter::slotClose() next = 0; ImageInfo info( m_pCurrentItem->url() ); - m_imagelist.remove( &info ); + m_imagelist.remove( info ); delete m_pCurrentItem; m_pCurrentItem = 0; @@ -285,7 +278,7 @@ void KViewPresenter::changeItem( TQListViewItem * qitem ) { kdDebug( 4630 ) << "file doesn't exist. removed." << endl; ImageInfo info( item->url() ); - m_imagelist.remove( &info ); + m_imagelist.remove( info ); if( m_pCurrentItem == item ) { TQListViewItem * next = m_pCurrentItem->itemBelow() ? m_pCurrentItem->itemBelow() : m_pImageList->m_pListView->firstChild(); @@ -430,14 +423,12 @@ void KViewPresenter::loadList() while( ! t.eof() ) { KURL url ( t.readLine() ); - ImageInfo * info = new ImageInfo( url ); + ImageInfo info = ImageInfo( url ); if( ! m_imagelist.contains( info ) ) { - m_imagelist.inSort( info ); + m_imagelist.append( info ); ( void )new ImageListItem( m_pImageList->m_pListView, url ); } - else - delete info; } } else @@ -487,6 +478,4 @@ void KViewPresenter::saveList() } } } - -// vim:sw=4:ts=4 #include "kviewpresenter.moc" diff --git a/kview/modules/presenter/kviewpresenter.h b/kview/modules/presenter/kviewpresenter.h index 94b9fa65..865c9f86 100644 --- a/kview/modules/presenter/kviewpresenter.h +++ b/kview/modules/presenter/kviewpresenter.h @@ -24,7 +24,7 @@ #include <tdeparts/plugin.h> #include <kurl.h> -#include <tqsortedlist.h> +#include <tqvaluelist.h> namespace KImageViewer { class Viewer; } @@ -37,7 +37,7 @@ class TDEAction; class KViewPresenter : public KParts::Plugin { - Q_OBJECT + TQ_OBJECT public: KViewPresenter( TQObject* parent, const char* name, const TQStringList & ); @@ -47,6 +47,11 @@ protected: struct ImageInfo { KURL url; + + ImageInfo() + : url() + { + } ImageInfo( const KURL & url ) : url( url ) { @@ -57,7 +62,7 @@ protected: } bool operator!=( const ImageInfo & i1 ) { - return url.prettyURL() == i1.url.prettyURL(); + return url.prettyURL() != i1.url.prettyURL(); } bool operator>( const ImageInfo & i1 ) { @@ -94,11 +99,9 @@ private: TDEAction * m_paFileOpen; TDEAction * m_paFileClose; - TQSortedList<ImageInfo> m_imagelist; + TQValueList<ImageInfo> m_imagelist; bool m_bDontAdd; ImageListItem * m_pCurrentItem; TQTimer * m_pSlideshowTimer; }; - -// vim:sw=4:ts=4:cindent #endif diff --git a/kview/modules/presenter/kviewpresenterconfmodule.cpp b/kview/modules/presenter/kviewpresenterconfmodule.cpp index 3d6de8b4..aee4dd44 100644 --- a/kview/modules/presenter/kviewpresenterconfmodule.cpp +++ b/kview/modules/presenter/kviewpresenterconfmodule.cpp @@ -54,7 +54,4 @@ void KViewPresenterConfModule::createPage( TQFrame * page ) m_pCheckBox = new TQCheckBox( "This is only for testing...", page ); } - -// vim:sw=4:ts=4 - #include "kviewpresenterconfmodule.moc" diff --git a/kview/modules/presenter/kviewpresenterconfmodule.h b/kview/modules/presenter/kviewpresenterconfmodule.h index 2c9a2ef6..5787541f 100644 --- a/kview/modules/presenter/kviewpresenterconfmodule.h +++ b/kview/modules/presenter/kviewpresenterconfmodule.h @@ -27,7 +27,7 @@ class TQCheckBox; class KViewPresenterConfModule : public KPreferencesModule { - Q_OBJECT + TQ_OBJECT public: KViewPresenterConfModule( TQObject * parent ); @@ -44,7 +44,4 @@ class KViewPresenterConfModule : public KPreferencesModule private: TQCheckBox * m_pCheckBox; }; - -// vim:sw=4:ts=4 - #endif // KVIEWPRESENTERCONFMODULE_H diff --git a/kview/modules/scale/kfloatspinbox.cpp b/kview/modules/scale/kfloatspinbox.cpp index 0dc7fb33..cd30e1f3 100644 --- a/kview/modules/scale/kfloatspinbox.cpp +++ b/kview/modules/scale/kfloatspinbox.cpp @@ -42,7 +42,7 @@ KFloatSpinBox::KFloatSpinBox( float minValue, float maxValue, float step, unsign , m_doselection( true ) { setRange( minValue, maxValue, step, precision ); - connect( this, TQT_SIGNAL( valueChanged( int ) ), this, TQT_SLOT( slotValueChanged( int ) ) ); + connect( this, TQ_SIGNAL( valueChanged( int ) ), this, TQ_SLOT( slotValueChanged( int ) ) ); } KFloatSpinBox::~KFloatSpinBox() diff --git a/kview/modules/scale/kfloatspinbox.h b/kview/modules/scale/kfloatspinbox.h index 7a84a06f..35c5ffd1 100644 --- a/kview/modules/scale/kfloatspinbox.h +++ b/kview/modules/scale/kfloatspinbox.h @@ -25,7 +25,7 @@ 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 ); diff --git a/kview/modules/scale/kview_scale.cpp b/kview/modules/scale/kview_scale.cpp index 2e6d03c4..1813bac9 100644 --- a/kview/modules/scale/kview_scale.cpp +++ b/kview/modules/scale/kview_scale.cpp @@ -47,7 +47,7 @@ KViewScale::KViewScale( TQObject* parent, const char* name, const TQStringList & m_pCanvas = m_pViewer->canvas(); (void) new TDEAction( i18n( "&Scale Image..." ), 0, 0, - this, TQT_SLOT( slotScaleDlg() ), + this, TQ_SLOT( slotScaleDlg() ), actionCollection(), "plugin_scale" ); } else @@ -175,6 +175,4 @@ void KViewScale::slotScale() else kdDebug( 4630 ) << "no image to scale" << endl; } - -// vim:sw=4:ts=4:cindent #include "kview_scale.moc" diff --git a/kview/modules/scale/kview_scale.h b/kview/modules/scale/kview_scale.h index 6834cda5..af0d66e6 100644 --- a/kview/modules/scale/kview_scale.h +++ b/kview/modules/scale/kview_scale.h @@ -30,7 +30,7 @@ namespace KImageViewer { class KViewScale : public KParts::Plugin { - Q_OBJECT + TQ_OBJECT public: KViewScale( TQObject* parent, const char* name, const TQStringList & ); @@ -44,6 +44,4 @@ private: KImageViewer::Viewer * m_pViewer; KImageViewer::Canvas * m_pCanvas; }; - -// vim:sw=4:ts=4:cindent #endif diff --git a/kview/modules/scale/scaledlg.cpp b/kview/modules/scale/scaledlg.cpp index 308546cd..d4c33262 100644 --- a/kview/modules/scale/scaledlg.cpp +++ b/kview/modules/scale/scaledlg.cpp @@ -157,16 +157,16 @@ ScaleDlg::ScaleDlg( const TQSize & origsize, TQVBox * parent, const char * name m_newsizeunit2 = 0; m_resolutionunit = 0; - 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, 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 ) ) ); + connect( m_pNewWidth, TQ_SIGNAL( valueChanged( float ) ), TQ_SLOT( slotNewWidth( float ) ) ); + connect( m_pNewHeight, TQ_SIGNAL( valueChanged( float ) ), TQ_SLOT( slotNewHeight( float ) ) ); + connect( m_pNewWidth2, TQ_SIGNAL( valueChanged( float ) ), TQ_SLOT( slotNewWidth2( float ) ) ); + connect( m_pNewHeight2, TQ_SIGNAL( valueChanged( float ) ), TQ_SLOT( slotNewHeight2( float ) ) ); + connect( m_pResolutionX, TQ_SIGNAL( valueChanged( float ) ), TQ_SLOT( slotResolutionX( float ) ) ); + connect( m_pResolutionY, TQ_SIGNAL( valueChanged( float ) ), TQ_SLOT( slotResolutionY( float ) ) ); + + connect( m_pNewSizeUnit, TQ_SIGNAL( activated( int ) ), TQ_SLOT( slotChangeNewSizeUnit( int ) ) ); + connect( m_pNewSizeUnit2, TQ_SIGNAL( activated( int ) ), TQ_SLOT( slotChangeNewSizeUnit2( int ) ) ); + connect( m_pResolutionUnit, TQ_SIGNAL( activated( int ) ), TQ_SLOT( slotChangeResolutionUnit( int ) ) ); } ScaleDlg::~ScaleDlg() diff --git a/kview/modules/scale/scaledlg.h b/kview/modules/scale/scaledlg.h index 6b7d6dcd..66b352c5 100644 --- a/kview/modules/scale/scaledlg.h +++ b/kview/modules/scale/scaledlg.h @@ -32,7 +32,7 @@ class TQSize; class ScaleDlg : public TQObject { - Q_OBJECT + TQ_OBJECT public: ScaleDlg( const TQSize & originalsize, TQVBox * parent, const char * name = 0 ); diff --git a/kview/modules/scanner/kviewscanner.cpp b/kview/modules/scanner/kviewscanner.cpp index ee3ca0dd..ae621465 100644 --- a/kview/modules/scanner/kviewscanner.cpp +++ b/kview/modules/scanner/kviewscanner.cpp @@ -24,7 +24,7 @@ #include <tqobjectlist.h> #include <tdeaction.h> -#include <kinstance.h> +#include <tdeinstance.h> #include <tdelocale.h> #include <kgenericfactory.h> #include <kscan.h> @@ -47,7 +47,7 @@ KViewScanner::KViewScanner( TQObject* parent, const char* name, if( m_pViewer ) { (void) new TDEAction( i18n( "&Scan Image..." ), "scanner", 0, - this, TQT_SLOT( slotScan() ), + this, TQ_SLOT( slotScan() ), actionCollection(), "plugin_scan" ); } else @@ -67,8 +67,8 @@ void KViewScanner::slotScan() { m_pScandlg->setMinimumSize( 300, 300 ); - connect( m_pScandlg, TQT_SIGNAL( finalImage( const TQImage &, int ) ), - this, TQT_SLOT( slotImgScanned( const TQImage & ) ) ); + connect( m_pScandlg, TQ_SIGNAL( finalImage( const TQImage &, int ) ), + this, TQ_SLOT( slotImgScanned( const TQImage & ) ) ); } else { @@ -91,6 +91,4 @@ void KViewScanner::slotImgScanned( const TQImage & img ) kdDebug( 4630 ) << "received an image from the scanner" << endl; m_pViewer->newImage( img ); } - -// vim:sw=4:ts=4:cindent #include "kviewscanner.moc" diff --git a/kview/modules/scanner/kviewscanner.h b/kview/modules/scanner/kviewscanner.h index c34bc0d3..59c335b8 100644 --- a/kview/modules/scanner/kviewscanner.h +++ b/kview/modules/scanner/kviewscanner.h @@ -30,7 +30,7 @@ namespace KImageViewer { class Viewer; } class KViewScanner : public KParts::Plugin { - Q_OBJECT + TQ_OBJECT public: KViewScanner( TQObject* parent, const char* name, const TQStringList & ); @@ -46,6 +46,4 @@ private: KScanDialog * m_pScandlg; KImageViewer::Viewer * m_pViewer; }; - -// vim:sw=4:ts=4:cindent #endif diff --git a/kview/modules/template/kviewtemplate.cpp b/kview/modules/template/kviewtemplate.cpp index dc386560..3a22d9df 100644 --- a/kview/modules/template/kviewtemplate.cpp +++ b/kview/modules/template/kviewtemplate.cpp @@ -24,7 +24,7 @@ KViewTemplate::KViewTemplate( TQObject* parent, const char* name, const TQString if( m_pViewer ) { (void) new TDEAction( /*i18n(*/ "&Do Something" /*)*/, 0, 0, - this, TQT_SLOT( yourSlot() ), + this, TQ_SLOT( yourSlot() ), actionCollection(), "plugin_template" ); } else @@ -38,6 +38,4 @@ KViewTemplate::~KViewTemplate() void KViewTemplate::yourSlot() { } - -// vim:sw=4:ts=4:cindent #include "kviewtemplate.moc" diff --git a/kview/modules/template/kviewtemplate.h b/kview/modules/template/kviewtemplate.h index 68084058..ab67e408 100644 --- a/kview/modules/template/kviewtemplate.h +++ b/kview/modules/template/kviewtemplate.h @@ -11,7 +11,7 @@ namespace KImageViewer { class Viewer; } class KViewTemplate : public KParts::Plugin { - Q_OBJECT + TQ_OBJECT public: KViewTemplate( TQObject* parent, const char* name, const TQStringList & ); @@ -23,6 +23,4 @@ private slots: private: KImageViewer::Viewer * m_pViewer; }; - -// vim:sw=4:ts=4:cindent #endif |
