Changeset 7947db3 for src


Ignore:
Timestamp:
04/22/12 03:24:53 (10 years ago)
Author:
gregor herrmann <gregoa@…>
Branches:
master, qt5
Children:
0dc6313
Parents:
2d11958
Message:

Show the AlarmOff? icon in the timegroup header when the group has no alarms set.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mvc/delegate.cpp

    r2d11958 r7947db3  
    164164    {
    165165        int numFav = numberOfFavourities(index);
     166#ifdef MAEMO
     167        int numAlarm = numberOfAlarms(index);
     168#endif
    166169
    167170        QStyleOptionButton styleOptionButton;
     
    199202#ifdef MAEMO
    200203        drawPoint.setX(drawPoint.x() - spacer - image->width());
    201         painter->drawImage(drawPoint,*mControls[AlarmControlOn]->image());
     204        image = mControls[numAlarm ? AlarmControlOn : AlarmControlOff]->image();
     205        painter->drawImage(drawPoint,*image);
    202206        painter->drawText(drawPoint+QPoint(image->width()+2, image->height() - 2),
    203                 QString::number(numberOfAlarms(index)));
     207                QString::number(numAlarm));
    204208#endif
    205209        // draw texts
Note: See TracChangeset for help on using the changeset viewer.