diff options
Diffstat (limited to 'src/gvcore/imageview.cpp')
-rw-r--r-- | src/gvcore/imageview.cpp | 53 |
1 files changed, 26 insertions, 27 deletions
diff --git a/src/gvcore/imageview.cpp b/src/gvcore/imageview.cpp index 3f1db66..2525b7b 100644 --- a/src/gvcore/imageview.cpp +++ b/src/gvcore/imageview.cpp @@ -279,8 +279,7 @@ public: case TQEvent::KeyPress: case TQEvent::KeyRelease: case TQEvent::AccelOverride: - return static_cast< ImageView* >( TQT_TQWIDGET(parent())) - ->viewportKeyEvent(static_cast<TQKeyEvent*>(event)); + return static_cast< ImageView* >(parent())->viewportKeyEvent(static_cast<TQKeyEvent*>(event)); default: break; } @@ -326,31 +325,31 @@ ImageView::ImageView(TQWidget* parent,Document* document, TDEActionCollection* a // Create actions d->mZoomToFit=new TDEToggleAction(i18n("Fit to &Window"),"zoom-fit-best",0,d->mActionCollection,"view_zoom_to_fit"); connect(d->mZoomToFit,TQT_SIGNAL(toggled(bool)), - TQT_TQOBJECT(this), TQT_SLOT(setZoomToFit(bool)) ); + this, TQT_SLOT(setZoomToFit(bool)) ); d->mZoomToWidth=new TDEToggleAction(i18n("Fit to &Width"),0,0,d->mActionCollection,"view_zoom_to_width"); connect(d->mZoomToWidth,TQT_SIGNAL(toggled(bool)), - TQT_TQOBJECT(this), TQT_SLOT(setZoomToWidth(bool)) ); + this, TQT_SLOT(setZoomToWidth(bool)) ); d->mZoomToHeight=new TDEToggleAction(i18n("Fit to &Height"),0,0,d->mActionCollection,"view_zoom_to_height"); connect(d->mZoomToHeight,TQT_SIGNAL(toggled(bool)), - TQT_TQOBJECT(this), TQT_SLOT(setZoomToHeight(bool)) ); + this, TQT_SLOT(setZoomToHeight(bool)) ); - d->mZoomIn=KStdAction::zoomIn(TQT_TQOBJECT(this),TQT_SLOT(slotZoomIn()),d->mActionCollection); + d->mZoomIn=KStdAction::zoomIn(this,TQT_SLOT(slotZoomIn()),d->mActionCollection); - d->mZoomOut=KStdAction::zoomOut(TQT_TQOBJECT(this),TQT_SLOT(slotZoomOut()),d->mActionCollection); + d->mZoomOut=KStdAction::zoomOut(this,TQT_SLOT(slotZoomOut()),d->mActionCollection); - d->mResetZoom=KStdAction::actualSize(TQT_TQOBJECT(this),TQT_SLOT(slotResetZoom()),d->mActionCollection); + d->mResetZoom=KStdAction::actualSize(this,TQT_SLOT(slotResetZoom()),d->mActionCollection); d->mResetZoom->setIcon("zoom-original"); d->mLockZoom=new TDEToggleAction(i18n("&Lock Zoom"),"system-lock-screen",0,d->mActionCollection,"view_zoom_lock"); d->mLockZoom->setChecked(ImageViewConfig::lockZoom()); connect(d->mLockZoom,TQT_SIGNAL(toggled(bool)), - TQT_TQOBJECT(this), TQT_SLOT(setLockZoom(bool)) ); + this, TQT_SLOT(setLockZoom(bool)) ); d->mZoomCombo=new TQComboBox(true); // Avoid stealing focus d->mZoomCombo->setFocusPolicy(TQWidget::ClickFocus); connect(d->mZoomCombo, TQT_SIGNAL(activated(int)), - TQT_TQOBJECT(this), TQT_SLOT(slotSelectZoom()) ); + this, TQT_SLOT(slotSelectZoom()) ); d->mZoomComboAction=new KWidgetAction(d->mZoomCombo, i18n("Zoom"), 0, 0, 0, d->mActionCollection, "view_zoom_to"); @@ -363,41 +362,41 @@ ImageView::ImageView(TQWidget* parent,Document* document, TDEActionCollection* a d->initZoomCombo(); d->mAdjustBCG=new TDEAction(i18n("Adjust Brightness/Contrast/Gamma"), "colorize", 0, - TQT_TQOBJECT(this), TQT_SLOT(showBCGDialog()), d->mActionCollection, "adjust_bcg"); + this, TQT_SLOT(showBCGDialog()), d->mActionCollection, "adjust_bcg"); d->mIncreaseGamma=new TDEAction(i18n("Increase Gamma"),0,CTRL+Key_G, - TQT_TQOBJECT(this), TQT_SLOT(increaseGamma()),d->mActionCollection,"increase_gamma"); + this, TQT_SLOT(increaseGamma()),d->mActionCollection,"increase_gamma"); d->mDecreaseGamma=new TDEAction(i18n("Decrease Gamma"),0,SHIFT+CTRL+Key_G, - TQT_TQOBJECT(this), TQT_SLOT(decreaseGamma()),d->mActionCollection,"decrease_gamma"); + this, TQT_SLOT(decreaseGamma()),d->mActionCollection,"decrease_gamma"); d->mIncreaseBrightness=new TDEAction(i18n("Increase Brightness" ),0,CTRL+Key_B, - TQT_TQOBJECT(this), TQT_SLOT(increaseBrightness()),d->mActionCollection,"increase_brightness"); + this, TQT_SLOT(increaseBrightness()),d->mActionCollection,"increase_brightness"); d->mDecreaseBrightness=new TDEAction(i18n("Decrease Brightness" ),0,SHIFT+CTRL+Key_B, - TQT_TQOBJECT(this), TQT_SLOT(decreaseBrightness()),d->mActionCollection,"decrease_brightness"); + this, TQT_SLOT(decreaseBrightness()),d->mActionCollection,"decrease_brightness"); d->mIncreaseContrast=new TDEAction(i18n("Increase Contrast" ),0,CTRL+Key_C, - TQT_TQOBJECT(this), TQT_SLOT(increaseContrast()),d->mActionCollection,"increase_contrast"); + this, TQT_SLOT(increaseContrast()),d->mActionCollection,"increase_contrast"); d->mDecreaseContrast=new TDEAction(i18n("Decrease Contrast" ),0,SHIFT+CTRL+Key_C, - TQT_TQOBJECT(this), TQT_SLOT(decreaseContrast()),d->mActionCollection,"decrease_contrast"); + this, TQT_SLOT(decreaseContrast()),d->mActionCollection,"decrease_contrast"); // Connect to some interesting signals connect(d->mDocument,TQT_SIGNAL(loaded(const KURL&)), - TQT_TQOBJECT(this), TQT_SLOT(slotLoaded()) ); + this, TQT_SLOT(slotLoaded()) ); connect(d->mDocument,TQT_SIGNAL(loading()), - TQT_TQOBJECT(this), TQT_SLOT( loadingStarted()) ); + this, TQT_SLOT( loadingStarted()) ); connect(d->mDocument,TQT_SIGNAL(modified()), - TQT_TQOBJECT(this), TQT_SLOT(slotModified()) ); + this, TQT_SLOT(slotModified()) ); connect(d->mDocument, TQT_SIGNAL(sizeUpdated()), - TQT_TQOBJECT(this), TQT_SLOT(slotImageSizeUpdated()) ); + this, TQT_SLOT(slotImageSizeUpdated()) ); connect(d->mDocument, TQT_SIGNAL(rectUpdated(const TQRect&)), - TQT_TQOBJECT(this), TQT_SLOT(slotImageRectUpdated(const TQRect&)) ); + this, TQT_SLOT(slotImageRectUpdated(const TQRect&)) ); connect(&d->mPendingPaintTimer,TQT_SIGNAL(timeout()), - TQT_TQOBJECT(this), TQT_SLOT(checkPendingOperations()) ); + this, TQT_SLOT(checkPendingOperations()) ); connect(BusyLevelManager::instance(),TQT_SIGNAL(busyLevelChanged(BusyLevel)), - TQT_TQOBJECT(this), TQT_SLOT(slotBusyLevelChanged(BusyLevel) )); + this, TQT_SLOT(slotBusyLevelChanged(BusyLevel) )); // This event filter is here to make sure the pixmap view is aware of the changes // in the keyboard modifiers, even if it isn't focused. However, making this widget @@ -749,12 +748,12 @@ void ImageView::scheduleOperation( Operation operation ) void ImageView::updateBusyLevels() { if( !d->mPendingPaintTimer.isActive()) { - BusyLevelManager::instance()->setBusyLevel( TQT_TQOBJECT(this), BUSY_NONE ); + BusyLevelManager::instance()->setBusyLevel( this, BUSY_NONE ); } else if( !d->mPendingPaints.isEmpty() && !(*d->mPendingPaints.begin()).smooth ) { - BusyLevelManager::instance()->setBusyLevel( TQT_TQOBJECT(this), BUSY_PAINTING ); + BusyLevelManager::instance()->setBusyLevel( this, BUSY_PAINTING ); } else if(( d->mPendingOperations & SMOOTH_PASS ) || ( !d->mPendingPaints.isEmpty() && (*d->mPendingPaints.begin()).smooth )) { - BusyLevelManager::instance()->setBusyLevel( TQT_TQOBJECT(this), BUSY_SMOOTHING ); + BusyLevelManager::instance()->setBusyLevel( this, BUSY_SMOOTHING ); } else { assert( false ); } |