Ignore:
Timestamp:
01/20/10 16:16:10 (12 years ago)
Author:
fortefr <fortefr@…>
Branches:
master, qt5
Children:
d4a8bbf
Parents:
990afd5
Message:

Warning icon (uncompleted)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mvc/delegate.cpp

    r990afd5 rf2ef735  
    124124        // map
    125125        painter->drawImage(mControls[MapControl]->drawPoint(option.rect),*mControls[MapControl]->image());
     126        // Time conflict
     127        if(static_cast<Event*>(index.internalPointer())->hasTimeConflict())
     128            painter->drawImage(mControls[WarningControlOn]->drawPoint(option.rect),*mControls[WarningControlOn]->image());
     129        else
     130            painter->drawImage(mControls[WarningControlOff]->drawPoint(option.rect),*mControls[WarningControlOff]->image());
    126131
    127132        // draw texts
     
    338343    control->setDrawPoint(p);
    339344    mControls.insert(MapControl,control);
     345
     346    // WARNING ICONs
     347    // on
     348    control = new Control(WarningControlOn,QString(":icons/exclamation-iconOn.png"));
     349    p = mControls[MapControl]->drawPoint();
     350    p.setX(p.x()-control->image()->width()-SPACER);
     351    control->setDrawPoint(p);
     352    mControls.insert(WarningControlOn,control);
     353    // off
     354    control = new Control(WarningControlOff,QString(":icons/exclamation-iconOff.png"));
     355    p = mControls[MapControl]->drawPoint();
     356    p.setX(p.x()-control->image()->width()-SPACER);
     357    control->setDrawPoint(p);
     358    mControls.insert(WarningControlOff,control);
    340359}
    341360
Note: See TracChangeset for help on using the changeset viewer.