TTKMusicPlayer  3.7.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 "musiclrcdefines.h"
6 #include "musicapplication.h"
7 #include "musicrightareawidget.h"
9 
11  : MusicLrcContainer(parent),
12  m_verticalWindow(false),
13  m_singleLineType(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_singleLineType ? 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 {
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 > MusicLrcDefines().findDesktopLastSize() - 1)
121  {
122  return;
123  }
124  resizeLrcSizeArea(true);
125 }
126 
128 {
129  if(m_currentLrcFontSize < MusicLrcDefines().findDesktopFirstSize() - 1)
130  {
131  return;
132  }
133  resizeLrcSizeArea(false);
134 }
135 
137 {
138  QMenu menu(this);
139  menu.setStyleSheet(TTK::UI::MenuStyle02);
140  createColorMenu(menu);
141  menu.exec(QCursor::pos());
142 }
143 
145 {
148 
149  if(m_singleLineType)
150  {
151  if(!m_reverse)
152  {
153  m_lrcManagers[0]->setText(m_lrcManagers[1]->text());
154  startDrawLrc();
155  }
156  m_lrcManagers[1]->hide();
157  }
158  else
159  {
160  m_lrcManagers[1]->show();
161  }
162  m_lrcManagers[1]->setText({});
163 }
164 
166 {
167  QActionGroup *group = new QActionGroup(this);
168  group->addAction(menu.addAction(tr("White")))->setData(0 + LRC_COLOR_OFFSET);
169  group->addAction(menu.addAction(tr("Blue")))->setData(1 + LRC_COLOR_OFFSET);
170  group->addAction(menu.addAction(tr("Red")))->setData(2 + LRC_COLOR_OFFSET);
171  group->addAction(menu.addAction(tr("Black")))->setData(3 + LRC_COLOR_OFFSET);
172  group->addAction(menu.addAction(tr("Yellow")))->setData(4 + LRC_COLOR_OFFSET);
173  group->addAction(menu.addAction(tr("Purple")))->setData(5 + LRC_COLOR_OFFSET);
174  group->addAction(menu.addAction(tr("Green")))->setData(6 + LRC_COLOR_OFFSET);
175  connect(group, SIGNAL(triggered(QAction*)), SLOT(changeCurrentLrcColor(QAction*)));
176  menu.addSeparator();
177  menu.addAction(tr("Custom"), this, SLOT(currentLrcCustom()));
178 
179  const int index = G_SETTING_PTR->value("DLrcColor").toInt() - LRC_COLOR_OFFSET;
180  if(index > -1 && index < group->actions().count())
181  {
182  group->actions()[index]->setIcon(QIcon(":/contextMenu/btn_selected"));
183  }
184 }
185 
187 {
188  for(MusicLrcManager *manager : qAsConst(m_lrcManagers))
189  {
190  manager->setSelfPosition(m_geometry.x(), m_geometry.y());
191  }
192 }
193 
195 {
196  m_toolBarLayout->setContentsMargins(0, 0, 0, 0);
197  m_toolBarLayout->addStretch(1);
198 
199  m_toolBarWidget->setObjectName("ToolBarWidget");
200  m_toolBarWidget->setStyleSheet(QString("#ToolBarWidget{%1}").arg(TTK::UI::BackgroundStyle05));
201  m_toolBarWidget->setLayout(m_toolBarLayout);
202 
203  QPushButton *showMainWindow = new QPushButton(m_toolBarWidget);
204  showMainWindow->setFixedSize(TOOLBAR_HEIGHT, TOOLBAR_HEIGHT);
205  m_toolBarLayout->addWidget(showMainWindow, 0, Qt::AlignCenter);
206  connect(showMainWindow, SIGNAL(clicked()), MusicApplication::instance(), SLOT(showNormal()));
207 #ifdef Q_OS_UNIX
208  showMainWindow->setFocusPolicy(Qt::NoFocus);
209 #endif
210 
211  QToolButton *toolWindowTypeButton = new QToolButton(m_toolBarWidget);
212  toolWindowTypeButton->setFixedSize(m_verticalWindow ? TOOLBAR_HEIGHT : TOOLBAR_WIDTH, m_verticalWindow ? TOOLBAR_WIDTH : TOOLBAR_HEIGHT);
213  m_toolBarLayout->addWidget(toolWindowTypeButton, 0, Qt::AlignCenter);
214  connect(toolWindowTypeButton, SIGNAL(clicked()), MusicRightAreaWidget::instance(), SLOT(setWindowLrcTypeChanged()));
215 
216  QToolButton *toolPreSongButton = new QToolButton(m_toolBarWidget);
217  toolPreSongButton->setFixedSize(TOOLBAR_HEIGHT, TOOLBAR_HEIGHT);
218  m_toolBarLayout->addWidget(toolPreSongButton, 0, Qt::AlignCenter);
219  connect(toolPreSongButton, SIGNAL(clicked()), MusicApplication::instance(), SLOT(playPrevious()));
220 
221  m_toolPlayButton = new QToolButton(m_toolBarWidget);
222  m_toolPlayButton->setFixedSize(TOOLBAR_HEIGHT, TOOLBAR_HEIGHT);
223  m_toolBarLayout->addWidget(m_toolPlayButton, 0, Qt::AlignCenter);
224  connect(m_toolPlayButton, SIGNAL(clicked()), MusicApplication::instance(), SLOT(switchToPlayState()));
225 
226  QToolButton *toolNextSongButton = new QToolButton(m_toolBarWidget);
227  toolNextSongButton->setFixedSize(TOOLBAR_HEIGHT, TOOLBAR_HEIGHT);
228  m_toolBarLayout->addWidget(toolNextSongButton, 0, Qt::AlignCenter);
229  connect(toolNextSongButton, SIGNAL(clicked()), MusicApplication::instance(), SLOT(playNext()));
230 
231  QToolButton *toolSettingButton = new QToolButton(m_toolBarWidget);
232  toolSettingButton->setFixedSize(TOOLBAR_HEIGHT, TOOLBAR_HEIGHT);
233  m_toolBarLayout->addWidget(toolSettingButton, 0, Qt::AlignCenter);
234  connect(toolSettingButton, SIGNAL(clicked()), SLOT(currentLrcCustom()));
235 
236  QToolButton *toolLrcSmallerButton = new QToolButton(m_toolBarWidget);
237  toolLrcSmallerButton->setFixedSize(TOOLBAR_HEIGHT, TOOLBAR_HEIGHT);
238  m_toolBarLayout->addWidget(toolLrcSmallerButton, 0, Qt::AlignCenter);
239  connect(toolLrcSmallerButton, SIGNAL(clicked()), SLOT(setLrcSmallerChanged()));
240 
241  QToolButton *toolLrcBigerButton = new QToolButton(m_toolBarWidget);
242  toolLrcBigerButton->setFixedSize(TOOLBAR_HEIGHT, TOOLBAR_HEIGHT);
243  m_toolBarLayout->addWidget(toolLrcBigerButton, 0, Qt::AlignCenter);
244  connect(toolLrcBigerButton, SIGNAL(clicked()), SLOT(setLrcBiggerChanged()));
245 
246  QToolButton *toolStyleButton = new QToolButton(m_toolBarWidget);
247  toolStyleButton->setFixedSize(20, 20);
248  m_toolBarLayout->addWidget(toolStyleButton, 0, Qt::AlignCenter);
249  connect(toolStyleButton, SIGNAL(clicked()), SLOT(toolStyleChanged()));
250 
251  QToolButton *toolMakeLrcTextButton = new QToolButton(m_toolBarWidget);
252  toolMakeLrcTextButton->setFixedSize(m_verticalWindow ? TOOLBAR_HEIGHT : TOOLBAR_TEXT_LENGTH, m_verticalWindow ? TOOLBAR_TEXT_LENGTH : TOOLBAR_HEIGHT);
253  m_toolBarLayout->addWidget(toolMakeLrcTextButton, 0, Qt::AlignCenter);
254  connect(toolMakeLrcTextButton, SIGNAL(clicked()), SLOT(showLrcMakedWidget()));
255 
256  QToolButton *toolSearchLrcTextButton = new QToolButton(m_toolBarWidget);
257  toolSearchLrcTextButton->setFixedSize(m_verticalWindow ? TOOLBAR_HEIGHT : TOOLBAR_TEXT_LENGTH, m_verticalWindow ? TOOLBAR_TEXT_LENGTH : TOOLBAR_HEIGHT);
258  m_toolBarLayout->addWidget(toolSearchLrcTextButton, 0, Qt::AlignCenter);
259  connect(toolSearchLrcTextButton, SIGNAL(clicked()), SLOT(searchMusicLrcs()));
260 
261  QToolButton *toolUpdateLrcTextButton = new QToolButton(m_toolBarWidget);
262  toolUpdateLrcTextButton->setFixedSize(m_verticalWindow ? TOOLBAR_HEIGHT : TOOLBAR_TEXT_LENGTH, m_verticalWindow ? TOOLBAR_TEXT_LENGTH : TOOLBAR_HEIGHT);
263  m_toolBarLayout->addWidget(toolUpdateLrcTextButton, 0, Qt::AlignCenter);
264  connect(toolUpdateLrcTextButton, SIGNAL(clicked()), SIGNAL(currentLrcUpdated()));
265 
266  QToolButton *toolWindowLockedButton = new QToolButton(m_toolBarWidget);
267  toolWindowLockedButton->setFixedSize(TOOLBAR_HEIGHT, TOOLBAR_HEIGHT);
268  m_toolBarLayout->addWidget(toolWindowLockedButton, 0, Qt::AlignCenter);
269  connect(toolWindowLockedButton, SIGNAL(clicked()), SLOT(setWindowLockedChanged()));
270 
271  QToolButton *toolCloseButton = new QToolButton(m_toolBarWidget);
272  toolCloseButton->setFixedSize(14, 14);
273  m_toolBarLayout->addWidget(toolCloseButton, 0, Qt::AlignCenter);
274  connect(toolCloseButton, SIGNAL(clicked()), SLOT(close()));
275  m_toolBarLayout->addStretch(1);
276 
277  showMainWindow->setIcon(QIcon(":/image/lb_app_logo"));
278 
279  showMainWindow->setCursor(QCursor(Qt::PointingHandCursor));
280  toolWindowTypeButton->setCursor(QCursor(Qt::PointingHandCursor));
281  toolCloseButton->setCursor(QCursor(Qt::PointingHandCursor));
282  toolStyleButton->setCursor(QCursor(Qt::PointingHandCursor));
283  toolMakeLrcTextButton->setCursor(QCursor(Qt::PointingHandCursor));
284  toolSearchLrcTextButton->setCursor(QCursor(Qt::PointingHandCursor));
285  toolUpdateLrcTextButton->setCursor(QCursor(Qt::PointingHandCursor));
286  toolWindowLockedButton->setCursor(QCursor(Qt::PointingHandCursor));
287  toolLrcBigerButton->setCursor(QCursor(Qt::PointingHandCursor));
288  toolLrcSmallerButton->setCursor(QCursor(Qt::PointingHandCursor));
289  toolPreSongButton->setCursor(QCursor(Qt::PointingHandCursor));
290  toolNextSongButton->setCursor(QCursor(Qt::PointingHandCursor));
291  toolSettingButton->setCursor(QCursor(Qt::PointingHandCursor));
292  m_toolPlayButton->setCursor(QCursor(Qt::PointingHandCursor));
293 
294  showMainWindow->setStyleSheet(TTK::UI::PushButtonStyle02);
295  toolCloseButton->setStyleSheet(TTK::UI::BtnTClose);
296  toolStyleButton->setStyleSheet(TTK::UI::DeskTopStyle);
297  toolWindowLockedButton->setStyleSheet(TTK::UI::DeskTopLock);
298  toolLrcSmallerButton->setStyleSheet(TTK::UI::DeskTopSizeDown);
299  toolLrcBigerButton->setStyleSheet(TTK::UI::DeskTopSizeUp);
300  toolPreSongButton->setStyleSheet(TTK::UI::DeskTopPrevious);
301  toolNextSongButton->setStyleSheet(TTK::UI::DeskTopNext);
302  toolSettingButton->setStyleSheet(TTK::UI::DeskTopSetting);
303  m_toolPlayButton->setStyleSheet(TTK::UI::DeskTopPlay);
304 
305  toolWindowTypeButton->setStyleSheet(m_verticalWindow ? TTK::UI::DeskTopHorizontal : TTK::UI::DeskTopVertical);
306  toolMakeLrcTextButton->setStyleSheet(m_verticalWindow ? TTK::UI::DeskTopVMakeLrc : TTK::UI::DeskTopHMakeLrc);
307  toolSearchLrcTextButton->setStyleSheet(m_verticalWindow ? TTK::UI::DeskTopVSearchLrc : TTK::UI::DeskTopHSearchLrc);
308  toolUpdateLrcTextButton->setStyleSheet(m_verticalWindow ? TTK::UI::DeskTopVUpdateLrc : TTK::UI::DeskTopHUpdateLrc);
309 
310  showMainWindow->setToolTip(tr("Show MainWindow"));
311  toolCloseButton->setToolTip(tr("Hide"));
312  toolWindowLockedButton->setToolTip(tr("Lock Lrc"));
313  toolLrcBigerButton->setToolTip(tr("Zoom Up"));
314  toolLrcSmallerButton->setToolTip(tr("Zoom Down"));
315  toolPreSongButton->setToolTip(tr("Previous"));
316  toolNextSongButton->setToolTip(tr("Next"));
317  toolSettingButton->setToolTip(tr("Settings"));
318  m_toolPlayButton->setToolTip(tr("Play"));
319 
320  m_toolBarWidget->hide();
321 }
322 
324 {
325  m_geometry.setY(resize ? m_geometry.y() + 1 : m_geometry.y() - 1);
326  setSelfPosition();
327 
328  const int size = resize ? ++m_currentLrcFontSize : --m_currentLrcFontSize;
329  for(MusicLrcManager *manager : qAsConst(m_lrcManagers))
330  {
331  manager->setLrcFontSize(size);
332  }
333 
334  if(!m_singleLineType)
335  {
336  m_lrcManagers[1]->setText(m_lrcManagers[1]->text());
337  }
338 
341 }
342 
344 {
345  MusicLrcContainer::mousePressEvent(event);
346  if(!m_windowLocked && event->button() == Qt::LeftButton)
347  {
348  m_offset = QtMouseGlobalPos(event) - frameGeometry().topLeft();
349  }
350 }
351 
353 {
354  MusicLrcContainer::mouseMoveEvent(event);
355  if(!m_windowLocked && (event->buttons() & Qt::LeftButton))
356  {
357  setCursor(Qt::CrossCursor);
358  move(QtMouseGlobalPos(event) - m_offset);
360  }
361 }
362 
364 {
365  if(m_windowLocked)
366  {
367  return;
368  }
369 
370  MusicLrcContainer::enterEvent(event);
371  m_toolBarWidget->show();
372  setStyleSheet(QString("#DesktopWidget{%1}").arg(TTK::UI::BackgroundStyle05));
373 }
374 
376 {
377  if(m_windowLocked)
378  {
379  return;
380  }
381 
382  MusicLrcContainer::leaveEvent(event);
383  m_toolBarWidget->hide();
384  setStyleSheet(QString("#DesktopWidget{%1}").arg(TTK::UI::BackgroundStyle01));
385 }
386 
388 {
389  MusicLrcContainer::closeEvent(event);
391 }
392 
393 void MusicLrcContainerForDesktop::contextMenuEvent(QContextMenuEvent *event)
394 {
395  MusicLrcContainer::contextMenuEvent(event);
396 
397  QMenu menu;
398  menu.setStyleSheet(TTK::UI::MenuStyle02);
399  menu.addAction(tr("Lrc Search"), this, SLOT(searchMusicLrcs()));
400  menu.addAction(tr("Lrc Update"), this, SIGNAL(currentLrcUpdated()));
401  menu.addAction(tr("Lrc Make"), this, SLOT(showLrcMakedWidget()));
402  menu.addAction(!m_singleLineType ? tr("Single Line") : tr("Double Line"), this, SLOT(setSingleLineTypeChanged()));
403  menu.addSeparator();
404 
405  QAction *lrcLinkAc = menu.addAction(tr("Link Off"), this, SLOT(linkLrcStateChanged()));
406  m_linkLocalLrc ? lrcLinkAc->setText(tr("Link Off")) : lrcLinkAc->setText(tr("Link On"));
407  menu.addAction(tr("Hide"), this, SLOT(close()));
408  menu.addAction(QIcon(":/contextMenu/btn_lock"), m_windowLocked ? tr("Unlock Lrc"): tr("Lock Lrc"), this, SLOT(setWindowLockedChanged()));
409 
410  QMenu changColorMenu(tr("Color"), &menu);
411  createColorMenu(changColorMenu);
412  menu.addMenu(&changColorMenu);
413 
414  menu.addSeparator();
415  menu.addAction(tr("Settings"), this, SLOT(currentLrcCustom()));
416 
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_singleLineType)
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_singleLineType)
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_singleLineType)
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_singleLineType)
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_singleLineType)
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_singleLineType)
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:93
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:53
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
virtual void closeEvent(QCloseEvent *event) overridefinal
The class of the lrc defines.
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