summaryrefslogtreecommitdiffabout
path: root/korganizer/koagenda.cpp
authorzautrix <zautrix>2005-02-23 21:53:18 (UTC)
committer zautrix <zautrix>2005-02-23 21:53:18 (UTC)
commit4a9bf75c2ef12a40be3aea1d147f3703aee48638 (patch) (side-by-side diff)
tree62b2e4d0b63487ff2818c18f8bc1a3233df46e76 /korganizer/koagenda.cpp
parent31f24d21cd23bb7e4033e7ffa000e6c979133ce7 (diff)
downloadkdepimpi-4a9bf75c2ef12a40be3aea1d147f3703aee48638.zip
kdepimpi-4a9bf75c2ef12a40be3aea1d147f3703aee48638.tar.gz
kdepimpi-4a9bf75c2ef12a40be3aea1d147f3703aee48638.tar.bz2
morelayout fixes
Diffstat (limited to 'korganizer/koagenda.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koagenda.cpp25
1 files changed, 24 insertions, 1 deletions
diff --git a/korganizer/koagenda.cpp b/korganizer/koagenda.cpp
index 195b1fa..ec81d44 100644
--- a/korganizer/koagenda.cpp
+++ b/korganizer/koagenda.cpp
@@ -1172,25 +1172,48 @@ void KOAgenda::drawContents(QPainter* p, int cx, int cy, int cw, int ch)
bitBlt ( pd, vx+1, vy, &mHighlightPixmap, 0, mSelectionYTop, mGridSpacingX-1, mSelectionHeight ,CopyROP);
}
}
//qDebug("btbl ");
p->begin( pd );
//qDebug("end ");
}
void KOAgenda::finishUpdate()
{
KOAgendaItem *item;
- globalFlagBlockAgendaItemPaint = 1;
+ globalFlagBlockAgendaItemPaint = 1;
+ // Adjust sub cell geometry of all conflict items of all conflict items of all conflict items ... of the conflict item with the max number of conflictitems
+ for ( item=mItems.first(); item != 0; item=mItems.next() ) {
+ if ( !item->checkLayout() ) {
+ //qDebug(" conflictitem found ");
+ int newSubCellWidth;
+ if (mAllDayMode) newSubCellWidth = mGridSpacingY / item->subCells();
+ else newSubCellWidth = mGridSpacingX / item->subCells();
+
+ if (mAllDayMode) {
+ item->resize(item->cellWidth() * mGridSpacingX, newSubCellWidth);
+ } else {
+ item->resize(newSubCellWidth, item->cellHeight() * mGridSpacingY);
+ }
+ int x,y;
+ gridToContents(item->cellX(),item->cellYTop(),x,y);
+ if (mAllDayMode) {
+ y += item->subCell() * newSubCellWidth;
+ } else {
+ x += item->subCell() * newSubCellWidth;
+ }
+ moveChild(item,x,y);
+ }
+ }
for ( item=mItems.first(); item != 0; item=mItems.next() ) {
if ( !item->isVisible() )
item->show();
}
globalFlagBlockAgendaItemUpdate = 0;
for ( item=mItems.first(); item != 0; item=mItems.next() ) {
item->repaintMe( );
}
globalFlagBlockAgendaItemUpdate = 1;
qApp->processEvents();
globalFlagBlockAgendaItemPaint = 0;