src/hbcore/image/hbbadgeiconinfo.cpp
changeset 5 627c4a0fd0e7
parent 0 16d8024aca5e
child 7 923ff622b8b9
equal deleted inserted replaced
3:11d3954df52a 5:627c4a0fd0e7
    21 ** If you have questions regarding the use of this file, please contact
    21 ** If you have questions regarding the use of this file, please contact
    22 ** Nokia at developer.feedback@nokia.com.
    22 ** Nokia at developer.feedback@nokia.com.
    23 **
    23 **
    24 ****************************************************************************/
    24 ****************************************************************************/
    25 
    25 
       
    26 #include "hbbadgeiconinfo_p.h"
    26 #include "hbicon.h"
    27 #include "hbicon.h"
    27 #include "hbbadgeiconinfo_p.h"
       
    28 #include "hbbadgeicon_p.h"
    28 #include "hbbadgeicon_p.h"
    29 #include <QPainter>
    29 #include <QPainter>
    30 
       
    31 #include <QDebug>
    30 #include <QDebug>
    32 
    31 
    33 
    32 HbBadgeIconInfo::HbBadgeIconInfo(const HbIcon &badge,
    34 HbBadgeIconInfo::HbBadgeIconInfo(const HbIcon& badge,
       
    35                                  Qt::Alignment alignment,
    33                                  Qt::Alignment alignment,
    36                                  int zValue): mIcon(badge),mAlignment(alignment),mZValue(zValue)
    34                                  int zValue): mIcon(badge), mAlignment(alignment), mZValue(zValue)
    37 {
    35 {
    38 }
    36 }
    39 
    37 
    40 HbBadgeIconInfo::HbBadgeIconInfo(const HbBadgeIconInfo& other)
    38 HbBadgeIconInfo::HbBadgeIconInfo(const HbBadgeIconInfo &other)
    41 {
    39 {
    42     *this = other;
    40     *this = other;
    43 }
    41 }
    44 
    42 
    45 HbBadgeIconInfo::~HbBadgeIconInfo()
    43 HbBadgeIconInfo::~HbBadgeIconInfo()
    46 {
    44 {
    47 }
    45 }
    48 
    46 
    49 bool HbBadgeIconInfo::operator==(const HbBadgeIconInfo &other)
    47 bool HbBadgeIconInfo::operator==(const HbBadgeIconInfo &other) const
    50 {
    48 {
    51     return !(*this != other);
    49     return !(*this != other);
    52 }
    50 }
    53 
    51 
    54 bool HbBadgeIconInfo::operator!=(const HbBadgeIconInfo &other)
    52 bool HbBadgeIconInfo::operator!=(const HbBadgeIconInfo &other) const
    55 {
    53 {
    56     if ((icon() != other.icon()) ||
    54     if ((icon() != other.icon()) ||
    57         (zValue() != other.zValue()) ||
    55             (zValue() != other.zValue()) ||
    58         (alignment() != other.alignment())
    56             (alignment() != other.alignment())
    59        )
    57        ) {
    60     {
       
    61         return true;
    58         return true;
    62     }
    59     }
    63 
    60 
    64     return false;
    61     return false;
    65 }
    62 }
    67 HbIcon HbBadgeIconInfo::icon() const
    64 HbIcon HbBadgeIconInfo::icon() const
    68 {
    65 {
    69     return mIcon;
    66     return mIcon;
    70 }
    67 }
    71 
    68 
    72 void HbBadgeIconInfo::setIcon(const HbIcon& icon)
    69 void HbBadgeIconInfo::setIcon(const HbIcon &icon)
    73 {
    70 {
    74     mIcon = icon;
    71     mIcon = icon;
    75 }
    72 }
    76 
    73 
    77 int HbBadgeIconInfo::zValue() const
    74 int HbBadgeIconInfo::zValue() const
    91 
    88 
    92 void HbBadgeIconInfo::setAlignment(Qt::Alignment align)
    89 void HbBadgeIconInfo::setAlignment(Qt::Alignment align)
    93 {
    90 {
    94     mAlignment = align;
    91     mAlignment = align;
    95 }
    92 }
    96