~ubuntu-branches/ubuntu/maverick/scribus-ng/maverick-backports

« back to all changes in this revision

Viewing changes to scribus/splash.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Oleksandr Moskalenko
  • Date: 2007-08-11 17:41:51 UTC
  • mfrom: (0.1.1 upstream) (4.1.2 feisty)
  • Revision ID: james.westby@ubuntu.com-20070811174151-tmkgjvjuc0mtk8ul
Tags: 1.3.4.dfsg+svn20071115-1
* Upstream svn update (Closes: #447480, #448949).
* debian/NEWS: Added a note for users wanting stable Scribus to switch to
  the "scribus" package (Closes: #427638).
* debian/watch: Updated the watch regex to properly track sourceforge
  releases for this branch (Closes: #449700).

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
{
20
20
        pix = loadIcon("Splash.png");
21
21
        Q_ASSERT(!pix.isNull());
22
 
        if (pix.isNull())
23
 
{
24
 
        pix = QPixmap(360, 200);
25
 
        pix.fill(Qt::darkGray);
26
 
}
 
22
        if (pix.isNull()) {
 
23
                pix = QPixmap(360, 200);
 
24
                pix.fill(Qt::darkGray);
 
25
        }
27
26
        setErasePixmap( pix );
28
27
        resize( pix.size() );
29
28
        QRect scr = QApplication::desktop()->screenGeometry();
45
44
 
46
45
void SplashScreen::setStatus( const QString &message )
47
46
{
48
 
        QString tmp = message;
 
47
        static QRegExp rx("&\\S*");     
 
48
        QString tmp(message);
49
49
        int f = 0;
50
50
        while (f != -1)
51
51
        {
52
 
                f = tmp.find(QRegExp( "&\\S*" ));
 
52
                f = tmp.find(rx);
53
53
                if (f != -1)
54
54
                {
55
55
                        tmp.remove(f, 1);
56
56
                        f = 0;
57
57
                }
58
58
        }
59
 
        QPixmap textPix = pix;
 
59
        QPixmap textPix(pix);
60
60
        QPainter painter( &textPix, this );
61
 
        painter.setFont(QFont("Helvetica", 10));
62
 
        painter.setPen( white );
 
61
#if defined _WIN32
 
62
        QFont font("Lucida Sans Unicode", 9);
 
63
#elif defined(__INNOTEK_LIBC__)
 
64
        QFont font("WarpSans", 8);
 
65
#else
 
66
        QFont font("Bitstream Vera Sans", 8);
 
67
#endif
 
68
        painter.setFont(font);
 
69
//      painter.setPen(QColor(236,233,216));
63
70
        //painter.setRasterOp(NotROP);
64
 
        painter.drawText( 10, textPix.height()-8, tmp );
 
71
        painter.setPen(Qt::white);
 
72
        painter.drawText( 315, textPix.height()-8, tmp );
65
73
        painter.end();
66
74
        setErasePixmap( textPix );
67
75
        repaint();