TTKMusicPlayer  3.7.0.0
TTKMusicPlayer imitates Kugou UI, the music player uses of qmmp core library based on Qt for windows and linux
musicabstractitemquerywidget.h
Go to the documentation of this file.
1 #ifndef MUSICABSTRACTITEMQUERYWIDGET_H
2 #define MUSICABSTRACTITEMQUERYWIDGET_H
3 
4 /***************************************************************************
5  * This file is part of the TTK Music Player project
6  * Copyright (C) 2015 - 2024 Greedysky Studio
7 
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 3 of the License, or
11  * (at your option) any later version.
12 
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17 
18  * You should have received a copy of the GNU General Public License along
19  * with this program; If not, see <http://www.gnu.org/licenses/>.
20  ***************************************************************************/
21 
22 #include <QButtonGroup>
23 #include "musicwidgetheaders.h"
24 #include "musicimagerenderer.h"
25 #include "musicsongsharingwidget.h"
27 
28 #define QUERY_WIDGET_WIDTH (G_SETTING_PTR->value(MusicSettingManager::WidgetSize).toSize().width() - LEFT_SIDE_WIDTH_MIN)
29 
34 {
35  Q_OBJECT
37 public:
41  explicit MusicAbstractItemQueryWidget(QWidget *parent = nullptr);
46 
50  virtual void setCurrentValue(const QString &value);
54  virtual void setCurrentID(const QString &id);
55 
56 public Q_SLOTS:
60  void downLoadFinished(const QByteArray &bytes);
64  void playAllButtonClicked();
68  void shareButtonClicked();
72  void playButtonClicked();
76  void downloadButtonClicked();
80  void addButtonClicked();
81 
82 protected:
86  virtual void mousePressEvent(QMouseEvent *event) override final;
87  virtual void mouseMoveEvent(QMouseEvent *event) override final;
88  virtual void mouseReleaseEvent(QMouseEvent *event) override final;
92  void initFirstWidget();
96  void initSecondWidget();
100  void setSongCountText();
101 
102  QString m_value;
103  QWidget *m_mainWindow;
104  QPushButton *m_songButton;
105  QLabel *m_iconLabel, *m_statusLabel, *m_infoLabel;
106  QStackedWidget *m_container;
111 
113  {
114  QLabel *m_label;
115  QFont m_font;
116  };
117  QList<TTKResizeWidget> m_resizeWidgets;
118 
119 };
120 
121 #endif // MusicAbstractItemQueryWidget_H
#define TTK_MODULE_EXPORT
The class of the search result data item.
MusicItemQueryTableWidget * m_queryTableWidget
The class of the query item table widget.
#define TTK_DECLARE_MODULE(Class)
Definition: ttkqtglobal.h:152
The class of the widget resize interface.
The class of the item query widget base.
MusicAbstractQueryRequest * m_networkRequest
The class of the abstract query download data from net.
MusicSongSharingWidget::Module m_shareType