equal
deleted
inserted
replaced
807 return d->qicon; |
807 return d->qicon; |
808 } |
808 } |
809 |
809 |
810 /*! |
810 /*! |
811 * Equality operator. It compares the icon names for all the state and mode combinations. |
811 * Equality operator. It compares the icon names for all the state and mode combinations. |
812 * The sizes set for the icons are not used for the comparison. |
812 * It also compares the badges, the color and the mirroring mode of the icon. The sizes |
|
813 * set for the icons are not used for the comparison. |
813 */ |
814 */ |
814 bool HbIcon::operator==( const HbIcon &other ) const |
815 bool HbIcon::operator==( const HbIcon &other ) const |
815 { |
816 { |
816 return !( *this != other ); |
817 return !( *this != other ); |
817 } |
818 } |
818 |
819 |
819 /*! |
820 /*! |
820 * Inequality operator. It compares the icon names for all the state and mode combinations. |
821 * Inequality operator. It compares the icon names for all the state and mode combinations. |
821 * The sizes set for the icons are not used for the comparison. |
822 * It also compares the badges, the color and the mirroring mode of the icon. The sizes |
|
823 * set for the icons are not used for the comparison. |
822 */ |
824 */ |
823 bool HbIcon::operator!=( const HbIcon &other ) const |
825 bool HbIcon::operator!=( const HbIcon &other ) const |
824 { |
826 { |
825 // NULL icons are equal |
827 // NULL icons are equal |
826 if ( isNull() && other.isNull() ) { |
828 if ( isNull() && other.isNull() ) { |
857 // If they have different badges, they are unequal |
859 // If they have different badges, they are unequal |
858 if ( engine1->badges() != engine2->badges() ) { |
860 if ( engine1->badges() != engine2->badges() ) { |
859 return true; |
861 return true; |
860 } |
862 } |
861 |
863 |
862 if ( engine1->color() != engine2->color() ) |
864 if ( engine1->color() != engine2->color() ){ |
863 return true; |
865 return true; |
864 else |
866 } |
865 return false; |
867 |
|
868 // two icons are considered different if their mirroring modes are different |
|
869 if ( engine1->mirroringMode() != engine2->mirroringMode() ){ |
|
870 return true; |
|
871 } |
|
872 |
|
873 return false; |
866 } |
874 } |
867 |
875 |
868 /*! |
876 /*! |
869 * Adds a badge icon to the existing icon. The badge icons |
877 * Adds a badge icon to the existing icon. The badge icons |
870 * are drawn relative to the alignment you specify with the |
878 * are drawn relative to the alignment you specify with the |