diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
commit | f008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch) | |
tree | 8e9244c4d4957c36be81e15b566b4aa5ea26c982 /krita/ui/kis_view.cc | |
parent | 1210f27b660efb7b37ff43ec68763e85a403471f (diff) | |
download | koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip |
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'krita/ui/kis_view.cc')
-rw-r--r-- | krita/ui/kis_view.cc | 924 |
1 files changed, 462 insertions, 462 deletions
diff --git a/krita/ui/kis_view.cc b/krita/ui/kis_view.cc index 4bd4a2b1..3220c07e 100644 --- a/krita/ui/kis_view.cc +++ b/krita/ui/kis_view.cc @@ -25,21 +25,21 @@ #include <algorithm> #include <cmath> -// Qt -#include <qapplication.h> -#include <qbutton.h> -#include <qcursor.h> -#include <qevent.h> -#include <qpainter.h> -#include <qscrollbar.h> -#include <qspinbox.h> -#include <qdockarea.h> -#include <qstringlist.h> -#include <qstyle.h> -#include <qpopupmenu.h> -#include <qvaluelist.h> -#include <qstringlist.h> -#include <qobjectlist.h> +// TQt +#include <tqapplication.h> +#include <tqbutton.h> +#include <tqcursor.h> +#include <tqevent.h> +#include <tqpainter.h> +#include <tqscrollbar.h> +#include <tqspinbox.h> +#include <tqdockarea.h> +#include <tqstringlist.h> +#include <tqstyle.h> +#include <tqpopupmenu.h> +#include <tqvaluelist.h> +#include <tqstringlist.h> +#include <tqobjectlist.h> // KDE #include <kis_meta_registry.h> @@ -168,8 +168,8 @@ // sent to a receiver if it does not accept the tablet event. #define MOUSE_CHANGE_EVENT_DELAY 100 -KisView::KisView(KisDoc *doc, KisUndoAdapter *adapter, QWidget *parent, const char *name) - : super(doc, parent, name) +KisView::KisView(KisDoc *doc, KisUndoAdapter *adapter, TQWidget *tqparent, const char *name) + : super(doc, tqparent, name) , KXMLGUIBuilder( shell() ) , m_panning( false ) , m_oldTool( 0 ) @@ -239,25 +239,25 @@ KisView::KisView(KisDoc *doc, KisUndoAdapter *adapter, QWidget *parent, const ch Q_ASSERT(doc); Q_ASSERT(adapter); - Q_ASSERT(parent); + Q_ASSERT(tqparent); KisConfig cfg; m_currentColorChooserDisplay = KisID("BLA"); - setFocusPolicy( QWidget::StrongFocus ); + setFocusPolicy( TQ_StrongFocus ); // Must come before input devices are referenced as this detects them. -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 KisCanvasWidget::initX11Support(); #endif // Install event filter before we create any child widgets so they can see // the tablet events. - qApp->installEventFilter(this); + tqApp->installEventFilter(this); m_tabletEventTimer.start(); m_inputDevice = KisInputDevice::mouse(); - connect(&m_initialZoomTimer, SIGNAL(timeout()), SLOT(slotInitialZoomTimeout())); + connect(&m_initialZoomTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotInitialZoomTimeout())); m_paletteManager = new KoPaletteManager(this, actionCollection(), "Krita palette manager"); if (cfg.fixDockerWidth()) m_paletteManager->setFixedWidth( 360 ); @@ -275,8 +275,8 @@ KisView::KisView(KisDoc *doc, KisUndoAdapter *adapter, QWidget *parent, const ch // This needs to be set before the dockers are created. m_image = m_doc->currentImage(); KisColorSpace * cs = KisMetaRegistry::instance()->csRegistry()->getRGB8(); - m_fg = KisColor(Qt::black, cs); - m_bg = KisColor(Qt::white, cs); + m_fg = KisColor(TQt::black, cs); + m_bg = KisColor(TQt::white, cs); createDockers(); @@ -288,7 +288,7 @@ KisView::KisView(KisDoc *doc, KisUndoAdapter *adapter, QWidget *parent, const ch else setXMLFile("krita.rc"); - KStdAction::keyBindings( mainWindow()->guiFactory(), SLOT( configureShortcuts() ), actionCollection() ); + KStdAction::keyBindings( mainWindow()->guiFactory(), TQT_SLOT( configureShortcuts() ), actionCollection() ); createLayerBox(); @@ -302,7 +302,7 @@ KisView::KisView(KisDoc *doc, KisUndoAdapter *adapter, QWidget *parent, const ch dcopObject(); - connect(this, SIGNAL(autoScroll(const QPoint &)), SLOT(slotAutoScroll(const QPoint &))); + connect(this, TQT_SIGNAL(autoScroll(const TQPoint &)), TQT_SLOT(slotAutoScroll(const TQPoint &))); setMouseTracking(true); @@ -313,8 +313,8 @@ KisView::KisView(KisDoc *doc, KisUndoAdapter *adapter, QWidget *parent, const ch m_brushesAndStuffToolBar = new KisControlFrame(mainWindow(), this); // Load all plugins - KTrader::OfferList offers = KTrader::self()->query(QString::fromLatin1("Krita/ViewPlugin"), - QString::fromLatin1("(Type == 'Service') and " + KTrader::OfferList offers = KTrader::self()->query(TQString::tqfromLatin1("Krita/ViewPlugin"), + TQString::tqfromLatin1("(Type == 'Service') and " "([X-Krita-Version] == 2)")); KTrader::OfferList::ConstIterator iter; for(iter = offers.begin(); iter != offers.end(); ++iter) @@ -322,7 +322,7 @@ KisView::KisView(KisDoc *doc, KisUndoAdapter *adapter, QWidget *parent, const ch KService::Ptr service = *iter; int errCode = 0; KParts::Plugin* plugin = - KParts::ComponentFactory::createInstanceFromService<KParts::Plugin> ( service, this, 0, QStringList(), &errCode); + KParts::ComponentFactory::createInstanceFromService<KParts::Plugin> ( service, this, 0, TQStringList(), &errCode); if ( plugin ) { kdDebug(41006) << "found plugin " << service->property("Name").toString() << "\n"; insertChildClient(plugin); @@ -340,7 +340,7 @@ KisView::KisView(KisDoc *doc, KisUndoAdapter *adapter, QWidget *parent, const ch { slotLoadingFinished(); } else { - connect(doc, SIGNAL(loadingFinished()), this, SLOT(slotLoadingFinished())); + connect(doc, TQT_SIGNAL(loadingFinished()), this, TQT_SLOT(slotLoadingFinished())); } setFocus(); @@ -360,27 +360,27 @@ KisView::~KisView() } -static Qt::Dock stringToDock( const QString& attrPosition ) +static TQt::Dock stringToDock( const TQString& attrPosition ) { KToolBar::Dock dock = KToolBar::DockTop; if ( !attrPosition.isEmpty() ) { if ( attrPosition == "top" ) - dock = Qt::DockTop; + dock = TQt::DockTop; else if ( attrPosition == "left" ) - dock = Qt::DockLeft; + dock = TQt::DockLeft; else if ( attrPosition == "right" ) - dock = Qt::DockRight; + dock = TQt::DockRight; else if ( attrPosition == "bottom" ) - dock = Qt::DockBottom; + dock = TQt::DockBottom; else if ( attrPosition == "floating" ) - dock = Qt::DockTornOff; + dock = TQt::DockTornOff; else if ( attrPosition == "flat" ) - dock = Qt::DockMinimized; + dock = TQt::DockMinimized; } return dock; } -QWidget * KisView::createContainer( QWidget *parent, int index, const QDomElement &element, int &id ) +TQWidget * KisView::createContainer( TQWidget *tqparent, int index, const TQDomElement &element, int &id ) { if( element.attribute( "name" ) == "ToolBox" ) { @@ -394,11 +394,11 @@ QWidget * KisView::createContainer( QWidget *parent, int index, const QDomElemen mainWindow()->moveDockWindow( m_toolBox, dock, false, 0, 0 ); } - return KXMLGUIBuilder::createContainer( parent, index, element, id ); + return KXMLGUIBuilder::createContainer( tqparent, index, element, id ); } -void KisView::removeContainer( QWidget *container, QWidget *parent, QDomElement &element, int id ) +void KisView::removeContainer( TQWidget *container, TQWidget *tqparent, TQDomElement &element, int id ) { Q_ASSERT(container); @@ -408,7 +408,7 @@ void KisView::removeContainer( QWidget *container, QWidget *parent, QDomElement m_toolManager->youAintGotNoToolBox(); } else { - KXMLGUIBuilder::removeContainer( container, parent, element, id ); + KXMLGUIBuilder::removeContainer( container, tqparent, element, id ); } } @@ -426,20 +426,20 @@ void KisView::createLayerBox() m_layerBox = new KisLayerBox(this); m_layerBox->setCaption(i18n("Layers")); - connect(m_layerBox, SIGNAL(sigRequestLayer(KisGroupLayerSP, KisLayerSP)), - this, SLOT(addLayer(KisGroupLayerSP, KisLayerSP))); - connect(m_layerBox, SIGNAL(sigRequestGroupLayer(KisGroupLayerSP, KisLayerSP)), - this, SLOT(addGroupLayer(KisGroupLayerSP, KisLayerSP))); - connect(m_layerBox, SIGNAL(sigRequestAdjustmentLayer(KisGroupLayerSP, KisLayerSP)), - this, SLOT(addAdjustmentLayer(KisGroupLayerSP, KisLayerSP))); - connect(m_layerBox, SIGNAL(sigRequestPartLayer(KisGroupLayerSP, KisLayerSP, const KoDocumentEntry&)), - this, SLOT(addPartLayer(KisGroupLayerSP, KisLayerSP, const KoDocumentEntry&))); - connect(m_layerBox, SIGNAL(sigRequestLayerProperties(KisLayerSP)), - this, SLOT(showLayerProperties(KisLayerSP))); - connect(m_layerBox, SIGNAL(sigOpacityChanged(int, bool)), this, SLOT(layerOpacity(int, bool))); - connect(m_layerBox, SIGNAL(sigOpacityFinishedChanging(int, int)), - this, SLOT(layerOpacityFinishedChanging(int, int))); - connect(m_layerBox, SIGNAL(sigItemComposite(const KisCompositeOp&)), this, SLOT(layerCompositeOp(const KisCompositeOp&))); + connect(m_layerBox, TQT_SIGNAL(sigRequestLayer(KisGroupLayerSP, KisLayerSP)), + this, TQT_SLOT(addLayer(KisGroupLayerSP, KisLayerSP))); + connect(m_layerBox, TQT_SIGNAL(sigRequestGroupLayer(KisGroupLayerSP, KisLayerSP)), + this, TQT_SLOT(addGroupLayer(KisGroupLayerSP, KisLayerSP))); + connect(m_layerBox, TQT_SIGNAL(sigRequestAdjustmentLayer(KisGroupLayerSP, KisLayerSP)), + this, TQT_SLOT(addAdjustmentLayer(KisGroupLayerSP, KisLayerSP))); + connect(m_layerBox, TQT_SIGNAL(sigRequestPartLayer(KisGroupLayerSP, KisLayerSP, const KoDocumentEntry&)), + this, TQT_SLOT(addPartLayer(KisGroupLayerSP, KisLayerSP, const KoDocumentEntry&))); + connect(m_layerBox, TQT_SIGNAL(sigRequestLayerProperties(KisLayerSP)), + this, TQT_SLOT(showLayerProperties(KisLayerSP))); + connect(m_layerBox, TQT_SIGNAL(sigOpacityChanged(int, bool)), this, TQT_SLOT(layerOpacity(int, bool))); + connect(m_layerBox, TQT_SIGNAL(sigOpacityFinishedChanging(int, int)), + this, TQT_SLOT(layerOpacityFinishedChanging(int, int))); + connect(m_layerBox, TQT_SIGNAL(sigItemComposite(const KisCompositeOp&)), this, TQT_SLOT(layerCompositeOp(const KisCompositeOp&))); paletteManager()->addWidget(m_layerBox, "layerbox", krita::LAYERBOX, 0); @@ -458,18 +458,18 @@ void KisView::setupScrollBars() { m_scrollX = 0; m_scrollY = 0; - m_vScroll = new QScrollBar(QScrollBar::Vertical, this); + m_vScroll = new TQScrollBar(TQScrollBar::Vertical, this); Q_CHECK_PTR(m_vScroll); - m_hScroll = new QScrollBar(QScrollBar::Horizontal, this); + m_hScroll = new TQScrollBar(TQScrollBar::Horizontal, this); Q_CHECK_PTR(m_hScroll); m_vScroll->setGeometry(width() - 16, 20, 16, height() - 36); m_hScroll->setGeometry(20, height() - 16, width() - 36, 16); m_hScroll->setValue(0); m_vScroll->setValue(0); - QObject::connect(m_vScroll, SIGNAL(valueChanged(int)), this, SLOT(scrollV(int))); - QObject::connect(m_hScroll, SIGNAL(valueChanged(int)), this, SLOT(scrollH(int))); + TQObject::connect(m_vScroll, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(scrollV(int))); + TQObject::connect(m_hScroll, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(scrollH(int))); } void KisView::setupRulers() @@ -494,11 +494,11 @@ void KisView::setupRulers() void KisView::updateStatusBarZoomLabel () { if (zoom() < 1 - EPSILON) { - m_statusBarZoomLabel->setText(i18n("Zoom %1%").arg(zoom() * 100, 0, 'g', 4)); + m_statusBarZoomLabel->setText(i18n("Zoom %1%").tqarg(zoom() * 100, 0, 'g', 4)); } else { - m_statusBarZoomLabel->setText(i18n("Zoom %1%").arg(zoom() * 100, 0, 'f', 0)); + m_statusBarZoomLabel->setText(i18n("Zoom %1%").tqarg(zoom() * 100, 0, 'f', 0)); } - m_statusBarZoomLabel->setMaximumWidth(m_statusBarZoomLabel->fontMetrics().width(i18n("Zoom %1%").arg("0.8888 "))); + m_statusBarZoomLabel->setMaximumWidth(m_statusBarZoomLabel->fontMetrics().width(i18n("Zoom %1%").tqarg("0.8888 "))); } void KisView::updateStatusBarSelectionLabel() @@ -512,8 +512,8 @@ void KisView::updateStatusBarSelectionLabel() KisPaintDeviceSP dev = img->activeDevice(); if (dev) { if (dev->hasSelection()) { - QRect r = dev->selection()->selectedExactRect(); - m_statusBarSelectionLabel->setText( i18n("Selection Active: x = %1 y = %2 width = %3 height = %4").arg(r.x()).arg(r.y()).arg( r.width()).arg( r.height())); + TQRect r = dev->selection()->selectedExactRect(); + m_statusBarSelectionLabel->setText( i18n("Selection Active: x = %1 y = %2 width = %3 height = %4").tqarg(r.x()).tqarg(r.y()).tqarg( r.width()).tqarg( r.height())); return; } } @@ -555,7 +555,7 @@ void KisView::resetMonitorProfile() if (m_monitorProfile == 0) { KisConfig cfg; - QString monitorProfileName = cfg.monitorProfile(); + TQString monitorProfileName = cfg.monitorProfile(); m_monitorProfile = KisMetaRegistry::instance()->csRegistry()->getProfileByName(monitorProfileName); } @@ -566,7 +566,7 @@ void KisView::setupStatusBar() KStatusBar *sb = statusBar(); if (sb) { - m_statusBarZoomLabel = new QLabel(sb); + m_statusBarZoomLabel = new TQLabel(sb); addStatusBarItem(m_statusBarZoomLabel,1); updateStatusBarZoomLabel(); @@ -601,112 +601,112 @@ void KisView::setupActions() m_fullScreen = KStdAction::fullScreen( NULL, NULL, actionCollection(), this ); - connect( m_fullScreen, SIGNAL( toggled( bool )), this, SLOT( slotUpdateFullScreen( bool ))); + connect( m_fullScreen, TQT_SIGNAL( toggled( bool )), this, TQT_SLOT( slotUpdateFullScreen( bool ))); - m_imgProperties = new KAction(i18n("Image Properties"), 0, this, SLOT(slotImageProperties()), actionCollection(), "img_properties"); + m_imgProperties = new KAction(i18n("Image Properties"), 0, this, TQT_SLOT(slotImageProperties()), actionCollection(), "img_properties"); m_imgScan = 0; // How the hell do I get a KAction to the scan plug-in?!? - m_imgResizeToLayer = new KAction(i18n("Resize Image to Size of Current Layer"), 0, this, SLOT(imgResizeToActiveLayer()), actionCollection(), "resizeimgtolayer"); + m_imgResizeToLayer = new KAction(i18n("Resize Image to Size of Current Layer"), 0, this, TQT_SLOT(imgResizeToActiveLayer()), actionCollection(), "resizeimgtolayer"); // view actions - m_zoomIn = KStdAction::zoomIn(this, SLOT(slotZoomIn()), actionCollection(), "zoom_in"); - m_zoomOut = KStdAction::zoomOut(this, SLOT(slotZoomOut()), actionCollection(), "zoom_out"); - m_actualPixels = new KAction(i18n("Actual Pixels"), "Ctrl+0", this, SLOT(slotActualPixels()), actionCollection(), "actual_pixels"); - m_actualSize = KStdAction::actualSize(this, SLOT(slotActualSize()), actionCollection(), "actual_size"); + m_zoomIn = KStdAction::zoomIn(this, TQT_SLOT(slotZoomIn()), actionCollection(), "zoom_in"); + m_zoomOut = KStdAction::zoomOut(this, TQT_SLOT(slotZoomOut()), actionCollection(), "zoom_out"); + m_actualPixels = new KAction(i18n("Actual Pixels"), "Ctrl+0", this, TQT_SLOT(slotActualPixels()), actionCollection(), "actual_pixels"); + m_actualSize = KStdAction::actualSize(this, TQT_SLOT(slotActualSize()), actionCollection(), "actual_size"); m_actualSize->setEnabled(false); - m_fitToCanvas = KStdAction::fitToPage(this, SLOT(slotFitToCanvas()), actionCollection(), "fit_to_canvas"); + m_fitToCanvas = KStdAction::fitToPage(this, TQT_SLOT(slotFitToCanvas()), actionCollection(), "fit_to_canvas"); // layer actions - m_layerAdd = new KAction(i18n("&Add..."), "Ctrl+Shift+N", this, SLOT(layerAdd()), actionCollection(), "insert_layer"); + m_layerAdd = new KAction(i18n("&Add..."), "Ctrl+Shift+N", this, TQT_SLOT(layerAdd()), actionCollection(), "insert_layer"); m_actionPartLayer = new KoPartSelectAction( i18n( "&Object Layer" ), "frame_query", - this, SLOT( addPartLayer() ), + this, TQT_SLOT( addPartLayer() ), actionCollection(), "insert_part_layer" ); m_actionAdjustmentLayer = new KAction( i18n( "&Adjustment Layer" ), 0, - this, SLOT( addAdjustmentLayer() ), + this, TQT_SLOT( addAdjustmentLayer() ), actionCollection(), "insert_adjustment_layer" ); - m_layerRm = new KAction(i18n("&Remove"), 0, this, SLOT(layerRemove()), actionCollection(), "remove_layer"); - m_layerDup = new KAction(i18n("Duplicate"), 0, this, SLOT(layerDuplicate()), actionCollection(), "duplicate_layer"); - m_layerHide = new KToggleAction(i18n("&Hide"), 0, this, SLOT(layerToggleVisible()), actionCollection(), "hide_layer"); + m_layerRm = new KAction(i18n("&Remove"), 0, this, TQT_SLOT(layerRemove()), actionCollection(), "remove_layer"); + m_layerDup = new KAction(i18n("Duplicate"), 0, this, TQT_SLOT(layerDuplicate()), actionCollection(), "duplicate_layer"); + m_layerHide = new KToggleAction(i18n("&Hide"), 0, this, TQT_SLOT(layerToggleVisible()), actionCollection(), "hide_layer"); m_layerHide->setCheckedState(KGuiItem(i18n("&Show"))); m_layerHide->setChecked(false); - m_layerRaise = new KAction(i18n("Raise"), "raise", "Ctrl+]", this, SLOT(layerRaise()), actionCollection(), "raiselayer"); - m_layerLower = new KAction(i18n("Lower"), "lower", "Ctrl+[", this, SLOT(layerLower()), actionCollection(), "lowerlayer"); - m_layerTop = new KAction(i18n("To Top"), "bring_forward", "Ctrl+Shift+]", this, SLOT(layerFront()), actionCollection(), "toplayer"); - m_layerBottom = new KAction(i18n("To Bottom"), "send_backward", "Ctrl+Shift+[", this, SLOT(layerBack()), actionCollection(), "bottomlayer"); - m_layerProperties = new KAction(i18n("Properties"), 0, this, SLOT(layerProperties()), actionCollection(), "layer_properties"); - (void)new KAction(i18n("I&nsert Image as Layer..."), 0, this, SLOT(slotInsertImageAsLayer()), actionCollection(), "insert_image_as_layer"); - m_layerSaveAs = new KAction(i18n("Save Layer as Image..."), "filesave", this, SLOT(saveLayerAsImage()), actionCollection(), "save_layer_as_image"); - (void)new KAction(i18n("Flip on &X Axis"), "view_left_right", 0, this, SLOT(mirrorLayerX()), actionCollection(), "mirrorLayerX"); - (void)new KAction(i18n("Flip on &Y Axis"), "view_top_bottom", 0, this, SLOT(mirrorLayerY()), actionCollection(), "mirrorLayerY"); + m_layerRaise = new KAction(i18n("Raise"), "raise", "Ctrl+]", this, TQT_SLOT(layerRaise()), actionCollection(), "raiselayer"); + m_layerLower = new KAction(i18n("Lower"), "lower", "Ctrl+[", this, TQT_SLOT(layerLower()), actionCollection(), "lowerlayer"); + m_layerTop = new KAction(i18n("To Top"), "bring_forward", "Ctrl+Shift+]", this, TQT_SLOT(layerFront()), actionCollection(), "toplayer"); + m_layerBottom = new KAction(i18n("To Bottom"), "send_backward", "Ctrl+Shift+[", this, TQT_SLOT(layerBack()), actionCollection(), "bottomlayer"); + m_layerProperties = new KAction(i18n("Properties"), 0, this, TQT_SLOT(layerProperties()), actionCollection(), "layer_properties"); + (void)new KAction(i18n("I&nsert Image as Layer..."), 0, this, TQT_SLOT(slotInsertImageAsLayer()), actionCollection(), "insert_image_as_layer"); + m_layerSaveAs = new KAction(i18n("Save Layer as Image..."), "filesave", this, TQT_SLOT(saveLayerAsImage()), actionCollection(), "save_layer_as_image"); + (void)new KAction(i18n("Flip on &X Axis"), "view_left_right", 0, this, TQT_SLOT(mirrorLayerX()), actionCollection(), "mirrorLayerX"); + (void)new KAction(i18n("Flip on &Y Axis"), "view_top_bottom", 0, this, TQT_SLOT(mirrorLayerY()), actionCollection(), "mirrorLayerY"); m_createMask = new KAction(i18n("Create Mask"), 0, this, - SLOT(slotCreateMask()), actionCollection(), "create_mask"); - m_maskFromSelection = new KAction(i18n("Mask From Selection"), 0, this, - SLOT(slotMaskFromSelection()), actionCollection(), - "mask_fromsel"); - m_maskToSelection = new KAction(i18n("Mask to Selection"), 0, this, - SLOT(slotMaskToSelection()), actionCollection(), "mask_tosel"); - m_applyMask = new KAction(i18n("Apply Mask"), 0, this, SLOT(slotApplyMask()), - actionCollection(), "apply_mask"); + TQT_SLOT(slotCreateMask()), actionCollection(), "create_tqmask"); + m_tqmaskFromSelection = new KAction(i18n("Mask From Selection"), 0, this, + TQT_SLOT(slotMaskFromSelection()), actionCollection(), + "tqmask_fromsel"); + m_tqmaskToSelection = new KAction(i18n("Mask to Selection"), 0, this, + TQT_SLOT(slotMaskToSelection()), actionCollection(), "tqmask_tosel"); + m_applyMask = new KAction(i18n("Apply Mask"), 0, this, TQT_SLOT(slotApplyMask()), + actionCollection(), "apply_tqmask"); m_removeMask = new KAction(i18n("Remove Mask"), 0, this, - SLOT(slotRemoveMask()), actionCollection(), "remove_mask"); + TQT_SLOT(slotRemoveMask()), actionCollection(), "remove_tqmask"); m_showMask = new KToggleAction(i18n( "Show Mask" ), 0, this, - SLOT(slotShowMask()), actionCollection(), "show_mask"); + TQT_SLOT(slotShowMask()), actionCollection(), "show_tqmask"); m_editMask = new KToggleAction(i18n( "Edit Mask" ), 0, this, - SLOT(slotEditMask()), actionCollection(), "edit_mask"); + TQT_SLOT(slotEditMask()), actionCollection(), "edit_tqmask"); // image actions - m_imgFlatten = new KAction(i18n("&Flatten Image"), "Ctrl+Shift+E", this, SLOT(flattenImage()), actionCollection(), "flatten_image"); - m_imgMergeLayer = new KAction(i18n("&Merge with Layer Below"), "Ctrl+E", this, SLOT(mergeLayer()), actionCollection(), "merge_layer"); + m_imgFlatten = new KAction(i18n("&Flatten Image"), "Ctrl+Shift+E", this, TQT_SLOT(flattenImage()), actionCollection(), "flatten_image"); + m_imgMergeLayer = new KAction(i18n("&Merge with Layer Below"), "Ctrl+E", this, TQT_SLOT(mergeLayer()), actionCollection(), "merge_layer"); // setting actions - KStdAction::preferences(this, SLOT(preferences()), actionCollection(), "preferences"); + KStdAction::preferences(this, TQT_SLOT(preferences()), actionCollection(), "preferences"); - m_RulerAction = new KToggleAction( i18n( "Show Rulers" ), "Ctrl+R", this, SLOT( showRuler() ), actionCollection(), "view_ruler" ); + m_RulerAction = new KToggleAction( i18n( "Show Rulers" ), "Ctrl+R", this, TQT_SLOT( showRuler() ), actionCollection(), "view_ruler" ); m_RulerAction->setChecked(cfg.showRulers()); m_RulerAction->setCheckedState(i18n("Hide Rulers")); m_RulerAction->setWhatsThis( i18n("The rulers show the horizontal and vertical positions of the mouse on the image " "and can be used to position your mouse at the right place on the canvas. <p>Uncheck this to disable " "the rulers from being displayed." ) ); - //m_guideAction = new KToggleAction( i18n( "Guide Lines" ), 0, this, SLOT( viewGuideLines() ), actionCollection(), "view_guidelines" ); + //m_guideAction = new KToggleAction( i18n( "Guide Lines" ), 0, this, TQT_SLOT( viewGuideLines() ), actionCollection(), "view_guidelines" ); // Add new palette - new KAction(i18n("Add New Palette..."), 0, this, SLOT(slotAddPalette()), + new KAction(i18n("Add New Palette..."), 0, this, TQT_SLOT(slotAddPalette()), actionCollection(), "add_palette"); - new KAction(i18n("Edit Palette..."), 0, this, SLOT(slotEditPalette()), + new KAction(i18n("Edit Palette..."), 0, this, TQT_SLOT(slotEditPalette()), actionCollection(), "edit_palette"); - // XXX: This triggers a repaint of the image, but way too early + // XXX: This triggers a tqrepaint of the image, but way too early //showRuler(); } -void KisView::resizeEvent(QResizeEvent *) +void KisView::resizeEvent(TQResizeEvent *) { if (!m_paintViewEnabled) { startInitialZoomTimerIfReady(); } KisImageSP img = currentImg(); - Q_INT32 scrollBarExtent = style().pixelMetric(QStyle::PM_ScrollBarExtent); - Q_INT32 drawH; - Q_INT32 drawW; - Q_INT32 docW; - Q_INT32 docH; + TQ_INT32 scrollBarExtent = style().tqpixelMetric(TQStyle::PM_ScrollBarExtent); + TQ_INT32 drawH; + TQ_INT32 drawW; + TQ_INT32 docW; + TQ_INT32 docH; // if (img) { // KisGuideMgr *mgr = img->guides(); // mgr->resize(size()); // } - docW = static_cast<Q_INT32>(ceil(docWidth() * zoom())); - docH = static_cast<Q_INT32>(ceil(docHeight() * zoom())); + docW = static_cast<TQ_INT32>(ceil(docWidth() * zoom())); + docH = static_cast<TQ_INT32>(ceil(docHeight() * zoom())); m_rulerThickness = m_RulerAction->isChecked() ? RULER_THICKNESS : 0; drawH = height() - m_rulerThickness; @@ -775,8 +775,8 @@ void KisView::resizeEvent(QResizeEvent *) m_hScrollBarExtent = scrollBarExtent; } - Q_INT32 oldCanvasXOffset = m_canvasXOffset; - Q_INT32 oldCanvasYOffset = m_canvasYOffset; + TQ_INT32 oldCanvasXOffset = m_canvasXOffset; + TQ_INT32 oldCanvasYOffset = m_canvasYOffset; if (docW < drawW) { m_canvasXOffset = (drawW - docW) / 2; @@ -799,29 +799,29 @@ void KisView::resizeEvent(QResizeEvent *) if (!m_canvas->isOpenGLCanvas()) { - if (m_canvasPixmap.size() != QSize(drawW, drawH)) { + if (m_canvasPixmap.size() != TQSize(drawW, drawH)) { - Q_INT32 oldCanvasWidth = m_canvasPixmap.width(); - Q_INT32 oldCanvasHeight = m_canvasPixmap.height(); + TQ_INT32 oldCanvasWidth = m_canvasPixmap.width(); + TQ_INT32 oldCanvasHeight = m_canvasPixmap.height(); - Q_INT32 newCanvasWidth = drawW; - Q_INT32 newCanvasHeight = drawH; + TQ_INT32 newCanvasWidth = drawW; + TQ_INT32 newCanvasHeight = drawH; - QRegion exposedRegion = QRect(0, 0, newCanvasWidth, newCanvasHeight); + TQRegion exposedRegion = TQRect(0, 0, newCanvasWidth, newCanvasHeight); // Increase size first so that we can copy the old image area to the new one. - m_canvasPixmap.resize(QMAX(oldCanvasWidth, newCanvasWidth), QMAX(oldCanvasHeight, newCanvasHeight)); + m_canvasPixmap.resize(TQMAX(oldCanvasWidth, newCanvasWidth), TQMAX(oldCanvasHeight, newCanvasHeight)); if (!m_canvasPixmap.isNull()) { if (oldCanvasXOffset != m_canvasXOffset || oldCanvasYOffset != m_canvasYOffset) { - Q_INT32 srcX; - Q_INT32 srcY; - Q_INT32 srcWidth; - Q_INT32 srcHeight; - Q_INT32 dstX; - Q_INT32 dstY; + TQ_INT32 srcX; + TQ_INT32 srcY; + TQ_INT32 srcWidth; + TQ_INT32 srcHeight; + TQ_INT32 dstX; + TQ_INT32 dstY; if (oldCanvasXOffset <= m_canvasXOffset) { // Move to the right @@ -848,9 +848,9 @@ void KisView::resizeEvent(QResizeEvent *) } bitBlt(&m_canvasPixmap, dstX, dstY, &m_canvasPixmap, srcX, srcY, srcWidth, srcHeight); - exposedRegion -= QRegion(QRect(dstX, dstY, srcWidth, srcHeight)); + exposedRegion -= TQRegion(TQRect(dstX, dstY, srcWidth, srcHeight)); } else { - exposedRegion -= QRegion(QRect(0, 0, oldCanvasWidth, oldCanvasHeight)); + exposedRegion -= TQRegion(TQRect(0, 0, oldCanvasWidth, oldCanvasHeight)); } } @@ -858,24 +858,24 @@ void KisView::resizeEvent(QResizeEvent *) if (!m_canvasPixmap.isNull() && !exposedRegion.isEmpty()) { - QMemArray<QRect> rects = exposedRegion.rects(); + TQMemArray<TQRect> rects = exposedRegion.rects(); for (unsigned int i = 0; i < rects.count(); i++) { - QRect r = rects[i]; - updateQPaintDeviceCanvas(viewToWindow(r)); + TQRect r = rects[i]; + updateTQPaintDeviceCanvas(viewToWindow(r)); } } } } - int fontheight = QFontMetrics(KGlobalSettings::generalFont()).height() * 3; + int fontheight = TQFontMetrics(KGlobalSettings::generalFont()).height() * 3; m_vScroll->setPageStep(drawH); m_vScroll->setLineStep(fontheight); m_hScroll->setPageStep(drawW); m_hScroll->setLineStep(fontheight); - m_hRuler->setGeometry(m_rulerThickness + m_canvasXOffset, 0, QMIN(docW, drawW), m_rulerThickness); - m_vRuler->setGeometry(0, m_rulerThickness + m_canvasYOffset, m_rulerThickness, QMIN(docH, drawH)); + m_hRuler->setGeometry(m_rulerThickness + m_canvasXOffset, 0, TQMIN(docW, drawW), m_rulerThickness); + m_vRuler->setGeometry(0, m_rulerThickness + m_canvasYOffset, m_rulerThickness, TQMIN(docH, drawH)); if (m_vScroll->isVisible()) m_vRuler->updateVisibleArea(0, m_vScroll->value()); @@ -900,20 +900,20 @@ void KisView::resizeEvent(QResizeEvent *) emit viewTransformationsChanged(); } -void KisView::styleChange(QStyle& oldStyle) +void KisView::styleChange(TQStyle& oldStyle) { Q_UNUSED(oldStyle); m_canvas->updateGeometry(); refreshKisCanvas(); } -void KisView::paletteChange(const QPalette& oldPalette) +void KisView::paletteChange(const TQPalette& oldPalette) { Q_UNUSED(oldPalette); refreshKisCanvas(); } -void KisView::showEvent(QShowEvent *) +void KisView::showEvent(TQShowEvent *) { if (!m_showEventReceived) { m_showEventReceived = true; @@ -926,24 +926,24 @@ void KisView::updateReadWrite(bool readwrite) layerUpdateGUI(readwrite); } -Q_INT32 KisView::horzValue() const +TQ_INT32 KisView::horzValue() const { return m_hScroll->value() - m_canvasXOffset; } -Q_INT32 KisView::vertValue() const +TQ_INT32 KisView::vertValue() const { return m_vScroll->value() - m_canvasYOffset; } -void KisView::updateQPaintDeviceCanvas(const QRect& imageRect) +void KisView::updateTQPaintDeviceCanvas(const TQRect& imageRect) { - QRect vr = windowToView(imageRect); - vr &= QRect(0, 0, m_canvas->width(), m_canvas->height()); + TQRect vr = windowToView(imageRect); + vr &= TQRect(0, 0, m_canvas->width(), m_canvas->height()); if (!vr.isEmpty()) { - QPainter gc; + TQPainter gc; if (gc.begin(&m_canvasPixmap)) { @@ -951,20 +951,20 @@ void KisView::updateQPaintDeviceCanvas(const QRect& imageRect) if (img && m_paintViewEnabled) { - QRect wr = viewToWindow(vr); + TQRect wr = viewToWindow(vr); if (wr.left() < 0 || wr.right() >= img->width() || wr.top() < 0 || wr.bottom() >= img->height()) { // Erase areas outside document - QRegion rg(vr); - rg -= QRegion(windowToView(QRect(0, 0, img->width(), img->height()))); + TQRegion rg(vr); + rg -= TQRegion(windowToView(TQRect(0, 0, img->width(), img->height()))); - QMemArray<QRect> rects = rg.rects(); + TQMemArray<TQRect> rects = rg.rects(); for (unsigned int i = 0; i < rects.count(); i++) { - QRect er = rects[i]; - gc.fillRect(er, colorGroup().mid()); + TQRect er = rects[i]; + gc.fillRect(er, tqcolorGroup().mid()); } - wr &= QRect(0, 0, img->width(), img->height()); + wr &= TQRect(0, 0, img->width(), img->height()); } if (!wr.isEmpty()) { @@ -991,14 +991,14 @@ void KisView::updateQPaintDeviceCanvas(const QRect& imageRect) paintFlags, HDRExposure()); } else { - QRect canvasRect = windowToView(wr); - QRect scaledImageRect = canvasRect; + TQRect canvasRect = windowToView(wr); + TQRect scaledImageRect = canvasRect; scaledImageRect.moveBy(horzValue(), vertValue()); - QSize scaledImageSize(static_cast<Q_INT32>(ceil(docWidth() * zoom())), - static_cast<Q_INT32>(ceil(docHeight() * zoom()))); + TQSize scaledImageSize(static_cast<TQ_INT32>(ceil(docWidth() * zoom())), + static_cast<TQ_INT32>(ceil(docHeight() * zoom()))); - QImage image = m_image->convertToQImage(scaledImageRect, scaledImageSize, + TQImage image = m_image->convertToTQImage(scaledImageRect, scaledImageSize, monitorProfile(), paintFlags, HDRExposure()); gc.drawImage(canvasRect.topLeft(), image, image.rect()); @@ -1014,23 +1014,23 @@ void KisView::updateQPaintDeviceCanvas(const QRect& imageRect) } // paintGuides(); } else { - gc.fillRect(vr, colorGroup().mid()); + gc.fillRect(vr, tqcolorGroup().mid()); } } } } -void KisView::paintQPaintDeviceView(const QRegion& canvasRegion) +void KisView::paintTQPaintDeviceView(const TQRegion& canvasRegion) { - Q_ASSERT(m_canvas->QPaintDeviceWidget() != 0); + Q_ASSERT(m_canvas->TQPaintDeviceWidget() != 0); - if (m_canvas->QPaintDeviceWidget() != 0 && !m_canvasPixmap.isNull()) { - QMemArray<QRect> rects = canvasRegion.rects(); + if (m_canvas->TQPaintDeviceWidget() != 0 && !m_canvasPixmap.isNull()) { + TQMemArray<TQRect> rects = canvasRegion.rects(); for (unsigned int i = 0; i < rects.count(); i++) { - QRect r = rects[i]; + TQRect r = rects[i]; - bitBlt(m_canvas->QPaintDeviceWidget(), r.x(), r.y(), &m_canvasPixmap, + bitBlt(m_canvas->TQPaintDeviceWidget(), r.x(), r.y(), &m_canvasPixmap, r.x(), r.y(), r.width(), r.height()); } @@ -1038,7 +1038,7 @@ void KisView::paintQPaintDeviceView(const QRegion& canvasRegion) } } -void KisView::updateOpenGLCanvas(const QRect& imageRect) +void KisView::updateOpenGLCanvas(const TQRect& imageRect) { #ifdef HAVE_GL KisImageSP img = currentImg(); @@ -1055,7 +1055,7 @@ void KisView::updateOpenGLCanvas(const QRect& imageRect) #endif } -void KisView::paintOpenGLView(const QRect& canvasRect) +void KisView::paintOpenGLView(const TQRect& canvasRect) { #ifdef HAVE_GL if (!m_canvas->isUpdatesEnabled()) { @@ -1066,7 +1066,7 @@ void KisView::paintOpenGLView(const QRect& canvasRect) glDrawBuffer(GL_BACK); - QColor widgetBackgroundColor = colorGroup().mid(); + TQColor widgetBackgroundColor = tqcolorGroup().mid(); glClearColor(widgetBackgroundColor.red() / 255.0, widgetBackgroundColor.green() / 255.0, widgetBackgroundColor.blue() / 255.0, 1.0); glClear(GL_COLOR_BUFFER_BIT); @@ -1075,8 +1075,8 @@ void KisView::paintOpenGLView(const QRect& canvasRect) if (img && m_paintViewEnabled) { - QRect vr = canvasRect; - vr &= QRect(0, 0, m_canvas->width(), m_canvas->height()); + TQRect vr = canvasRect; + vr &= TQRect(0, 0, m_canvas->width(), m_canvas->height()); if (!vr.isNull()) { @@ -1093,7 +1093,7 @@ void KisView::paintOpenGLView(const QRect& canvasRect) glTranslatef(m_canvasXOffset, m_canvasYOffset, 0.0); glEnable(GL_TEXTURE_2D); - glBegin(GL_QUADS); + glBegin(GL_TQUADS); glTexCoord2f(0.0, 0.0); glVertex2f(0.0, 0.0); @@ -1118,8 +1118,8 @@ void KisView::paintOpenGLView(const QRect& canvasRect) glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - QRect wr = viewToWindow(QRect(0, 0, m_canvas->width(), m_canvas->height())); - wr &= QRect(0, 0, img->width(), img->height()); + TQRect wr = viewToWindow(TQRect(0, 0, m_canvas->width(), m_canvas->height())); + wr &= TQRect(0, 0, img->width(), img->height()); m_OpenGLImageContext->setHDRExposure(HDRExposure()); @@ -1134,7 +1134,7 @@ void KisView::paintOpenGLView(const QRect& canvasRect) glBindTexture(GL_TEXTURE_2D, m_OpenGLImageContext->imageTextureTile(x, y)); - glBegin(GL_QUADS); + glBegin(GL_TQUADS); glTexCoord2f(0.0, 0.0); glVertex2f(x, y); @@ -1168,7 +1168,7 @@ void KisView::paintOpenGLView(const QRect& canvasRect) m_canvas->OpenGLWidget()->swapBuffers(); - paintToolOverlay(QRegion(canvasRect)); + paintToolOverlay(TQRegion(canvasRect)); #else Q_UNUSED(canvasRect); @@ -1213,26 +1213,26 @@ void KisView::updateCanvas() } } -void KisView::updateCanvas(Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h) +void KisView::updateCanvas(TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, TQ_INT32 h) { - updateCanvas(QRect(x, y, w, h)); + updateCanvas(TQRect(x, y, w, h)); } -void KisView::updateCanvas(const QRect& imageRect) +void KisView::updateCanvas(const TQRect& imageRect) { if (m_canvas->isOpenGLCanvas()) { updateOpenGLCanvas(imageRect); paintOpenGLView(windowToView(imageRect)); } else { - updateQPaintDeviceCanvas(imageRect); + updateTQPaintDeviceCanvas(imageRect); //m_canvas->update(windowToView(imageRect)); - m_canvas->repaint(windowToView(imageRect)); + m_canvas->tqrepaint(windowToView(imageRect)); } } void KisView::refreshKisCanvas() { - QRect imageRect = viewToWindow(QRect(0, 0, m_canvas->width(), m_canvas->height())); + TQRect imageRect = viewToWindow(TQRect(0, 0, m_canvas->width(), m_canvas->height())); if (m_image) { imageRect |= m_image->bounds(); @@ -1241,7 +1241,7 @@ void KisView::refreshKisCanvas() updateCanvas(imageRect); // Enable this if updateCanvas does an m_canvas->update() - //m_canvas->repaint(); + //m_canvas->tqrepaint(); } void KisView::selectionDisplayToggled(bool displaySelection) @@ -1263,8 +1263,8 @@ void KisView::layerUpdateGUI(bool enable) KisImageSP img = currentImg(); KisLayerSP layer; - Q_INT32 nlayers = 0; - Q_INT32 nvisible = 0; + TQ_INT32 nlayers = 0; + TQ_INT32 nvisible = 0; @@ -1457,13 +1457,13 @@ void KisView::zoomAroundPoint(double x, double y, double zf) if (m_hScroll->isVisible()) { double vcx = m_canvas->width() / 2.0; - Q_INT32 scrollX = qRound(x * zoom() - vcx); + TQ_INT32 scrollX = tqRound(x * zoom() - vcx); m_hScroll->setValue(scrollX); } if (m_vScroll->isVisible()) { double vcy = m_canvas->height() / 2.0; - Q_INT32 scrollY = qRound(y * zoom() - vcy); + TQ_INT32 scrollY = tqRound(y * zoom() - vcy); m_vScroll->setValue(scrollY); } @@ -1475,7 +1475,7 @@ void KisView::zoomAroundPoint(double x, double y, double zf) m_vScroll->update(); if (m_canvas->isOpenGLCanvas()) { - paintOpenGLView(QRect(0, 0, m_canvas->width(), m_canvas->height())); + paintOpenGLView(TQRect(0, 0, m_canvas->width(), m_canvas->height())); } else { refreshKisCanvas(); } @@ -1504,22 +1504,22 @@ void KisView::zoomTo(const KisRect& r) } } -void KisView::zoomTo(const QRect& r) +void KisView::zoomTo(const TQRect& r) { zoomTo(KisRect(r)); } -void KisView::zoomTo(Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h) +void KisView::zoomTo(TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, TQ_INT32 h) { zoomTo(KisRect(x, y, w, h)); } -void KisView::zoomIn(Q_INT32 x, Q_INT32 y) +void KisView::zoomIn(TQ_INT32 x, TQ_INT32 y) { zoomAroundPoint(x, y, nextZoomInLevel()); } -void KisView::zoomOut(Q_INT32 x, Q_INT32 y) +void KisView::zoomOut(TQ_INT32 x, TQ_INT32 y) { zoomAroundPoint(x, y, nextZoomOutLevel()); } @@ -1574,7 +1574,7 @@ double KisView::fitToCanvasZoomLevel() const double xZoomLevel = static_cast<double>(fullCanvasWidth) / img->width(); double yZoomLevel = static_cast<double>(fullCanvasHeight) / img->height(); - return QMIN(xZoomLevel, yZoomLevel); + return TQMIN(xZoomLevel, yZoomLevel); } else { return 1; @@ -1612,7 +1612,7 @@ void KisView::imgResizeToActiveLayer() img->lock(); - QRect r = layer->exactBounds(); + TQRect r = layer->exactBounds(); img->resize(r.width(), r.height(), r.x(), r.y(), true); img->unlock(); @@ -1631,14 +1631,14 @@ void KisView::slotImageProperties() KisDlgImageProperties dlg(img, this); - if (dlg.exec() == QDialog::Accepted) { + if (dlg.exec() == TQDialog::Accepted) { if (dlg.imageWidth() != img->width() || dlg.imageHeight() != img->height()) { resizeCurrentImage(dlg.imageWidth(), dlg.imageHeight()); } - Q_INT32 opacity = dlg.opacity(); + TQ_INT32 opacity = dlg.opacity(); opacity = opacity * 255 / 100; img->setName(dlg.imageName()); img->setColorSpace(dlg.colorSpace()); @@ -1669,8 +1669,8 @@ void KisView::slotEditPalette() if (!srv) { return; } - QValueList<KisResource*> resources = srv->resources(); - QValueList<KisPalette*> palettes; + TQValueList<KisResource*> resources = srv->resources(); + TQValueList<KisPalette*> palettes; for(uint i = 0; i < resources.count(); i++) { KisPalette* palette = dynamic_cast<KisPalette*>(*resources.at(i)); @@ -1679,7 +1679,7 @@ void KisView::slotEditPalette() palettes.append(palette); } - if (chooser.exec() != QDialog::Accepted ) { + if (chooser.exec() != TQDialog::Accepted ) { return; } @@ -1700,10 +1700,10 @@ void KisView::slotEditPalette() void KisView::saveLayerAsImage() { - QStringList listMimeFilter = KoFilterManager::mimeFilter("application/x-krita", KoFilterManager::Export); - QString mimelist = listMimeFilter.join(" "); + TQStringList listMimeFilter = KoFilterManager::mimeFilter("application/x-krita", KoFilterManager::Export); + TQString mimelist = listMimeFilter.join(" "); - KFileDialog fd (QString::null, mimelist, this, "Export Layer", true); + KFileDialog fd (TQString(), mimelist, this, "Export Layer", true); fd.setCaption(i18n("Export Layer")); fd.setMimeFilter(listMimeFilter); fd.setOperationMode(KFileDialog::Saving); @@ -1711,7 +1711,7 @@ void KisView::saveLayerAsImage() if (!fd.exec()) return; KURL url = fd.selectedURL(); - QString mimefilter = fd.currentMimeFilter(); + TQString mimefilter = fd.currentMimeFilter(); if (url.isEmpty()) return; @@ -1723,7 +1723,7 @@ void KisView::saveLayerAsImage() KisLayerSP l = img->activeLayer(); if (!l) return; - QRect r = l->exactBounds(); + TQRect r = l->exactBounds(); KisDoc d; d.prepareForImport(); @@ -1738,7 +1738,7 @@ void KisView::saveLayerAsImage() -Q_INT32 KisView::importImage(const KURL& urlArg) +TQ_INT32 KisView::importImage(const KURL& urlArg) { KisImageSP currentImage = currentImg(); @@ -1747,11 +1747,11 @@ Q_INT32 KisView::importImage(const KURL& urlArg) } KURL::List urls; - Q_INT32 rc = 0; + TQ_INT32 rc = 0; if (urlArg.isEmpty()) { - QString mimelist = KoFilterManager::mimeFilter("application/x-krita", KoFilterManager::Import).join(" "); - urls = KFileDialog::getOpenURLs(QString::null, mimelist, 0, i18n("Import Image")); + TQString mimelist = KoFilterManager::mimeFilter("application/x-krita", KoFilterManager::Import).join(" "); + urls = KFileDialog::getOpenURLs(TQString(), mimelist, 0, i18n("Import Image")); } else { urls.push_back(urlArg); } @@ -1862,15 +1862,15 @@ void KisView::rotateLayer(double radians) } KisFilterStrategy *filter = KisFilterStrategyRegistry::instance()->get(KisID("Triangle")); - QRect r; + TQRect r; if(dev->hasSelection()) r = dev->selection()->selectedExactRect(); else r = dev->exactBounds(); double cx = r.x()+r.width()/2.0; double cy = r.y()+r.height()/2.0; - Q_INT32 tx = Q_INT32(cx*cos(radians) - cy*sin(radians) - cx + 0.5); - Q_INT32 ty = Q_INT32(cy*cos(radians) + cx*sin(radians) - cy + 0.5); + TQ_INT32 tx = TQ_INT32(cx*cos(radians) - cy*sin(radians) - cx + 0.5); + TQ_INT32 ty = TQ_INT32(cy*cos(radians) + cx*sin(radians) - cy + 0.5); KisTransformWorker tw(dev, 1.0, 1.0, 0, 0, radians, -tx, -ty, m_progress, filter); tw.run(); @@ -1965,7 +1965,7 @@ void KisView::preferences() } else { m_OpenGLImageContext = 0; - m_canvas->createQPaintDeviceCanvas(); + m_canvas->createTQPaintDeviceCanvas(); } connectCurrentImg(); @@ -2082,26 +2082,26 @@ void KisView::slotUpdateFullScreen(bool toggle) uint newState = KoView::shell()->windowState(); if (toggle) { - newState |= Qt::WindowFullScreen; + newState |= TQt::WindowFullScreen; } else { - newState &= ~Qt::WindowFullScreen; + newState &= ~TQt::WindowFullScreen; } KoView::shell()->setWindowState(newState); } } -Q_INT32 KisView::docWidth() const +TQ_INT32 KisView::docWidth() const { return currentImg() ? currentImg()->width() : 0; } -Q_INT32 KisView::docHeight() const +TQ_INT32 KisView::docHeight() const { return currentImg() ? currentImg()->height() : 0; } -void KisView::scrollTo(Q_INT32 x, Q_INT32 y) +void KisView::scrollTo(TQ_INT32 x, TQ_INT32 y) { if (m_hScroll->isVisible()) { m_hScroll->setValue(x); @@ -2160,14 +2160,14 @@ void KisView::setBGColor(const KisColor& c) { m_bg = c; notifyObservers(); - emit sigBGQColorChanged( c.toQColor() ); + emit sigBGTQColorChanged( c.toTQColor() ); } void KisView::setFGColor(const KisColor& c) { m_fg = c; notifyObservers(); - emit sigFGQColorChanged( c.toQColor() ); + emit sigFGTQColorChanged( c.toTQColor() ); } void KisView::slotSetFGColor(const KisColor& c) @@ -2184,18 +2184,18 @@ void KisView::slotSetBGColor(const KisColor& c) notifyObservers(); } -void KisView::slotSetFGQColor(const QColor& c) +void KisView::slotSetFGTQColor(const TQColor& c) { KisColorSpace * monitorSpace = KisMetaRegistry::instance()->csRegistry()->getColorSpace(KisID("RGBA"), m_monitorProfile); setFGColor(KisColor(c, monitorSpace)); - emit sigFGQColorChanged(c); + emit sigFGTQColorChanged(c); } -void KisView::slotSetBGQColor(const QColor& c) +void KisView::slotSetBGTQColor(const TQColor& c) { KisColorSpace * monitorSpace = KisMetaRegistry::instance()->csRegistry()->getColorSpace(KisID("RGBA"), m_monitorProfile); setBGColor(KisColor(c, monitorSpace)); - emit sigBGQColorChanged(c); + emit sigBGTQColorChanged(c); } @@ -2212,7 +2212,7 @@ void KisView::setupPrinter(KPrinter& printer) void KisView::print(KPrinter& printer) { - QPainter gc(&printer); + TQPainter gc(&printer); KisImageSP img = currentImg(); if (!img) return; @@ -2221,14 +2221,14 @@ void KisView::print(KPrinter& printer) gc.setClipping(false); KisConfig cfg; - QString printerProfileName = cfg.printerProfile(); + TQString printerProfileName = cfg.printerProfile(); KisProfile * printerProfile = KisMetaRegistry::instance()->csRegistry() ->getProfileByName(printerProfileName); - QRect r = img->bounds(); + TQRect r = img->bounds(); img->renderToPainter(r.x(), r.y(), r.width(), r.height(), gc, printerProfile, KisImage::PAINT_IMAGE_ONLY, HDRExposure()); } -void KisView::paintToolOverlay(const QRegion& region) +void KisView::paintToolOverlay(const TQRegion& region) { if (!region.isEmpty() && m_toolManager->currentTool() && !m_toolIsPainting) { KisCanvasPainter gc(m_canvas); @@ -2236,19 +2236,19 @@ void KisView::paintToolOverlay(const QRegion& region) gc.setClipRegion(region); gc.setClipping(true); - // Prevent endless loop if the tool needs to have the canvas repainted + // Prevent endless loop if the tool needs to have the canvas tqrepainted m_toolIsPainting = true; m_toolManager->currentTool()->paint(gc, region.boundingRect()); m_toolIsPainting = false; } } -void KisView::canvasGotPaintEvent(QPaintEvent *event) +void KisView::canvasGotPaintEvent(TQPaintEvent *event) { if (m_canvas->isOpenGLCanvas()) { paintOpenGLView(event->rect()); } else { - paintQPaintDeviceView(event->region()); + paintTQPaintDeviceView(event->region()); } } @@ -2274,19 +2274,19 @@ void KisView::canvasGotButtonPressEvent(KisButtonPressEvent *e) KisImageSP img = currentImg(); // if (img) { -// QPoint pt = mapToScreen(e->pos().floorQPoint()); +// TQPoint pt = mapToScreen(e->pos().floorTQPoint()); // KisGuideMgr *mgr = img->guides(); // -// m_lastGuidePoint = mapToScreen(e->pos().floorQPoint()); +// m_lastGuidePoint = mapToScreen(e->pos().floorTQPoint()); // m_currentGuide = 0; // -// if ((e->state() & ~Qt::ShiftButton) == Qt::NoButton) { -// KisGuideSP gd = mgr->find(static_cast<Q_INT32>(pt.x() / zoom()), static_cast<Q_INT32>(pt.y() / zoom()), QMAX(2.0, 2.0 / zoom())); +// if ((e->state() & ~TQt::ShiftButton) == Qt::NoButton) { +// KisGuideSP gd = mgr->tqfind(static_cast<TQ_INT32>(pt.x() / zoom()), static_cast<TQ_INT32>(pt.y() / zoom()), TQMAX(2.0, 2.0 / zoom())); // // if (gd) { // m_currentGuide = gd; // -// if ((e->button() == Qt::RightButton) || ((e->button() & Qt::ShiftButton) == Qt::ShiftButton)) { +// if ((e->button() == Qt::RightButton) || ((e->button() & TQt::ShiftButton) == TQt::ShiftButton)) { // if (gd->isSelected()) // mgr->unselect(gd); // else @@ -2304,13 +2304,13 @@ void KisView::canvasGotButtonPressEvent(KisButtonPressEvent *e) // } // } if (e->button() == Qt::RightButton) { - QPopupMenu * m_popup = 0; + TQPopupMenu * m_popup = 0; if (factory()) { Q_ASSERT(factory()); - m_popup = (QPopupMenu *)factory()->container("image_popup", this); + m_popup = (TQPopupMenu *)factory()->container("image_popup", this); } if (m_popup) { - m_popup->popup(e->globalPos().roundQPoint()); + m_popup->popup(e->globalPos().roundTQPoint()); } } else if (e->device() == currentInputDevice() && m_toolManager->currentTool()) { @@ -2357,7 +2357,7 @@ void KisView::canvasGotMoveEvent(KisMoveEvent *e) #if 0 if (img && m_currentGuide) { - QPoint p = mapToScreen(e->pos().floorQPoint()); + TQPoint p = mapToScreen(e->pos().floorTQPoint()); KisGuideMgr *mgr = img->guides(); if (((e->state() & Qt::LeftButton) == Qt::LeftButton) && mgr->hasSelected()) { @@ -2381,7 +2381,7 @@ void KisView::canvasGotMoveEvent(KisMoveEvent *e) m_toolManager->currentTool()->move(&ev); } -// m_lastGuidePoint = mapToScreen(e->pos().floorQPoint()); +// m_lastGuidePoint = mapToScreen(e->pos().floorTQPoint()); emit cursorPosition(wp.floorX(), wp.floorY()); } @@ -2405,13 +2405,13 @@ int KisView::bottomBorder() const return m_vScrollBarExtent; } -void KisView::mouseMoveEvent(QMouseEvent *e) +void KisView::mouseMoveEvent(TQMouseEvent *e) { KisMoveEvent ke(currentInputDevice(), e->pos(), e->globalPos(), PRESSURE_DEFAULT, 0, 0, e->state()); canvasGotMoveEvent(&ke); } -void KisView::slotAutoScroll(const QPoint &p) +void KisView::slotAutoScroll(const TQPoint &p) { scrollTo(horzValue()+p.x(), vertValue()+p.y()); } @@ -2480,17 +2480,17 @@ void KisView::canvasGotDoubleClickEvent(KisDoubleClickEvent *e) } } -void KisView::canvasGotEnterEvent(QEvent *e) +void KisView::canvasGotEnterEvent(TQEvent *e) { Q_UNUSED( e ); } -void KisView::canvasGotLeaveEvent (QEvent *e) +void KisView::canvasGotLeaveEvent (TQEvent *e) { Q_UNUSED( e ); } -void KisView::canvasGotMouseWheelEvent(QWheelEvent *event) +void KisView::canvasGotMouseWheelEvent(TQWheelEvent *event) { //if(event->state() == ControlButton ) //{ @@ -2508,18 +2508,18 @@ void KisView::canvasGotMouseWheelEvent(QWheelEvent *event) } } //} else { - // QApplication::sendEvent(m_vScroll, event); + // TQApplication::sendEvent(m_vScroll, event); //} } -void KisView::canvasGotKeyPressEvent(QKeyEvent *event) +void KisView::canvasGotKeyPressEvent(TQKeyEvent *event) { if (!m_toolManager->currentTool()) { event->ignore(); return; } - if (event->key() == Qt::Key_Space) { + if (event->key() == TQt::Key_Space) { if (!m_panning) { // Set tool temporarily to pan m_panning = true; @@ -2537,26 +2537,26 @@ void KisView::canvasGotKeyPressEvent(QKeyEvent *event) m_toolManager->currentTool()->keyPress(event); } -void KisView::canvasGotKeyReleaseEvent(QKeyEvent *event) +void KisView::canvasGotKeyReleaseEvent(TQKeyEvent *event) { if (m_toolManager->currentTool()) m_toolManager->currentTool()->keyRelease(event); } -void KisView::canvasGotDragEnterEvent(QDragEnterEvent *event) +void KisView::canvasGotDragEnterEvent(TQDragEnterEvent *event) { bool accept = false; // Only accept drag if we're not busy, particularly as we may - // be showing a progress bar and calling qApp->processEvents(). - if (KURLDrag::canDecode(event) && QApplication::overrideCursor() == 0) { + // be showing a progress bar and calling tqApp->processEvents(). + if (KURLDrag::canDecode(event) && TQApplication::overrideCursor() == 0) { accept = true; } event->accept(accept); } -void KisView::canvasGotDropEvent(QDropEvent *event) +void KisView::canvasGotDropEvent(TQDropEvent *event) { KURL::List urls; @@ -2587,7 +2587,7 @@ void KisView::canvasGotDropEvent(QDropEvent *event) popup.insertSeparator(); popup.insertItem(i18n("Cancel"), cancelId); - int actionId = popup.exec(QCursor::pos()); + int actionId = popup.exec(TQCursor::pos()); if (actionId >= 0 && actionId != cancelId) { for (KURL::List::ConstIterator it = urls.begin (); it != urls.end (); ++it) { @@ -2620,11 +2620,11 @@ namespace { typedef KNamedCommand super; public: - // The QStrings are the _serialized_ configs + // The TQStrings are the _serialized_ configs KisChangeFilterCmd(KisAdjustmentLayerSP layer, KisFilterConfiguration* config, - const QString& before, - const QString& after) : super(i18n("Change Filter")) + const TQString& before, + const TQString& after) : super(i18n("Change Filter")) { m_layer = layer; m_config = config; @@ -2634,28 +2634,28 @@ namespace { public: virtual void execute() { - QApplication::setOverrideCursor(KisCursor::waitCursor()); + TQApplication::setOverrideCursor(KisCursor::waitCursor()); m_config->fromXML(m_after); //Q_ASSERT(m_after == m_config->toString()); m_layer->setFilter(m_config); m_layer->setDirty(); - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); } virtual void unexecute() { - QApplication::setOverrideCursor(KisCursor::waitCursor()); + TQApplication::setOverrideCursor(KisCursor::waitCursor()); m_config->fromXML(m_before); //Q_ASSERT(m_before == m_config->toString()); m_layer->setFilter(m_config); m_layer->setDirty(); - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); } private: KisAdjustmentLayerSP m_layer; KisFilterConfiguration* m_config; - QString m_before; - QString m_after; + TQString m_before; + TQString m_after; }; } @@ -2677,8 +2677,8 @@ void KisView::showLayerProperties(KisLayerSP layer) if (KisAdjustmentLayerSP alayer = dynamic_cast<KisAdjustmentLayer*>(layer.data())) { KisDlgAdjLayerProps dlg(alayer, alayer->name(), i18n("Adjustment Layer Properties"), this, "dlgadjlayerprops"); - QString before = dlg.filterConfiguration()->toString(); - if (dlg.exec() == QDialog::Accepted) + TQString before = dlg.filterConfiguration()->toString(); + if (dlg.exec() == TQDialog::Accepted) { KisChangeFilterCmd * cmd = new KisChangeFilterCmd(alayer, dlg.filterConfiguration(), @@ -2695,18 +2695,18 @@ void KisView::showLayerProperties(KisLayerSP layer) layer->opacity(), layer->compositeOp(), cs); - if (dlg.exec() == QDialog::Accepted) + if (dlg.exec() == TQDialog::Accepted) { if (layer->name() != dlg.getName() || layer->opacity() != dlg.getOpacity() || layer->compositeOp() != dlg.getCompositeOp()) { - QApplication::setOverrideCursor(KisCursor::waitCursor()); + TQApplication::setOverrideCursor(KisCursor::waitCursor()); m_adapter->beginMacro(i18n("Property Changes")); layer->image()->setLayerProperties(layer, dlg.getOpacity(), dlg.getCompositeOp(), dlg.getName()); layer->setDirty(); m_adapter->endMacro(); - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); m_doc->setModified( true ); } } @@ -2717,29 +2717,29 @@ void KisView::layerAdd() { KisImageSP img = currentImg(); if (img && img->activeLayer()) { - addLayer(img->activeLayer()->parent(), img->activeLayer()); + addLayer(img->activeLayer()->tqparent(), img->activeLayer()); } else if (img) addLayer(static_cast<KisGroupLayer*>(img->rootLayer().data()), 0); } -void KisView::addLayer(KisGroupLayerSP parent, KisLayerSP above) +void KisView::addLayer(KisGroupLayerSP tqparent, KisLayerSP above) { KisImageSP img = currentImg(); if (img) { KisConfig cfg; - QString profilename; + TQString profilename; if(img->colorSpace()->getProfile()) profilename = img->colorSpace()->getProfile()->productName(); NewLayerDialog dlg(img->colorSpace()->id(), profilename, img->nextLayerName(), this); - if (dlg.exec() == QDialog::Accepted) { + if (dlg.exec() == TQDialog::Accepted) { KisColorSpace* cs = KisMetaRegistry::instance()-> csRegistry() -> getColorSpace(dlg.colorSpaceID(),dlg.profileName()); KisLayerSP layer = new KisPaintLayer(img, dlg.layerName(), dlg.opacity(), cs); if (layer) { layer->setCompositeOp(dlg.compositeOp()); - img->addLayer(layer, parent.data(), above); + img->addLayer(layer, tqparent.data(), above); updateCanvas(); } else { KMessageBox::error(this, i18n("Could not add layer to image."), i18n("Layer Error")); @@ -2751,22 +2751,22 @@ void KisView::addLayer(KisGroupLayerSP parent, KisLayerSP above) } } -void KisView::addGroupLayer(KisGroupLayerSP parent, KisLayerSP above) +void KisView::addGroupLayer(KisGroupLayerSP tqparent, KisLayerSP above) { KisImageSP img = currentImg(); if (img) { - QString profilename; + TQString profilename; if(img->colorSpace()->getProfile()) profilename = img->colorSpace()->getProfile()->productName(); KisConfig cfg; NewLayerDialog dlg(img->colorSpace()->id(), profilename, img->nextLayerName(), this); dlg.setColorSpaceEnabled(false); - if (dlg.exec() == QDialog::Accepted) { + if (dlg.exec() == TQDialog::Accepted) { KisLayerSP layer = new KisGroupLayer(img, dlg.layerName(), dlg.opacity()); if (layer) { layer->setCompositeOp(dlg.compositeOp()); - img->addLayer(layer, parent.data(), above); + img->addLayer(layer, tqparent.data(), above); updateCanvas(); } else { KMessageBox::error(this, i18n("Could not add layer to image."), i18n("Layer Error")); @@ -2783,35 +2783,35 @@ void KisView::addPartLayer() addPartLayer(img->rootLayer(), img->rootLayer()->firstChild(), m_actionPartLayer->documentEntry()); } -void KisView::addPartLayer(KisGroupLayerSP parent, KisLayerSP above, const KoDocumentEntry& entry) +void KisView::addPartLayer(KisGroupLayerSP tqparent, KisLayerSP above, const KoDocumentEntry& entry) { delete m_partHandler; // Only one at a time - m_partHandler = new KisPartLayerHandler(this, entry, parent, above); - - disconnect(m_canvas, SIGNAL(sigGotButtonPressEvent(KisButtonPressEvent*)), this, 0); - disconnect(m_canvas, SIGNAL(sigGotButtonReleaseEvent(KisButtonReleaseEvent*)), this, 0); - disconnect(m_canvas, SIGNAL(sigGotMoveEvent(KisMoveEvent*)), this, 0); - disconnect(m_canvas, SIGNAL(sigGotKeyPressEvent(QKeyEvent*)), this, 0); - - connect(m_canvas, SIGNAL(sigGotButtonPressEvent(KisButtonPressEvent*)), - m_partHandler, SLOT(gotButtonPressEvent(KisButtonPressEvent*))); - connect(m_canvas, SIGNAL(sigGotButtonReleaseEvent(KisButtonReleaseEvent*)), - m_partHandler, SLOT(gotButtonReleaseEvent(KisButtonReleaseEvent*))); - connect(m_canvas, SIGNAL(sigGotMoveEvent(KisMoveEvent*)), - m_partHandler, SLOT(gotMoveEvent(KisMoveEvent*))); - connect(m_canvas, SIGNAL(sigGotKeyPressEvent(QKeyEvent*)), - m_partHandler, SLOT(gotKeyPressEvent(QKeyEvent*))); - - connect(m_partHandler, SIGNAL(sigGotMoveEvent(KisMoveEvent*)), - this, SLOT(canvasGotMoveEvent(KisMoveEvent*))); - connect(m_partHandler, SIGNAL(sigGotKeyPressEvent(QKeyEvent*)), - this, SLOT(canvasGotKeyPressEvent(QKeyEvent*))); - connect(m_partHandler, SIGNAL(handlerDone()), - this, SLOT(reconnectAfterPartInsert())); -} - -void KisView::insertPart(const QRect& viewRect, const KoDocumentEntry& entry, - KisGroupLayerSP parent, KisLayerSP above) { + m_partHandler = new KisPartLayerHandler(this, entry, tqparent, above); + + disconnect(m_canvas, TQT_SIGNAL(sigGotButtonPressEvent(KisButtonPressEvent*)), this, 0); + disconnect(m_canvas, TQT_SIGNAL(sigGotButtonReleaseEvent(KisButtonReleaseEvent*)), this, 0); + disconnect(m_canvas, TQT_SIGNAL(sigGotMoveEvent(KisMoveEvent*)), this, 0); + disconnect(m_canvas, TQT_SIGNAL(sigGotKeyPressEvent(TQKeyEvent*)), this, 0); + + connect(m_canvas, TQT_SIGNAL(sigGotButtonPressEvent(KisButtonPressEvent*)), + m_partHandler, TQT_SLOT(gotButtonPressEvent(KisButtonPressEvent*))); + connect(m_canvas, TQT_SIGNAL(sigGotButtonReleaseEvent(KisButtonReleaseEvent*)), + m_partHandler, TQT_SLOT(gotButtonReleaseEvent(KisButtonReleaseEvent*))); + connect(m_canvas, TQT_SIGNAL(sigGotMoveEvent(KisMoveEvent*)), + m_partHandler, TQT_SLOT(gotMoveEvent(KisMoveEvent*))); + connect(m_canvas, TQT_SIGNAL(sigGotKeyPressEvent(TQKeyEvent*)), + m_partHandler, TQT_SLOT(gotKeyPressEvent(TQKeyEvent*))); + + connect(m_partHandler, TQT_SIGNAL(sigGotMoveEvent(KisMoveEvent*)), + this, TQT_SLOT(canvasGotMoveEvent(KisMoveEvent*))); + connect(m_partHandler, TQT_SIGNAL(sigGotKeyPressEvent(TQKeyEvent*)), + this, TQT_SLOT(canvasGotKeyPressEvent(TQKeyEvent*))); + connect(m_partHandler, TQT_SIGNAL(handlerDone()), + this, TQT_SLOT(reconnectAfterPartInsert())); +} + +void KisView::insertPart(const TQRect& viewRect, const KoDocumentEntry& entry, + KisGroupLayerSP tqparent, KisLayerSP above) { KisImageSP img = currentImg(); if (!img) return; @@ -2822,27 +2822,27 @@ void KisView::insertPart(const QRect& viewRect, const KoDocumentEntry& entry, if ( !doc->showEmbedInitDialog(this) ) return; - QRect rect = viewToWindow(viewRect); + TQRect rect = viewToWindow(viewRect); KisChildDoc * childDoc = m_doc->createChildDoc(rect, doc); KisPartLayerImpl* partLayer = new KisPartLayerImpl(img, childDoc); partLayer->setDocType(entry.service()->genericName()); - img->addLayer(partLayer, parent, above); + img->addLayer(partLayer, tqparent, above); m_doc->setModified(true); reconnectAfterPartInsert(); } void KisView::reconnectAfterPartInsert() { - connect(m_canvas, SIGNAL(sigGotButtonPressEvent(KisButtonPressEvent*)), - this, SLOT(canvasGotButtonPressEvent(KisButtonPressEvent*))); - connect(m_canvas, SIGNAL(sigGotButtonReleaseEvent(KisButtonReleaseEvent*)), - this, SLOT(canvasGotButtonReleaseEvent(KisButtonReleaseEvent*))); - connect(m_canvas, SIGNAL(sigGotMoveEvent(KisMoveEvent*)), - this, SLOT(canvasGotMoveEvent(KisMoveEvent*))); - connect(m_canvas, SIGNAL(sigGotKeyPressEvent(QKeyEvent*)), - this, SLOT(canvasGotKeyPressEvent(QKeyEvent*))); + connect(m_canvas, TQT_SIGNAL(sigGotButtonPressEvent(KisButtonPressEvent*)), + this, TQT_SLOT(canvasGotButtonPressEvent(KisButtonPressEvent*))); + connect(m_canvas, TQT_SIGNAL(sigGotButtonReleaseEvent(KisButtonReleaseEvent*)), + this, TQT_SLOT(canvasGotButtonReleaseEvent(KisButtonReleaseEvent*))); + connect(m_canvas, TQT_SIGNAL(sigGotMoveEvent(KisMoveEvent*)), + this, TQT_SLOT(canvasGotMoveEvent(KisMoveEvent*))); + connect(m_canvas, TQT_SIGNAL(sigGotKeyPressEvent(TQKeyEvent*)), + this, TQT_SLOT(canvasGotKeyPressEvent(TQKeyEvent*))); delete m_partHandler; m_partHandler = 0; @@ -2853,12 +2853,12 @@ void KisView::addAdjustmentLayer() KisImageSP img = currentImg(); if (!img) return; - addAdjustmentLayer( img->activeLayer()->parent(), img->activeLayer() ); + addAdjustmentLayer( img->activeLayer()->tqparent(), img->activeLayer() ); } -void KisView::addAdjustmentLayer(KisGroupLayerSP parent, KisLayerSP above) +void KisView::addAdjustmentLayer(KisGroupLayerSP tqparent, KisLayerSP above) { - Q_ASSERT(parent); + Q_ASSERT(tqparent); Q_ASSERT(above); KisImageSP img = currentImg(); @@ -2890,23 +2890,23 @@ void KisView::addAdjustmentLayer(KisGroupLayerSP parent, KisLayerSP above) } KisDlgAdjustmentLayer dlg(img, img->nextLayerName(), i18n("New Adjustment Layer"), this, "dlgadjustmentlayer"); - if (dlg.exec() == QDialog::Accepted) { + if (dlg.exec() == TQDialog::Accepted) { KisSelectionSP selection = 0; if (dev->hasSelection()) { selection = dev->selection(); } KisFilterConfiguration * filter = dlg.filterConfiguration(); - QString name = dlg.layerName(); + TQString name = dlg.layerName(); - addAdjustmentLayer( parent, above, name, filter, selection); + addAdjustmentLayer( tqparent, above, name, filter, selection); } } -void KisView::addAdjustmentLayer(KisGroupLayerSP parent, KisLayerSP above, const QString & name, +void KisView::addAdjustmentLayer(KisGroupLayerSP tqparent, KisLayerSP above, const TQString & name, KisFilterConfiguration * filter, KisSelectionSP selection) { - Q_ASSERT(parent); + Q_ASSERT(tqparent); Q_ASSERT(above); Q_ASSERT(filter); @@ -2914,7 +2914,7 @@ void KisView::addAdjustmentLayer(KisGroupLayerSP parent, KisLayerSP above, const if (!img) return; KisAdjustmentLayer * l = new KisAdjustmentLayer(img, name, filter, selection); - img->addLayer(l, parent, above); + img->addLayer(l, tqparent, above); } void KisView::slotChildActivated(bool a) { @@ -2943,8 +2943,8 @@ void KisView::layerRemove() img->removeLayer(layer); - if (layer->parent()) - layer->parent()->setDirty(layer->extent()); + if (layer->tqparent()) + layer->tqparent()->setDirty(layer->extent()); updateCanvas(); layerUpdateGUI(img->activeLayer() != 0); @@ -2965,8 +2965,8 @@ void KisView::layerDuplicate() return; KisLayerSP dup = active->clone(); - dup->setName(i18n("Duplicate of '%1'").arg(active->name())); - img->addLayer(dup, active->parent().data(), active); + dup->setName(i18n("Duplicate of '%1'").tqarg(active->name())); + img->addLayer(dup, active->tqparent().data(), active); if (dup) { img->activate( dup ); updateCanvas(); @@ -3079,26 +3079,26 @@ void KisView::scrollH(int value) if (xShift > 0) { if (m_canvas->isOpenGLCanvas()) { - paintOpenGLView(QRect(0, 0, m_canvas->width(), m_canvas->height())); + paintOpenGLView(TQRect(0, 0, m_canvas->width(), m_canvas->height())); } else { - QRect drawRect(0, 0, xShift, m_canvasPixmap.height()); + TQRect drawRect(0, 0, xShift, m_canvasPixmap.height()); bitBlt(&m_canvasPixmap, xShift, 0, &m_canvasPixmap, 0, 0, m_canvasPixmap.width() - xShift, m_canvasPixmap.height()); - updateQPaintDeviceCanvas(viewToWindow(drawRect)); - m_canvas->repaint(); + updateTQPaintDeviceCanvas(viewToWindow(drawRect)); + m_canvas->tqrepaint(); } } else if (xShift < 0) { - QRect drawRect(m_canvasPixmap.width() + xShift, 0, -xShift, m_canvasPixmap.height()); + TQRect drawRect(m_canvasPixmap.width() + xShift, 0, -xShift, m_canvasPixmap.height()); if (m_canvas->isOpenGLCanvas()) { - paintOpenGLView(QRect(0, 0, m_canvas->width(), m_canvas->height())); + paintOpenGLView(TQRect(0, 0, m_canvas->width(), m_canvas->height())); } else { bitBlt(&m_canvasPixmap, 0, 0, &m_canvasPixmap, -xShift, 0, m_canvasPixmap.width() + xShift, m_canvasPixmap.height()); - updateQPaintDeviceCanvas(viewToWindow(drawRect)); - m_canvas->repaint(); + updateTQPaintDeviceCanvas(viewToWindow(drawRect)); + m_canvas->tqrepaint(); } } if (m_oldTool) { @@ -3124,26 +3124,26 @@ void KisView::scrollV(int value) if (yShift > 0) { if (m_canvas->isOpenGLCanvas()) { - paintOpenGLView(QRect(0, 0, m_canvas->width(), m_canvas->height())); + paintOpenGLView(TQRect(0, 0, m_canvas->width(), m_canvas->height())); } else { - QRect drawRect(0, 0, m_canvasPixmap.width(), yShift); + TQRect drawRect(0, 0, m_canvasPixmap.width(), yShift); bitBlt(&m_canvasPixmap, 0, yShift, &m_canvasPixmap, 0, 0, m_canvasPixmap.width(), m_canvasPixmap.height() - yShift); - updateQPaintDeviceCanvas(viewToWindow(drawRect)); - m_canvas->repaint(); + updateTQPaintDeviceCanvas(viewToWindow(drawRect)); + m_canvas->tqrepaint(); } } else if (yShift < 0) { if (m_canvas->isOpenGLCanvas()) { - paintOpenGLView(QRect(0, 0, m_canvas->width(), m_canvas->height())); + paintOpenGLView(TQRect(0, 0, m_canvas->width(), m_canvas->height())); } else { - QRect drawRect(0, m_canvasPixmap.height() + yShift, m_canvasPixmap.width(), -yShift); + TQRect drawRect(0, m_canvasPixmap.height() + yShift, m_canvasPixmap.width(), -yShift); bitBlt(&m_canvasPixmap, 0, 0, &m_canvasPixmap, 0, -yShift, m_canvasPixmap.width(), m_canvasPixmap.height() + yShift); - updateQPaintDeviceCanvas(viewToWindow(drawRect)); - m_canvas->repaint(); + updateTQPaintDeviceCanvas(viewToWindow(drawRect)); + m_canvas->tqrepaint(); } } if (m_oldTool) { @@ -3161,53 +3161,53 @@ void KisView::scrollV(int value) void KisView::setupCanvas() { m_canvas = new KisCanvas(this, "kis_canvas"); - m_canvas->setFocusPolicy( QWidget::StrongFocus ); - QObject::connect(m_canvas, SIGNAL(sigGotButtonPressEvent(KisButtonPressEvent*)), this, SLOT(canvasGotButtonPressEvent(KisButtonPressEvent*))); - QObject::connect(m_canvas, SIGNAL(sigGotButtonReleaseEvent(KisButtonReleaseEvent*)), this, SLOT(canvasGotButtonReleaseEvent(KisButtonReleaseEvent*))); - QObject::connect(m_canvas, SIGNAL(sigGotDoubleClickEvent(KisDoubleClickEvent*)), this, SLOT(canvasGotDoubleClickEvent(KisDoubleClickEvent*))); - QObject::connect(m_canvas, SIGNAL(sigGotMoveEvent(KisMoveEvent*)), this, SLOT(canvasGotMoveEvent(KisMoveEvent*))); - QObject::connect(m_canvas, SIGNAL(sigGotPaintEvent(QPaintEvent*)), this, SLOT(canvasGotPaintEvent(QPaintEvent*))); - QObject::connect(m_canvas, SIGNAL(sigGotEnterEvent(QEvent*)), this, SLOT(canvasGotEnterEvent(QEvent*))); - QObject::connect(m_canvas, SIGNAL(sigGotLeaveEvent(QEvent*)), this, SLOT(canvasGotLeaveEvent(QEvent*))); - QObject::connect(m_canvas, SIGNAL(sigGotMouseWheelEvent(QWheelEvent*)), this, SLOT(canvasGotMouseWheelEvent(QWheelEvent*))); - QObject::connect(m_canvas, SIGNAL(sigGotKeyPressEvent(QKeyEvent*)), this, SLOT(canvasGotKeyPressEvent(QKeyEvent*))); - QObject::connect(m_canvas, SIGNAL(sigGotKeyReleaseEvent(QKeyEvent*)), this, SLOT(canvasGotKeyReleaseEvent(QKeyEvent*))); - QObject::connect(m_canvas, SIGNAL(sigGotDragEnterEvent(QDragEnterEvent*)), this, SLOT(canvasGotDragEnterEvent(QDragEnterEvent*))); - QObject::connect(m_canvas, SIGNAL(sigGotDropEvent(QDropEvent*)), this, SLOT(canvasGotDropEvent(QDropEvent*))); + m_canvas->setFocusPolicy( TQ_StrongFocus ); + TQObject::connect(m_canvas, TQT_SIGNAL(sigGotButtonPressEvent(KisButtonPressEvent*)), this, TQT_SLOT(canvasGotButtonPressEvent(KisButtonPressEvent*))); + TQObject::connect(m_canvas, TQT_SIGNAL(sigGotButtonReleaseEvent(KisButtonReleaseEvent*)), this, TQT_SLOT(canvasGotButtonReleaseEvent(KisButtonReleaseEvent*))); + TQObject::connect(m_canvas, TQT_SIGNAL(sigGotDoubleClickEvent(KisDoubleClickEvent*)), this, TQT_SLOT(canvasGotDoubleClickEvent(KisDoubleClickEvent*))); + TQObject::connect(m_canvas, TQT_SIGNAL(sigGotMoveEvent(KisMoveEvent*)), this, TQT_SLOT(canvasGotMoveEvent(KisMoveEvent*))); + TQObject::connect(m_canvas, TQT_SIGNAL(sigGotPaintEvent(TQPaintEvent*)), this, TQT_SLOT(canvasGotPaintEvent(TQPaintEvent*))); + TQObject::connect(m_canvas, TQT_SIGNAL(sigGotEnterEvent(TQEvent*)), this, TQT_SLOT(canvasGotEnterEvent(TQEvent*))); + TQObject::connect(m_canvas, TQT_SIGNAL(sigGotLeaveEvent(TQEvent*)), this, TQT_SLOT(canvasGotLeaveEvent(TQEvent*))); + TQObject::connect(m_canvas, TQT_SIGNAL(sigGotMouseWheelEvent(TQWheelEvent*)), this, TQT_SLOT(canvasGotMouseWheelEvent(TQWheelEvent*))); + TQObject::connect(m_canvas, TQT_SIGNAL(sigGotKeyPressEvent(TQKeyEvent*)), this, TQT_SLOT(canvasGotKeyPressEvent(TQKeyEvent*))); + TQObject::connect(m_canvas, TQT_SIGNAL(sigGotKeyReleaseEvent(TQKeyEvent*)), this, TQT_SLOT(canvasGotKeyReleaseEvent(TQKeyEvent*))); + TQObject::connect(m_canvas, TQT_SIGNAL(sigGotDragEnterEvent(TQDragEnterEvent*)), this, TQT_SLOT(canvasGotDragEnterEvent(TQDragEnterEvent*))); + TQObject::connect(m_canvas, TQT_SIGNAL(sigGotDropEvent(TQDropEvent*)), this, TQT_SLOT(canvasGotDropEvent(TQDropEvent*))); } void KisView::connectCurrentImg() { if (m_image) { - connect(m_image, SIGNAL(sigActiveSelectionChanged(KisImageSP)), m_selectionManager, SLOT(imgSelectionChanged(KisImageSP))); - connect(m_image, SIGNAL(sigActiveSelectionChanged(KisImageSP)), this, SLOT(updateCanvas())); - connect(m_image, SIGNAL(sigColorSpaceChanged(KisColorSpace *)), this, SLOT(updateStatusBarProfileLabel())); - connect(m_image, SIGNAL(sigProfileChanged(KisProfile * )), SLOT(profileChanged(KisProfile * ))); - - connect(m_image, SIGNAL(sigLayersChanged(KisGroupLayerSP)), SLOT(layersUpdated())); - connect(m_image, SIGNAL(sigMaskInfoChanged()), SLOT(maskUpdated())); - connect(m_image, SIGNAL(sigLayerAdded(KisLayerSP)), SLOT(layersUpdated())); - connect(m_image, SIGNAL(sigLayerRemoved(KisLayerSP, KisGroupLayerSP, KisLayerSP)), SLOT(layersUpdated())); - connect(m_image, SIGNAL(sigLayerMoved(KisLayerSP, KisGroupLayerSP, KisLayerSP)), SLOT(layersUpdated())); - connect(m_image, SIGNAL(sigLayerActivated(KisLayerSP)), SLOT(layersUpdated())); - connect(m_image, SIGNAL(sigLayerActivated(KisLayerSP)), SLOT(updateCanvas())); - connect(m_image, SIGNAL(sigLayerPropertiesChanged(KisLayerSP)), SLOT(layersUpdated())); + connect(m_image, TQT_SIGNAL(sigActiveSelectionChanged(KisImageSP)), m_selectionManager, TQT_SLOT(imgSelectionChanged(KisImageSP))); + connect(m_image, TQT_SIGNAL(sigActiveSelectionChanged(KisImageSP)), this, TQT_SLOT(updateCanvas())); + connect(m_image, TQT_SIGNAL(sigColorSpaceChanged(KisColorSpace *)), this, TQT_SLOT(updateStatusBarProfileLabel())); + connect(m_image, TQT_SIGNAL(sigProfileChanged(KisProfile * )), TQT_SLOT(profileChanged(KisProfile * ))); + + connect(m_image, TQT_SIGNAL(sigLayersChanged(KisGroupLayerSP)), TQT_SLOT(layersUpdated())); + connect(m_image, TQT_SIGNAL(sigMaskInfoChanged()), TQT_SLOT(tqmaskUpdated())); + connect(m_image, TQT_SIGNAL(sigLayerAdded(KisLayerSP)), TQT_SLOT(layersUpdated())); + connect(m_image, TQT_SIGNAL(sigLayerRemoved(KisLayerSP, KisGroupLayerSP, KisLayerSP)), TQT_SLOT(layersUpdated())); + connect(m_image, TQT_SIGNAL(sigLayerMoved(KisLayerSP, KisGroupLayerSP, KisLayerSP)), TQT_SLOT(layersUpdated())); + connect(m_image, TQT_SIGNAL(sigLayerActivated(KisLayerSP)), TQT_SLOT(layersUpdated())); + connect(m_image, TQT_SIGNAL(sigLayerActivated(KisLayerSP)), TQT_SLOT(updateCanvas())); + connect(m_image, TQT_SIGNAL(sigLayerPropertiesChanged(KisLayerSP)), TQT_SLOT(layersUpdated())); KisConnectPartLayerVisitor v(m_image, this, true); m_image->rootLayer()->accept(v); - connect(m_image, SIGNAL(sigLayerAdded(KisLayerSP)), - SLOT(handlePartLayerAdded(KisLayerSP))); + connect(m_image, TQT_SIGNAL(sigLayerAdded(KisLayerSP)), + TQT_SLOT(handlePartLayerAdded(KisLayerSP))); - maskUpdated(); + tqmaskUpdated(); #ifdef HAVE_GL if (m_OpenGLImageContext != 0) { - connect(m_OpenGLImageContext, SIGNAL(sigImageUpdated(QRect)), SLOT(slotOpenGLImageUpdated(QRect))); - connect(m_OpenGLImageContext, SIGNAL(sigSizeChanged(Q_INT32, Q_INT32)), SLOT(slotImageSizeChanged(Q_INT32, Q_INT32))); + connect(m_OpenGLImageContext, TQT_SIGNAL(sigImageUpdated(TQRect)), TQT_SLOT(slotOpenGLImageUpdated(TQRect))); + connect(m_OpenGLImageContext, TQT_SIGNAL(sigSizeChanged(TQ_INT32, TQ_INT32)), TQT_SLOT(slotImageSizeChanged(TQ_INT32, TQ_INT32))); } else #endif { - connect(m_image, SIGNAL(sigImageUpdated(QRect)), SLOT(imgUpdated(QRect))); - connect(m_image, SIGNAL(sigSizeChanged(Q_INT32, Q_INT32)), SLOT(slotImageSizeChanged(Q_INT32, Q_INT32))); + connect(m_image, TQT_SIGNAL(sigImageUpdated(TQRect)), TQT_SLOT(imgUpdated(TQRect))); + connect(m_image, TQT_SIGNAL(sigSizeChanged(TQ_INT32, TQ_INT32)), TQT_SLOT(slotImageSizeChanged(TQ_INT32, TQ_INT32))); } } @@ -3239,16 +3239,16 @@ void KisView::handlePartLayerAdded(KisLayerSP layer) if (!l) return; - connect(this, SIGNAL(childActivated(KoDocumentChild*)), - layer, SLOT(childActivated(KoDocumentChild*))); + connect(this, TQT_SIGNAL(childActivated(KoDocumentChild*)), + layer, TQT_SLOT(childActivated(KoDocumentChild*))); } -void KisView::imgUpdated(QRect rc) +void KisView::imgUpdated(TQRect rc) { updateCanvas(rc); } -void KisView::slotOpenGLImageUpdated(QRect rc) +void KisView::slotOpenGLImageUpdated(TQRect rc) { paintOpenGLView(windowToView(rc)); } @@ -3258,13 +3258,13 @@ void KisView::profileChanged(KisProfile * /*profile*/) updateStatusBarProfileLabel(); } -void KisView::slotImageSizeChanged(Q_INT32 /*w*/, Q_INT32 /*h*/) +void KisView::slotImageSizeChanged(TQ_INT32 /*w*/, TQ_INT32 /*h*/) { resizeEvent(0); refreshKisCanvas(); } -void KisView::resizeCurrentImage(Q_INT32 w, Q_INT32 h, bool cropLayers) +void KisView::resizeCurrentImage(TQ_INT32 w, TQ_INT32 h, bool cropLayers) { if (!currentImg()) return; @@ -3298,9 +3298,9 @@ void KisView::shearCurrentImage(double angleX, double angleY) } -QPoint KisView::viewToWindow(const QPoint& pt) +TQPoint KisView::viewToWindow(const TQPoint& pt) { - QPoint converted; + TQPoint converted; converted.rx() = static_cast<int>((pt.x() + horzValue()) / zoom()); converted.ry() = static_cast<int>((pt.y() + vertValue()) / zoom()); @@ -3308,9 +3308,9 @@ QPoint KisView::viewToWindow(const QPoint& pt) return converted; } -QPoint KisView::viewToWindow(const QPoint& pt) const +TQPoint KisView::viewToWindow(const TQPoint& pt) const { - QPoint converted; + TQPoint converted; converted.rx() = static_cast<int>((pt.x() + horzValue()) / zoom()); converted.ry() = static_cast<int>((pt.y() + vertValue()) / zoom()); @@ -3328,9 +3328,9 @@ KisPoint KisView::viewToWindow(const KisPoint& pt) return converted; } -QRect KisView::viewToWindow(const QRect& rc) +TQRect KisView::viewToWindow(const TQRect& rc) { - QRect r; + TQRect r; r.setTopLeft(viewToWindow(rc.topLeft())); r.setRight((int)(ceil((rc.right() + 1.0 + horzValue()) / zoom()) - 1)); @@ -3351,27 +3351,27 @@ KisRect KisView::viewToWindow(const KisRect& rc) return r; } -void KisView::viewToWindow(Q_INT32 *x, Q_INT32 *y) +void KisView::viewToWindow(TQ_INT32 *x, TQ_INT32 *y) { if (x && y) { - QPoint p = viewToWindow(QPoint(*x, *y)); + TQPoint p = viewToWindow(TQPoint(*x, *y)); *x = p.x(); *y = p.y(); } } -QPoint KisView::windowToView(const QPoint& pt) +TQPoint KisView::windowToView(const TQPoint& pt) { - QPoint p; + TQPoint p; p.setX(static_cast<int>(pt.x() * zoom() - horzValue())); p.setY(static_cast<int>(pt.y() * zoom() - vertValue())); return p; } -QPoint KisView::windowToView(const QPoint& pt) const +TQPoint KisView::windowToView(const TQPoint& pt) const { - QPoint p; + TQPoint p; p.setX(static_cast<int>(pt.x() * zoom() - horzValue())); p.setY(static_cast<int>(pt.y() * zoom() - vertValue())); @@ -3387,9 +3387,9 @@ KisPoint KisView::windowToView(const KisPoint& pt) return p; } -QRect KisView::windowToView(const QRect& rc) +TQRect KisView::windowToView(const TQRect& rc) { - QRect r; + TQRect r; r.setTopLeft(windowToView(rc.topLeft())); r.setRight((int)(ceil((rc.right() + 1.0) * zoom()) - horzValue() - 1)); @@ -3410,10 +3410,10 @@ KisRect KisView::windowToView(const KisRect& rc) return r; } -void KisView::windowToView(Q_INT32 *x, Q_INT32 *y) +void KisView::windowToView(TQ_INT32 *x, TQ_INT32 *y) { if (x && y) { - QPoint p = windowToView(QPoint(*x, *y)); + TQPoint p = windowToView(TQPoint(*x, *y)); *x = p.x(); *y = p.y(); } @@ -3439,29 +3439,29 @@ void KisView::guiActivateEvent(KParts::GUIActivateEvent *event) super::guiActivateEvent(event); } -bool KisView::eventFilter(QObject *o, QEvent *e) +bool KisView::eventFilter(TQObject *o, TQEvent *e) { Q_ASSERT(o); Q_ASSERT(e); switch (e->type()) { - case QEvent::TabletMove: - case QEvent::TabletPress: - case QEvent::TabletRelease: + case TQEvent::TabletMove: + case TQEvent::TabletPress: + case TQEvent::TabletRelease: { - QTabletEvent *te = static_cast<QTabletEvent *>(e); + TQTabletEvent *te = static_cast<TQTabletEvent *>(e); KisInputDevice device; switch (te->device()) { default: - case QTabletEvent::Stylus: - case QTabletEvent::NoDevice: + case TQTabletEvent::Stylus: + case TQTabletEvent::NoDevice: device = KisInputDevice::stylus(); break; - case QTabletEvent::Puck: + case TQTabletEvent::Puck: device = KisInputDevice::puck(); break; - case QTabletEvent::Eraser: + case TQTabletEvent::Eraser: device = KisInputDevice::eraser(); break; } @@ -3470,13 +3470,13 @@ bool KisView::eventFilter(QObject *o, QEvent *e) // We ignore device change due to mouse events for a short duration // after a tablet event, since these are almost certainly mouse events - // sent to receivers that don't accept the tablet event. + // sent to tqreceivers that don't accept the tablet event. m_tabletEventTimer.start(); break; } - case QEvent::MouseButtonPress: - case QEvent::MouseMove: - case QEvent::MouseButtonRelease: + case TQEvent::MouseButtonPress: + case TQEvent::MouseMove: + case TQEvent::MouseButtonRelease: { #ifdef EXTENDED_X11_TABLET_SUPPORT KisInputDevice device = KisCanvasWidget::findActiveInputDevice(); @@ -3493,8 +3493,8 @@ bool KisView::eventFilter(QObject *o, QEvent *e) } break; } - case QEvent::KeyPress: - case QEvent::KeyRelease: + case TQEvent::KeyPress: + case TQEvent::KeyRelease: { if (m_canvas->cursorIsOverCanvas()) { m_canvas->handleKeyEvent(e); @@ -3507,17 +3507,17 @@ bool KisView::eventFilter(QObject *o, QEvent *e) // This eventFilter is called for all widgets already, no need to install event filters multiple times // Even worse: with multiple views, they would all install event filters on each other's widgets, // due to the qapp event filter triggering in all views! - case QEvent::ChildInserted: + case TQEvent::ChildInserted: { - QChildEvent *childEvent = static_cast<QChildEvent *>(e); - QObject *child = childEvent->child(); + TQChildEvent *childEvent = static_cast<TQChildEvent *>(e); + TQObject *child = childEvent->child(); if ( child->isWidgetType() ) { child->installEventFilter(this); - QObjectList *objectList = child->queryList("QWidget"); - QObjectListIt it(*objectList); - QObject *obj; + TQObjectList *objectList = child->queryList(TQWIDGET_OBJECT_NAME_STRING); + TQObjectListIt it(*objectList); + TQObject *obj; while ((obj = it.current()) != 0) { obj->installEventFilter(this); ++it; @@ -3532,9 +3532,9 @@ bool KisView::eventFilter(QObject *o, QEvent *e) } #if 0 - if ((o == m_hRuler || o == m_vRuler) && (e->type() == QEvent::MouseMove || e->type() == QEvent::MouseButtonRelease)) { - QMouseEvent *me = dynamic_cast<QMouseEvent*>(e); - QPoint pt = mapFromGlobal(me->globalPos()); + if ((o == m_hRuler || o == m_vRuler) && (e->type() == TQEvent::MouseMove || e->type() == TQEvent::MouseButtonRelease)) { + TQMouseEvent *me = dynamic_cast<TQMouseEvent*>(e); + TQPoint pt = mapFromGlobal(me->globalPos()); KisImageSP img = currentImg(); KisGuideMgr *mgr; @@ -3543,8 +3543,8 @@ bool KisView::eventFilter(QObject *o, QEvent *e) mgr = img->guides(); - if (e->type() == QEvent::MouseMove && (me->state() & Qt::LeftButton)) { - bool flag = geometry().contains(pt); + if (e->type() == TQEvent::MouseMove && (me->state() & Qt::LeftButton)) { + bool flag = tqgeometry().tqcontains(pt); KisGuideSP gd; if (m_currentGuide == 0 && flag) { @@ -3576,7 +3576,7 @@ bool KisView::eventFilter(QObject *o, QEvent *e) m_currentGuide = 0; } } - } else if (e->type() == QEvent::MouseButtonRelease && m_currentGuide) { + } else if (e->type() == TQEvent::MouseButtonRelease && m_currentGuide) { eraseGuides(); mgr->unselect(m_currentGuide); paintGuides(); @@ -3627,9 +3627,9 @@ void KisView::updateGuides() //{ //} -QPoint KisView::mapToScreen(const QPoint& pt) +TQPoint KisView::mapToScreen(const TQPoint& pt) { - QPoint converted; + TQPoint converted; converted.rx() = pt.x() + horzValue(); converted.ry() = pt.y() + vertValue(); @@ -3647,7 +3647,7 @@ void KisView::detach(KisCanvasObserver *observer) { Q_ASSERT(observer); if (observer) { - vKisCanvasObserver_it it = std::find(m_observers.begin(), m_observers.end(), observer); + vKisCanvasObserver_it it = std::tqfind(m_observers.begin(), m_observers.end(), observer); if (it != m_observers.end()) m_observers.erase(it); @@ -3759,10 +3759,10 @@ KisProgressDisplayInterface *KisView::progressDisplay() const return m_progress; } -QCursor KisView::setCanvasCursor(const QCursor & cursor) +TQCursor KisView::setCanvasCursor(const TQCursor & cursor) { - QCursor oldCursor = m_canvas->cursor(); - QCursor newCursor; + TQCursor oldCursor = m_canvas->cursor(); + TQCursor newCursor; KisConfig cfg; @@ -3811,51 +3811,51 @@ void KisView::createDockers() m_hsvwidget = new KoHSVWidget(this, "hsv"); m_hsvwidget->setCaption(i18n("HSV")); - connect(m_hsvwidget, SIGNAL(sigFgColorChanged(const QColor &)), this, SLOT(slotSetFGQColor(const QColor &))); - connect(m_hsvwidget, SIGNAL(sigBgColorChanged(const QColor &)), this, SLOT(slotSetBGQColor(const QColor &))); - connect(this, SIGNAL(sigFGQColorChanged(const QColor &)), m_hsvwidget, SLOT(setFgColor(const QColor &))); - connect(this, SIGNAL(sigBGQColorChanged(const QColor &)), m_hsvwidget, SLOT(setBgColor(const QColor &))); + connect(m_hsvwidget, TQT_SIGNAL(sigFgColorChanged(const TQColor &)), this, TQT_SLOT(slotSetFGTQColor(const TQColor &))); + connect(m_hsvwidget, TQT_SIGNAL(sigBgColorChanged(const TQColor &)), this, TQT_SLOT(slotSetBGTQColor(const TQColor &))); + connect(this, TQT_SIGNAL(sigFGTQColorChanged(const TQColor &)), m_hsvwidget, TQT_SLOT(setFgColor(const TQColor &))); + connect(this, TQT_SIGNAL(sigBGTQColorChanged(const TQColor &)), m_hsvwidget, TQT_SLOT(setBgColor(const TQColor &))); m_paletteManager->addWidget( m_hsvwidget, "hsvwidget", krita::COLORBOX, 0, PALETTE_DOCKER, true); m_rgbwidget = new KoRGBWidget(this, "rgb"); m_rgbwidget->setCaption(i18n("RGB")); - connect(m_rgbwidget, SIGNAL(sigFgColorChanged(const QColor &)), this, SLOT(slotSetFGQColor(const QColor &))); - connect(m_rgbwidget, SIGNAL(sigBgColorChanged(const QColor &)), this, SLOT(slotSetBGQColor(const QColor &))); - connect(this, SIGNAL(sigFGQColorChanged(const QColor &)), m_rgbwidget, SLOT(setFgColor(const QColor &))); - connect(this, SIGNAL(sigBGQColorChanged(const QColor &)), m_rgbwidget, SLOT(setBgColor(const QColor &))); + connect(m_rgbwidget, TQT_SIGNAL(sigFgColorChanged(const TQColor &)), this, TQT_SLOT(slotSetFGTQColor(const TQColor &))); + connect(m_rgbwidget, TQT_SIGNAL(sigBgColorChanged(const TQColor &)), this, TQT_SLOT(slotSetBGTQColor(const TQColor &))); + connect(this, TQT_SIGNAL(sigFGTQColorChanged(const TQColor &)), m_rgbwidget, TQT_SLOT(setFgColor(const TQColor &))); + connect(this, TQT_SIGNAL(sigBGTQColorChanged(const TQColor &)), m_rgbwidget, TQT_SLOT(setBgColor(const TQColor &))); m_paletteManager->addWidget( m_rgbwidget, "rgbwidget", krita::COLORBOX); m_graywidget = new KoGrayWidget(this, "gray"); m_graywidget->setCaption(i18n("Gray")); - connect(m_graywidget, SIGNAL(sigFgColorChanged(const QColor &)), this, SLOT(slotSetFGQColor(const QColor &))); - connect(m_graywidget, SIGNAL(sigBgColorChanged(const QColor &)), this, SLOT(slotSetBGQColor(const QColor &))); - connect(this, SIGNAL(sigFGQColorChanged(const QColor &)), m_graywidget, SLOT(setFgColor(const QColor &))); - connect(this, SIGNAL(sigBGQColorChanged(const QColor &)), m_graywidget, SLOT(setBgColor(const QColor &))); + connect(m_graywidget, TQT_SIGNAL(sigFgColorChanged(const TQColor &)), this, TQT_SLOT(slotSetFGTQColor(const TQColor &))); + connect(m_graywidget, TQT_SIGNAL(sigBgColorChanged(const TQColor &)), this, TQT_SLOT(slotSetBGTQColor(const TQColor &))); + connect(this, TQT_SIGNAL(sigFGTQColorChanged(const TQColor &)), m_graywidget, TQT_SLOT(setFgColor(const TQColor &))); + connect(this, TQT_SIGNAL(sigBGTQColorChanged(const TQColor &)), m_graywidget, TQT_SLOT(setBgColor(const TQColor &))); m_paletteManager->addWidget( m_graywidget, "graywidget", krita::COLORBOX); //make sure the color chooser get right default values - emit sigFGQColorChanged(m_fg.toQColor()); - emit sigBGQColorChanged(m_bg.toQColor()); + emit sigFGTQColorChanged(m_fg.toTQColor()); + emit sigBGTQColorChanged(m_bg.toTQColor()); m_palettewidget = new KisPaletteWidget(this); m_palettewidget->setCaption(i18n("Palettes")); - connect(m_palettewidget, SIGNAL(colorSelected(const QColor &)), - this, SLOT(slotSetFGQColor(const QColor &))); + connect(m_palettewidget, TQT_SIGNAL(colorSelected(const TQColor &)), + this, TQT_SLOT(slotSetFGTQColor(const TQColor &))); // No BGColor or reverse slotFGChanged->palette connections, since that's not useful here KisResourceServerBase* rServer; rServer = KisResourceServerRegistry::instance()->get("PaletteServer"); - QValueList<KisResource*> resources = rServer->resources(); - QValueList<KisResource*>::iterator it; + TQValueList<KisResource*> resources = rServer->resources(); + TQValueList<KisResource*>::iterator it; for ( it = resources.begin(); it != resources.end(); ++it ) { m_palettewidget->slotAddPalette( *it ); } - connect(m_palettewidget, SIGNAL(colorSelected(const KisColor &)), this, SLOT(slotSetFGColor(const KisColor &))); + connect(m_palettewidget, TQT_SIGNAL(colorSelected(const KisColor &)), this, TQT_SLOT(slotSetFGColor(const KisColor &))); m_paletteManager->addWidget( m_palettewidget, "palettewidget", krita::COLORBOX, 10, PALETTE_DOCKER, true); } -QPoint KisView::applyViewTransformations(const QPoint& p) const { - QPoint point(windowToView(p)); +TQPoint KisView::applyViewTransformations(const TQPoint& p) const { + TQPoint point(windowToView(p)); if (m_hRuler->isShown()) point.ry() += m_hRuler->height(); @@ -3865,11 +3865,11 @@ QPoint KisView::applyViewTransformations(const QPoint& p) const { return point; } -QPoint KisView::reverseViewTransformations(const QPoint& p) const { +TQPoint KisView::reverseViewTransformations(const TQPoint& p) const { // Since we now zoom ourselves, the only thing super::~ does is nothing anymore. // Hence, zoom ourselves, like super would // viewToWindow doesn't take the rulers into account, do that ourselves - QPoint point(p); + TQPoint point(p); if (m_hRuler -> isShown()) point.ry() -= m_hRuler -> height(); if (m_vRuler -> isShown()) @@ -3880,7 +3880,7 @@ QPoint KisView::reverseViewTransformations(const QPoint& p) const { void KisView::canvasAddChild(KoViewChild *child) { super::canvasAddChild(child); - connect(this, SIGNAL(viewTransformationsChanged()), child, SLOT(reposition())); + connect(this, TQT_SIGNAL(viewTransformationsChanged()), child, TQT_SLOT(reposition())); m_vScroll->raise(); m_hScroll->raise(); m_vScroll->raise(); @@ -3894,7 +3894,7 @@ void KisView::slotLoadingFinished() setCurrentImage(document()->currentImage()); m_paletteManager->showWidget( "layerbox" ); m_canvas->show(); - disconnect(document(), SIGNAL(loadingFinished()), this, SLOT(slotLoadingFinished())); + disconnect(document(), TQT_SIGNAL(loadingFinished()), this, TQT_SLOT(slotLoadingFinished())); m_imageLoaded = true; startInitialZoomTimerIfReady(); @@ -3933,7 +3933,7 @@ void KisView::slotMaskFromSelection() { if (!layer) return; - KNamedCommand *cmd = layer->maskFromSelectionCommand(); + KNamedCommand *cmd = layer->tqmaskFromSelectionCommand(); cmd->execute(); if (undoAdapter() && undoAdapter()->undo()) { undoAdapter()->addCommand(cmd); @@ -3945,7 +3945,7 @@ void KisView::slotMaskToSelection() { if (!layer) return; - KNamedCommand *cmd = layer->maskToSelectionCommand(); + KNamedCommand *cmd = layer->tqmaskToSelectionCommand(); cmd->execute(); if (undoAdapter() && undoAdapter()->undo()) { undoAdapter()->addCommand(cmd); @@ -3992,7 +3992,7 @@ void KisView::slotShowMask() { layer->setRenderMask(m_showMask->isChecked()); } -void KisView::maskUpdated() { +void KisView::tqmaskUpdated() { KisPaintLayer* layer = dynamic_cast<KisPaintLayer*>(currentImg()->activeLayer().data()); if (!layer) { m_createMask->setEnabled(false); @@ -4003,8 +4003,8 @@ void KisView::maskUpdated() { return; } m_createMask->setEnabled(!layer->hasMask()); - m_maskFromSelection->setEnabled(true); // Perhaps also update this to false when no selection? - m_maskToSelection->setEnabled(layer->hasMask()); + m_tqmaskFromSelection->setEnabled(true); // Perhaps also update this to false when no selection? + m_tqmaskToSelection->setEnabled(layer->hasMask()); m_applyMask->setEnabled(layer->hasMask()); m_removeMask->setEnabled(layer->hasMask()); |