summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/firstuse.cpp6
-rw-r--r--pics/launcher/firstuse.jpgbin0 -> 12739 bytes
2 files changed, 2 insertions, 4 deletions
diff --git a/core/launcher/firstuse.cpp b/core/launcher/firstuse.cpp
index e9e2d83..acddeea 100644
--- a/core/launcher/firstuse.cpp
+++ b/core/launcher/firstuse.cpp
@@ -405,100 +405,98 @@ void FirstUse::reloadLanguages()
transLib = new QTranslator(qApp);
tfn = QPEApplication::qpeDir() + "i18n/"+l+"/libqpe.qm";
owarn << "loading " + tfn << oendl;
if ( transLib->load(tfn) ) {
owarn << "installing translator library" << oendl;
qApp->installTranslator( transLib );
} else {
delete transLib;
transLib = 0;
}
loadPixmaps();
//###language/font hack; should look it up somewhere
#ifdef Q_WS_QWS
if ( l == "ja" || l == "zh_CN" || l == "zh_TW" || l == "ko" ) {
QFont fn = FontManager::unicodeFont( FontManager::Proportional );
qApp->setFont( fn, TRUE );
} else {
qApp->setFont( defaultFont, TRUE );
}
#endif
#endif
}
void FirstUse::paintEvent( QPaintEvent * )
{
QPainter p( this );
p.drawPixmap(0,0, splash);
QFont f = p.font();
f.setPointSize(15);
f.setItalic(FALSE);
f.setBold(FALSE);
p.setFont(f);
if ( currApp < 0 ) {
drawText(p, tr( "Tap anywhere on the screen to continue." ));
} else if ( settingsTable[currApp].app ) {
if ( waitingForLaunch )
drawText(p, tr("Please wait, loading %1 settings.").arg(tr(settingsTable[currApp].desc)) );
} else {
drawText(p, tr("Please wait..."));
}
}
void FirstUse::loadPixmaps()
{
- /* create background, tr so can change image with language.
- images will likely contain text. */
- splash.convertFromImage( Resource::loadImage(tr("FirstUseBackground"))
- .smoothScale( width(), height() ) );
+ splash.convertFromImage( Resource::loadImage("launcher/firstuse")
+ .smoothScale( width(), height() ) );
setBackgroundPixmap(splash);
}
void FirstUse::drawText(QPainter &p, const QString &text)
{
QString altered = "<CENTER>" + text + "</CENTER>";
QSimpleRichText rt(altered, p.font());
rt.setWidth(width() - 20);
int h = (height() * 3) / 10; // start at 30%
if (rt.height() < height() / 2)
h += ((height() / 2) - rt.height()) / 2;
rt.draw(&p, 10, h, QRegion(0,0, width()-20, height()), palette());
}
void FirstUse::updateButtons()
{
if ( currApp >= 0 ) {
taskBar->show();
}
int i = currApp-1;
while ( i >= 0 && !settingsTable[i].enabled )
i--;
back->setText(tr("<< Back"));
back->setEnabled( i >= 0 && !waitingForLaunch );
i = currApp+1;
while ( settingsTable[i].app && !settingsTable[i].enabled )
i++;
if ( !settingsTable[i].app )
next->setText(tr("Finish"));
else
next->setText(tr("Next >>"));
next->setEnabled( !waitingForLaunch );
}
void FirstUse::keyPressEvent( QKeyEvent *e )
{
// Allow cancelling at first dialog, in case display is broken.
if ( e->key() == Key_Escape && currApp < 0 )
QDialog::keyPressEvent(e);
}
void FirstUse::mouseReleaseEvent( QMouseEvent * )
diff --git a/pics/launcher/firstuse.jpg b/pics/launcher/firstuse.jpg
new file mode 100644
index 0000000..92fb044
--- a/dev/null
+++ b/pics/launcher/firstuse.jpg
Binary files differ