diff options
Diffstat (limited to 'kword/KWCanvas.cpp')
-rw-r--r-- | kword/KWCanvas.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/kword/KWCanvas.cpp b/kword/KWCanvas.cpp index 04575514..65aa9e14 100644 --- a/kword/KWCanvas.cpp +++ b/kword/KWCanvas.cpp @@ -63,8 +63,8 @@ #include <assert.h> -KWCanvas::KWCanvas(const TQString& viewMode, TQWidget *tqparent, KWDocument *d, KWGUI *lGui) - : TQScrollView( tqparent, "canvas", /*WNorthWestGravity*/ WStaticContents| WResizeNoErase | WRepaintNoErase ), m_doc( d ) +KWCanvas::KWCanvas(const TQString& viewMode, TQWidget *parent, KWDocument *d, KWGUI *lGui) + : TQScrollView( parent, "canvas", /*WNorthWestGravity*/ WStaticContents| WResizeNoErase | WRepaintNoErase ), m_doc( d ) { m_frameViewManager = new KWFrameViewManager(d); m_gui = lGui; @@ -2039,9 +2039,9 @@ KoPoint KWCanvas::caretPos() // ************** InteractionPolicy *********************** -InteractionPolicy::InteractionPolicy(KWCanvas *tqparent, bool doInit, bool includeInlineFrames) { +InteractionPolicy::InteractionPolicy(KWCanvas *parent, bool doInit, bool includeInlineFrames) { m_gotDragEvents = false; - m_parent = tqparent; + m_parent = parent; if(doInit) { TQValueList<KWFrameView*> selectedFrames = m_parent->frameViewManager()->selectedFrames(); TQValueListIterator<KWFrameView*> framesIterator = selectedFrames.begin(); @@ -2061,7 +2061,7 @@ InteractionPolicy::InteractionPolicy(KWCanvas *tqparent, bool doInit, bool inclu } } -InteractionPolicy* InteractionPolicy::createPolicy(KWCanvas *tqparent, MouseMeaning meaning, KoPoint &point, TQt::ButtonState buttonState, TQt::ButtonState keyState) { +InteractionPolicy* InteractionPolicy::createPolicy(KWCanvas *parent, MouseMeaning meaning, KoPoint &point, TQt::ButtonState buttonState, TQt::ButtonState keyState) { if(buttonState & Qt::LeftButton || buttonState & Qt::RightButton) { // little inner class to make sure we don't duplicate code class Selector { @@ -2085,11 +2085,11 @@ InteractionPolicy* InteractionPolicy::createPolicy(KWCanvas *tqparent, MouseMean bool m_leftClick, m_doSomething; }; - Selector selector(tqparent, point, buttonState, keyState); + Selector selector(parent, point, buttonState, keyState); switch(meaning) { case MEANING_MOUSE_MOVE: selector.doSelect(); - return new FrameMovePolicy(tqparent, point); + return new FrameMovePolicy(parent, point); case MEANING_TOPLEFT: case MEANING_TOP: case MEANING_TOPRIGHT: @@ -2099,9 +2099,9 @@ InteractionPolicy* InteractionPolicy::createPolicy(KWCanvas *tqparent, MouseMean case MEANING_BOTTOMLEFT: case MEANING_LEFT: selector.doSelect(); - return new FrameResizePolicy(tqparent, meaning, point); + return new FrameResizePolicy(parent, meaning, point); default: - FrameSelectPolicy *fsp = new FrameSelectPolicy(tqparent, meaning, point, buttonState, keyState); + FrameSelectPolicy *fsp = new FrameSelectPolicy(parent, meaning, point, buttonState, keyState); if(fsp->isValid()) return fsp; delete fsp; @@ -2120,8 +2120,8 @@ void InteractionPolicy::cancelInteraction() { // ************** FrameResizePolicy *********************** -FrameResizePolicy::FrameResizePolicy(KWCanvas *tqparent, MouseMeaning meaning, KoPoint &point) : - InteractionPolicy (tqparent, true, true), m_boundingRect() { +FrameResizePolicy::FrameResizePolicy(KWCanvas *parent, MouseMeaning meaning, KoPoint &point) : + InteractionPolicy (parent, true, true), m_boundingRect() { if( meaning == MEANING_TOPLEFT) { m_top = true; m_bottom = false; m_left = true; m_right = false; @@ -2308,8 +2308,8 @@ void FrameResizePolicy::finishInteraction() { // *************** FrameMovePolicy ************************ -FrameMovePolicy::FrameMovePolicy(KWCanvas *tqparent, KoPoint &point) : - InteractionPolicy (tqparent), m_boundingRect() { +FrameMovePolicy::FrameMovePolicy(KWCanvas *parent, KoPoint &point) : + InteractionPolicy (parent), m_boundingRect() { TQValueListConstIterator<KWFrame*> framesIterator = m_frames.begin(); for(;framesIterator != m_frames.end(); ++framesIterator) { @@ -2442,15 +2442,15 @@ void FrameMovePolicy::finishInteraction() { // ************** FrameSelectPolicy *********************** -FrameSelectPolicy::FrameSelectPolicy(KWCanvas *tqparent, MouseMeaning meaning, KoPoint &point, TQt::ButtonState buttonState, TQt::ButtonState keyState) - : InteractionPolicy(tqparent, false) { +FrameSelectPolicy::FrameSelectPolicy(KWCanvas *parent, MouseMeaning meaning, KoPoint &point, TQt::ButtonState buttonState, TQt::ButtonState keyState) + : InteractionPolicy(parent, false) { bool leftButton = buttonState & Qt::LeftButton; // this is a special case; if a frame that is curently being edited is 'selected' on the border // we redirect that click to the text part of the frame. // this means we give the user a lot more space to click on the left side of the frame to // select the first characters. - KWFrameSetEdit *fse = tqparent->currentFrameSetEdit(); + KWFrameSetEdit *fse = parent->currentFrameSetEdit(); if(leftButton && fse) { KWFrameView *view = m_parent->frameViewManager()->view(point, KWFrameViewManager::unselected, true); @@ -2462,8 +2462,8 @@ FrameSelectPolicy::FrameSelectPolicy(KWCanvas *tqparent, MouseMeaning meaning, K point.setY(TQMIN(point.y(), view->frame()->bottom())); // convert point to the view coordinate system. - TQPoint normalPoint = tqparent->kWordDocument()->zoomPoint(point); - TQPoint mousePos = tqparent->viewMode()->normalToView(normalPoint); + TQPoint normalPoint = parent->kWordDocument()->zoomPoint(point); + TQPoint mousePos = parent->viewMode()->normalToView(normalPoint); TQMouseEvent *me = new TQMouseEvent(TQEvent::MouseButtonPress, mousePos, buttonState, keyState); fse->mousePressEvent(me, normalPoint, point ); |