23 QHBoxLayout *layout =
new QHBoxLayout(
this);
24 layout->setSpacing(0);
25 layout->setContentsMargins(0, 0, 0, 0);
40 QShortcut *cut =
new QShortcut(Qt::SHIFT + Qt::CTRL + Qt::Key_T,
this);
101 m_detectedLabel->setText(tr(
"Intelligent recognition of playing song"));
119 connect(
m_networkRequest, SIGNAL(downLoadDataChanged(QString)), &loop, SLOT(quit()));
179 const QString &lrc = QString(
"<p style='font-weight:600;' align='center'>%1</p>").arg(tr(
"No lrc data file found"));
194 lrc += QString(
"<p style='font-weight:700;' align='center'>");
198 lrc += QString(
"<p align='center'>");
202 lrc += QString(
"</p>");
213 QVBoxLayout *widgetLayout =
new QVBoxLayout(widget);
216 QLabel *iconLabel =
new QLabel(widget);
217 iconLabel->setFixedSize(200, 200);
218 QVBoxLayout *iconLabelLayout =
new QVBoxLayout(iconLabel);
219 iconLabelLayout->setSpacing(0);
220 iconLabelLayout->setContentsMargins(0, 0, 0, 0);
232 iconLabel->setLayout(iconLabelLayout);
236 m_detectedLabel->setText(tr(
"Intelligent recognition of playing song"));
238 QLabel *text =
new QLabel(tr(
"Shortcut:") +
" Shift + Ctrl + T", widget);
241 widgetLayout->addStretch(2);
242 widgetLayout->addWidget(iconLabel, 0, Qt::AlignCenter);
243 widgetLayout->addStretch(1);
245 widgetLayout->addStretch(1);
246 widgetLayout->addWidget(text, 0, Qt::AlignCenter);
247 widget->setLayout(widgetLayout);
271 QVBoxLayout *widgetLayout =
new QVBoxLayout(widget);
273 QWidget *infoWidget =
new QWidget(widget);
274 QHBoxLayout *infoWidgetLayout =
new QHBoxLayout(infoWidget);
275 infoWidgetLayout->setContentsMargins(0, 0, 0, 0);
276 infoWidgetLayout->setSpacing(25);
278 QWidget *infoFuncWidget =
new QWidget(infoWidget);
279 QGridLayout *infoFuncWidgetLayout =
new QGridLayout(infoFuncWidget);
280 infoFuncWidgetLayout->setContentsMargins(0, 0, 0, 0);
282 QLabel *textLabel =
new QLabel(widget);
284 textLabel->setAlignment(Qt::AlignCenter);
288 connect(d, SIGNAL(downLoadDataChanged(QString)), &loop, SLOT(quit()));
296 if(info.m_artistName.toLower().trimmed().contains(songIdentify.
m_artistName.toLower().trimmed(), Qt::CaseInsensitive) &&
297 info.m_songName.toLower().trimmed().contains(songIdentify.
m_songName.toLower().trimmed(), Qt::CaseInsensitive))
305 QLabel *iconLabel =
new QLabel(widget);
306 iconLabel->setMinimumSize(280, 280);
310 if(!QFile::exists(name))
313 connect(d, SIGNAL(downLoadDataChanged(QString)), &loop, SLOT(quit()));
317 iconLabel->setPixmap(QPixmap(name).scaled(iconLabel->size()));
321 iconLabel->setPixmap(QPixmap(
":/image/lb_default_art").scaled(iconLabel->size()));
324 QPushButton *playButton =
new QPushButton(infoFuncWidget);
325 QPushButton *loveButton =
new QPushButton(infoFuncWidget);
326 QPushButton *downButton =
new QPushButton(infoFuncWidget);
327 QPushButton *shareButton =
new QPushButton(infoFuncWidget);
330 playButton->setFocusPolicy(Qt::NoFocus);
331 loveButton->setFocusPolicy(Qt::NoFocus);
332 downButton->setFocusPolicy(Qt::NoFocus);
333 shareButton->setFocusPolicy(Qt::NoFocus);
336 playButton->setFixedSize(25, 25);
337 loveButton->setFixedSize(25, 25);
338 downButton->setFixedSize(25, 25);
339 shareButton->setFixedSize(25, 25);
341 playButton->setCursor(QCursor(Qt::PointingHandCursor));
342 loveButton->setCursor(QCursor(Qt::PointingHandCursor));
343 downButton->setCursor(QCursor(Qt::PointingHandCursor));
344 shareButton->setCursor(QCursor(Qt::PointingHandCursor));
355 infoFuncWidgetLayout->addWidget(textLabel, 0, 0, 1, 4);
356 infoFuncWidgetLayout->addWidget(iconLabel, 1, 0, 1, 4);
357 infoFuncWidgetLayout->addWidget(playButton, 2, 0, Qt::AlignCenter);
358 infoFuncWidgetLayout->addWidget(loveButton, 2, 1, Qt::AlignCenter);
359 infoFuncWidgetLayout->addWidget(downButton, 2, 2, Qt::AlignCenter);
360 infoFuncWidgetLayout->addWidget(shareButton, 2, 3, Qt::AlignCenter);
361 infoFuncWidget->setLayout(infoFuncWidgetLayout);
369 if(!QFile::exists(name))
372 connect(d, SIGNAL(downLoadDataChanged(QString)), &loop, SLOT(quit()));
386 infoWidgetLayout->addWidget(infoFuncWidget);
388 infoWidget->setLayout(infoWidgetLayout);
390 QPushButton *reDetect =
new QPushButton(widget);
391 reDetect->setFixedSize(56, 56);
393 reDetect->setCursor(QCursor(Qt::PointingHandCursor));
396 QLabel *text3Label =
new QLabel(tr(
"Redetect"), widget);
399 widgetLayout->addStretch(1);
400 widgetLayout->addWidget(infoWidget, 1, Qt::AlignCenter);
401 widgetLayout->addStretch(1);
402 widgetLayout->addWidget(reDetect, 0, Qt::AlignCenter);
403 widgetLayout->addWidget(text3Label, 0, Qt::AlignCenter);
404 widgetLayout->addStretch(1);
405 widget->setLayout(widgetLayout);
420 QVBoxLayout *widgetLayout =
new QVBoxLayout(widget);
422 QLabel *iconLabel =
new QLabel(widget);
423 iconLabel->setPixmap(QPixmap(
":/toolSets/lb_detect_error"));
424 QLabel *text1Label =
new QLabel(tr(
"There are no recognized songs"), widget);
425 QLabel *text2Label =
new QLabel(tr(
"Only playing songs can be recognized"), widget);
426 QLabel *text3Label =
new QLabel(tr(
"Redetect"), widget);
429 QPushButton *reDetect =
new QPushButton(widget);
430 reDetect->setFixedSize(56, 56);
432 reDetect->setCursor(QCursor(Qt::PointingHandCursor));
435 reDetect->setFocusPolicy(Qt::NoFocus);
438 widgetLayout->addStretch(2);
439 widgetLayout->addWidget(iconLabel, 0, Qt::AlignCenter);
440 widgetLayout->addStretch(1);
441 widgetLayout->addWidget(text1Label, 0, Qt::AlignCenter);
442 widgetLayout->addStretch(1);
443 widgetLayout->addWidget(text2Label, 0, Qt::AlignCenter);
444 widgetLayout->addStretch(2);
445 widgetLayout->addWidget(reDetect, 0, Qt::AlignCenter);
446 widgetLayout->addWidget(text3Label, 0, Qt::AlignCenter);
447 widgetLayout->addStretch(1);
448 widget->setLayout(widgetLayout);
TTK_MODULE_EXPORT QString generateSongName(const QString &title, const QString &artist)
int addWavHeader(const char *fileName) const
void setMedia(Module type, const QString &url, int winId=-1)
The class of the abstract download data.
void setCurrentIndex(int index)
static const QString FontStyle03
The class of the download the type of data.
static constexpr const char * SongsDetectShareBtn
The class of the audio recorder core.
int exec(ProcessEventsFlags flags=AllEvents)
static constexpr const char * SongsDetectUnloveBtn
const MusicSongIdentifyDataList & items() const
The class of the song identify data item.
static void popup(const QString &text)
virtual void startToQueryResult(TTK::MusicSongInformation *info, int bitrate)
The class of the core lrc analysis.
#define TTK_RECORD_DATA_FILE
void startToRequest(const QString &path)
QString text(int index) const
static constexpr const char * SongsDetectDownloadBtn
TTK_MODULE_EXPORT QString lrcDirPrefix()
static constexpr const char * SongsDetectStopBtn
State loadFromLrcFile(const QString &path)
qint64 findTime(int index) const
static constexpr const char * SongsRedetectBtn
static const QString BackgroundStyle10
The class of the mplayer core.
static const QString FontStyle04
The class of the song identify query request.
static const QString ColorStyle03
virtual void startToRequest()=0
#define G_DOWNLOAD_QUERY_PTR
virtual void startToSearch(const QString &value)=0
The class of the abstract query download data from net.
static constexpr const char * SongsDetectPlayBtn
static constexpr const char * SongsDetectStartBtn
const TTK::MusicSongInformationList & items() const
The class of the semaphore event loop.
virtual void startToRequest() override