TTKMusicPlayer  4.2.0.0
TTKMusicPlayer imitates Kugou UI, the music player uses of qmmp core library based on Qt for windows and linux
musiclrccontainerfordesktop.cpp
Go to the documentation of this file.
5 #include "musiclrchelper.h"
6 #include "musicapplication.h"
7 #include "musicrightareawidget.h"
9 
11  : MusicLrcContainer(parent),
12  m_verticalWindow(false),
13  m_singleLine(false),
14  m_windowLocked(false),
15  m_reverse(false),
16  m_currentLrcFontSize(0),
17  m_widgetWidth(0)
18 {
19  setWindowFlags(Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint | Qt::Tool);
20  setAttribute(Qt::WA_TranslucentBackground);
21  setMouseTracking(true);
22 
24 }
25 
27 {
29  delete m_toolBarLayout;
30  delete m_toolPlayButton;
31  delete m_toolBarWidget;
32 }
33 
35 {
36  m_lrcManagers[m_singleLine ? 0 : !m_reverse]->startDrawLrc();
37 }
38 
40 {
41  for(MusicLrcManager *manager : qAsConst(m_lrcManagers))
42  {
43  manager->stopDrawLrc();
44  }
45 }
46 
48 {
50  for(MusicLrcManager *manager : qAsConst(m_lrcManagers))
51  {
53  manager->setLrcFontSize(m_currentLrcFontSize);
54  }
55 
59 
60  const QPoint &point = G_SETTING_PTR->value(MusicSettingManager::DLrcGeometry).toPoint();
61  if(!point.isNull())
62  {
63  move(point);
64  }
65 }
66 
68 {
69  if(m_currentTime == 0)
70  {
71  m_lrcManagers[0]->setText(tr("Welcome to use TTKMusicPlayer"));
72  }
73 }
74 
76 {
78 }
79 
80 void MusicLrcContainerForDesktop::updateCurrentLrc(const QString &first, const QString &second, qint64 time)
81 {
82  if(m_singleLine)
83  {
84  m_lrcManagers[0]->setText(first);
85  m_lrcManagers[0]->startDrawLrcMask(time);
86  }
87  else
88  {
90  m_lrcManagers[m_reverse]->reset();
91  m_lrcManagers[m_reverse]->setText(second);
92  m_lrcManagers[!m_reverse]->setText(first);
93  m_lrcManagers[!m_reverse]->startDrawLrcMask(time);
94  }
95 
97 }
98 
100 {
102  m_toolPlayButton->setStyleSheet(other->m_toolPlayButton->styleSheet());
103 }
104 
106 {
108  if(m_windowLocked)
109  {
110  m_toolBarWidget->hide();
111  setStyleSheet(TTK::UI::BackgroundStyle01);
112  }
113 
116 }
117 
119 {
120  if(m_currentLrcFontSize > MusicLrcHelper().findDesktopLastSize() - 1)
121  {
122  return;
123  }
124  resizeLrcSizeArea(true);
125 }
126 
128 {
129  if(m_currentLrcFontSize < MusicLrcHelper().findDesktopFirstSize() - 1)
130  {
131  return;
132  }
133  resizeLrcSizeArea(false);
134 }
135 
137 {
138  QMenu menu(this);
139  menu.setStyleSheet(TTK::UI::MenuStyle02);
140 
141  createColorMenu(&menu);
142  menu.exec(QCursor::pos());
143 }
144 
146 {
149 
150  if(m_singleLine)
151  {
152  if(!m_reverse)
153  {
154  m_lrcManagers[0]->setText(m_lrcManagers[1]->text());
155  startDrawLrc();
156  }
157  m_lrcManagers[1]->hide();
158  }
159  else
160  {
161  m_lrcManagers[1]->show();
162  }
163  m_lrcManagers[1]->setText({});
164 }
165 
167 {
168  QActionGroup *actions = new QActionGroup(this);
169  actions->addAction(menu->addAction(tr("White")))->setData(0 + LRC_COLOR_OFFSET);
170  actions->addAction(menu->addAction(tr("Blue")))->setData(1 + LRC_COLOR_OFFSET);
171  actions->addAction(menu->addAction(tr("Red")))->setData(2 + LRC_COLOR_OFFSET);
172  actions->addAction(menu->addAction(tr("Black")))->setData(3 + LRC_COLOR_OFFSET);
173  actions->addAction(menu->addAction(tr("Yellow")))->setData(4 + LRC_COLOR_OFFSET);
174  actions->addAction(menu->addAction(tr("Purple")))->setData(5 + LRC_COLOR_OFFSET);
175  actions->addAction(menu->addAction(tr("Green")))->setData(6 + LRC_COLOR_OFFSET);
176  connect(actions, SIGNAL(triggered(QAction*)), SLOT(changeCurrentLrcColor(QAction*)));
177  menu->addSeparator();
178  menu->addAction(tr("Custom"), this, SLOT(currentLrcCustom()));
179 
180  const int index = G_SETTING_PTR->value("DLrcColor").toInt() - LRC_COLOR_OFFSET;
181  if(index > -1 && index < actions->actions().count())
182  {
183  actions->actions()[index]->setIcon(QIcon(":/contextMenu/btn_selected"));
184  }
185 }
186 
188 {
189  for(MusicLrcManager *manager : qAsConst(m_lrcManagers))
190  {
191  manager->setSelfPosition(m_geometry.x(), m_geometry.y());
192  }
193 }
194 
196 {
197  m_toolBarLayout->setContentsMargins(0, 0, 0, 0);
198  m_toolBarLayout->addStretch(1);
199 
200  m_toolBarWidget->setObjectName("ToolBarWidget");
201  m_toolBarWidget->setStyleSheet(QString("#%1{ %2 }").arg(m_toolBarWidget->objectName(), TTK::UI::BackgroundStyle05));
202  m_toolBarWidget->setLayout(m_toolBarLayout);
203 
204  QPushButton *showMainWindow = new QPushButton(m_toolBarWidget);
205  showMainWindow->setFixedSize(TOOLBAR_HEIGHT, TOOLBAR_HEIGHT);
206  m_toolBarLayout->addWidget(showMainWindow, 0, Qt::AlignCenter);
207  connect(showMainWindow, SIGNAL(clicked()), MusicApplication::instance(), SLOT(showNormal()));
208 #ifdef Q_OS_UNIX
209  showMainWindow->setFocusPolicy(Qt::NoFocus);
210 #endif
211 
212  QToolButton *toolWindowTypeButton = new QToolButton(m_toolBarWidget);
213  toolWindowTypeButton->setFixedSize(m_verticalWindow ? TOOLBAR_HEIGHT : TOOLBAR_WIDTH, m_verticalWindow ? TOOLBAR_WIDTH : TOOLBAR_HEIGHT);
214  m_toolBarLayout->addWidget(toolWindowTypeButton, 0, Qt::AlignCenter);
215  connect(toolWindowTypeButton, SIGNAL(clicked()), MusicRightAreaWidget::instance(), SLOT(setWindowLrcTypeChanged()));
216 
217  QToolButton *toolPreSongButton = new QToolButton(m_toolBarWidget);
218  toolPreSongButton->setFixedSize(TOOLBAR_HEIGHT, TOOLBAR_HEIGHT);
219  m_toolBarLayout->addWidget(toolPreSongButton, 0, Qt::AlignCenter);
220  connect(toolPreSongButton, SIGNAL(clicked()), MusicApplication::instance(), SLOT(playPrevious()));
221 
222  m_toolPlayButton = new QToolButton(m_toolBarWidget);
223  m_toolPlayButton->setFixedSize(TOOLBAR_HEIGHT, TOOLBAR_HEIGHT);
224  m_toolBarLayout->addWidget(m_toolPlayButton, 0, Qt::AlignCenter);
225  connect(m_toolPlayButton, SIGNAL(clicked()), MusicApplication::instance(), SLOT(switchToPlayState()));
226 
227  QToolButton *toolNextSongButton = new QToolButton(m_toolBarWidget);
228  toolNextSongButton->setFixedSize(TOOLBAR_HEIGHT, TOOLBAR_HEIGHT);
229  m_toolBarLayout->addWidget(toolNextSongButton, 0, Qt::AlignCenter);
230  connect(toolNextSongButton, SIGNAL(clicked()), MusicApplication::instance(), SLOT(playNext()));
231 
232  QToolButton *toolSettingButton = new QToolButton(m_toolBarWidget);
233  toolSettingButton->setFixedSize(TOOLBAR_HEIGHT, TOOLBAR_HEIGHT);
234  m_toolBarLayout->addWidget(toolSettingButton, 0, Qt::AlignCenter);
235  connect(toolSettingButton, SIGNAL(clicked()), SLOT(currentLrcCustom()));
236 
237  QToolButton *toolLrcSmallerButton = new QToolButton(m_toolBarWidget);
238  toolLrcSmallerButton->setFixedSize(TOOLBAR_HEIGHT, TOOLBAR_HEIGHT);
239  m_toolBarLayout->addWidget(toolLrcSmallerButton, 0, Qt::AlignCenter);
240  connect(toolLrcSmallerButton, SIGNAL(clicked()), SLOT(setLrcSmallerChanged()));
241 
242  QToolButton *toolLrcBigerButton = new QToolButton(m_toolBarWidget);
243  toolLrcBigerButton->setFixedSize(TOOLBAR_HEIGHT, TOOLBAR_HEIGHT);
244  m_toolBarLayout->addWidget(toolLrcBigerButton, 0, Qt::AlignCenter);
245  connect(toolLrcBigerButton, SIGNAL(clicked()), SLOT(setLrcBiggerChanged()));
246 
247  QToolButton *toolStyleButton = new QToolButton(m_toolBarWidget);
248  toolStyleButton->setFixedSize(20, 20);
249  m_toolBarLayout->addWidget(toolStyleButton, 0, Qt::AlignCenter);
250  connect(toolStyleButton, SIGNAL(clicked()), SLOT(toolStyleChanged()));
251 
252  QToolButton *toolMakeLrcTextButton = new QToolButton(m_toolBarWidget);
253  toolMakeLrcTextButton->setFixedSize(m_verticalWindow ? TOOLBAR_HEIGHT : TOOLBAR_TEXT_LENGTH, m_verticalWindow ? TOOLBAR_TEXT_LENGTH : TOOLBAR_HEIGHT);
254  m_toolBarLayout->addWidget(toolMakeLrcTextButton, 0, Qt::AlignCenter);
255  connect(toolMakeLrcTextButton, SIGNAL(clicked()), SLOT(showLrcMakedWidget()));
256 
257  QToolButton *toolSearchLrcTextButton = new QToolButton(m_toolBarWidget);
258  toolSearchLrcTextButton->setFixedSize(m_verticalWindow ? TOOLBAR_HEIGHT : TOOLBAR_TEXT_LENGTH, m_verticalWindow ? TOOLBAR_TEXT_LENGTH : TOOLBAR_HEIGHT);
259  m_toolBarLayout->addWidget(toolSearchLrcTextButton, 0, Qt::AlignCenter);
260  connect(toolSearchLrcTextButton, SIGNAL(clicked()), SLOT(searchMusicLrcs()));
261 
262  QToolButton *toolUpdateLrcTextButton = new QToolButton(m_toolBarWidget);
263  toolUpdateLrcTextButton->setFixedSize(m_verticalWindow ? TOOLBAR_HEIGHT : TOOLBAR_TEXT_LENGTH, m_verticalWindow ? TOOLBAR_TEXT_LENGTH : TOOLBAR_HEIGHT);
264  m_toolBarLayout->addWidget(toolUpdateLrcTextButton, 0, Qt::AlignCenter);
265  connect(toolUpdateLrcTextButton, SIGNAL(clicked()), SIGNAL(currentLrcUpdated()));
266 
267  QToolButton *toolWindowLockedButton = new QToolButton(m_toolBarWidget);
268  toolWindowLockedButton->setFixedSize(TOOLBAR_HEIGHT, TOOLBAR_HEIGHT);
269  m_toolBarLayout->addWidget(toolWindowLockedButton, 0, Qt::AlignCenter);
270  connect(toolWindowLockedButton, SIGNAL(clicked()), SLOT(setWindowLockedChanged()));
271 
272  QToolButton *toolCloseButton = new QToolButton(m_toolBarWidget);
273  toolCloseButton->setFixedSize(14, 14);
274  m_toolBarLayout->addWidget(toolCloseButton, 0, Qt::AlignCenter);
275  connect(toolCloseButton, SIGNAL(clicked()), SLOT(close()));
276  m_toolBarLayout->addStretch(1);
277 
278  showMainWindow->setIcon(QIcon(":/image/lb_app_logo"));
279 
280  showMainWindow->setCursor(QCursor(Qt::PointingHandCursor));
281  toolWindowTypeButton->setCursor(QCursor(Qt::PointingHandCursor));
282  toolCloseButton->setCursor(QCursor(Qt::PointingHandCursor));
283  toolStyleButton->setCursor(QCursor(Qt::PointingHandCursor));
284  toolMakeLrcTextButton->setCursor(QCursor(Qt::PointingHandCursor));
285  toolSearchLrcTextButton->setCursor(QCursor(Qt::PointingHandCursor));
286  toolUpdateLrcTextButton->setCursor(QCursor(Qt::PointingHandCursor));
287  toolWindowLockedButton->setCursor(QCursor(Qt::PointingHandCursor));
288  toolLrcBigerButton->setCursor(QCursor(Qt::PointingHandCursor));
289  toolLrcSmallerButton->setCursor(QCursor(Qt::PointingHandCursor));
290  toolPreSongButton->setCursor(QCursor(Qt::PointingHandCursor));
291  toolNextSongButton->setCursor(QCursor(Qt::PointingHandCursor));
292  toolSettingButton->setCursor(QCursor(Qt::PointingHandCursor));
293  m_toolPlayButton->setCursor(QCursor(Qt::PointingHandCursor));
294 
295  showMainWindow->setStyleSheet(TTK::UI::PushButtonStyle02);
296  toolCloseButton->setStyleSheet(TTK::UI::BtnTClose);
297  toolStyleButton->setStyleSheet(TTK::UI::DeskTopStyle);
298  toolWindowLockedButton->setStyleSheet(TTK::UI::DeskTopLock);
299  toolLrcSmallerButton->setStyleSheet(TTK::UI::DeskTopSizeDown);
300  toolLrcBigerButton->setStyleSheet(TTK::UI::DeskTopSizeUp);
301  toolPreSongButton->setStyleSheet(TTK::UI::DeskTopPrevious);
302  toolNextSongButton->setStyleSheet(TTK::UI::DeskTopNext);
303  toolSettingButton->setStyleSheet(TTK::UI::DeskTopSetting);
304  m_toolPlayButton->setStyleSheet(TTK::UI::DeskTopPlay);
305 
306  toolWindowTypeButton->setStyleSheet(m_verticalWindow ? TTK::UI::DeskTopHorizontal : TTK::UI::DeskTopVertical);
307  toolMakeLrcTextButton->setStyleSheet(m_verticalWindow ? TTK::UI::DeskTopVMakeLrc : TTK::UI::DeskTopHMakeLrc);
308  toolSearchLrcTextButton->setStyleSheet(m_verticalWindow ? TTK::UI::DeskTopVSearchLrc : TTK::UI::DeskTopHSearchLrc);
309  toolUpdateLrcTextButton->setStyleSheet(m_verticalWindow ? TTK::UI::DeskTopVUpdateLrc : TTK::UI::DeskTopHUpdateLrc);
310 
311  showMainWindow->setToolTip(tr("Show MainWindow"));
312  toolCloseButton->setToolTip(tr("Hide"));
313  toolWindowLockedButton->setToolTip(tr("Lock Lrc"));
314  toolLrcBigerButton->setToolTip(tr("Zoom Up"));
315  toolLrcSmallerButton->setToolTip(tr("Zoom Down"));
316  toolPreSongButton->setToolTip(tr("Previous"));
317  toolNextSongButton->setToolTip(tr("Next"));
318  toolSettingButton->setToolTip(tr("Settings"));
319  m_toolPlayButton->setToolTip(tr("Play"));
320 
321  m_toolBarWidget->hide();
322 }
323 
325 {
326  m_geometry.setY(resize ? m_geometry.y() + 1 : m_geometry.y() - 1);
327  setSelfPosition();
328 
329  const int size = resize ? ++m_currentLrcFontSize : --m_currentLrcFontSize;
330  for(MusicLrcManager *manager : qAsConst(m_lrcManagers))
331  {
332  manager->setLrcFontSize(size);
333  }
334 
335  if(!m_singleLine)
336  {
337  m_lrcManagers[1]->setText(m_lrcManagers[1]->text());
338  }
339 
342 }
343 
345 {
346  MusicLrcContainer::mousePressEvent(event);
347  if(!m_windowLocked && event->button() == Qt::LeftButton)
348  {
349  m_offset = QtMouseGlobalPos(event) - frameGeometry().topLeft();
350  }
351 }
352 
354 {
355  MusicLrcContainer::mouseMoveEvent(event);
356  if(!m_windowLocked && (event->buttons() & Qt::LeftButton))
357  {
358  setCursor(Qt::CrossCursor);
359  move(QtMouseGlobalPos(event) - m_offset);
361  }
362 }
363 
365 {
366  if(m_windowLocked)
367  {
368  return;
369  }
370 
371  MusicLrcContainer::enterEvent(event);
372  m_toolBarWidget->show();
373  setStyleSheet(QString("#DesktopWidget{ %1 }").arg(TTK::UI::BackgroundStyle05));
374 }
375 
377 {
378  if(m_windowLocked)
379  {
380  return;
381  }
382 
383  MusicLrcContainer::leaveEvent(event);
384  m_toolBarWidget->hide();
385  setStyleSheet(QString("#DesktopWidget{ %1 }").arg(TTK::UI::BackgroundStyle01));
386 }
387 
389 {
390  MusicLrcContainer::closeEvent(event);
392 }
393 
394 void MusicLrcContainerForDesktop::contextMenuEvent(QContextMenuEvent *event)
395 {
396  MusicLrcContainer::contextMenuEvent(event);
397 
398  QMenu menu;
399  menu.setStyleSheet(TTK::UI::MenuStyle02);
400 
401  menu.addAction(tr("Lrc Search"), this, SLOT(searchMusicLrcs()));
402  menu.addAction(tr("Lrc Update"), this, SIGNAL(currentLrcUpdated()));
403  menu.addAction(tr("Lrc Make"), this, SLOT(showLrcMakedWidget()));
404  menu.addAction(!m_singleLine ? tr("Single Line") : tr("Double Line"), this, SLOT(setSingleLineTypeChanged()));
405  menu.addSeparator();
406 
407  QAction *lrcLinkAc = menu.addAction(tr("Link Off"), this, SLOT(linkLrcStateChanged()));
408  m_linkLocalLrc ? lrcLinkAc->setText(tr("Link Off")) : lrcLinkAc->setText(tr("Link On"));
409  menu.addAction(tr("Hide"), this, SLOT(close()));
410  menu.addAction(QIcon(":/contextMenu/btn_lock"), m_windowLocked ? tr("Unlock Lrc"): tr("Lock Lrc"), this, SLOT(setWindowLockedChanged()));
411 
412  QMenu *colorMenu = menu.addMenu(tr("Color"));
413  createColorMenu(colorMenu);
414 
415  menu.addSeparator();
416  menu.addAction(tr("Settings"), this, SLOT(currentLrcCustom()));
417  menu.exec(QCursor::pos());
418 }
419 
420 
421 
424 {
425  m_verticalWindow = false;
426  const QSize &windowSize = G_SETTING_PTR->value(MusicSettingManager::ScreenSize).toSize();
427  m_widgetWidth = windowSize.width() - 300;
429  m_geometry.setY(60);
430 
431  m_toolBarWidget = new QWidget(this);
432  m_toolBarWidget->setGeometry(0, 0, m_geometry.x(), TOOLBAR_MAIN_HEIGHT);
433  m_toolBarLayout = new QHBoxLayout(m_toolBarWidget);
435 
436  QWidget *desktopWidget = new QWidget(this);
437  desktopWidget->setObjectName("DesktopWidget");
438  m_lrcManagers << new MusicLrcManagerHorizontalDesktop(desktopWidget)
439  << new MusicLrcManagerHorizontalDesktop(desktopWidget);
440 
441  move(200, windowSize.height() - height() - 200);
442  setFixedSize(m_geometry.x(), 2 * m_geometry.y() + TOOLBAR_HEIGHT + TOOLBAR_MAIN_HEIGHT);
443  desktopWidget->setGeometry(0, TOOLBAR_MAIN_HEIGHT, m_geometry.x(), 2 * m_geometry.y() + TOOLBAR_MAIN_HEIGHT);
444 
445  setSelfPosition();
446  m_currentLrcFontSize = m_lrcManagers[0]->lrcFontSize();
447 }
448 
450 {
452  if(m_currentTime == 0)
453  {
454  const int width = m_lrcManagers[0]->x();
455  if(m_singleLine)
456  {
457  m_lrcManagers[0]->setGeometry((m_widgetWidth - width) / 2, 20, width, m_geometry.y());
458  }
459  else
460  {
461  m_lrcManagers[0]->setGeometry(0, 20, width, m_geometry.y());
462  m_lrcManagers[1]->setGeometry(0, m_geometry.y() + 20, 0, 0);
463  }
464  }
465 }
466 
468 {
470  if(m_singleLine)
471  {
472  const int width = m_lrcManagers[0]->x();
473  m_lrcManagers[0]->move((m_widgetWidth - width) / 2, 20);
474  }
475  else
476  {
477  m_lrcManagers[0]->move(0, 20);
478  }
479 }
480 
482 {
483  int width = m_lrcManagers[0]->x();
484  if(m_singleLine)
485  {
486  m_lrcManagers[0]->setGeometry((m_widgetWidth - width) / 2, 20, width, m_geometry.y());
487  }
488  else
489  {
490  m_lrcManagers[0]->setGeometry(0, 20, width, m_geometry.y());
491  width = m_lrcManagers[1]->x();
492  int pos = m_geometry.x() - width;
493  if(pos < 0)
494  {
495  pos = 0;
496  }
497  m_lrcManagers[1]->setGeometry(pos, m_geometry.y() + 20, width, m_geometry.y());
498  }
499 }
500 
501 
502 
505 {
506  m_verticalWindow = true;
507  const QSize &windowSize = G_SETTING_PTR->value(MusicSettingManager::ScreenSize).toSize();
508  m_widgetWidth = windowSize.height() - 150;
510  m_geometry.setY(60);
511 
512  m_toolBarWidget = new QWidget(this);
513  m_toolBarWidget->setGeometry(0, 0, TOOLBAR_MAIN_HEIGHT, m_geometry.x());
514  m_toolBarLayout = new QVBoxLayout(m_toolBarWidget);
516 
517  QWidget *desktopWidget = new QWidget(this);
518  desktopWidget->setObjectName("DesktopWidget");
519  m_lrcManagers << new MusicLrcManagerVerticalDesktop(desktopWidget)
520  << new MusicLrcManagerVerticalDesktop(desktopWidget);
521 
522  move(200, 75);
523  setFixedSize(2 * m_geometry.y() + TOOLBAR_HEIGHT + TOOLBAR_MAIN_HEIGHT, m_geometry.x());
524  desktopWidget->setGeometry(TOOLBAR_MAIN_HEIGHT, 0, 2 * m_geometry.y() + TOOLBAR_MAIN_HEIGHT, m_geometry.x());
525 
526  setSelfPosition();
527  m_currentLrcFontSize = m_lrcManagers[0]->lrcFontSize();
528 }
529 
531 {
533  if(m_currentTime == 0)
534  {
535  const int height = m_lrcManagers[0]->x();
536  if(m_singleLine)
537  {
538  m_lrcManagers[0]->setGeometry(20, (m_widgetWidth - height) / 2, m_geometry.y(), height);
539  }
540  else
541  {
542  m_lrcManagers[0]->setGeometry(20, 0, m_geometry.y(), height);
543  m_lrcManagers[1]->setGeometry(m_geometry.x() + 20, 0, 0, 0);
544  }
545  }
546 }
547 
549 {
551  if(m_singleLine)
552  {
553  const int height = m_lrcManagers[0]->x();
554  m_lrcManagers[0]->move(20, (m_widgetWidth - height) / 2);
555  }
556  else
557  {
558  m_lrcManagers[0]->move(20, 0);
559  }
560 }
561 
563 {
564  int height = m_lrcManagers[0]->x();
565  if(m_singleLine)
566  {
567  m_lrcManagers[0]->setGeometry(20, (m_widgetWidth - height) / 2, m_geometry.y(), height);
568  }
569  else
570  {
571  m_lrcManagers[0]->setGeometry(20, 0, m_geometry.y(), height);
572 
573  height = m_lrcManagers[1]->x();
574  int pos = m_geometry.x() - height;
575  if(pos < 0)
576  {
577  pos = 0;
578  }
579  m_lrcManagers[1]->setGeometry(m_geometry.y() + 20, pos, m_geometry.y(), height);
580  }
581 }
static MusicRightAreaWidget * instance()
#define QtEnterEvent
Event enter.
Definition: ttkqtcompat.h:160
static constexpr const char * DeskTopHorizontal
The class of the lrc manager base.
static constexpr const char * DeskTopSizeDown
static const QString BackgroundStyle05
Definition: musicuiobject.h:94
virtual void initCurrentLrc() const overridefinal
static constexpr const char * DeskTopVUpdateLrc
static MusicApplication * instance()
static constexpr const char * LRC_DESKTOP_TPYE
static constexpr const char * DeskTopVSearchLrc
void currentLrcUpdated()
virtual void mousePressEvent(QMouseEvent *event) overridefinal
static constexpr const char * DeskTopSetting
virtual void setSingleLineTypeChanged() overridefinal
virtual void applyParameter() overridefinal
static constexpr int TOOLBAR_TEXT_LENGTH
static constexpr const char * DeskTopHSearchLrc
static MusicBottomAreaWidget * instance()
virtual void initCurrentLrc() const overridefinal
MusicLrcContainerHorizontalDesktop(QWidget *parent=nullptr)
voidpf void uLong size
Definition: ioapi.h:136
virtual void setSingleLineTypeChanged() overridefinal
void statusCopyFrom(MusicLrcContainerForDesktop *other)
void setCurrentPlayState(bool state) const
static constexpr int LRC_COLOR_OFFSET
static const QString PushButtonStyle02
static constexpr const char * DeskTopPrevious
#define QtMouseGlobalPos(p)
Definition: ttkqtcompat.h:148
The class of the lrc container base.
virtual void enterEvent(QtEnterEvent *event) overridefinal
static constexpr const char * DeskTopSizeUp
virtual void startDrawLrc() overridefinal
MusicLrcContainerVerticalDesktop(QWidget *parent=nullptr)
#define qAsConst
Definition: ttkqtglobal.h:57
virtual void leaveEvent(QEvent *event) overridefinal
virtual void applyParameter()
static const QString BackgroundStyle01
Background.
Definition: musicuiobject.h:77
The class of the desktop horizontal lrc manager.
static constexpr const char * DeskTopNext
static const QString MenuStyle02
The class of the lrc helper.
virtual void closeEvent(QCloseEvent *event) overridefinal
static constexpr int TOOLBAR_MAIN_HEIGHT
static constexpr int TOOLBAR_HEIGHT
void changeCurrentLrcColor(QAction *action)
virtual void resizeLrcSizeArea()=0
static constexpr const char * DeskTopPlay
static constexpr int TOOLBAR_WIDTH
virtual void contextMenuEvent(QContextMenuEvent *event) overridefinal
static constexpr const char * DeskTopVMakeLrc
The class of the desktop vertical lrc manager.
static constexpr const char * DeskTopVertical
QList< MusicLrcManager * > m_lrcManagers
static constexpr const char * DeskTopPause
static constexpr const char * DeskTopHUpdateLrc
static constexpr const char * DeskTopHMakeLrc
The class of the desktop lrc container.
MusicLrcContainerForDesktop(QWidget *parent=nullptr)
static constexpr const char * DeskTopLock
static constexpr const char * BtnTClose
virtual void mouseMoveEvent(QMouseEvent *event) overridefinal
state
Definition: http_parser.c:279
void updateCurrentLrc(const QString &first, const QString &second, qint64 time)
virtual void resizeLrcSizeArea() overridefinal
#define G_SETTING_PTR
static constexpr const char * DeskTopStyle
virtual void stopDrawLrc() overridefinal