diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-05-27 23:37:00 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-05-27 23:37:00 +0000 |
commit | b0e912c8b3d02a518fedda28c3180eb4794a7520 (patch) | |
tree | 07d344862562fab58cbe2df39d13d16f2e4d2bea /k9author/k9canvasselection.cpp | |
parent | 4d695ec81fe4d4335ee82c7a9346ad9c9e144ecc (diff) | |
download | k9copy-b0e912c8b3d02a518fedda28c3180eb4794a7520.tar.gz k9copy-b0e912c8b3d02a518fedda28c3180eb4794a7520.zip |
TQt4 convert k9copy
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/k9copy@1233843 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'k9author/k9canvasselection.cpp')
-rw-r--r-- | k9author/k9canvasselection.cpp | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/k9author/k9canvasselection.cpp b/k9author/k9canvasselection.cpp index 8b9d72f..8405917 100644 --- a/k9author/k9canvasselection.cpp +++ b/k9author/k9canvasselection.cpp @@ -12,7 +12,7 @@ #include "k9canvasselection.h" #include "k9menubutton.h" -k9CanvasSelectionRedim::k9CanvasSelectionRedim (ePosition _position,int _x,int _y,int _w,int _h,QCanvas *canvas,k9CanvasSelection *selection):QCanvasRectangle(_x,_y,_w,_h,canvas) { +k9CanvasSelectionRedim::k9CanvasSelectionRedim (ePosition _position,int _x,int _y,int _w,int _h,TQCanvas *canvas,k9CanvasSelection *selection):TQCanvasRectangle(_x,_y,_w,_h,canvas) { m_position=_position; m_selection=selection; } @@ -20,7 +20,7 @@ k9CanvasSelectionRedim::k9CanvasSelectionRedim (ePosition _position,int _x,int _ void k9CanvasSelectionRedim::moveBy(double _x,double _y) { m_offsetX=_x; m_offsetY=_y; - QCanvasRectangle::moveBy(_x,_y); + TQCanvasRectangle::moveBy(_x,_y); } void k9CanvasSelectionRedim::updateSelection() { @@ -98,7 +98,7 @@ void k9CanvasSelectionRedim::updateSelection() { k9CanvasSelection::k9CanvasSelection(k9MenuEditor *_editor) - : QObject(_editor) { + : TQObject(_editor) { m_rect=NULL; m_editor=_editor; } @@ -106,45 +106,45 @@ k9CanvasSelection::k9CanvasSelection(k9MenuEditor *_editor) k9CanvasSelection::~k9CanvasSelection() {} -void k9CanvasSelection::setPosition(QPoint _p) { +void k9CanvasSelection::setPosition(TQPoint _p) { if (m_rect==NULL) { - QCanvas *m_canvas=m_editor->canvas(); - m_rect=new QCanvasRectangle(m_editor->canvas()); - QBrush brush(Qt::green); + TQCanvas *m_canvas=m_editor->canvas(); + m_rect=new TQCanvasRectangle(m_editor->canvas()); + TQBrush brush(TQt::green); m_rm=new k9CanvasSelectionRedim(k9CanvasSelectionRedim::RedimMiddleRight,0,0,10,10,m_canvas,this); - m_rm->setPen(Qt::black); + m_rm->setPen(TQt::black); m_rm->setBrush(brush); m_lt=new k9CanvasSelectionRedim(k9CanvasSelectionRedim::RedimTopLeft,0,0,10,10,m_canvas,this); - m_lt->setPen(Qt::black); + m_lt->setPen(TQt::black); m_lt->setBrush(brush); m_mt=new k9CanvasSelectionRedim(k9CanvasSelectionRedim::RedimTopMiddle,0,0,10,10,m_canvas,this); - m_mt->setPen(Qt::black); + m_mt->setPen(TQt::black); m_mt->setBrush(brush); m_mt=new k9CanvasSelectionRedim(k9CanvasSelectionRedim::RedimTopMiddle,0,0,10,10,m_canvas,this); - m_mt->setPen(Qt::black); + m_mt->setPen(TQt::black); m_mt->setBrush(brush); m_rt=new k9CanvasSelectionRedim(k9CanvasSelectionRedim::RedimTopRight,0,0,10,10,m_canvas,this); - m_rt->setPen(Qt::black); + m_rt->setPen(TQt::black); m_rt->setBrush(brush); m_lm=new k9CanvasSelectionRedim(k9CanvasSelectionRedim::RedimMiddleLeft,0,0,10,10,m_canvas,this); - m_lm->setPen(Qt::black); + m_lm->setPen(TQt::black); m_lm->setBrush(brush); m_lb=new k9CanvasSelectionRedim(k9CanvasSelectionRedim::RedimBottomLeft,0,0,10,10,m_canvas,this); - m_lb->setPen(Qt::black); + m_lb->setPen(TQt::black); m_lb->setBrush(brush); m_mb=new k9CanvasSelectionRedim(k9CanvasSelectionRedim::RedimBottomMiddle,0,0,10,10,m_canvas,this); - m_mb->setPen(Qt::black); + m_mb->setPen(TQt::black); m_mb->setBrush(brush); m_rb=new k9CanvasSelectionRedim(k9CanvasSelectionRedim::RedimBottomRight,0,0,10,10,m_canvas,this); - m_rb->setPen(Qt::black); + m_rb->setPen(TQt::black); m_rb->setBrush(brush); } else { m_rect->setCanvas(m_editor->canvas()); @@ -158,7 +158,7 @@ void k9CanvasSelection::setPosition(QPoint _p) { m_rb->setCanvas(m_editor->canvas()); ; } - m_rect->setPen(QPen(Qt::red)); + m_rect->setPen(TQPen(TQt::red)); m_rect->setX(_p.x()); m_rect->setY(_p.y()); m_rect->setSize(0,0); @@ -179,13 +179,13 @@ void k9CanvasSelection::release() { void k9CanvasSelection::drawSelection() { int left=720,top=576,right=0,bottom=0; - QPtrList <k9MenuButton> *selection=m_editor->getSelection(); + TQPtrList <k9MenuButton> *selection=m_editor->getSelection(); for (k9MenuButton *b=selection->first();b;b=selection->next()) { - left=QMIN(left,b->getLeft()); - top=QMIN(top,b->getTop()); - right=QMAX(right,b->getWidth()+b->getLeft()); - bottom=QMAX(bottom,b->getTop()+b->getHeight()); + left=TQMIN(left,b->getLeft()); + top=TQMIN(top,b->getTop()); + right=TQMAX(right,b->getWidth()+b->getLeft()); + bottom=TQMAX(bottom,b->getTop()+b->getHeight()); } m_rect->setX(left-2); m_rect->setY(top-2); @@ -227,9 +227,9 @@ void k9CanvasSelection::update() { m_rect->setZ(count--); - QCanvasItemList l=m_editor->canvas()->allItems(); - for (QCanvasItemList::Iterator it=l.begin(); it!=l.end(); ++it) { - QCanvasItem *item=*it; + TQCanvasItemList l=m_editor->canvas()->allItems(); + for (TQCanvasItemList::Iterator it=l.begin(); it!=l.end(); ++it) { + TQCanvasItem *item=*it; if (item != m_rect && item !=m_lt && item !=m_rt && item != m_mt && item !=m_lm && item != m_rm && item != m_lb && item != m_mb && item !=m_rb) item->setZ(count--); } @@ -239,7 +239,7 @@ void k9CanvasSelection::update() { } void k9CanvasSelection::scale(int _x,int _y,int _w, int _h) { - QPtrList <k9MenuButton> *buttons=m_editor->getSelection(); + TQPtrList <k9MenuButton> *buttons=m_editor->getSelection(); for (k9MenuButton *b=buttons->first();b;b=buttons->next()) { b->moveBy(_x,_y,false); if (b->getWidth() + _w >10) @@ -251,7 +251,7 @@ void k9CanvasSelection::scale(int _x,int _y,int _w, int _h) { } bool k9CanvasSelection::canScale(int _w, int _h) { - QPtrList <k9MenuButton> *buttons=m_editor->getSelection(); + TQPtrList <k9MenuButton> *buttons=m_editor->getSelection(); for (k9MenuButton *b=buttons->first();b;b=buttons->next()) { if (b->getWidth() + _w <10) return false; @@ -298,7 +298,7 @@ void k9CanvasSelection::setSize(int _w,int _h) { m_rect->setSize(_w,_h); } -QRect k9CanvasSelection::getRect() { +TQRect k9CanvasSelection::getRect() { return m_rect->rect(); } |