summaryrefslogtreecommitdiffabout
path: root/korganizer
Side-by-side diff
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koagendaitem.cpp2
-rw-r--r--korganizer/korganizer.pro2
2 files changed, 2 insertions, 2 deletions
diff --git a/korganizer/koagendaitem.cpp b/korganizer/koagendaitem.cpp
index df7d612..6a312b3 100644
--- a/korganizer/koagendaitem.cpp
+++ b/korganizer/koagendaitem.cpp
@@ -272,97 +272,97 @@ void KOAgendaItem::select(bool selected)
}
}
globalFlagBlockAgendaItemUpdate = 0;
paintMe( selected );
globalFlagBlockAgendaItemUpdate = 1;
repaint( false );
}
/*
The eventFilter has to filter the mouse events of the agenda item childs. The
events are fed into the event handling method of KOAgendaItem. This allows the
KOAgenda to handle the KOAgendaItems by using an eventFilter.
*/
bool KOAgendaItem::eventFilter ( QObject *object, QEvent *e )
{
if (e->type() == QEvent::MouseButtonPress ||
e->type() == QEvent::MouseButtonDblClick ||
e->type() == QEvent::MouseButtonRelease ||
e->type() == QEvent::MouseMove) {
QMouseEvent *me = (QMouseEvent *)e;
QPoint itemPos = this->mapFromGlobal(((QWidget *)object)->
mapToGlobal(me->pos()));
QMouseEvent returnEvent (e->type(),itemPos,me->button(),me->state());
return event(&returnEvent);
} else {
return false;
}
}
void KOAgendaItem::repaintMe( )
{
paintMe ( mSelected );
}
void KOAgendaItem::paintMe( bool selected, QPainter* paint )
{
if ( globalFlagBlockAgendaItemUpdate && ! selected)
return;
QPainter pa;
if ( mSelected ) {
pa.begin( paintPixSel() );
} else {
if ( mAllDay )
pa.begin( paintPixAllday() );
else
pa.begin( paintPix() );
}
int x, yy, w, h;
- float nfh;
+ float nfh = 7.0;
x = pos().x(); w = width(); h = height ();
if ( mAllDay )
yy = y();
else
yy = mCellYTop * ( height() / cellHeight() );
xPaintCoord= x;
yPaintCoord = yy;
wPaintCoord = width();
hPaintCoord = height();
//qDebug("paintMe %s %d %d %d %d",incidence()->summary().latin1(), x, yy, width(), height());
if ( paint == 0 )
paint = &pa;
bool horLayout = ( w < h );
int maxhei = mFontPixelSize+4;
if ( horLayout )
maxhei += AGENDA_ICON_SIZE -4;
bool small = ( h < maxhei );
if ( ! small )
paint->setFont(KOPrefs::instance()->mAgendaViewFont);
else {
QFont f = KOPrefs::instance()->mAgendaViewFont;
f.setBold( false );
int fh = f.pointSize();
nfh = (((float)height())/(float)(mFontPixelSize+4))*fh;
if ( nfh < 6 )
nfh = 6;
f.setPointSize( nfh );
paint->setFont(f);
}
paint->fillRect ( x, yy, w, h, mBackgroundColor );
static const QPixmap completedPxmp = SmallIcon("greenhook16");
static const QPixmap overduePxmp = SmallIcon("redcross16");
if ( mIncidence->type() == "Todo" ) {
Todo* tempTodo = static_cast<Todo*>(mIncidence);
int xx = pos().x()+(width()-completedPxmp.width()-3 );
int yyy = yy+3;
if ( tempTodo->isCompleted() )
paint->drawPixmap ( xx, yyy, completedPxmp );
else {
paint->drawPixmap ( xx, yyy, overduePxmp );
}
}
bool addIcon = false;
if ( ! small || w > 3 * h || h > 3* w )
addIcon = updateIcons( paint, horLayout );
qDrawShadePanel (paint, x, yy, w, h, mColorGroup, selected , 2, 0);
diff --git a/korganizer/korganizer.pro b/korganizer/korganizer.pro
index 3c7a1fb..5e82721 100644
--- a/korganizer/korganizer.pro
+++ b/korganizer/korganizer.pro
@@ -1,50 +1,50 @@
TEMPLATE = app
-CONFIG += qt warn_off
+CONFIG += qt warn_on
TARGET = kopi
OBJECTS_DIR = _obj/
MOC_DIR = _moc
DESTDIR= ../bin
include( ../variables.pri )
INCLUDEPATH += ../microkde ../ interfaces ../microkde/kdecore ../microkde/kdeui ../microkde/kio/kfile ../microkde/kio/kio ../libkdepim
#../qtcompat
DEFINES += KORG_NOPLUGINS KORG_NOARCHIVE KORG_NOMAIL
DEFINES += KORG_NODCOP KORG_NOKALARMD KORG_NORESOURCEVIEW KORG_NOSPLITTER
#KORG_NOPRINTER KORG_NOKABC KORG_NODND
DEFINES += KORG_NOLVALTERNATION
DEFINES += DESKTOP_VERSION
unix : {
LIBS += ../bin/libmicrokdepim.so
LIBS += ../bin/libmicrokcal.so
LIBS += ../bin/libmicrokde.so
LIBS += ../bin/libmicrokabc.so
#LIBS += -lbluetooth
#LIBS += -lsdp
#LIBS += -lldap
OBJECTS_DIR = obj/unix
MOC_DIR = moc/unix
}
win32: {
RC_FILE = winicons.rc
DEFINES += _WIN32_
LIBS += ../bin/microkdepim.lib
LIBS += ../bin/microkcal.lib
LIBS += ../bin/microkde.lib
LIBS += ../bin/microkabc.lib
LIBS += ../libical/lib/ical.lib
LIBS += ../libical/lib/icalss.lib
#LIBS += atls.lib
QMAKE_LINK += /NODEFAULTLIB:LIBC
#QMAKE_LINK += /NODEFAULTLIB:MSVCRT
#QMAKE_LINK += /NODEFAULTLIB:uafxcw.lib
OBJECTS_DIR = obj/win
MOC_DIR = moc/win
#olimport section
#blabla: {
LIBS += mfc71u.lib
DEFINES += _OL_IMPORT_
HEADERS += ../outport/msoutl9.h \
koimportoldialog.h