7 #if defined(HAVE_CONFIG_H)
21 #include <QApplication>
25 QSplashScreen(pixmap, f)
27 setAutoFillBackground(
true);
31 int paddingCopyrightTop = 18;
34 QString versionText = QString(
"VERSION %1").arg(QString::fromStdString(
FormatFullVersion()));
35 QString copyrightText1 = QChar(0xA9)+QString(
" 2013-%1 ").arg(
COPYRIGHT_YEAR) + QString(tr(
"ANONCOIN CORE DEVELOPERS"));
41 newPixmap = QPixmap(
":/images/splash_testnet");
44 newPixmap = QPixmap(
":/images/splash");
48 initfont.setFamily(
"Courier New,Courier,Monaco,Andale Mono,Arial");
49 initfont.setPixelSize(12);
51 QPainter pixPaint(&newPixmap);
52 pixPaint.setPen(QColor(250,250,250));
53 pixPaint.setFont(initfont);
55 QFontMetrics fm = pixPaint.fontMetrics();
58 pixPaint.drawText(newPixmap.width()/2-fm.width(versionText)/2,paddingTop,versionText);
61 pixPaint.setFont(initfont);
62 pixPaint.drawText(newPixmap.width()/2-fm.width(copyrightText1)/2,paddingTop+paddingCopyrightTop,copyrightText1);
76 this->setPixmap(newPixmap);
91 static void InitMessage(
SplashScreen *splash,
const std::string &message)
94 initfont.setFamily(
"Courier New,Courier,Monaco,Andale Mono,Arial");
95 initfont.setPixelSize(12);
96 initfont.setCapitalization(initfont.AllUppercase);
97 splash->setFont(initfont);
99 std::string message_cr;
100 message_cr = message +
"\n";
102 QMetaObject::invokeMethod(splash,
"showMessage",
103 Qt::QueuedConnection,
104 Q_ARG(QString, QString::fromStdString(message_cr)),
105 Q_ARG(
int, Qt::AlignBottom|Qt::AlignHCenter),
106 Q_ARG(QColor, QColor(0,0,0)));
109 static void ShowProgress(
SplashScreen *splash,
const std::string &title,
int nProgress)
111 InitMessage(splash, title +
strprintf(
"%d", nProgress) +
"%");
117 wallet->
ShowProgress.connect(boost::bind(ShowProgress, splash, _1, _2));
CClientUIInterface uiInterface
void unsubscribeFromCoreSignals()
Disconnect core signals to splash screen.
class for the splashscreen with information of the running client
void subscribeToCoreSignals()
Connect core signals to splash screen.
SplashScreen(const QPixmap &pixmap, Qt::WindowFlags f, bool isTestNet)
boost::signals2::signal< void(CWallet *wallet)> LoadWallet
A wallet has been loaded.
#define COPYRIGHT_YEAR
Copyright year (2013-this) Todo: update this when changing our copyright comments in the source...
std::string FormatFullVersion()
void slotFinish(QWidget *mainWin)
Slot to call finish() method as it's not defined as slot.
A CWallet is an extension of a keystore, which also maintains a set of transactions and balances...
boost::signals2::signal< void(const std::string &title, int nProgress)> ShowProgress
Show progress e.g.
boost::signals2::signal< void(const std::string &message)> InitMessage
Progress message during initialization.