Ignore:
Timestamp:
01/18/10 16:13:01 (12 years ago)
Author:
pavelpa <pavelpa@…>
Branches:
master, qt5
Children:
f6300c7
Parents:
d23aa6a
Message:

added 'alarm' columnt to the 'EVENT' table to signalize
that the event has/hasn't alarm set

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mvc/delegate.cpp

    rd23aa6a rb6cd05c  
    8484
    8585        // draw Controls
     86        // favourite
    8687        if(static_cast<Event*>(index.internalPointer())->isFavourite())
    8788            painter->drawImage(mControls[FavouriteControlOn]->drawPoint(option.rect),*mControls[FavouriteControlOn]->image());
    8889        else
    8990            painter->drawImage(mControls[FavouriteControlOff]->drawPoint(option.rect),*mControls[FavouriteControlOff]->image());
    90         painter->drawImage(mControls[AlarmControlOn]->drawPoint(option.rect),*mControls[AlarmControlOn]->image());
     91        // alarm
     92        if(static_cast<Event*>(index.internalPointer())->hasAlarm())
     93            painter->drawImage(mControls[AlarmControlOn]->drawPoint(option.rect),*mControls[AlarmControlOn]->image());
     94        else
     95            painter->drawImage(mControls[AlarmControlOff]->drawPoint(option.rect),*mControls[AlarmControlOff]->image());
     96        // map
    9197        painter->drawImage(mControls[MapControl]->drawPoint(option.rect),*mControls[MapControl]->image());
    9298    }
     
    225231    // ALARM ICONs
    226232    // on
    227     control = new Control(AlarmControlOn,QString(":icons/alarm-off.png"));
     233    control = new Control(AlarmControlOn,QString(":icons/alarm-on.png"));
    228234    p = mControls[FavouriteControlOn]->drawPoint();
    229235    p.setX(p.x()-control->image()->width()-SPACER);
Note: See TracChangeset for help on using the changeset viewer.