TTKMusicPlayer  3.7.0.0
TTKMusicPlayer imitates Kugou UI, the music player uses of qmmp core library based on Qt for windows and linux
musicsongslistplaytablewidget.h
Go to the documentation of this file.
1 #ifndef MUSICSONGSLISTPLAYTABLEWIDGET_H
2 #define MUSICSONGSLISTPLAYTABLEWIDGET_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 <QTimer>
24 
25 class QPropertyAnimation;
30 
35 {
36  Q_OBJECT
38 public:
42  explicit MusicSongsListPlayTableWidget(int index, QWidget *parent = nullptr);
47 
51  virtual void updateSongsList(const MusicSongList &songs) override final;
55  virtual void selectRow(int index) override final;
56 
60  void updateSearchFileName(MusicSongList *songs, const TTKIntList &result);
61 
65  inline void setSongSort(MusicSongSort *sort) { m_songSort = sort; }
69  void updateDurationLabel(const QString &current, const QString &total) const;
73  void updateCurrentArtist();
77  void adjustPlayWidgetRow();
81  bool createUploadFileModule();
82 
83 Q_SIGNALS:
87  void isSearchedResultEmpty(bool &empty);
91  void deleteItemAt(const TTKIntList &index, bool fileRemove);
95  void itemIndexSwaped(int start, int end, int play, MusicSongList &songs);
99  void addSongToLovestList(bool state, int row);
103  void showFloatWidget();
107  void songListSortBy(int index);
108 
109 public Q_SLOTS:
113  virtual void itemCellEntered(int row, int column) override final;
117  virtual void itemCellClicked(int row, int column) override final;
121  virtual void removeItems() override final;
125  virtual void removeItemAt() override final;
129  void removeItemWithFile();
133  void setChangSongName();
137  void showMakeRingWidget();
141  void showTransformWidget();
145  void searchQueryByName(QAction *action);
149  void addToPlayLater();
153  void addToPlayedList();
157  void itemRenameFinished(const QString &name);
161  void songListSortBy(QAction *action);
162 
163 private Q_SLOTS:
167  void showTimeOut();
171  void stayTimeOut();
172 
173 private:
177  virtual void mousePressEvent(QMouseEvent *event) override final;
178  virtual void mouseMoveEvent(QMouseEvent *event) override final;
179  virtual void mouseReleaseEvent(QMouseEvent *event) override final;
180  virtual void leaveEvent(QEvent *event) override final;
181  virtual void wheelEvent(QWheelEvent *event) override final;
182  virtual void contextMenuEvent(QContextMenuEvent *event) override final;
186  void closeRenameItem();
190  void startToDrag();
191 
192  QWidget *m_parent;
193  int m_dragStartIndex;
194  QPoint m_dragStartPoint;
195  bool m_mouseMoved;
196 
197  QTimer m_timerShow, m_timerStay;
198  MusicOpenFileWidget *m_openFileWidget;
199  MusicSongsListItemInfoWidget *m_songsInfoWidget;
200  MusicSongsListPlayWidget *m_songsPlayWidget;
201 
202  bool m_leftButtonPressed;
203  bool m_renameActived, m_deleteItemWithFile;
204  MusicSongList m_searchedSongs;
205  QTableWidgetItem *m_renameItem;
206  MusicLineEditItemDelegate *m_renameEditDelegate;
207  MusicSongSort *m_songSort;
208 
209 };
210 
211 #endif // MUSICSONGSLISTPLAYTABLEWIDGET_H
The class of the song list play widget.
#define TTK_MODULE_EXPORT
QList< int > TTKIntList
Definition: ttkqtglobal.h:188
const char * name
Definition: http_parser.c:458
The class of the song list item info widget.
virtual void itemCellClicked(int row, int column)
#define TTK_DECLARE_MODULE(Class)
Definition: ttkqtglobal.h:152
virtual void updateSongsList(const MusicSongList &songs)
The class of the music song sort tag.
Definition: musicsong.h:142
virtual void itemCellEntered(int row, int column)
The class of the lineedit item delegate.
#define const
Definition: zconf.h:233
The class of the open file widget.
The class of the songs list abstract table widget.
state
Definition: http_parser.c:279
The class of the songs list play table widget.