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);
99 m_detectedLabel->setText(tr(
"Intelligent recognition of playing song"));
117 connect(
m_networkRequest, SIGNAL(downLoadDataChanged(QString)), &loop, SLOT(quit()));
177 const QString &lrc = QString(
"<p style='font-weight:600;' align='center'>%1</p>").arg(tr(
"No lrc data file found"));
192 lrc += QString(
"<p style='font-weight:700;' align='center'>");
196 lrc += QString(
"<p align='center'>");
200 lrc += QString(
"</p>");
211 QVBoxLayout *widgetLayout =
new QVBoxLayout(widget);
214 QLabel *iconLabel =
new QLabel(widget);
215 iconLabel->setFixedSize(200, 200);
216 QVBoxLayout *iconLabelLayout =
new QVBoxLayout(iconLabel);
217 iconLabelLayout->setSpacing(0);
218 iconLabelLayout->setContentsMargins(0, 0, 0, 0);
230 iconLabel->setLayout(iconLabelLayout);
234 m_detectedLabel->setText(tr(
"Intelligent recognition of playing song"));
236 QLabel *text =
new QLabel(tr(
"Shortcut:") +
" Shift + Ctrl + T", widget);
239 widgetLayout->addStretch(2);
240 widgetLayout->addWidget(iconLabel, 0, Qt::AlignCenter);
241 widgetLayout->addStretch(1);
243 widgetLayout->addStretch(1);
244 widgetLayout->addWidget(text, 0, Qt::AlignCenter);
245 widget->setLayout(widgetLayout);
269 QVBoxLayout *widgetLayout =
new QVBoxLayout(widget);
271 QWidget *infoWidget =
new QWidget(widget);
272 QHBoxLayout *infoWidgetLayout =
new QHBoxLayout(infoWidget);
273 infoWidgetLayout->setContentsMargins(0, 0, 0, 0);
274 infoWidgetLayout->setSpacing(25);
276 QWidget *infoFuncWidget =
new QWidget(infoWidget);
277 QGridLayout *infoFuncWidgetLayout =
new QGridLayout(infoFuncWidget);
278 infoFuncWidgetLayout->setContentsMargins(0, 0, 0, 0);
280 QLabel *textLabel =
new QLabel(widget);
281 textLabel->setText(QString(
"%1 - %2").arg(songIdentify.m_artistName, songIdentify.m_songName));
282 textLabel->setAlignment(Qt::AlignCenter);
286 connect(d, SIGNAL(downLoadDataChanged(QString)), &loop, SLOT(quit()));
295 if(info.m_artistName.toLower().trimmed().contains(songIdentify.m_artistName.toLower().trimmed(), Qt::CaseInsensitive) &&
296 info.m_songName.toLower().trimmed().contains(songIdentify.m_songName.toLower().trimmed(), Qt::CaseInsensitive))
304 QLabel *iconLabel =
new QLabel(widget);
305 iconLabel->setMinimumSize(280, 280);
309 if(!QFile::exists(name))
312 connect(d, SIGNAL(downLoadDataChanged(QString)), &loop, SLOT(quit()));
316 iconLabel->setPixmap(QPixmap(name).scaled(iconLabel->size()));
320 iconLabel->setPixmap(QPixmap(
":/image/lb_default_art").scaled(iconLabel->size()));
323 QPushButton *playButton =
new QPushButton(infoFuncWidget);
324 QPushButton *loveButton =
new QPushButton(infoFuncWidget);
325 QPushButton *downButton =
new QPushButton(infoFuncWidget);
326 QPushButton *shareButton =
new QPushButton(infoFuncWidget);
329 playButton->setFocusPolicy(Qt::NoFocus);
330 loveButton->setFocusPolicy(Qt::NoFocus);
331 downButton->setFocusPolicy(Qt::NoFocus);
332 shareButton->setFocusPolicy(Qt::NoFocus);
335 playButton->setFixedSize(25, 25);
336 loveButton->setFixedSize(25, 25);
337 downButton->setFixedSize(25, 25);
338 shareButton->setFixedSize(25, 25);
340 playButton->setCursor(QCursor(Qt::PointingHandCursor));
341 loveButton->setCursor(QCursor(Qt::PointingHandCursor));
342 downButton->setCursor(QCursor(Qt::PointingHandCursor));
343 shareButton->setCursor(QCursor(Qt::PointingHandCursor));
350 connect(playButton, SIGNAL(clicked()), SLOT(
playSong()));
354 infoFuncWidgetLayout->addWidget(textLabel, 0, 0, 1, 4);
355 infoFuncWidgetLayout->addWidget(iconLabel, 1, 0, 1, 4);
356 infoFuncWidgetLayout->addWidget(playButton, 2, 0, Qt::AlignCenter);
357 infoFuncWidgetLayout->addWidget(loveButton, 2, 1, Qt::AlignCenter);
358 infoFuncWidgetLayout->addWidget(downButton, 2, 2, Qt::AlignCenter);
359 infoFuncWidgetLayout->addWidget(shareButton, 2, 3, Qt::AlignCenter);
360 infoFuncWidget->setLayout(infoFuncWidgetLayout);
368 if(!QFile::exists(name))
371 connect(d, SIGNAL(downLoadDataChanged(QString)), &loop, SLOT(quit()));
385 infoWidgetLayout->addWidget(infoFuncWidget);
387 infoWidget->setLayout(infoWidgetLayout);
389 QPushButton *reDetect =
new QPushButton(widget);
390 reDetect->setFixedSize(56, 56);
392 reDetect->setCursor(QCursor(Qt::PointingHandCursor));
395 QLabel *text3Label =
new QLabel(tr(
"Redetect"), widget);
398 widgetLayout->addStretch(1);
399 widgetLayout->addWidget(infoWidget, 1, Qt::AlignCenter);
400 widgetLayout->addStretch(1);
401 widgetLayout->addWidget(reDetect, 0, Qt::AlignCenter);
402 widgetLayout->addWidget(text3Label, 0, Qt::AlignCenter);
403 widgetLayout->addStretch(1);
404 widget->setLayout(widgetLayout);
419 QVBoxLayout *widgetLayout =
new QVBoxLayout(widget);
421 QLabel *iconLabel =
new QLabel(widget);
422 iconLabel->setPixmap(QPixmap(
":/toolSets/lb_detect_error"));
423 QLabel *text1Label =
new QLabel(tr(
"There are no recognized songs"), widget);
424 QLabel *text2Label =
new QLabel(tr(
"Only playing songs can be recognized"), widget);
425 QLabel *text3Label =
new QLabel(tr(
"Redetect"), widget);
428 QPushButton *reDetect =
new QPushButton(widget);
429 reDetect->setFixedSize(56, 56);
431 reDetect->setCursor(QCursor(Qt::PointingHandCursor));
434 reDetect->setFocusPolicy(Qt::NoFocus);
437 widgetLayout->addStretch(2);
438 widgetLayout->addWidget(iconLabel, 0, Qt::AlignCenter);
439 widgetLayout->addStretch(1);
440 widgetLayout->addWidget(text1Label, 0, Qt::AlignCenter);
441 widgetLayout->addStretch(1);
442 widgetLayout->addWidget(text2Label, 0, Qt::AlignCenter);
443 widgetLayout->addStretch(2);
444 widgetLayout->addWidget(reDetect, 0, Qt::AlignCenter);
445 widgetLayout->addWidget(text3Label, 0, Qt::AlignCenter);
446 widgetLayout->addStretch(1);
447 widget->setLayout(widgetLayout);
TTK_MODULE_EXPORT QString generateSongName(const QString &title, const QString &artist)
int addWavHeader(const char *fileName) const
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)
void setQueryType(QueryType type)
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
void setMedia(Module type, const QString &data, int winId=-1)
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