Changeset a5c1179


Ignore:
Timestamp:
01/20/10 16:43:16 (12 years ago)
Author:
pavelpa <pavelpa@…>
Branches:
master, qt5
Children:
95596f6
Parents:
d4a8bbf
Message:

alarm icon/stuff is relevant for MAEMO only

  • used "MAEMO" define for conditional compilation
Location:
src/mvc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/mvc/delegate.cpp

    rd4a8bbf ra5c1179  
    117117        else
    118118            painter->drawImage(mControls[FavouriteControlOff]->drawPoint(option.rect),*mControls[FavouriteControlOff]->image());
     119#ifdef MAEMO
    119120        // alarm
    120121        if(static_cast<Event*>(index.internalPointer())->hasAlarm())
     
    122123        else
    123124            painter->drawImage(mControls[AlarmControlOff]->drawPoint(option.rect),*mControls[AlarmControlOff]->image());
     125#endif
    124126        // map
    125127        painter->drawImage(mControls[MapControl]->drawPoint(option.rect),*mControls[MapControl]->image());
     
    223225        painter->drawText(drawPoint+QPoint(mControls[FavouriteControlOn]->image()->width()+2, option.rect.height()/2),
    224226                QString::number(numberOfFavourities(index)));
     227#ifdef MAEMO
    225228        drawPoint.setX(drawPoint.x() - spacer - mControls[FavouriteControlOn]->image()->width());
    226229        painter->drawImage(drawPoint,*mControls[AlarmControlOn]->image());
    227230        painter->drawText(drawPoint+QPoint(mControls[FavouriteControlOn]->image()->width()+2, option.rect.height()/2),
    228231                QString::number(numberOfAlarms(index)));
     232#endif
    229233        // draw texts
    230234        QString numEvents = QString::number(index.model()->rowCount(index)).append("/");
     
    323327    mControls.insert(FavouriteControlOff,control);
    324328
     329#ifdef MAEMO
    325330    // ALARM ICONs
    326331    // on
     
    343348    control->setDrawPoint(p);
    344349    mControls.insert(MapControl,control);
     350#else
     351    // MAP ICON
     352    control = new Control(MapControl,QString(":icons/compassBig.png"));
     353    p = mControls[FavouriteControlOn]->drawPoint();
     354    p.setX(p.x()-control->image()->width()-SPACER);
     355    control->setDrawPoint(p);
     356    mControls.insert(MapControl,control);
     357#endif
    345358
    346359    // WARNING ICONs
  • src/mvc/treeview.cpp

    rd4a8bbf ra5c1179  
    106106            }
    107107        break;
     108        case Delegate::WarningControlOn:
     109        case Delegate::WarningControlOff:
     110        {
     111            // TODO: implement
     112            handled = true;
     113        }
     114        break;
    108115        case Delegate::ControlNone:
    109116        default:
Note: See TracChangeset for help on using the changeset viewer.