summaryrefslogtreecommitdiffabout
path: root/korganizer/koagenda.cpp
Side-by-side diff
Diffstat (limited to 'korganizer/koagenda.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koagenda.cpp35
1 files changed, 26 insertions, 9 deletions
diff --git a/korganizer/koagenda.cpp b/korganizer/koagenda.cpp
index c339b57..662576f 100644
--- a/korganizer/koagenda.cpp
+++ b/korganizer/koagenda.cpp
@@ -57,13 +57,13 @@
//extern bool globalFlagBlockPainting;
extern int globalFlagBlockAgenda;
extern int globalFlagBlockAgendaItemPaint;
extern int globalFlagBlockAgendaItemUpdate;
extern int globalFlagBlockStartup;
-bool KOAgenda::mInvalidPixmap = false;
+
////////////////////////////////////////////////////////////////////////////
MarcusBains::MarcusBains(KOAgenda *_agenda,const char *name)
: QFrame(_agenda->viewport(),name), agenda(_agenda)
{
setLineWidth(0);
setMargin(0);
@@ -327,12 +327,13 @@ void KOAgenda::shrinkPixmap()
{
mPaintPixmap.resize( 20,20);
mInvalidPixmap = true;
}
void KOAgenda::slotContentMove(int,int)
{
+ emit sendPing();
if ( mActionType == NOP )
slotClearSelection();
if ( mSelectedItem && !mActionItem ) {
deselectItem();
emit incidenceSelected( 0 );
}
@@ -435,12 +436,21 @@ void KOAgenda::categoryChanged(Incidence * inc)
item->updateItem();
}
}
}
bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me)
{
+
+ if ( mInvalidPixmap ) {
+ mInvalidPixmap = false;
+ qDebug("InvalidPixmap ");
+ computeSizes();
+ emit updateViewSignal();
+ return true;
+ }
+ emit sendPing();
static int startX = 0;
static int startY = 0;
int blockmoveDist = ( QApplication::desktop()->width() < 480 ? 7 : 9 );
static bool blockMoving = true;
//qDebug("KOAgenda::eventFilter_mous ");
@@ -1264,22 +1274,26 @@ void KOAgenda::drawContents(QPainter* p, int cx, int cy, int cw, int ch)
if ( globalFlagBlockAgenda )
return;
if ( mInvalidPixmap ) {
mInvalidPixmap = false;
qDebug("InvalidPixmap ");
- QTimer::singleShot( 0, this, SIGNAL( updateViewSignal() ));
+ computeSizes();
+ emit updateViewSignal();
return;
}
if ( ! mAllDayMode ) {
// currently not working for
//qDebug("KOAgenda::drawContents ");
- if ( mCurPixWid != contentsWidth() || mCurPixHei != contentsHeight() )
- ;//drawContentsToPainter();
-
+#if 0
+ if ( mCurPixWid != contentsWidth() || mCurPixHei != contentsHeight() ) {
+ qDebug("WAU ");
+ drawContentsToPainter();
+ }
+#endif
QPaintDevice* pd = p->device();
p->end();
int vx, vy;
int selectionX = KOGlobals::self()->reverseLayout() ?
(mColumns - 1 - mSelectionCellX) * mGridSpacingX :
mSelectionCellX * mGridSpacingX;
@@ -1317,16 +1331,19 @@ void KOAgenda::drawContents(QPainter* p, int cx, int cy, int cw, int ch)
offset += 5;
}
}
}
p->begin( pd );
} else {
-
- if ( mCurPixWid != contentsWidth() || mCurPixHei != contentsHeight() )
- ;//drawContentsToPainter();
-
+#if 0
+ qDebug("mCurPixWid %d %d ",mCurPixWid, contentsWidth() );
+ if ( mCurPixWid != contentsWidth() || mCurPixHei != contentsHeight() ) {
+ qDebug("WAUWAU ");
+ drawContentsToPainter();
+ }
+#endif
QPaintDevice* pd = p->device();
p->end();
int vx, vy;
int selectionX = KOGlobals::self()->reverseLayout() ?
(mColumns - 1 - mSelectionCellX) * mGridSpacingX :
mSelectionCellX * mGridSpacingX;