|
|
@ -63,7 +63,7 @@ EventEater::eventFilter(TQObject *, TQEvent *ev)
|
|
|
|
// we need to simulate the Press event
|
|
|
|
// we need to simulate the Press event
|
|
|
|
if(ev->type() == TQEvent::MouseButtonRelease && m_widget->inherits("TQTabWidget"))
|
|
|
|
if(ev->type() == TQEvent::MouseButtonRelease && m_widget->inherits("TQTabWidget"))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
TQMouseEvent *mev = TQT_TQMOUSEEVENT(ev);
|
|
|
|
TQMouseEvent *mev = static_cast<TQMouseEvent*>(ev);
|
|
|
|
if(mev->button() == TQt::LeftButton)
|
|
|
|
if(mev->button() == TQt::LeftButton)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
TQMouseEvent *myev = new TQMouseEvent(TQEvent::MouseButtonPress, mev->pos(), mev->button(), mev->state());
|
|
|
|
TQMouseEvent *myev = new TQMouseEvent(TQEvent::MouseButtonPress, mev->pos(), mev->button(), mev->state());
|
|
|
@ -162,7 +162,7 @@ Container::eventFilter(TQObject *s, TQEvent *e)
|
|
|
|
kdDebug() << "TQEvent::MouseButtonPress this = " << name() << endl;
|
|
|
|
kdDebug() << "TQEvent::MouseButtonPress this = " << name() << endl;
|
|
|
|
|
|
|
|
|
|
|
|
m_moving = TQT_TQWIDGET(s);
|
|
|
|
m_moving = TQT_TQWIDGET(s);
|
|
|
|
TQMouseEvent *mev = TQT_TQMOUSEEVENT(e);
|
|
|
|
TQMouseEvent *mev = static_cast<TQMouseEvent*>(e);
|
|
|
|
m_grab = TQPoint(mev->x(), mev->y());
|
|
|
|
m_grab = TQPoint(mev->x(), mev->y());
|
|
|
|
|
|
|
|
|
|
|
|
// we are drawing a connection
|
|
|
|
// we are drawing a connection
|
|
|
@ -239,7 +239,7 @@ Container::eventFilter(TQObject *s, TQEvent *e)
|
|
|
|
|
|
|
|
|
|
|
|
case TQEvent::MouseButtonRelease:
|
|
|
|
case TQEvent::MouseButtonRelease:
|
|
|
|
{
|
|
|
|
{
|
|
|
|
TQMouseEvent *mev = TQT_TQMOUSEEVENT(e);
|
|
|
|
TQMouseEvent *mev = static_cast<TQMouseEvent*>(e);
|
|
|
|
if (!m_mousePressEventReceived) {
|
|
|
|
if (!m_mousePressEventReceived) {
|
|
|
|
m_mouseReleaseEvent = *mev;
|
|
|
|
m_mouseReleaseEvent = *mev;
|
|
|
|
m_objectForMouseReleaseEvent = s;
|
|
|
|
m_objectForMouseReleaseEvent = s;
|
|
|
@ -252,7 +252,7 @@ Container::eventFilter(TQObject *s, TQEvent *e)
|
|
|
|
|
|
|
|
|
|
|
|
case TQEvent::MouseMove:
|
|
|
|
case TQEvent::MouseMove:
|
|
|
|
{
|
|
|
|
{
|
|
|
|
TQMouseEvent *mev = TQT_TQMOUSEEVENT(e);
|
|
|
|
TQMouseEvent *mev = static_cast<TQMouseEvent*>(e);
|
|
|
|
if(m_insertBegin!=TQPoint(-1,-1) && FormManager::self()->isInserting() && ((mev->state() == TQt::LeftButton) || (mev->state() == (TQt::LeftButton|TQt::ControlButton)) ||
|
|
|
|
if(m_insertBegin!=TQPoint(-1,-1) && FormManager::self()->isInserting() && ((mev->state() == TQt::LeftButton) || (mev->state() == (TQt::LeftButton|TQt::ControlButton)) ||
|
|
|
|
(mev->state() == (TQt::LeftButton|TQt::ControlButton|TQt::AltButton)) || (mev->state() == (TQt::LeftButton|TQt::ShiftButton)) ) )
|
|
|
|
(mev->state() == (TQt::LeftButton|TQt::ControlButton|TQt::AltButton)) || (mev->state() == (TQt::LeftButton|TQt::ShiftButton)) ) )
|
|
|
|
// draw the insert rect
|
|
|
|
// draw the insert rect
|
|
|
@ -343,7 +343,7 @@ Container::eventFilter(TQObject *s, TQEvent *e)
|
|
|
|
//case TQEvent::AccelOverride:
|
|
|
|
//case TQEvent::AccelOverride:
|
|
|
|
case TQEvent::KeyPress:
|
|
|
|
case TQEvent::KeyPress:
|
|
|
|
{
|
|
|
|
{
|
|
|
|
TQKeyEvent *kev = TQT_TQKEYEVENT(e);
|
|
|
|
TQKeyEvent *kev = static_cast<TQKeyEvent*>(e);
|
|
|
|
|
|
|
|
|
|
|
|
if(kev->key() == Key_F2) // pressing F2 == double-clicking
|
|
|
|
if(kev->key() == Key_F2) // pressing F2 == double-clicking
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -374,7 +374,7 @@ Container::eventFilter(TQObject *s, TQEvent *e)
|
|
|
|
// we simulate a mouse move event to update screen
|
|
|
|
// we simulate a mouse move event to update screen
|
|
|
|
TQMouseEvent *mev = new TQMouseEvent(TQEvent::MouseMove, m_moving->mapFromGlobal(TQCursor::pos()), TQt::NoButton,
|
|
|
|
TQMouseEvent *mev = new TQMouseEvent(TQEvent::MouseMove, m_moving->mapFromGlobal(TQCursor::pos()), TQt::NoButton,
|
|
|
|
TQt::LeftButton|TQt::ControlButton );
|
|
|
|
TQt::LeftButton|TQt::ControlButton );
|
|
|
|
eventFilter(TQT_TQOBJECT(m_moving), TQT_TQEVENT(mev));
|
|
|
|
eventFilter(m_moving, mev);
|
|
|
|
delete mev;
|
|
|
|
delete mev;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if(kev->key() == FormManager::self()->contextMenuKey())
|
|
|
|
else if(kev->key() == FormManager::self()->contextMenuKey())
|
|
|
@ -435,7 +435,7 @@ Container::eventFilter(TQObject *s, TQEvent *e)
|
|
|
|
|
|
|
|
|
|
|
|
case TQEvent::KeyRelease:
|
|
|
|
case TQEvent::KeyRelease:
|
|
|
|
{
|
|
|
|
{
|
|
|
|
TQKeyEvent *kev = TQT_TQKEYEVENT(e);
|
|
|
|
TQKeyEvent *kev = static_cast<TQKeyEvent*>(e);
|
|
|
|
if((kev->key() == Key_Control) && (m_state == CopyingWidget)) {
|
|
|
|
if((kev->key() == Key_Control) && (m_state == CopyingWidget)) {
|
|
|
|
// cancel copying
|
|
|
|
// cancel copying
|
|
|
|
//m_copyRect = TQRect();
|
|
|
|
//m_copyRect = TQRect();
|
|
|
|