summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-06-03 11:21:25 (UTC)
committer zautrix <zautrix>2005-06-03 11:21:25 (UTC)
commitdd80f5bb6eee2a924748b7d0acfb4fb892f58b86 (patch) (side-by-side diff)
tree24f60fbd7cfaf5b4a9f545d4f61a7deebbd7d725
parentab0f6af57ebf5b5a6fa2f7e6209fe04aafbfb14f (diff)
downloadkdepimpi-dd80f5bb6eee2a924748b7d0acfb4fb892f58b86.zip
kdepimpi-dd80f5bb6eee2a924748b7d0acfb4fb892f58b86.tar.gz
kdepimpi-dd80f5bb6eee2a924748b7d0acfb4fb892f58b86.tar.bz2
block move change
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koagenda.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/korganizer/koagenda.cpp b/korganizer/koagenda.cpp
index 99009a5..cdeeac5 100644
--- a/korganizer/koagenda.cpp
+++ b/korganizer/koagenda.cpp
@@ -408,17 +408,17 @@ void KOAgenda::popupMenu()
mPopupItem = 0;
mPopupKind = 0;
}
bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me)
{
static int startX = 0;
static int startY = 0;
- static int blockmoveDist = ( QApplication::desktop()->width() < 480 ? 15 : 20 );
+ int blockmoveDist = ( QApplication::desktop()->width() < 480 ? 7 : 9 );
static bool blockMoving = true;
//qDebug("KOAgenda::eventFilter_mous ");
if ( object == mNewItemPopup ) {
//qDebug("mNewItemPopup ");
if ( me->type() == QEvent::MouseButtonRelease ) {
mNewItemPopup->removeEventFilter( this );
int dX = me->globalPos().x() - mPopupPos.x();;
@@ -446,16 +446,17 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me)
if ( dX > blockmoveDist || dY > blockmoveDist ) {
mAllAgendaPopup->hide();
}
}
return true;
}
QPoint viewportPos;
if (object != viewport()) {
+ blockmoveDist = blockmoveDist*2;
viewportPos = ((QWidget *)object)->mapToParent(me->pos());
} else {
viewportPos = me->pos();
}
switch (me->type()) {
case QEvent::MouseButtonPress:
if (me->button() == LeftButton) {
@@ -465,17 +466,17 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me)
blockMoving = true;
startX = viewportPos.x();
startY = viewportPos.y();
mPopupPos = me->globalPos();
if (object != viewport()) {
mPopupItem = (KOAgendaItem *)object;
mPopupKind = 1;
if (me->button() == RightButton) {
- mPopupKind = 3;
+ mPopupKind = 3;
popupMenu();
} else if (me->button() == LeftButton) {
mActionItem = (KOAgendaItem *)object;
if (mActionItem) {
emit signalClearSelection();
slotClearSelection();
selectItem(mActionItem);
Incidence *incidence = mActionItem->incidence();
@@ -495,17 +496,17 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me)
int x,y;
viewportToContents(viewportPos.x(),viewportPos.y(),x,y);
int gx,gy;
contentsToGrid(x,y,gx,gy);
mCurrentCellX = gx;
mCurrentCellY = gy;
mStartCellX = gx;
mStartCellY = gy;
- mPopupKind = 4;
+ mPopupKind = 4;
popupMenu();
} else if (me->button() == LeftButton) {
setCursor(arrowCursor);
startSelectAction(viewportPos);
}
}
break;