author | zautrix <zautrix> | 2005-06-08 10:34:22 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-06-08 10:34:22 (UTC) |
commit | 793d117812b4da36c9c11d90cccba347cbc6e208 (patch) (unidiff) | |
tree | 5bc77e2b7a32a541c2a3b3c3d6d50f873216deef /korganizer/koagenda.cpp | |
parent | 39d84e2fc3099bd5d7596e8be5dc6783826cec01 (diff) | |
download | kdepimpi-793d117812b4da36c9c11d90cccba347cbc6e208.zip kdepimpi-793d117812b4da36c9c11d90cccba347cbc6e208.tar.gz kdepimpi-793d117812b4da36c9c11d90cccba347cbc6e208.tar.bz2 |
changed incidence type to a faster access method
-rw-r--r-- | korganizer/koagenda.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/korganizer/koagenda.cpp b/korganizer/koagenda.cpp index 2a2acb1..fc213d8 100644 --- a/korganizer/koagenda.cpp +++ b/korganizer/koagenda.cpp | |||
@@ -740,33 +740,33 @@ void KOAgenda::startItemAction(QPoint viewportPos) | |||
740 | int gridDistanceX = (x - gx * mGridSpacingX); | 740 | int gridDistanceX = (x - gx * mGridSpacingX); |
741 | if (gridDistanceX < mResizeBorderWidth && | 741 | if (gridDistanceX < mResizeBorderWidth && |
742 | mActionItem->cellX() == mCurrentCellX) { | 742 | mActionItem->cellX() == mCurrentCellX) { |
743 | mActionType = RESIZELEFT; | 743 | mActionType = RESIZELEFT; |
744 | setCursor(sizeHorCursor); | 744 | setCursor(sizeHorCursor); |
745 | } else if ((mGridSpacingX - gridDistanceX) < mResizeBorderWidth && | 745 | } else if ((mGridSpacingX - gridDistanceX) < mResizeBorderWidth && |
746 | mActionItem->cellXWidth() == mCurrentCellX) { | 746 | mActionItem->cellXWidth() == mCurrentCellX) { |
747 | mActionType = RESIZERIGHT; | 747 | mActionType = RESIZERIGHT; |
748 | setCursor(sizeHorCursor); | 748 | setCursor(sizeHorCursor); |
749 | } else { | 749 | } else { |
750 | mActionType = MOVE; | 750 | mActionType = MOVE; |
751 | mActionItem->startMove(); | 751 | mActionItem->startMove(); |
752 | setCursor(sizeAllCursor); | 752 | setCursor(sizeAllCursor); |
753 | } | 753 | } |
754 | } else { | 754 | } else { |
755 | int gridDistanceY = (y - gy * mGridSpacingY); | 755 | int gridDistanceY = (y - gy * mGridSpacingY); |
756 | bool allowResize = ( mActionItem->incidence()->type() != "Todo" ); | 756 | bool allowResize = ( mActionItem->incidence()->typeID() != todoID ); |
757 | if (allowResize && gridDistanceY < mResizeBorderWidth && | 757 | if (allowResize && gridDistanceY < mResizeBorderWidth && |
758 | mActionItem->cellYTop() == mCurrentCellY && | 758 | mActionItem->cellYTop() == mCurrentCellY && |
759 | !mActionItem->firstMultiItem()) { | 759 | !mActionItem->firstMultiItem()) { |
760 | mActionType = RESIZETOP; | 760 | mActionType = RESIZETOP; |
761 | setCursor(sizeVerCursor); | 761 | setCursor(sizeVerCursor); |
762 | } else if (allowResize &&(mGridSpacingY - gridDistanceY) < mResizeBorderWidth && | 762 | } else if (allowResize &&(mGridSpacingY - gridDistanceY) < mResizeBorderWidth && |
763 | mActionItem->cellYBottom() == mCurrentCellY && | 763 | mActionItem->cellYBottom() == mCurrentCellY && |
764 | !mActionItem->lastMultiItem()) { | 764 | !mActionItem->lastMultiItem()) { |
765 | mActionType = RESIZEBOTTOM; | 765 | mActionType = RESIZEBOTTOM; |
766 | setCursor(sizeVerCursor); | 766 | setCursor(sizeVerCursor); |
767 | } else { | 767 | } else { |
768 | mActionType = MOVE; | 768 | mActionType = MOVE; |
769 | mActionItem->startMove(); | 769 | mActionItem->startMove(); |
770 | setCursor(sizeAllCursor); | 770 | setCursor(sizeAllCursor); |
771 | } | 771 | } |
772 | } | 772 | } |
@@ -899,33 +899,33 @@ void KOAgenda::endItemAction() | |||
899 | if ( !placeItem ) { | 899 | if ( !placeItem ) { |
900 | placeItem = mActionItem; | 900 | placeItem = mActionItem; |
901 | } | 901 | } |
902 | if ( placeItem->incidence()->recurrence()->doesRecur() ) { | 902 | if ( placeItem->incidence()->recurrence()->doesRecur() ) { |
903 | Incidence* oldInc = placeItem->incidence(); | 903 | Incidence* oldInc = placeItem->incidence(); |
904 | placeItem->recreateIncidence(); | 904 | placeItem->recreateIncidence(); |
905 | emit addToCalSignal(placeItem->incidence(), oldInc ); | 905 | emit addToCalSignal(placeItem->incidence(), oldInc ); |
906 | } | 906 | } |
907 | int type = mActionType; | 907 | int type = mActionType; |
908 | if ( mAllDayMode ) | 908 | if ( mAllDayMode ) |
909 | type = -1; | 909 | type = -1; |
910 | KOAgendaItem *modifiedItem = placeItem; | 910 | KOAgendaItem *modifiedItem = placeItem; |
911 | //emit itemModified( placeItem, mActionType /*KOGlobals::EVENTEDITED */); | 911 | //emit itemModified( placeItem, mActionType /*KOGlobals::EVENTEDITED */); |
912 | QPtrList<KOAgendaItem> oldconflictItems ;//= placeItem->conflictItems(); | 912 | QPtrList<KOAgendaItem> oldconflictItems ;//= placeItem->conflictItems(); |
913 | KOAgendaItem *item; | 913 | KOAgendaItem *item; |
914 | 914 | ||
915 | if ( placeItem->incidence()->type() == "Todo" ) { | 915 | if ( placeItem->incidence()->typeID() == todoID ) { |
916 | mSelectedItem = 0; | 916 | mSelectedItem = 0; |
917 | //qDebug("todo %d %d %d ", mCurrentCellX, modifiedItem->cellX() ,modifiedItem->cellXWidth()); | 917 | //qDebug("todo %d %d %d ", mCurrentCellX, modifiedItem->cellX() ,modifiedItem->cellXWidth()); |
918 | modifiedItem->mLastMoveXPos = mCurrentCellX; | 918 | modifiedItem->mLastMoveXPos = mCurrentCellX; |
919 | emit itemModified( modifiedItem, mActionType ); | 919 | emit itemModified( modifiedItem, mActionType ); |
920 | } | 920 | } |
921 | else { | 921 | else { |
922 | 922 | ||
923 | 923 | ||
924 | globalFlagBlockAgendaItemPaint = 1; | 924 | globalFlagBlockAgendaItemPaint = 1; |
925 | for ( item=oldconflictItems.first(); item != 0; | 925 | for ( item=oldconflictItems.first(); item != 0; |
926 | item=oldconflictItems.next() ) { | 926 | item=oldconflictItems.next() ) { |
927 | placeSubCells(item); | 927 | placeSubCells(item); |
928 | } | 928 | } |
929 | while ( placeItem ) { | 929 | while ( placeItem ) { |
930 | //qDebug("placeItem %s ", placeItem->incidence()->summary().latin1()); | 930 | //qDebug("placeItem %s ", placeItem->incidence()->summary().latin1()); |
931 | oldconflictItems = placeItem->conflictItems(); | 931 | oldconflictItems = placeItem->conflictItems(); |