diff options
Diffstat (limited to 'kghostview')
36 files changed, 248 insertions, 249 deletions
diff --git a/kghostview/Makefile.am b/kghostview/Makefile.am index f96f9850..a0dd3927 100644 --- a/kghostview/Makefile.am +++ b/kghostview/Makefile.am @@ -28,11 +28,11 @@ libkghostviewlib_la_SOURCES = kgvshell.cpp kgvdocument.cpp kgv_miniwidget.cpp \ libkghostviewpart_la_SOURCES = part_init.cpp kghostview_SOURCES = main.cpp -kghostview_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_TDEIO) -ltdetexteditor +kghostview_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_TQT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_TDEIO) -ltdetexteditor kghostview_LDADD = libkghostviewlib.la libdscparse_la_LDFLAGS = $(all_libraries) -no-undefined -libdscparse_la_LIBADD = $(LIB_QT) +libdscparse_la_LIBADD = $(LIB_TQT) libdscparse_la_SOURCES = $(top_srcdir)/kghostview/dscparse/dscparse.cpp $(top_srcdir)/kghostview/dscparse/dscparse_adapter.cpp noinst_HEADERS = marklist.h logwindow.h infodialog.h kgvshell.h \ diff --git a/kghostview/displayoptions.h b/kghostview/displayoptions.h index 78ecc0d4..1507f22c 100644 --- a/kghostview/displayoptions.h +++ b/kghostview/displayoptions.h @@ -20,11 +20,11 @@ #include <tqstring.h> #include <tqvaluelist.h> #include "dscparse_adapter.h" -#include <kdemacros.h> +#include <tdemacros.h> class TDECmdLineArgs; class TDEConfig; -class KDE_EXPORT DisplayOptions +class TDE_EXPORT DisplayOptions { public: DisplayOptions(); diff --git a/kghostview/dscparse/dscparse.cpp b/kghostview/dscparse/dscparse.cpp index ba473cc8..e31b9edd 100644 --- a/kghostview/dscparse/dscparse.cpp +++ b/kghostview/dscparse/dscparse.cpp @@ -2026,7 +2026,7 @@ dsc_scan_comments(CDSC *dsc) continued ? 3 : 10)) return CDSC_ERROR; } - else if (IS_DSC(line, "%%Qt::Orientation:")) { + else if (IS_DSC(line, "%%Orientation:")) { dsc->id = CDSC_ORIENTATION; if (dsc_parse_orientation(dsc, &(dsc->page_orientation), continued ? 3 : 14)) @@ -2330,7 +2330,7 @@ dsc_scan_defaults(CDSC *dsc) } else if (IS_DSC(line, "%%PageQt::Orientation:")) { dsc->id = CDSC_PAGEORIENTATION; - /* This can override %%Qt::Orientation: */ + /* This can override %%Orientation: */ if (dsc_parse_orientation(dsc, &(dsc->page_orientation), 18)) return CDSC_ERROR; } @@ -2936,30 +2936,30 @@ dsc_scan_page(CDSC *dsc) * %%DocumentProcessColors: * %%DocumentSuppliedFiles: * %%DocumentSuppliedFonts: - * %%DocumentSuppliedProcSets: - * %%DocumentSuppliedResources: - * %%Qt::Orientation: - * %%Pages: - * %%PageOrder: + * %%DocumentSuppliedProcSets: + * %%DocumentSuppliedResources: + * %%Orientation: + * %%Pages: + * %%PageOrder: * * Our supported subset is * %%Trailer * %%EOF * %%BoundingBox: - * %%Qt::Orientation: - * %%Pages: - * %%PageOrder: + * %%Orientation: + * %%Pages: + * %%PageOrder: * In addition to these, we support * %%DocumentMedia: * * A %%PageTrailer can have the following: - * %%PageBoundingBox: - * %%PageCustomColors: - * %%PageFiles: - * %%PageFonts: - * %%PageQt::Orientation: - * %%PageProcessColors: - * %%PageResources: + * %%PageBoundingBox: + * %%PageCustomColors: + * %%PageFiles: + * %%PageFonts: + * %%PageQt::Orientation: + * %%PageProcessColors: + * %%PageResources: */ dsc_private int @@ -3052,7 +3052,7 @@ dsc_scan_trailer(CDSC *dsc) continued ? 3 : 10)) return CDSC_ERROR; } - else if (IS_DSC(line, "%%Qt::Orientation:")) { + else if (IS_DSC(line, "%%Orientation:")) { dsc->id = CDSC_ORIENTATION; if (dsc_parse_orientation(dsc, &(dsc->page_orientation), continued ? 3 : 14)) return CDSC_ERROR; diff --git a/kghostview/dscparse/dscparse.h b/kghostview/dscparse/dscparse.h index d290c0d4..77b670a0 100644 --- a/kghostview/dscparse/dscparse.h +++ b/kghostview/dscparse/dscparse.h @@ -98,7 +98,7 @@ typedef enum { CDSC_FOR = 207, /* %%For: */ CDSC_LANGUAGELEVEL = 208, /* %%LanguageLevel: */ CDSC_BOUNDINGBOX = 209, /* %%BoundingBox: */ - CDSC_ORIENTATION = 210, /* %%Qt::Orientation: */ + CDSC_ORIENTATION = 210, /* %%Orientation: */ CDSC_PAGEORDER = 211, /* %%PageOrder: */ CDSC_DOCUMENTMEDIA = 212, /* %%DocumentMedia: */ CDSC_DOCUMENTPAPERSIZES = 213, /* %%DocumentPaperSizes: */ @@ -159,7 +159,7 @@ typedef enum { /* Trailer section */ CDSC_TRAILER = 800, /* %%Trailer */ -/* also %%Pages, %%BoundingBox, %%Qt::Orientation, %%PageOrder, %%DocumentMedia */ +/* also %%Pages, %%BoundingBox, %%Orientation, %%PageOrder, %%DocumentMedia */ /* %%Page is recognised as an error */ /* also %%DocumentNeededFonts, %%DocumentSuppliedFonts */ diff --git a/kghostview/fullscreenfilter.cpp b/kghostview/fullscreenfilter.cpp index b42a6277..4c269028 100644 --- a/kghostview/fullscreenfilter.cpp +++ b/kghostview/fullscreenfilter.cpp @@ -37,7 +37,7 @@ bool FullScreenFilter::eventFilter( TQObject* /*object*/, TQEvent* ev) { } } if ( TQMouseEvent* mouseevent = dynamic_cast<TQMouseEvent*>( ev ) ) { - if ( mouseevent->stateAfter() & mouseevent->button() & Qt::LeftButton ) { + if ( mouseevent->stateAfter() & mouseevent->button() & TQt::LeftButton ) { // if ( The whole image is visible at once ) if ( parent.m_gvpart->pageView()->contentsHeight() <= parent.m_gvpart->widget()->height() && parent.m_gvpart->pageView()->contentsWidth() <= parent.m_gvpart->widget()->width() ) { diff --git a/kghostview/fullscreenfilter.h b/kghostview/fullscreenfilter.h index a9d18366..7125e506 100644 --- a/kghostview/fullscreenfilter.h +++ b/kghostview/fullscreenfilter.h @@ -27,7 +27,7 @@ class KGVShell; * key/mouse handling related to full-screen mode without bloating further KGVPart */ class FullScreenFilter : public TQObject { - Q_OBJECT + TQ_OBJECT public: FullScreenFilter( KGVShell& parent ); diff --git a/kghostview/gssettingswidget.ui b/kghostview/gssettingswidget.ui index c2c18d05..f8ddc0ad 100644 --- a/kghostview/gssettingswidget.ui +++ b/kghostview/gssettingswidget.ui @@ -142,12 +142,12 @@ <include location="global" impldecl="in implementation">kpushbutton.h</include> <include location="global" impldecl="in implementation">kurlrequester.h</include> </includes> -<Q_SIGNALS> +<signals> <signal>configClicked()</signal> -</Q_SIGNALS> -<Q_SLOTS> +</signals> +<slots> <slot specifier="non virtual">setDetectedVersion( TQString v )</slot> -</Q_SLOTS> +</slots> <layoutdefaults spacing="6" margin="11"/> <layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> </UI> diff --git a/kghostview/infodialog.h b/kghostview/infodialog.h index 65d973f3..4f01dca6 100644 --- a/kghostview/infodialog.h +++ b/kghostview/infodialog.h @@ -26,7 +26,7 @@ class TQLabel; class InfoDialog : public KDialogBase { - Q_OBJECT + TQ_OBJECT public: diff --git a/kghostview/kdscerrordialog.cpp b/kghostview/kdscerrordialog.cpp index 32219bc9..3bcb7c31 100644 --- a/kghostview/kdscerrordialog.cpp +++ b/kghostview/kdscerrordialog.cpp @@ -76,10 +76,10 @@ KDSCErrorDialog::KDSCErrorDialog( TQWidget* parent ) : _ignoreAllButton = new TQPushButton( i18n("Ignore All"), this ); hbox->addWidget( _ignoreAllButton ); - connect( _okButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotOk() ) ); - connect( _cancelButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotCancel() ) ); - connect( _ignoreAllButton, TQT_SIGNAL( clicked() ), - this, TQT_SLOT( slotIgnoreAll() ) ); + connect( _okButton, TQ_SIGNAL( clicked() ), this, TQ_SLOT( slotOk() ) ); + connect( _cancelButton, TQ_SIGNAL( clicked() ), this, TQ_SLOT( slotCancel() ) ); + connect( _ignoreAllButton, TQ_SIGNAL( clicked() ), + this, TQ_SLOT( slotIgnoreAll() ) ); } KDSCErrorHandler::Response KDSCErrorDialog::error( const KDSCError& err ) diff --git a/kghostview/kdscerrordialog.h b/kghostview/kdscerrordialog.h index 97d311e5..a753f9d8 100644 --- a/kghostview/kdscerrordialog.h +++ b/kghostview/kdscerrordialog.h @@ -41,7 +41,7 @@ private: class KDSCErrorDialog : public KDialog, public KDSCErrorHandler { - Q_OBJECT + TQ_OBJECT public: diff --git a/kghostview/kgv_miniwidget.cpp b/kghostview/kgv_miniwidget.cpp index 5d6ca3df..e7d391b4 100644 --- a/kghostview/kgv_miniwidget.cpp +++ b/kghostview/kgv_miniwidget.cpp @@ -23,7 +23,7 @@ #include <tdeapplication.h> #include <tdeconfig.h> #include <kdebug.h> -#include <kinstance.h> +#include <tdeinstance.h> #include <tdeversion.h> #include <tdelocale.h> #include <tdemessagebox.h> @@ -66,16 +66,16 @@ KGVMiniWidget::KGVMiniWidget( KGVPart* part, const char* name ) : static_cast< TQPrinter::PageSize >( locale.pageSize() ) ); _thumbnailService = new ThumbnailService( this ); - connect( this, TQT_SIGNAL( newPageShown( int ) ), - TQT_SLOT( updateStatusBarText( int ) ) ); + connect( this, TQ_SIGNAL( newPageShown( int ) ), + TQ_SLOT( updateStatusBarText( int ) ) ); } void KGVMiniWidget::setDocument( KGVDocument* document ) { _document = document; if( _document ) - connect( _document, TQT_SIGNAL( completed() ), - TQT_SLOT( slotDocumentOpened() ) ); + connect( _document, TQ_SIGNAL( completed() ), + TQ_SLOT( slotDocumentOpened() ) ); } TQString KGVMiniWidget::pageSizeToString( TQPrinter::PageSize pageSize ) @@ -109,8 +109,8 @@ void KGVMiniWidget::setPSWidget( KPSWidget* psWidget ) { _psWidget = psWidget; // setMagnification( _magnification ); - connect( _psWidget, TQT_SIGNAL( newPageImage( TQPixmap ) ), - this, TQT_SLOT( sendPage() ) ); + connect( _psWidget, TQ_SIGNAL( newPageImage( TQPixmap ) ), + this, TQ_SLOT( sendPage() ) ); } void KGVMiniWidget::goToPage() @@ -384,7 +384,7 @@ void KGVMiniWidget::showPage( int pagenumber ) kdDebug(4500) << "KGVMiniWidget::showPage( " << pagenumber << " )" << endl; - TQT_TQWIDGET( _psWidget->parent() )->show(); + static_cast<TQWidget*>( _psWidget->parent() )->show(); _psWidget->setFileName(_document->fileName(), dsc()->isStructured() ); _psWidget->clear(); @@ -452,8 +452,8 @@ void KGVMiniWidget::showPage( int pagenumber ) } } // Do this after ajusting pagenumber above - _thumbnailService->cancelRequests( -1 , TQT_TQOBJECT(_part->scrollBox()), TQT_SLOT( setThumbnail( TQPixmap ) ) ); - _thumbnailService->delayedGetThumbnail( pagenumber, TQT_TQOBJECT(_part->scrollBox()), TQT_SLOT( setThumbnail( TQPixmap ) ), true ); + _thumbnailService->cancelRequests( -1 , _part->scrollBox(), TQ_SLOT( setThumbnail( TQPixmap ) ) ); + _thumbnailService->delayedGetThumbnail( pagenumber, _part->scrollBox(), TQ_SLOT( setThumbnail( TQPixmap ) ), true ); emit newPageShown( pagenumber ); } diff --git a/kghostview/kgv_miniwidget.h b/kghostview/kgv_miniwidget.h index 2e370153..dcbcb305 100644 --- a/kghostview/kgv_miniwidget.h +++ b/kghostview/kgv_miniwidget.h @@ -37,7 +37,7 @@ class MarkList; class KGVMiniWidget : public TQObject { - Q_OBJECT + TQ_OBJECT public: diff --git a/kghostview/kgv_view.cpp b/kghostview/kgv_view.cpp index 0701c659..c3a7bf6b 100644 --- a/kghostview/kgv_view.cpp +++ b/kghostview/kgv_view.cpp @@ -30,7 +30,7 @@ #include <kdirwatch.h> #include <tdeglobalsettings.h> #include <kiconloader.h> -#include <kinstance.h> +#include <tdeinstance.h> #include <tdelocale.h> #include <tdepopupmenu.h> #include <kstdaction.h> @@ -94,28 +94,28 @@ KGVPart::KGVPart( TQWidget* parentWidget, const char*, setProgressInfoEnabled( !args.contains( "Browser/View") ); _document = new KGVDocument( this ); - connect( _document, TQT_SIGNAL( fileChangeFailed() ), - this, TQT_SLOT( slotCancelWatch() ) ); - connect( _document, TQT_SIGNAL( completed() ), - this, TQT_SLOT( slotOpenFileCompleted() ) ); - connect( _document, TQT_SIGNAL( canceled( const TQString& ) ), - this, TQT_SIGNAL( canceled( const TQString& ) ) ); + connect( _document, TQ_SIGNAL( fileChangeFailed() ), + this, TQ_SLOT( slotCancelWatch() ) ); + connect( _document, TQ_SIGNAL( completed() ), + this, TQ_SLOT( slotOpenFileCompleted() ) ); + connect( _document, TQ_SIGNAL( canceled( const TQString& ) ), + this, TQ_SIGNAL( canceled( const TQString& ) ) ); _fileWatcher = new KDirWatch( this ); - connect( _fileWatcher, TQT_SIGNAL( dirty( const TQString& ) ), - this, TQT_SLOT( slotFileDirty( const TQString& ) ) ); - connect( _dirtyHandler, TQT_SIGNAL( timeout() ), - this, TQT_SLOT( slotDoFileDirty() ) ); + connect( _fileWatcher, TQ_SIGNAL( dirty( const TQString& ) ), + this, TQ_SLOT( slotFileDirty( const TQString& ) ) ); + connect( _dirtyHandler, TQ_SIGNAL( timeout() ), + this, TQ_SLOT( slotDoFileDirty() ) ); // Setup main widget _mainWidget = new KGVMainWidget( parentWidget ); - _mainWidget->setFocusPolicy( TQ_StrongFocus ); + _mainWidget->setFocusPolicy( TQWidget::StrongFocus ); _mainWidget->installEventFilter( this ); _mainWidget->setAcceptDrops( true ); - connect( _mainWidget, TQT_SIGNAL( spacePressed() ), - this, TQT_SLOT( slotReadDown() ) ); - connect( _mainWidget, TQT_SIGNAL( urlDropped( const KURL& ) ), - this, TQT_SLOT( openURL( const KURL& ) ) ); + connect( _mainWidget, TQ_SIGNAL( spacePressed() ), + this, TQ_SLOT( slotReadDown() ) ); + connect( _mainWidget, TQ_SIGNAL( urlDropped( const KURL& ) ), + this, TQ_SLOT( openURL( const KURL& ) ) ); TQHBoxLayout* hlay = new TQHBoxLayout( _mainWidget, 0, 0 ); TQVBoxLayout* vlay = new TQVBoxLayout( hlay ); @@ -146,17 +146,17 @@ KGVPart::KGVPart( TQWidget* parentWidget, const char*, _psWidget = new KPSWidget( _pageDecorator ); _psWidget->readSettings(); _pageView->setPage( _pageDecorator ); - connect( _psWidget, TQT_SIGNAL( output( char*, int ) ), - this, TQT_SLOT( slotGhostscriptOutput( char*, int ) ) ); + connect( _psWidget, TQ_SIGNAL( output( char*, int ) ), + this, TQ_SLOT( slotGhostscriptOutput( char*, int ) ) ); - connect( _psWidget, TQT_SIGNAL( ghostscriptError( const TQString& ) ), - this, TQT_SLOT( slotGhostscriptError( const TQString& ) ) ); + connect( _psWidget, TQ_SIGNAL( ghostscriptError( const TQString& ) ), + this, TQ_SLOT( slotGhostscriptError( const TQString& ) ) ); _logWindow = new LogWindow( i18n( "Ghostscript Messages" ), _mainWidget, "logwindow" ); _showLogWindow = false; - connect( _logWindow, TQT_SIGNAL( configureGS() ), TQT_SLOT( slotConfigure() ) ); + connect( _logWindow, TQ_SIGNAL( configureGS() ), TQ_SLOT( slotConfigure() ) ); _docManager = new KGVMiniWidget( this ); _docManager->setPSWidget( _psWidget ); @@ -165,57 +165,57 @@ KGVPart::KGVPart( TQWidget* parentWidget, const char*, _markList = new MarkList( _mainWidget, "marklist", _docManager ); _markList->setFixedWidth( PAGELIST_WIDTH ); vlay->addWidget( _markList, 1 ); - connect( TQT_TQOBJECT(_markList), TQT_SIGNAL( contextMenuRequested ( int, int, const TQPoint& ) ), - this, TQT_SLOT( showPopup( int, int, const TQPoint& ) ) ); - - - connect( TQT_TQOBJECT(_markList), TQT_SIGNAL( selected( int ) ), - _docManager, TQT_SLOT( goToPage( int ) ) ); - connect( _docManager, TQT_SIGNAL( newPageShown( int ) ), - TQT_TQOBJECT(_markList), TQT_SLOT( select( int ) ) ); - connect( _docManager, TQT_SIGNAL( setStatusBarText( const TQString& ) ), - this, TQT_SIGNAL( setStatusBarText( const TQString& ) ) ); - connect( _scrollBox, TQT_SIGNAL( valueChangedRelative( int, int ) ), - _pageView, TQT_SLOT( scrollBy( int, int ) ) ); - connect( _pageView, TQT_SIGNAL( pageSizeChanged( const TQSize& ) ), - _scrollBox, TQT_SLOT( setPageSize( const TQSize& ) ) ); - connect( _pageView, TQT_SIGNAL( viewSizeChanged( const TQSize& ) ), - _scrollBox, TQT_SLOT( setViewSize( const TQSize& ) ) ); - connect( _pageView, TQT_SIGNAL( contentsMoving( int, int ) ), - _scrollBox, TQT_SLOT( setViewPos( int, int ) ) ); + connect( _markList, TQ_SIGNAL( contextMenuRequested ( int, int, const TQPoint& ) ), + this, TQ_SLOT( showPopup( int, int, const TQPoint& ) ) ); + + + connect( _markList, TQ_SIGNAL( selected( int ) ), + _docManager, TQ_SLOT( goToPage( int ) ) ); + connect( _docManager, TQ_SIGNAL( newPageShown( int ) ), + _markList, TQ_SLOT( select( int ) ) ); + connect( _docManager, TQ_SIGNAL( setStatusBarText( const TQString& ) ), + this, TQ_SIGNAL( setStatusBarText( const TQString& ) ) ); + connect( _scrollBox, TQ_SIGNAL( valueChangedRelative( int, int ) ), + _pageView, TQ_SLOT( scrollBy( int, int ) ) ); + connect( _pageView, TQ_SIGNAL( pageSizeChanged( const TQSize& ) ), + _scrollBox, TQ_SLOT( setPageSize( const TQSize& ) ) ); + connect( _pageView, TQ_SIGNAL( viewSizeChanged( const TQSize& ) ), + _scrollBox, TQ_SLOT( setViewSize( const TQSize& ) ) ); + connect( _pageView, TQ_SIGNAL( contentsMoving( int, int ) ), + _scrollBox, TQ_SLOT( setViewPos( int, int ) ) ); //-- File Menu ---------------------------------------------------------- - KStdAction::saveAs( document(), TQT_SLOT( saveAs() ), + KStdAction::saveAs( document(), TQ_SLOT( saveAs() ), actionCollection() ); new TDEAction( i18n( "Document &Info" ), 0, - miniWidget(), TQT_SLOT( info() ), + miniWidget(), TQ_SLOT( info() ), actionCollection(), "info" ); //-- Edit Menu ----------------------------------------------------- _popup = new TDEPopupMenu( _markList, "marklist_menu" ); TDEAction *act = new TDEAction( i18n( "Mark Current Page" ), "flag", CTRL+SHIFT+Key_M, - TQT_TQOBJECT(_markList), TQT_SLOT( markCurrent() ), + _markList, TQ_SLOT( markCurrent() ), actionCollection(), "mark_current" ); act->plug( _popup ); act = new TDEAction( i18n( "Mark &All Pages" ), 0, - TQT_TQOBJECT(_markList), TQT_SLOT( markAll() ), + _markList, TQ_SLOT( markAll() ), actionCollection(), "mark_all" ); act->plug( _popup ); act = new TDEAction( i18n( "Mark &Even Pages" ), 0, - TQT_TQOBJECT(_markList), TQT_SLOT( markEven() ), + _markList, TQ_SLOT( markEven() ), actionCollection(), "mark_even" ); act->plug( _popup ); act = new TDEAction( i18n( "Mark &Odd Pages" ), 0, - TQT_TQOBJECT(_markList), TQT_SLOT( markOdd() ), + _markList, TQ_SLOT( markOdd() ), actionCollection(), "mark_odd" ); act->plug( _popup ); act = new TDEAction( i18n( "&Toggle Page Marks" ), 0, - TQT_TQOBJECT(_markList), TQT_SLOT( toggleMarks() ), + _markList, TQ_SLOT( toggleMarks() ), actionCollection(), "toggle" ); act->plug( _popup ); act = new TDEAction( i18n("&Remove Page Marks"), 0, - TQT_TQOBJECT(_markList), TQT_SLOT( removeMarks() ), + _markList, TQ_SLOT( removeMarks() ), actionCollection(), "remove" ); act->plug( _popup ); @@ -228,7 +228,7 @@ KGVPart::KGVPart( TQWidget* parentWidget, const char*, actionCollection(), "media_menu" ); _flick = new TDEToggleAction( i18n( "No &Flicker" ), 0, - this, TQT_SLOT( slotFlicker() ), + this, TQ_SLOT( slotFlicker() ), actionCollection(), "no_flicker" ); TQStringList orientations; @@ -239,22 +239,22 @@ KGVPart::KGVPart( TQWidget* parentWidget, const char*, orientations.append( i18n( "Seascape" ) ); _selectOrientation->setItems( orientations ); - connect( _selectOrientation, TQT_SIGNAL( activated( int ) ), - this, TQT_SLOT( slotOrientation( int ) ) ); - connect( _selectMedia, TQT_SIGNAL( activated( int ) ), - this, TQT_SLOT( slotMedia( int ) ) ); + connect( _selectOrientation, TQ_SIGNAL( activated( int ) ), + this, TQ_SLOT( slotOrientation( int ) ) ); + connect( _selectMedia, TQ_SIGNAL( activated( int ) ), + this, TQ_SLOT( slotMedia( int ) ) ); { TDEShortcut zoomInShort = TDEStdAccel::zoomIn(); zoomInShort.append( KKey( CTRL+Key_Equal ) ); - _zoomIn = KStdAction::zoomIn( this, TQT_SLOT( slotZoomIn() ), + _zoomIn = KStdAction::zoomIn( this, TQ_SLOT( slotZoomIn() ), actionCollection(), "zoomIn" ); _zoomIn->setShortcut( zoomInShort ); } - _zoomOut = KStdAction::zoomOut( this, TQT_SLOT( slotZoomOut() ), + _zoomOut = KStdAction::zoomOut( this, TQ_SLOT( slotZoomOut() ), actionCollection(), "zoomOut" ); _zoomTo = new TDESelectAction( i18n( "Zoom" ), "viewmag", 0, actionCollection(), "zoomTo" ); - connect( _zoomTo, TQT_SIGNAL( activated( const TQString & ) ), this, TQT_SLOT( slotZoom( const TQString& ) ) ); + connect( _zoomTo, TQ_SIGNAL( activated( const TQString & ) ), this, TQ_SLOT( slotZoom( const TQString& ) ) ); _zoomTo->setEditable( true ); _zoomTo->clear(); TQValueList<double> mags = DisplayOptions::normalMagnificationValues(); @@ -274,41 +274,41 @@ KGVPart::KGVPart( TQWidget* parentWidget, const char*, _zoomTo->setCurrentItem( idx ); _fitWidth = new TDEAction( i18n( "&Fit to Page Width" ), 0, this, - TQT_SLOT( slotFitToPage() ), actionCollection(), + TQ_SLOT( slotFitToPage() ), actionCollection(), "fit_to_page"); _fitScreen = new TDEAction( i18n( "&Fit to Screen" ), Key_S, this, - TQT_SLOT( slotFitToScreen() ), actionCollection(), + TQ_SLOT( slotFitToScreen() ), actionCollection(), "fit_to_screen"); - _prevPage = new TDEAction( i18n( "Previous Page" ), CTRL+Key_PageUp, this, TQT_SLOT( slotPrevPage() ), + _prevPage = new TDEAction( i18n( "Previous Page" ), CTRL+Key_PageUp, this, TQ_SLOT( slotPrevPage() ), actionCollection(), "prevPage" ); _prevPage->setWhatsThis( i18n( "Moves to the previous page of the document" ) ); - _nextPage = new TDEAction( i18n( "Next Page" ), CTRL + Key_PageDown, this, TQT_SLOT( slotNextPage() ), + _nextPage = new TDEAction( i18n( "Next Page" ), CTRL + Key_PageDown, this, TQ_SLOT( slotNextPage() ), actionCollection(), "nextPage" ); _nextPage->setWhatsThis( i18n( "Moves to the next page of the document" ) ); - _firstPage = KStdAction::firstPage( this, TQT_SLOT( slotGotoStart() ), + _firstPage = KStdAction::firstPage( this, TQ_SLOT( slotGotoStart() ), actionCollection(), "goToStart" ); _firstPage->setWhatsThis( i18n( "Moves to the first page of the document" ) ); - _lastPage = KStdAction::lastPage( this, TQT_SLOT( slotGotoEnd() ), + _lastPage = KStdAction::lastPage( this, TQ_SLOT( slotGotoEnd() ), actionCollection(), "goToEnd" ); _lastPage->setWhatsThis( i18n( "Moves to the last page of the document" ) ); TDEShortcut readUpShort = TDEStdAccel::shortcut( TDEStdAccel::Prior ); readUpShort.append( KKey( SHIFT+Key_Space ) ); _readUp = new TDEAction( i18n( "Read Up" ), "go-up", - readUpShort, this, TQT_SLOT( slotReadUp() ), + readUpShort, this, TQ_SLOT( slotReadUp() ), actionCollection(), "readUp" ); TDEShortcut readDownShort = TDEStdAccel::shortcut( TDEStdAccel::Next ); readDownShort.append( KKey( Key_Space ) ); _readDown = new TDEAction( i18n( "Read Down" ), "go-down", - readDownShort, this, TQT_SLOT( slotReadDown() ), + readDownShort, this, TQ_SLOT( slotReadDown() ), actionCollection(), "readDown" ); - _gotoPage = KStdAction::gotoPage( _docManager, TQT_SLOT( goToPage() ), + _gotoPage = KStdAction::gotoPage( _docManager, TQ_SLOT( goToPage() ), actionCollection(), "goToPage" ); //-- Settings Menu ------------------------------------------------------ @@ -316,7 +316,7 @@ KGVPart::KGVPart( TQWidget* parentWidget, const char*, actionCollection(), "show_scrollbars" ); _showScrollBars->setCheckedState(i18n("Hide &Scrollbars")); _watchFile = new TDEToggleAction( i18n( "&Watch File" ), 0, - this, TQT_SLOT( slotWatchFile() ), + this, TQ_SLOT( slotWatchFile() ), actionCollection(), "watch_file" ); _showPageList = new TDEToggleAction( i18n( "Show &Page List" ), 0, actionCollection(), "show_page_list" ); @@ -324,29 +324,29 @@ KGVPart::KGVPart( TQWidget* parentWidget, const char*, _showPageLabels = new TDEToggleAction( i18n("Show Page &Labels"), 0, actionCollection(), "show_page_labels" ); _showPageLabels->setCheckedState(i18n("Hide Page &Labels")); - KStdAction::preferences( this, TQT_SLOT( slotConfigure() ), actionCollection() ); - connect( _showScrollBars, TQT_SIGNAL( toggled( bool ) ), - TQT_SLOT( showScrollBars( bool ) ) ); - connect( _showPageList, TQT_SIGNAL( toggled( bool ) ), - TQT_SLOT( showMarkList( bool ) ) ); - connect( _showPageLabels, TQT_SIGNAL( toggled( bool ) ), - TQT_SLOT( showPageLabels( bool ) ) ); + KStdAction::preferences( this, TQ_SLOT( slotConfigure() ), actionCollection() ); + connect( _showScrollBars, TQ_SIGNAL( toggled( bool ) ), + TQ_SLOT( showScrollBars( bool ) ) ); + connect( _showPageList, TQ_SIGNAL( toggled( bool ) ), + TQ_SLOT( showMarkList( bool ) ) ); + connect( _showPageLabels, TQ_SIGNAL( toggled( bool ) ), + TQ_SLOT( showPageLabels( bool ) ) ); _extension = new KGVBrowserExtension( this ); setXMLFile( "kgv_part.rc" ); - connect( miniWidget(), TQT_SIGNAL( newPageShown( int ) ), - this, TQT_SLOT( slotNewPage( int ) ) ); - connect( _pageView, TQT_SIGNAL( contentsMoving( int, int ) ), - this, TQT_SLOT( slotPageMoved( int, int ) ) ); + connect( miniWidget(), TQ_SIGNAL( newPageShown( int ) ), + this, TQ_SLOT( slotNewPage( int ) ) ); + connect( _pageView, TQ_SIGNAL( contentsMoving( int, int ) ), + this, TQ_SLOT( slotPageMoved( int, int ) ) ); - connect( _pageView, TQT_SIGNAL( nextPage() ), TQT_SLOT( slotNextPage() )); - connect( _pageView, TQT_SIGNAL( prevPage() ), TQT_SLOT( slotPrevPage() )); - connect( _pageView, TQT_SIGNAL( zoomIn() ), TQT_SLOT( slotZoomIn() )); - connect( _pageView, TQT_SIGNAL( zoomOut() ), TQT_SLOT( slotZoomOut() )); - connect( _pageView, TQT_SIGNAL( ReadUp() ), TQT_SLOT( slotReadUp() )); - connect( _pageView, TQT_SIGNAL( ReadDown() ), TQT_SLOT( slotReadDown() )); + connect( _pageView, TQ_SIGNAL( nextPage() ), TQ_SLOT( slotNextPage() )); + connect( _pageView, TQ_SIGNAL( prevPage() ), TQ_SLOT( slotPrevPage() )); + connect( _pageView, TQ_SIGNAL( zoomIn() ), TQ_SLOT( slotZoomIn() )); + connect( _pageView, TQ_SIGNAL( zoomOut() ), TQ_SLOT( slotZoomOut() )); + connect( _pageView, TQ_SIGNAL( ReadUp() ), TQ_SLOT( slotReadUp() )); + connect( _pageView, TQ_SIGNAL( ReadDown() ), TQ_SLOT( slotReadDown() )); TQStringList items = document()->mediaNames(); items.prepend( i18n( "Auto ") ); @@ -658,10 +658,10 @@ bool KGVPart::openURL( const KURL& url ) emit setWindowCaption( m_url.prettyURL() ); _mimetypeScanner = new KGVRun( m_url, 0, m_url.isLocalFile(), false ); - connect( _mimetypeScanner, TQT_SIGNAL( finished( const TQString& ) ), - TQT_SLOT( slotMimetypeFinished( const TQString& ) ) ); - connect( _mimetypeScanner, TQT_SIGNAL( error() ), - TQT_SLOT( slotMimetypeError() ) ); + connect( _mimetypeScanner, TQ_SIGNAL( finished( const TQString& ) ), + TQ_SLOT( slotMimetypeFinished( const TQString& ) ) ); + connect( _mimetypeScanner, TQ_SIGNAL( error() ), + TQ_SLOT( slotMimetypeError() ) ); return true; } @@ -693,15 +693,15 @@ void KGVPart::openURLContinue() /* d->m_job = TDEIO::file_copy( m_url, m_file, 0600, true, false, d->m_showProgressInfo ); emit started( d->m_job ); - connect( d->m_job, TQT_SIGNAL( result( TDEIO::Job * ) ), this, TQT_SLOT( slotJobFinished ( TDEIO::Job * ) ) ); + connect( d->m_job, TQ_SIGNAL( result( TDEIO::Job * ) ), this, TQ_SLOT( slotJobFinished ( TDEIO::Job * ) ) ); */ _job = TDEIO::get( m_url, false, isProgressInfoEnabled() ); - connect( _job, TQT_SIGNAL( data( TDEIO::Job*, const TQByteArray& ) ), - TQT_SLOT( slotData( TDEIO::Job*, const TQByteArray& ) ) ); - connect( _job, TQT_SIGNAL( result( TDEIO::Job* ) ), - TQT_SLOT( slotJobFinished( TDEIO::Job* ) ) ); + connect( _job, TQ_SIGNAL( data( TDEIO::Job*, const TQByteArray& ) ), + TQ_SLOT( slotData( TDEIO::Job*, const TQByteArray& ) ) ); + connect( _job, TQ_SIGNAL( result( TDEIO::Job* ) ), + TQ_SLOT( slotJobFinished( TDEIO::Job* ) ) ); emit started( _job ); } @@ -795,7 +795,7 @@ void KGVPart::slotMimetypeError() kdDebug(4500) << "KGVPart::slotMimetypeError()" << endl; _mimetypeScanner = 0; emit started( 0 ); - //kapp->processEvents(); + //tdeApp->processEvents(); emit canceled( TQString() ); } @@ -926,8 +926,8 @@ void KGVPart::slotFitToScreen() { kdDebug(4500) << "KGVPart::slotFitToScreen()" << endl; if ( _fitTimer->isActive() ) { - disconnect( _fitTimer, TQT_SIGNAL( timeout() ), this, 0 ); - connect( _fitTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( slotDoFitToScreen() ) ); + disconnect( _fitTimer, TQ_SIGNAL( timeout() ), this, 0 ); + connect( _fitTimer, TQ_SIGNAL( timeout() ), TQ_SLOT( slotDoFitToScreen() ) ); } else slotDoFitToScreen(); } @@ -996,7 +996,7 @@ KGVRun::KGVRun( const KURL& url, mode_t mode, bool isLocalFile, bool showProgressInfo ) : KRun( url, mode, isLocalFile, showProgressInfo ) { - connect( this, TQT_SIGNAL( finished() ), TQT_SLOT( emitFinishedWithMimetype() ) ); + connect( this, TQ_SIGNAL( finished() ), TQ_SLOT( emitFinishedWithMimetype() ) ); } KGVRun::~KGVRun() diff --git a/kghostview/kgv_view.h b/kghostview/kgv_view.h index 04365ad4..9a1e23da 100644 --- a/kghostview/kgv_view.h +++ b/kghostview/kgv_view.h @@ -54,7 +54,7 @@ class ScrollBox; class KGVPart: public KParts::ReadOnlyPart { - Q_OBJECT + TQ_OBJECT public: KGVPart( TQWidget* parentWidget, const char* widgetName, @@ -77,7 +77,7 @@ public: */ virtual bool closeURL(); - KDE_EXPORT static TDEAboutData* createAboutData(); + TDE_EXPORT static TDEAboutData* createAboutData(); public slots: /** @@ -230,7 +230,7 @@ private: class KGVBrowserExtension : public KParts::BrowserExtension { - Q_OBJECT + TQ_OBJECT friend class KGVPart; // emits our signals public: @@ -244,7 +244,7 @@ public slots: class KGVRun : public KRun { - Q_OBJECT + TQ_OBJECT public: diff --git a/kghostview/kgvconfigdialog.cpp b/kghostview/kgvconfigdialog.cpp index c2ce2d2a..b1febcee 100644 --- a/kghostview/kgvconfigdialog.cpp +++ b/kghostview/kgvconfigdialog.cpp @@ -25,11 +25,11 @@ #include <kdebug.h> #include <tdeglobal.h> #include <kiconloader.h> -#include <kinstance.h> +#include <tdeinstance.h> #include <tdelocale.h> #include <tdemessagebox.h> -#include <kprocess.h> -#include <kstandarddirs.h> +#include <tdeprocess.h> +#include <tdestandarddirs.h> #include <tdeconfigdialog.h> #include "configuration.h" @@ -146,6 +146,6 @@ void ConfigDialog::showSettings( KGVPart* main ) { gssw->setDetectedVersion(Configuration::version()); - TQObject::connect( dialog, TQT_SIGNAL( settingsChanged() ), main, TQT_SLOT( slotConfigurationChanged() ) ); + TQObject::connect( dialog, TQ_SIGNAL( settingsChanged() ), main, TQ_SLOT( slotConfigurationChanged() ) ); dialog->show(); } diff --git a/kghostview/kgvdocument.cpp b/kghostview/kgvdocument.cpp index ae0742da..9d4e06de 100644 --- a/kghostview/kgvdocument.cpp +++ b/kghostview/kgvdocument.cpp @@ -17,6 +17,7 @@ */ #include <algorithm> +#include <functional> #include <memory> #include <tqfileinfo.h> @@ -24,11 +25,11 @@ #include <tdeconfig.h> #include <tdefiledialog.h> #include <kfilterdev.h> -#include <kinstance.h> +#include <tdeinstance.h> #include <tdemessagebox.h> #include <kmimetype.h> #include <kprinter.h> -#include <kprocess.h> +#include <tdeprocess.h> #include <tdetempfile.h> #include <tdeio/netaccess.h> #include <tdelocale.h> @@ -63,8 +64,8 @@ KGVDocument::KGVDocument( KGVPart* part, const char* name ) : readSettings(); _pdf2dsc = new Pdf2dsc( _interpreterPath, this ); - connect( _pdf2dsc, TQT_SIGNAL( finished( bool ) ), - TQT_SLOT( openPDFFileContinue( bool ) ) ); + connect( _pdf2dsc, TQ_SIGNAL( finished( bool ) ), + TQ_SLOT( openPDFFileContinue( bool ) ) ); } KGVDocument::~KGVDocument() @@ -87,7 +88,7 @@ void KGVDocument::openFile( const TQString& name, const TQString& mimetype ) _fileName = name; _mimetype = mimetype; - TQTimer::singleShot( 0, this, TQT_SLOT( doOpenFile() ) ); + TQTimer::singleShot( 0, this, TQ_SLOT( doOpenFile() ) ); } void KGVDocument::doOpenFile() @@ -313,7 +314,7 @@ void KGVDocument::scanDSC() /* if( clock.elapsed() > 10 ) { - kapp->processEvents(); + tdeApp->processEvents(); clock.start(); } */ @@ -565,9 +566,7 @@ void KGVDocument::saveAs() TQString(), _part->widget(), TQString() ); - if( !TDEIO::NetAccess::upload( _fileName, - saveURL, - static_cast<TQWidget*>( 0 ) ) ) { + if( !TDEIO::NetAccess::upload( _fileName, saveURL, 0 ) ) { // TODO: Proper error dialog } } @@ -620,7 +619,7 @@ bool KGVDocument::savePages( const TQString& saveFileName, PageList normedPageList; transform( pageList.begin(), pageList.end(), back_inserter( normedPageList ), - bind2nd( minus<int>(), minPage - 1 ) ); + bind( minus<int>(), std::placeholders::_1, minPage - 1 ) ); // Finally select the desired pages from the converted file. psCopyDoc( psSaveFile.name(), saveFileName, normedPageList ); @@ -786,8 +785,8 @@ e=%1" ).arg( dscName ) << "-c" << "quit"; - connect( &process, TQT_SIGNAL( processExited( TDEProcess* ) ), - this, TQT_SLOT( pdf2psExited( TDEProcess* ) ) ); + connect( &process, TQ_SIGNAL( processExited( TDEProcess* ) ), + this, TQ_SLOT( pdf2psExited( TDEProcess* ) ) ); kdDebug(4500) << "KGVDocument: pdf2ps started" << endl; process.start( TDEProcess::NotifyOnExit ); @@ -832,8 +831,8 @@ void Pdf2dsc::run( const TQString& pdfName, const TQString& dscName ) << "-c" << "quit"; - connect( _process, TQT_SIGNAL( processExited( TDEProcess* ) ), - this, TQT_SLOT( processExited() ) ); + connect( _process, TQ_SIGNAL( processExited( TDEProcess* ) ), + this, TQ_SLOT( processExited() ) ); kdDebug(4500) << "Pdf2dsc: started" << endl; _process->start( TDEProcess::NotifyOnExit ); diff --git a/kghostview/kgvdocument.h b/kghostview/kgvdocument.h index 5076b78b..2de2fc69 100644 --- a/kghostview/kgvdocument.h +++ b/kghostview/kgvdocument.h @@ -33,7 +33,7 @@ class Pdf2dsc; class KGVDocument : public TQObject { - Q_OBJECT + TQ_OBJECT public: @@ -159,7 +159,7 @@ private: class Pdf2dsc : public TQObject { - Q_OBJECT + TQ_OBJECT public: diff --git a/kghostview/kgvfactory.h b/kghostview/kgvfactory.h index d0ac9550..612a6d21 100644 --- a/kghostview/kgvfactory.h +++ b/kghostview/kgvfactory.h @@ -25,7 +25,7 @@ class TDEInstance; class TDEAboutData; -class KDE_EXPORT KGVFactory : public KParts::Factory +class TDE_EXPORT KGVFactory : public KParts::Factory { public: KGVFactory(); diff --git a/kghostview/kgvmainwidget.h b/kghostview/kgvmainwidget.h index f18856b1..78965728 100644 --- a/kghostview/kgvmainwidget.h +++ b/kghostview/kgvmainwidget.h @@ -25,7 +25,7 @@ class KURL; class KGVMainWidget : public TQWidget { - Q_OBJECT + TQ_OBJECT public: diff --git a/kghostview/kgvpageview.cpp b/kghostview/kgvpageview.cpp index 336bad6d..10651383 100644 --- a/kghostview/kgvpageview.cpp +++ b/kghostview/kgvpageview.cpp @@ -27,8 +27,8 @@ KGVPageView::KGVPageView( TQWidget* parent, const char* name ) { _page = 0; - setFocusPolicy( TQ_StrongFocus ); - viewport()->setFocusPolicy( TQ_WheelFocus ); + setFocusPolicy( TQWidget::StrongFocus ); + viewport()->setFocusPolicy( TQWidget::WheelFocus ); } void KGVPageView::setPage( TQWidget* page ) @@ -52,7 +52,7 @@ bool KGVPageView::atBottom() const bool KGVPageView::eventFilter( TQObject* o, TQEvent* e ) { - if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(_page) && e->type() == TQEvent::Resize ) { + if ( o == _page && e->type() == TQEvent::Resize ) { // We need to call TQScrollView::eventFilter before centerContents, // otherwise a loop will be introduced. bool result = TQScrollView::eventFilter( o, e ); @@ -88,16 +88,16 @@ void KGVPageView::wheelEvent( TQWheelEvent *e ) } void KGVPageView::mousePressEvent( TQMouseEvent * e ) { - if ( e->button() & Qt::LeftButton ) + if ( e->button() & TQt::LeftButton ) { _dragGrabPos = e -> globalPos(); setCursor( sizeAllCursor ); } - else if ( e->button() & Qt::MidButton ) + else if ( e->button() & TQt::MidButton ) { emit ReadDown(); } - else if ( e -> button() & Qt::RightButton ) + else if ( e -> button() & TQt::RightButton ) { emit rightClick(); } @@ -105,7 +105,7 @@ void KGVPageView::mousePressEvent( TQMouseEvent * e ) void KGVPageView::mouseReleaseEvent( TQMouseEvent *e ) { - if ( e -> button() & Qt::LeftButton ) + if ( e -> button() & TQt::LeftButton ) { setCursor( arrowCursor ); } @@ -113,7 +113,7 @@ void KGVPageView::mouseReleaseEvent( TQMouseEvent *e ) void KGVPageView::mouseMoveEvent( TQMouseEvent * e ) { - if ( e->state() & Qt::LeftButton ) + if ( e->state() & TQt::LeftButton ) { TQPoint delta = _dragGrabPos - e->globalPos(); scrollBy( delta.x(), delta.y() ); diff --git a/kghostview/kgvpageview.h b/kghostview/kgvpageview.h index b7c4cd09..dadbbfe2 100644 --- a/kghostview/kgvpageview.h +++ b/kghostview/kgvpageview.h @@ -29,7 +29,7 @@ */ class KGVPageView : public TQScrollView { - Q_OBJECT + TQ_OBJECT public: diff --git a/kghostview/kgvshell.cpp b/kghostview/kgvshell.cpp index 0835efb3..9fa5200f 100644 --- a/kghostview/kgvshell.cpp +++ b/kghostview/kgvshell.cpp @@ -26,7 +26,7 @@ #include <klibloader.h> #include <tdelocale.h> #include <tdemessagebox.h> -#include <kstandarddirs.h> +#include <tdestandarddirs.h> #include <kstatusbar.h> #include <kstdaction.h> #include <tdestdaccel.h> @@ -60,29 +60,29 @@ KGVShell::KGVShell() : _tmpFile( 0 ) { m_gvpart = KParts::ComponentFactory::createPartInstanceFromLibrary< KGVPart >( "libkghostviewpart", this, "kgvpart", - TQT_TQOBJECT(this), "kgvpart" ); + this, "kgvpart" ); /*---- File -----------------------------------------------------------*/ openact = - KStdAction::open( TQT_TQOBJECT(this), TQT_SLOT( slotFileOpen() ), + KStdAction::open( this, TQ_SLOT( slotFileOpen() ), actionCollection() ); recent = - KStdAction::openRecent( TQT_TQOBJECT(this), TQT_SLOT( openURL( const KURL& ) ), + KStdAction::openRecent( this, TQ_SLOT( openURL( const KURL& ) ), actionCollection() ); - KStdAction::print( m_gvpart->document(), TQT_SLOT( print() ), + KStdAction::print( m_gvpart->document(), TQ_SLOT( print() ), actionCollection() ); (void) - KStdAction::quit( TQT_TQOBJECT(this), TQT_SLOT( slotQuit() ), actionCollection() ); + KStdAction::quit( this, TQ_SLOT( slotQuit() ), actionCollection() ); /*---- View -----------------------------------------------------------*/ new TDEAction( i18n( "&Reload" ), "reload", TDEStdAccel::shortcut( TDEStdAccel::Reload ), - m_gvpart, TQT_SLOT( reloadFile() ), + m_gvpart, TQ_SLOT( reloadFile() ), actionCollection(), "reload" ); - new TDEAction( i18n( "&Maximize" ), Key_M, TQT_TQOBJECT(this), - TQT_SLOT( slotMaximize() ), actionCollection(), + new TDEAction( i18n( "&Maximize" ), Key_M, this, + TQ_SLOT( slotMaximize() ), actionCollection(), "maximize"); - _showMenuBarAction = KStdAction::showMenubar( TQT_TQOBJECT(this), TQT_SLOT( slotShowMenubar() ), actionCollection() ); + _showMenuBarAction = KStdAction::showMenubar( this, TQ_SLOT( slotShowMenubar() ), actionCollection() ); /*---- Settings -------------------------------------------------------*/ #if TDE_VERSION >= TDE_MAKE_VERSION(3,1,90) @@ -91,12 +91,12 @@ KGVShell::KGVShell() : setAutoSaveSettings(); setStandardToolBarMenuEnabled(true); #if TDE_VERSION >= TDE_MAKE_VERSION(3,1,90) - m_fullScreenAction = KStdAction::fullScreen( TQT_TQOBJECT(this), TQT_SLOT( slotUpdateFullScreen() ), actionCollection(), this ); + m_fullScreenAction = KStdAction::fullScreen( this, TQ_SLOT( slotUpdateFullScreen() ), actionCollection(), this ); #else - m_fullScreenAction = new TDEToggleAction( this, TQT_SLOT( slotUpdateFullScreen() ) ); + m_fullScreenAction = new TDEToggleAction( this, TQ_SLOT( slotUpdateFullScreen() ) ); #endif - KStdAction::configureToolbars( TQT_TQOBJECT(this), TQT_SLOT( slotConfigureToolbars() ), actionCollection() ); - KStdAction::keyBindings(guiFactory(), TQT_SLOT(configureShortcuts()), + KStdAction::configureToolbars( this, TQ_SLOT( slotConfigureToolbars() ), actionCollection() ); + KStdAction::keyBindings(guiFactory(), TQ_SLOT(configureShortcuts()), actionCollection()); //_popup = new TDEPopupMenu( i18n( "Full Screen Options" ), this, "rmb popup" ); @@ -108,21 +108,21 @@ actionCollection()); m_fsFilter = new FullScreenFilter( *this ); // Just save them automatically is destructor. (TODO: of kgv_view!) - //KStdAction::saveOptions ( this, TQT_SLOT (slotWriteSettings()), actionCollection()); + //KStdAction::saveOptions ( this, TQ_SLOT (slotWriteSettings()), actionCollection()); setXMLFile( "kghostviewui.rc" ); // We could, at the user's option, make this connection and kghostview // will always resize to fit the width of the page. But, for now, // let's not. - // connect ( m_gvpart->widget(), TQT_SIGNAL (sizeHintChanged()), this, TQT_SLOT (slotResize ()) ); + // connect ( m_gvpart->widget(), TQ_SIGNAL (sizeHintChanged()), this, TQ_SLOT (slotResize ()) ); setCentralWidget( m_gvpart->widget() ); createGUI( m_gvpart ); - connect( m_gvpart->pageView(), TQT_SIGNAL( rightClick() ),TQT_SLOT( slotRMBClick() ) ); - connect( m_gvpart, TQT_SIGNAL( canceled(const TQString&) ),TQT_SLOT( slotReset() ) ); - connect( m_gvpart, TQT_SIGNAL( completed() ), TQT_SLOT( slotDocumentState() ) ); + connect( m_gvpart->pageView(), TQ_SIGNAL( rightClick() ),TQ_SLOT( slotRMBClick() ) ); + connect( m_gvpart, TQ_SIGNAL( canceled(const TQString&) ),TQ_SLOT( slotReset() ) ); + connect( m_gvpart, TQ_SIGNAL( completed() ), TQ_SLOT( slotDocumentState() ) ); if (!initialGeometrySet()) resize(640,400); @@ -151,7 +151,7 @@ KGVShell::~KGVShell() void KGVShell::slotQuit() { - kapp->closeAllWindows(); + tdeApp->closeAllWindows(); } void KGVShell::slotShowMenubar() @@ -263,7 +263,7 @@ KGVShell::openStdin() wrtn = _tmpFile->file()->writeBlock( buf.data(), read ); if( read != wrtn ) break; - kapp->processEvents(); + tdeApp->processEvents(); } if( read != 0 ) { @@ -304,7 +304,7 @@ void KGVShell::slotMaximize() KWin::setState( winId(), NET::MaxHoriz | NET::MaxVert ); // If we do it now, it comes to nothing since it would work // on the current (non-maximized) size - TQTimer::singleShot( 800, m_gvpart, TQT_SLOT( slotFitToPage() ) ); + TQTimer::singleShot( 800, m_gvpart, TQ_SLOT( slotFitToPage() ) ); } void KGVShell::slotResize() @@ -329,13 +329,13 @@ void KGVShell::slotUpdateFullScreen() toolBar()->hide(); m_gvpart->updateFullScreen( true ); showFullScreen(); - kapp->installEventFilter( m_fsFilter ); + tdeApp->installEventFilter( m_fsFilter ); if ( m_gvpart->document()->isOpen() ) m_gvpart->slotFitToPage(); } else { - kapp->removeEventFilter( m_fsFilter ); + tdeApp->removeEventFilter( m_fsFilter ); m_gvpart->updateFullScreen( false ); menuBar()->show(); #if TDE_VERSION >= TDE_MAKE_VERSION(3,1,90) @@ -352,7 +352,7 @@ void KGVShell::slotConfigureToolbars() { saveMainWindowSettings( TDEGlobal::config(), "MainWindow" ); KEditToolbar dlg( factory() ); - connect(&dlg,TQT_SIGNAL(newToolbarConfig()),this,TQT_SLOT(slotNewToolbarConfig())); + connect(&dlg,TQ_SIGNAL(newToolbarConfig()),this,TQ_SLOT(slotNewToolbarConfig())); dlg.exec(); } diff --git a/kghostview/kgvshell.h b/kghostview/kgvshell.h index 70879a4f..1c90673d 100644 --- a/kghostview/kgvshell.h +++ b/kghostview/kgvshell.h @@ -35,9 +35,9 @@ class TDEPopupMenu; class DisplayOptions; class FullScreenFilter; -class KDE_EXPORT KGVShell : public KParts::MainWindow +class TDE_EXPORT KGVShell : public KParts::MainWindow { - Q_OBJECT + TQ_OBJECT public: diff --git a/kghostview/kpswidget.cpp b/kghostview/kpswidget.cpp index cdce1dbb..e89d19e3 100644 --- a/kghostview/kpswidget.cpp +++ b/kghostview/kpswidget.cpp @@ -27,7 +27,7 @@ #include <kdebug.h> #include <tdelocale.h> #include <tdemessagebox.h> -#include <kprocess.h> +#include <tdeprocess.h> #include "configuration.h" @@ -279,8 +279,8 @@ void KPSWidget::setupWidget() Q_ASSERT( orientation() != CDSC_ORIENT_UNKNOWN ); - const float dpiX = _magnification * TQT_TQPAINTDEVICE(this)->x11AppDpiX(); - const float dpiY = _magnification * TQT_TQPAINTDEVICE(this)->x11AppDpiY(); + const float dpiX = _magnification * this->x11AppDpiX(); + const float dpiY = _magnification * this->x11AppDpiY(); int newWidth = 0, newHeight = 0; if( orientation() == CDSC_PORTRAIT || orientation() == CDSC_UPSIDEDOWN ) @@ -298,7 +298,7 @@ void KPSWidget::setupWidget() { setEraseColor( white ); setFixedSize( newWidth, newHeight ); - kapp->processEvents(); + tdeApp->processEvents(); _backgroundPixmap.resize( size() ); _backgroundPixmap.fill( white ); @@ -358,16 +358,16 @@ bool KPSWidget::startInterpreter() else *_process << _fileName << "-c" << "quit"; - connect( _process, TQT_SIGNAL( processExited( TDEProcess* ) ), - this, TQT_SLOT( slotProcessExited( TDEProcess* ) ) ); - connect( _process, TQT_SIGNAL( receivedStdout( TDEProcess*, char*, int ) ), - this, TQT_SLOT( gs_output( TDEProcess*, char*, int ) ) ); - connect( _process, TQT_SIGNAL( receivedStderr( TDEProcess*, char*, int ) ), - this, TQT_SLOT( gs_output( TDEProcess*, char*, int ) ) ); - connect( _process, TQT_SIGNAL( wroteStdin( TDEProcess*) ), - this, TQT_SLOT( gs_input( TDEProcess* ) ) ); + connect( _process, TQ_SIGNAL( processExited( TDEProcess* ) ), + this, TQ_SLOT( slotProcessExited( TDEProcess* ) ) ); + connect( _process, TQ_SIGNAL( receivedStdout( TDEProcess*, char*, int ) ), + this, TQ_SLOT( gs_output( TDEProcess*, char*, int ) ) ); + connect( _process, TQ_SIGNAL( receivedStderr( TDEProcess*, char*, int ) ), + this, TQ_SLOT( gs_output( TDEProcess*, char*, int ) ) ); + connect( _process, TQ_SIGNAL( wroteStdin( TDEProcess*) ), + this, TQ_SLOT( gs_input( TDEProcess* ) ) ); - kapp->flushX(); + tdeApp->flushX(); // Finally fire up the interpreter. kdDebug(4500) << "KPSWidget: starting interpreter" << endl; diff --git a/kghostview/kpswidget.h b/kghostview/kpswidget.h index 0dd556fa..d1c41c25 100644 --- a/kghostview/kpswidget.h +++ b/kghostview/kpswidget.h @@ -45,7 +45,7 @@ class MessagesDialog; class KPSWidget : public TQWidget { - Q_OBJECT + TQ_OBJECT public: diff --git a/kghostview/logwindow.cpp b/kghostview/logwindow.cpp index 2e94e45a..1e28fdb3 100644 --- a/kghostview/logwindow.cpp +++ b/kghostview/logwindow.cpp @@ -46,8 +46,8 @@ LogWindow::LogWindow( const TQString& caption, _logView->setFont( TDEGlobalSettings::fixedFont() ); _logView->setMinimumWidth( 80 * fontMetrics().width( " " ) ); - connect( this, TQT_SIGNAL( user1Clicked() ), TQT_SLOT( clear() ) ); - connect( _configureGS, TQT_SIGNAL( leftClickedURL() ), TQT_SLOT( emitConfigureGS() ) ); + connect( this, TQ_SIGNAL( user1Clicked() ), TQ_SLOT( clear() ) ); + connect( _configureGS, TQ_SIGNAL( leftClickedURL() ), TQ_SLOT( emitConfigureGS() ) ); } void LogWindow::emitConfigureGS() { diff --git a/kghostview/logwindow.h b/kghostview/logwindow.h index 8f3b2f11..daa9f03d 100644 --- a/kghostview/logwindow.h +++ b/kghostview/logwindow.h @@ -27,7 +27,7 @@ class KURLLabel; class LogWindow : public KDialogBase { - Q_OBJECT + TQ_OBJECT public: diff --git a/kghostview/main.cpp b/kghostview/main.cpp index cd11b877..38a2f2e0 100644 --- a/kghostview/main.cpp +++ b/kghostview/main.cpp @@ -50,7 +50,7 @@ int main( int argc, char** argv ) TDEApplication app; TDECmdLineArgs* args = TDECmdLineArgs::parsedArgs(); - if( kapp->isRestored() ) + if( tdeApp->isRestored() ) RESTORE( KGVShell ) else { KGVShell* shell = new KGVShell; diff --git a/kghostview/marklist.cpp b/kghostview/marklist.cpp index b84924eb..e21ab7b0 100644 --- a/kghostview/marklist.cpp +++ b/kghostview/marklist.cpp @@ -105,7 +105,7 @@ void MarkListItem::paintEvent( TQPaintEvent* ) */ if ( _requested ) return; if ( !_thumbnailW->paletteBackgroundPixmap() || _thumbnailW->paletteBackgroundPixmap()->isNull() ) { - _miniWidget->getThumbnailService()->delayedGetThumbnail( _pageNum, TQT_TQOBJECT(this), TQT_SLOT( setPixmap( TQPixmap ) ) ); + _miniWidget->getThumbnailService()->delayedGetThumbnail( _pageNum, this, TQ_SLOT( setPixmap( TQPixmap ) ) ); _requested = true; } } @@ -122,8 +122,8 @@ _miniWidget( mini ) setLeftMargin( 0 ); // we don't want the vertical header horizontalHeader()->setLabel( 0, i18n("Page") ); - connect( this, TQT_SIGNAL( currentChanged( int, int ) ), - this, TQT_SIGNAL( selected( int ) ) ); + connect( this, TQ_SIGNAL( currentChanged( int, int ) ), + this, TQ_SIGNAL( selected( int ) ) ); } TQValueList<int> MarkList::markList() const diff --git a/kghostview/marklist.h b/kghostview/marklist.h index 6ccc5800..e8b4f54c 100644 --- a/kghostview/marklist.h +++ b/kghostview/marklist.h @@ -26,7 +26,7 @@ class KGVMiniWidget; class MarkListItem : public TQWidget { - Q_OBJECT + TQ_OBJECT public: MarkListItem( TQWidget *parent, const TQString &text, const TQString &tip, const TQColor &color, KGVMiniWidget*, int ); @@ -54,7 +54,7 @@ private: class MarkList: public TQTable { - Q_OBJECT + TQ_OBJECT public: diff --git a/kghostview/scrollbox.cpp b/kghostview/scrollbox.cpp index e50f353a..10b1a6eb 100644 --- a/kghostview/scrollbox.cpp +++ b/kghostview/scrollbox.cpp @@ -31,15 +31,15 @@ ScrollBox::ScrollBox( TQWidget* parent, const char* name ) void ScrollBox::mousePressEvent( TQMouseEvent* e ) { mouse = e->pos(); - if( e->button() == Qt::RightButton ) + if( e->button() == TQt::RightButton ) emit button3Pressed(); - if( e->button() == Qt::MidButton ) + if( e->button() == TQt::MidButton ) emit button2Pressed(); } void ScrollBox::mouseMoveEvent( TQMouseEvent* e ) { - if( e->state() != Qt::LeftButton ) + if( e->state() != TQt::LeftButton ) return; int dx = ( e->pos().x() - mouse.x() ) * pagesize.width() / width(); diff --git a/kghostview/scrollbox.h b/kghostview/scrollbox.h index 5cdd96b0..fa0a4441 100644 --- a/kghostview/scrollbox.h +++ b/kghostview/scrollbox.h @@ -24,7 +24,7 @@ class ScrollBox: public TQFrame { - Q_OBJECT + TQ_OBJECT public: diff --git a/kghostview/thumbnailservice.cpp b/kghostview/thumbnailservice.cpp index 817d1c03..367aad14 100644 --- a/kghostview/thumbnailservice.cpp +++ b/kghostview/thumbnailservice.cpp @@ -37,8 +37,8 @@ ThumbnailService::ThumbnailService( KGVMiniWidget* parent, const char* name ) : { _thumbnailDrawer = new KPSWidget( parent->_part->widget(), "thumbnail-drawer" ); _thumbnailDrawer->readSettings(); - connect( _thumbnailDrawer, TQT_SIGNAL( newPageImage( TQPixmap ) ), TQT_SLOT( slotDone( TQPixmap ) ) ); - connect( timer_, TQT_SIGNAL( timeout() ), TQT_SLOT( processOne() ) ); + connect( _thumbnailDrawer, TQ_SIGNAL( newPageImage( TQPixmap ) ), TQ_SLOT( slotDone( TQPixmap ) ) ); + connect( timer_, TQ_SIGNAL( timeout() ), TQ_SLOT( processOne() ) ); _thumbnailDrawer->hide(); } @@ -133,10 +133,10 @@ void ThumbnailService::processOne() FILE* file = _mini->psFile(); Request req = *pending.begin(); kdDebug( 4500 ) << "ThumbnailService::processOne(): processing " << req.page << "(of " << pending.size() << " requests)" << endl; - disconnect( TQT_SIGNAL( relayPixmap( TQPixmap ) ) ); + disconnect( TQ_SIGNAL( relayPixmap( TQPixmap ) ) ); while ( !pending.empty() && req.page == pending.begin()->page ) { req = *pending.begin(); - connect( this, TQT_SIGNAL( relayPixmap( TQPixmap ) ), req.receiver, req.slot ); + connect( this, TQ_SIGNAL( relayPixmap( TQPixmap ) ), req.receiver, req.slot ); pending.erase( pending.begin() ); } _thumbnailDrawer->setOrientation( _mini->orientation( req.page ) ); diff --git a/kghostview/thumbnailservice.h b/kghostview/thumbnailservice.h index 6c861e77..edc33d4a 100644 --- a/kghostview/thumbnailservice.h +++ b/kghostview/thumbnailservice.h @@ -29,7 +29,7 @@ class KGVMiniWidget; class TQTimer; class ThumbnailService : public TQObject { - Q_OBJECT + TQ_OBJECT public: ThumbnailService( KGVMiniWidget* parent, const char* name = 0 ); diff --git a/kghostview/viewcontrol.cpp b/kghostview/viewcontrol.cpp index aa46048b..2fe37797 100644 --- a/kghostview/viewcontrol.cpp +++ b/kghostview/viewcontrol.cpp @@ -28,7 +28,7 @@ ViewControl::ViewControl( TQWidget *parent, const char *name ) : TQDialog( parent, name ) { - setFocusPolicy(TQ_StrongFocus); + setFocusPolicy(TQWidget::StrongFocus); TQBoxLayout *topLayout = new TQVBoxLayout( this, 10 ); @@ -50,35 +50,35 @@ ViewControl::ViewControl( TQWidget *parent, const char *name ) grid->setColStretch(1,10); - magComboBox = new TQComboBox( FALSE, vcGroupBox ); + magComboBox = new TQComboBox( false, vcGroupBox ); magComboBox->setFixedHeight( magComboBox->sizeHint().height() ); //magComboBox->hide(); - connect ( magComboBox, TQT_SIGNAL (activated (int)), - this, TQT_SLOT (slotMagSelection (int)) ); + connect ( magComboBox, TQ_SIGNAL (activated (int)), + this, TQ_SLOT (slotMagSelection (int)) ); grid->addWidget( magComboBox, 0, 1 ); - mediaComboBox = new TQComboBox( FALSE, vcGroupBox ); + mediaComboBox = new TQComboBox( false, vcGroupBox ); mediaComboBox->setFixedHeight( magComboBox->sizeHint().height() ); - connect ( mediaComboBox, TQT_SIGNAL (activated (int)), - this, TQT_SLOT (slotMediaSelection (int)) ); + connect ( mediaComboBox, TQ_SIGNAL (activated (int)), + this, TQ_SLOT (slotMediaSelection (int)) ); grid->addWidget( mediaComboBox, 1, 1 ); - orientComboBox = new TQComboBox( FALSE, vcGroupBox ); + orientComboBox = new TQComboBox( false, vcGroupBox ); orientComboBox->insertItem(i18n("Portrait")); orientComboBox->insertItem(i18n("Landscape")); orientComboBox->insertItem(i18n("Seascape")); orientComboBox->insertItem(i18n("Upside Down")); orientComboBox->setFixedHeight( magComboBox->sizeHint().height() ); - connect ( orientComboBox, TQT_SIGNAL (activated (int)), - this, TQT_SLOT (slotOrientSelection (int)) ); + connect ( orientComboBox, TQ_SIGNAL (activated (int)), + this, TQ_SLOT (slotOrientSelection (int)) ); grid->addWidget( orientComboBox, 2, 1 ); int labelWidth = 0; @@ -124,10 +124,10 @@ ViewControl::ViewControl( TQWidget *parent, const char *name ) bbox->addStretch( 10 ); apply = bbox->addButton( KStdGuiItem::apply() ); - connect( apply, TQT_SIGNAL(clicked()), TQT_SLOT(slotApplyClicked()) ); + connect( apply, TQ_SIGNAL(clicked()), TQ_SLOT(slotApplyClicked()) ); TQPushButton *closebtn = bbox->addButton( KStdGuiItem::close() ); - connect( closebtn, TQT_SIGNAL(clicked()), TQT_SLOT(reject()) ); + connect( closebtn, TQ_SIGNAL(clicked()), TQ_SLOT(reject()) ); bbox->layout(); diff --git a/kghostview/viewcontrol.h b/kghostview/viewcontrol.h index 3e4a24b9..93db268f 100644 --- a/kghostview/viewcontrol.h +++ b/kghostview/viewcontrol.h @@ -8,7 +8,7 @@ class TQPushButton; class ViewControl : public TQDialog { - Q_OBJECT + TQ_OBJECT public: ViewControl( TQWidget *parent, const char *name ); |