TTKMusicPlayer  3.7.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(downloadFinished(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  "MinGW 32bit"));
42 #else
43  "GCC x86_64"));
44 #endif
45 }
46 
48 {
49  delete m_networkRequest;
50  delete m_ui;
51 }
52 
54 {
55  m_ui->counterLabel->setText(tr("Counter: %1").arg(bytes));
56 }
Ui::MusicMessageAboutDialog * m_ui
void setBackgroundLabel(QLabel *label)
TTK_MODULE_EXPORT QByteArray md5(const QByteArray &data)
voidpf void uLong size
Definition: ioapi.h:136
void downloadFinished(const QString &bytes)
The class of the pv counter.
MusicMessageAboutDialog(QWidget *parent=nullptr)
static const QString PushButtonStyle04
TTK_MODULE_EXPORT QByteArray sha1(const QByteArray &data)
#define TTK_VERSION_STR
Definition: ttkversion.h:171
MusicPVCounterRequest * m_networkRequest
The class of the moving dialog base.
The class of the about application info dialog.
static const QString ToolButtonStyle04