Changeset a6a9e0b for src/mvc


Ignore:
Timestamp:
05/05/10 15:59:24 (12 years ago)
Author:
kirilma <kirilma@…>
Branches:
master, qt5
Children:
900bcf1
Parents:
525448c
Message:

add enabled flag

Location:
src/mvc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/mvc/delegate.cpp

    r525448c ra6a9e0b  
    136136
    137137        // draw Controls
     138        foreach(Control* c, mControls.values()) {
     139            c->setEnabled(false);
     140        }
    138141        if(event->isFavourite())
    139142            mControls[FavouriteControlOn]->paint(painter, option.rect);
     
    342345    , mImage(new QImage(aImageName))
    343346    , mDrawPoint(QPoint(0,0))
     347    , mEnabled(false)
    344348{
    345349    QPoint p;
     
    356360{
    357361    painter->drawImage(drawPoint(rect),*image());
     362    setEnabled(true);
    358363}
    359364
  • src/mvc/delegate.h

    r525448c ra6a9e0b  
    5454                void paint(QPainter* painter, const QRect rect);
    5555
     56                bool enabled() const { return mEnabled; }
     57                void setEnabled(bool v) { mEnabled = v; }
    5658            private:
    5759                inline QPoint drawPoint(const QRect &aRect = QRect()) const // for painter to draw Control
     
    6668                QImage *mImage;
    6769                QPoint mDrawPoint; // relative 'start-drawing' position (may hold negative values)
     70                bool mEnabled;
    6871        };
    6972
Note: See TracChangeset for help on using the changeset viewer.