22 : QWidget(parent, Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint | Qt::SplashScreen), backgroundImage(image)
24 setAttribute(Qt::WA_TranslucentBackground);
40 QPainter painter(
this);
54 if (image.depth() != 32)
56 QImage img32 = image.convertToFormat(QImage::Format_RGB32);
60 int width = image.width();
61 int height = image.height();
64 for (
int y = 0; y < height; ++y)
67 QRgb *currLine = (QRgb *)image.scanLine(y);
70 QRgb *currVal = currLine;
71 for (
int x = 0; x < width; ++x, ++currVal)
73 int alpha = qAlpha(*currVal);
74 if ((posMask && alpha != 0) || (!posMask && alpha == 0))
87 retVal += QRegion(xstart, y, xcurr - xstart + 1, 1);
94 retVal += QRegion(xstart, y, xcurr - xstart + 1, 1);
103 QWidget::mouseReleaseEvent(mouseEvent);
QDiffusionImagingSplashScreen(const QImage &image, QWidget *parent=0)
virtual QSize sizeHint() const
QRegion createMaskRegion(const QImage &image, bool posMask=true)
virtual void paintEvent(QPaintEvent *paintEvent)
virtual void mouseReleaseEvent(QMouseEvent *mouseEvent)
virtual void resizeEvent(QResizeEvent *resizeEvent)
~QDiffusionImagingSplashScreen()