src/hbcore/image/hbicon.h
branchGCC_SURGE
changeset 15 f378acbc9cfb
parent 7 923ff622b8b9
child 34 ed14f46c0e55
equal deleted inserted replaced
9:730c025d4b77 15:f378acbc9cfb
    29 #include <hbglobal.h>
    29 #include <hbglobal.h>
    30 
    30 
    31 #include <QIcon> //krazy:exclude=qclasses
    31 #include <QIcon> //krazy:exclude=qclasses
    32 #include <QMetaType>
    32 #include <QMetaType>
    33 #include <QString>
    33 #include <QString>
       
    34 #include <QSizeF>
    34 #include <QExplicitlySharedDataPointer>
    35 #include <QExplicitlySharedDataPointer>
    35 
    36 
    36 class HbIconPrivate;
    37 class HbIconPrivate;
    37 class HbIconAnimator;
    38 class HbIconAnimator;
    38 
    39 
    98 
    99 
    99     Flags flags() const;
   100     Flags flags() const;
   100     void setFlags(Flags flags);
   101     void setFlags(Flags flags);
   101 
   102 
   102     void paint(QPainter *painter,
   103     void paint(QPainter *painter,
   103                 const QRectF &rect,
   104                const QRectF &rect,
   104                 Qt::AspectRatioMode aspectRatioMode = Qt::KeepAspectRatio,
   105                Qt::AspectRatioMode aspectRatioMode = Qt::KeepAspectRatio,
   105                 Qt::Alignment alignment = Qt::AlignCenter,
   106                Qt::Alignment alignment = Qt::AlignCenter,
   106                 QIcon::Mode mode = QIcon::Normal,
   107                QIcon::Mode mode = QIcon::Normal,
   107                 QIcon::State state = QIcon::Off) const;
   108                QIcon::State state = QIcon::Off) const;
   108 
   109 
   109     operator QVariant() const;
   110     operator QVariant() const;
   110 
   111 
   111     QIcon &qicon() const;
   112     QIcon &qicon() const;
   112 
   113 
   113     bool addBadge(Qt::Alignment alignment,
   114     bool addBadge(Qt::Alignment alignment,
   114                       const HbIcon& badge,
   115                   const HbIcon &badge,
   115                       int z=0);
   116                   int z = 0,
   116     bool removeBadge(const HbIcon& badge);
   117                   Qt::AspectRatioMode aspectRatio = Qt::KeepAspectRatio);
       
   118     bool addProportionalBadge(Qt::Alignment alignment,
       
   119                               const HbIcon &badge,
       
   120                               const QSizeF &sizeFactor = QSizeF(0.25, 0.25),
       
   121                               int z = 0,
       
   122                               Qt::AspectRatioMode aspectRatio = Qt::KeepAspectRatio);
       
   123     bool removeBadge(const HbIcon &badge);
   117     void removeAllBadges();
   124     void removeAllBadges();
   118 
   125 
   119 private:
   126 private:
   120     QExplicitlySharedDataPointer<HbIconPrivate> d;
   127     QExplicitlySharedDataPointer<HbIconPrivate> d;
   121 
   128