Changeset 54a377c in confclerk_git for src/mvc/delegate.cpp


Ignore:
Timestamp:
04/02/13 23:28:06 (9 years ago)
Author:
Philipp Spitzer <philipp@…>
Branches:
master, qt5
Children:
b261e79
Parents:
cdf0332
Message:

Prepared to show an alarm message via tray icon on non-MAEMO systems.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mvc/delegate.cpp

    rcdf0332 r54a377c  
    110110        else
    111111            mControls[FavouriteControlOff]->paint(painter, option.rect);
    112 #ifdef MAEMO
     112
    113113        if(event->hasAlarm())
    114114            mControls[AlarmControlOn]->paint(painter, option.rect);
    115115        else
    116116            mControls[AlarmControlOff]->paint(painter, option.rect);
    117 #endif
     117
    118118        if(event->hasTimeConflict())
    119119            mControls[WarningControl]->paint(painter, option.rect);
     
    164164    {
    165165        int numFav = numberOfFavourities(index);
    166 #ifdef MAEMO
    167166        int numAlarm = numberOfAlarms(index);
    168 #endif
    169167
    170168        QStyleOptionButton styleOptionButton;
     
    200198        painter->drawText(drawPoint+QPoint(image->width()+2, image->height() - 2),
    201199                QString::number(numFav));
    202 #ifdef MAEMO
     200
    203201        drawPoint.setX(drawPoint.x() - spacer - image->width());
    204202        image = mControls[numAlarm ? AlarmControlOn : AlarmControlOff]->image();
     
    206204        painter->drawText(drawPoint+QPoint(image->width()+2, image->height() - 2),
    207205                QString::number(numAlarm));
    208 #endif
     206
    209207        // draw texts
    210208        QString numEvents = QString::number(index.model()->rowCount(index)).append("/");
     
    314312    mControls.insert(FavouriteControlOff, new Control(FavouriteControlOff, QString(":icons/favourite-off.png"), NULL));
    315313
    316 #ifdef MAEMO
    317314    // ALARM ICONs
    318315    // on
     
    325322    mControls.insert(WarningControl,
    326323                    new Control(WarningControl, QString(":icons/dialog-warning.png"), mControls[AlarmControlOff]));
    327 #else
    328     // WARNING ICON
    329     mControls.insert(WarningControl,
    330                     new Control(WarningControl, QString(":icons/dialog-warning.png"), mControls[FavouriteControlOn]));
    331 #endif
    332 
    333 }
     324        }
    334325
    335326bool Delegate::isPointFromRect(const QPoint &aPoint, const QRect &aRect) const
Note: See TracChangeset for help on using the changeset viewer.