src/hbcore/image/hbmaskableiconimpl_p.h
changeset 1 f7ac710697a9
parent 0 16d8024aca5e
child 5 627c4a0fd0e7
equal deleted inserted replaced
0:16d8024aca5e 1:f7ac710697a9
    46     {
    46     {
    47         return icon->pixmap();
    47         return icon->pixmap();
    48     }
    48     }
    49     
    49     
    50     void paint(QPainter* painter, const QRectF &childRect,
    50     void paint(QPainter* painter, const QRectF &childRect,
    51                         Qt::Alignment alignment)
    51                         Qt::Alignment alignment,
       
    52                         const QPainterPath &clipPath = QPainterPath())
    52     {
    53     {
    53         icon->paint(painter, childRect, alignment, this);
    54         icon->paint(painter, childRect, alignment, clipPath, this);
    54         maskApplied = false;
    55         maskApplied = false;
    55     }
    56     }
    56     
    57     
    57     HbIconImpl * iconImpl()
    58     HbIconImpl * iconImpl()
    58     {
    59     {
   157         icon->destroyMaskedData(data);
   158         icon->destroyMaskedData(data);
   158         icon->dispose();
   159         icon->dispose();
   159         delete this;
   160         delete this;
   160     }
   161     }
   161     
   162     
   162     void setImplData(IconMaskedData data)
   163     void setImplData(HbIconMaskedData *data)
   163     {
   164     {
   164         this->data = data;
   165         this->data = data;
   165     }
   166     }
   166     
   167     
   167     IconMaskedData implData()
   168     HbIconMaskedData * implData() const
   168     {
   169     {
   169         return data;
   170         return data;
   170     }
   171     }
   171     
   172     
   172 private:
   173 private:
   173     ~HbMaskableIconImpl()
   174     ~HbMaskableIconImpl()
   174     {
   175     {
   175     }
   176     }
   176 
   177 
   177     HbIconImpl *      icon;
   178     HbIconImpl        *icon;
   178     IconMaskedData    data;
   179     HbIconMaskedData  *data;
   179     QBitmap           maskBitmap;
   180     QBitmap            maskBitmap;
   180     bool              maskApplied;
   181     bool               maskApplied;
   181 };
   182 };
   182 
   183 
   183 #endif
   184 #endif
   184 
   185