+QPixmap composite(const QString& theAdditionalIcon, const QString& theIcon)
+{
+ QImage anIcon(theIcon);
+ QImage anAditional(theAdditionalIcon);
+
+ if (anIcon.isNull())
+ return QPixmap();
+
+ int anAddWidth = anAditional.width();
+ int anAddHeight = anAditional.height();
+
+ int aWidth = anIcon.width();
+ int aHeight = anIcon.height();
+
+ int aStartWidthPos = aWidth - anAddWidth - 1;
+ int aStartHeightPos = aHeight - anAddHeight - 1;
+
+ for (int i = 0; i < anAddWidth && i + aStartWidthPos < aWidth; i++)
+ {
+ for (int j = 0; j < anAddHeight && j + aStartHeightPos < aHeight; j++)
+ {
+ if (qAlpha(anAditional.pixel(i, j)) > 0)
+ anIcon.setPixel(i + aStartWidthPos, j + aStartHeightPos, anAditional.pixel(i, j));
+ }
+ }
+ return QPixmap::fromImage(anIcon);
+}
+
+QPixmap lighter(const QString& theIcon, const int theLighterValue)
+{
+ QImage anIcon(theIcon);
+ if (anIcon.isNull())
+ return QPixmap();
+
+ QImage aResult(theIcon);
+ for ( int i = 0; i < anIcon.width(); i++ )
+ {
+ for ( int j = 0; j < anIcon.height(); j++ )
+ {
+ QRgb anRgb = anIcon.pixel( i, j );
+ QColor aPixelColor(qRed(anRgb), qGreen(anRgb), qBlue(anRgb),
+ qAlpha( aResult.pixel( i, j ) ));