summaryrefslogtreecommitdiffstats
path: root/kig/modes/base_mode.cc
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-11 04:44:41 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-11 04:44:41 +0000
commita374efce3a207b39514be3c52264091400ce297e (patch)
tree77bdf654b55826d4f59b53a5621310206bcaead1 /kig/modes/base_mode.cc
parentf81a494f3957d5cf38c787973415597941934727 (diff)
downloadtdeedu-a374efce3a207b39514be3c52264091400ce297e.tar.gz
tdeedu-a374efce3a207b39514be3c52264091400ce297e.zip
TQt4 port kdeedu
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeedu@1236073 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kig/modes/base_mode.cc')
-rw-r--r--kig/modes/base_mode.cc28
1 files changed, 14 insertions, 14 deletions
diff --git a/kig/modes/base_mode.cc b/kig/modes/base_mode.cc
index d968566b..e470f938 100644
--- a/kig/modes/base_mode.cc
+++ b/kig/modes/base_mode.cc
@@ -38,7 +38,7 @@ BaseMode::~BaseMode()
void BaseMode::leftClicked( TQMouseEvent* e, KigWidget* v )
{
// touch screens don't send a mouseMoved event before a click event,
- // apparently, so we simulate it.
+ // aptqparently, so we simulate it.
mouseMoved( e, v );
// get rid of text still showing...
@@ -46,9 +46,9 @@ void BaseMode::leftClicked( TQMouseEvent* e, KigWidget* v )
v->updateWidget();
mplc = e->pos();
- moco = mdoc.document().whatAmIOn( v->fromScreen( mplc ), *v );
+ tqmoco = mdoc.document().whatAmIOn( v->fromScreen( mplc ), *v );
- if( moco.empty() )
+ if( tqmoco.empty() )
{
// clicked on an empty spot --> we show the rectangle for
// selecting stuff...
@@ -66,8 +66,8 @@ void BaseMode::leftClicked( TQMouseEvent* e, KigWidget* v )
void BaseMode::leftMouseMoved( TQMouseEvent* e, KigWidget* w )
{
- if( !moco.empty() && ( mplc - e->pos() ).manhattanLength() > 3 )
- dragObject( moco, mplc, *w,
+ if( !tqmoco.empty() && ( mplc - e->pos() ).manhattanLength() > 3 )
+ dragObject( tqmoco, mplc, *w,
( e->state() & (ShiftButton | ControlButton ) ) != 0
);
}
@@ -79,16 +79,16 @@ void BaseMode::leftReleased( TQMouseEvent* e, KigWidget* v )
ObjectHolder* o = 0;
bool keyCtrl = ( e->state() & ControlButton ) != 0;
bool keyShift = ( e->state() & ShiftButton ) != 0;
- if ( ! moco.empty() )
+ if ( ! tqmoco.empty() )
{
if ( keyShift )
{
- int id = ObjectChooserPopup::getObjectFromList( e->pos(), v, moco );
+ int id = ObjectChooserPopup::getObjectFromList( e->pos(), v, tqmoco );
if ( id >= 0 )
- o = moco[id];
+ o = tqmoco[id];
}
else
- o = moco.front();
+ o = tqmoco.front();
}
leftClickedObject( o, e->pos(), *v, keyCtrl );
}
@@ -100,7 +100,7 @@ void BaseMode::midClicked( TQMouseEvent* e, KigWidget* v )
v->updateWidget();
mplc = e->pos();
- moco = mdoc.document().whatAmIOn( v->fromScreen( e->pos() ), *v );
+ tqmoco = mdoc.document().whatAmIOn( v->fromScreen( e->pos() ), *v );
}
void BaseMode::midReleased( TQMouseEvent* e, KigWidget* v )
@@ -119,15 +119,15 @@ void BaseMode::rightClicked( TQMouseEvent* e, KigWidget* w )
w->setCursor( KCursor::arrowCursor() );
mplc = e->pos();
- moco = mdoc.document().whatAmIOn( w->fromScreen( mplc ), *w );
+ tqmoco = mdoc.document().whatAmIOn( w->fromScreen( mplc ), *w );
- rightClicked( moco, mplc, *w );
+ rightClicked( tqmoco, mplc, *w );
}
void BaseMode::mouseMoved( TQMouseEvent* e, KigWidget* w )
{
std::vector<ObjectHolder*> os = mdoc.document().whatAmIOn( w->fromScreen( e->pos() ), *w );
- mouseMoved( os, e->pos(), *w, e->state() & Qt::ShiftButton );
+ mouseMoved( os, e->pos(), *w, e->state() & TQt::ShiftButton );
}
void BaseMode::dragRect( const TQPoint&, KigWidget& )
@@ -151,7 +151,7 @@ void BaseMode::enableActions()
std::vector<ObjectHolder*> BaseMode::oco()
{
- return moco;
+ return tqmoco;
}
TQPoint BaseMode::pointLocation()