mirror of https://github.com/GOSTSec/gostcoin
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
56 lines
2.0 KiB
56 lines
2.0 KiB
8 years ago
|
#include "splashscreen.h"
|
||
|
#include "clientversion.h"
|
||
|
#include "util.h"
|
||
|
|
||
|
#include <QPainter>
|
||
|
#undef loop /* ugh, remove this when the #define loop is gone from util.h */
|
||
|
#include <QApplication>
|
||
|
|
||
|
SplashScreen::SplashScreen(const QPixmap &pixmap, Qt::WindowFlags f) :
|
||
|
QSplashScreen(pixmap, f)
|
||
|
{
|
||
|
// set reference point, paddings
|
||
|
int paddingLeftCol2 = 230;
|
||
|
int paddingTopCol2 = 376;
|
||
|
int line1 = 0;
|
||
|
int line2 = 13;
|
||
|
int line3 = 26;
|
||
|
int line4 = 39;
|
||
|
|
||
|
float fontFactor = 1.0;
|
||
|
|
||
|
// define text to place
|
||
|
QString titleText = QString(QApplication::applicationName()).replace(QString("-testnet"), QString(""), Qt::CaseSensitive); // cut of testnet, place it as single object further down
|
||
|
QString versionText = QString("Version %1 ").arg(QString::fromStdString(FormatFullVersion()));
|
||
|
QString copyrightText1 = QChar(0xA9)+QString(" 2009-%1 ").arg(COPYRIGHT_YEAR) + QString(tr("The Bitcoin developers"));
|
||
|
QString copyrightText2 = QChar(0xA9)+QString(" 2011-%1 ").arg(COPYRIGHT_YEAR) + QString(tr("The Litecoin developers"));
|
||
|
QString copyrightText3 = QChar(0xA9)+QString(" %1 ").arg(COPYRIGHT_YEAR) + QString(tr("The Anoncoin developers"));
|
||
|
|
||
|
QString font = "Arial";
|
||
|
|
||
|
// load the bitmap for writing some text over it
|
||
|
QPixmap newPixmap;
|
||
|
if(GetBoolArg("-testnet")) {
|
||
|
newPixmap = QPixmap(":/images/splash_testnet");
|
||
|
}
|
||
|
else {
|
||
|
newPixmap = QPixmap(":/images/splash");
|
||
|
}
|
||
|
|
||
|
QPainter pixPaint(&newPixmap);
|
||
|
pixPaint.setPen(QColor(70,70,70));
|
||
|
|
||
|
pixPaint.setFont(QFont(font, 9*fontFactor));
|
||
|
pixPaint.drawText(paddingLeftCol2,paddingTopCol2+line4,versionText);
|
||
|
|
||
|
// draw copyright stuff
|
||
|
pixPaint.setFont(QFont(font, 9*fontFactor));
|
||
|
pixPaint.drawText(paddingLeftCol2,paddingTopCol2+line1,copyrightText1);
|
||
|
pixPaint.drawText(paddingLeftCol2,paddingTopCol2+line2,copyrightText2);
|
||
|
pixPaint.drawText(paddingLeftCol2,paddingTopCol2+line3,copyrightText3);
|
||
|
|
||
|
pixPaint.end();
|
||
|
|
||
|
this->setPixmap(newPixmap);
|
||
|
}
|