TTKMusicPlayer  4.3.0.0
TTKMusicPlayer imitates Kugou UI, the music player uses of qmmp core library based on Qt for windows and linux
musicmessageaboutdialog.cpp
Go to the documentation of this file.
2 #include "ui_musicmessageaboutdialog.h"
4 #include "ttkversion.h"
5 
7  : MusicAbstractMoveDialog(parent),
8  m_ui(new Ui::MusicMessageAboutDialog)
9 {
10  m_ui->setupUi(this);
11  setFixedSize(size());
12  setBackgroundLabel(m_ui->background);
13 
14  m_ui->topTitleCloseButton->setIcon(QIcon(":/functions/btn_close_hover"));
15  m_ui->topTitleCloseButton->setStyleSheet(TTK::UI::ToolButtonStyle04);
16  m_ui->topTitleCloseButton->setCursor(QCursor(Qt::PointingHandCursor));
17  m_ui->topTitleCloseButton->setToolTip(tr("Close"));
18  connect(m_ui->topTitleCloseButton, SIGNAL(clicked()), SLOT(close()));
19 
20  m_ui->confirmButton->setStyleSheet(TTK::UI::PushButtonStyle04);
21  m_ui->confirmButton->setCursor(QCursor(Qt::PointingHandCursor));
22 #ifdef Q_OS_UNIX
23  m_ui->confirmButton->setFocusPolicy(Qt::NoFocus);
24 #endif
25 
26  connect(m_ui->confirmButton, SIGNAL(clicked()), SLOT(close()));
27 
29  connect(m_networkRequest, SIGNAL(downloadDataChanged(QString)), SLOT(downloadDataFinished(QString)));
31 
32  const QString &buildTime = QString("%1 %2").arg(__DATE__, __TIME__);
33  const QByteArray &md5 = TTK::Algorithm::md5(buildTime.toUtf8()).mid(12, 8);
34 
35  m_ui->iconLabel->setPixmap(QPixmap(":/image/lb_logo"));
36  m_ui->versionLabel->setText(QString("Version: %1\n").arg(TTK_VERSION_STR) +
37  QString("Hash: %1\n").arg(TTK::Algorithm::sha1(TTK_VERSION_STR).toHex().constData()) +
38  QString("Built on %1 (%2)\n").arg(buildTime, md5.constData()) +
39  QString("Based on Qt %1(%2)\n").arg(QT_VERSION_STR,
40 #ifdef Q_OS_WIN
41 # if __i386__
42  "MinGW 32bit"));
43 # else
44  "MinGW 64bit"));
45 # endif
46 #else
47  "GCC x86_64"));
48 #endif
49 }
50 
52 {
53  delete m_networkRequest;
54  delete m_ui;
55 }
56 
58 {
59  m_ui->counterLabel->setText(tr("Counter: %1").arg(bytes));
60 }
Ui::MusicMessageAboutDialog * m_ui
void downloadDataFinished(const QString &bytes)
voidpf void uLong size
Definition: ioapi.h:136
The class of the pv counter.
void setBackgroundLabel(QLabel *label) noexcept
TTK_MODULE_EXPORT QByteArray md5(const QByteArray &data, bool base64=false)
MusicMessageAboutDialog(QWidget *parent=nullptr)
static const QString PushButtonStyle04
TTK_MODULE_EXPORT QByteArray sha1(const QByteArray &data)
#define TTK_VERSION_STR
Definition: ttkversion.h:179
MusicPVCounterRequest * m_networkRequest
The class of the moving dialog base.
The class of the about application info dialog.
static const QString ToolButtonStyle04