-
Notifications
You must be signed in to change notification settings - Fork 4
/
playlistwidget.h
45 lines (37 loc) · 1.24 KB
/
playlistwidget.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#ifndef PLAYLISTWIDGET_H
#define PLAYLISTWIDGET_H
class PlayListWidget : public QFrame
{
Q_OBJECT
public:
PlayListWidget(QWidget *parent = 0);
~PlayListWidget();
bool AddRecommend(const QString& ed2k);
bool AddHistory(const QString& ed2k);
bool AddFavorite(const QString& ed2k);
private:
void InitControl();
void AddContextMenu();
void UpdateRoot();
QMenu *m_pPopupMenu;
QTreeWidgetItem *ChildAt(QTreeWidgetItem *parent, int index);
void RemoveAllChild(QTreeWidgetItem *item);
void UpdateRecommend(const QStringList& items);
void UpdateHistory(const QStringList& items);
void UpdateFavorite(const QStringList& items);
QLineEdit *m_pSearchListLineEdit;
QTreeWidget *m_pPlayListTreeWidget;
QTreeWidgetItem *m_pRecommendTreeWidgetItem;
QTreeWidgetItem *m_pFavoriteTreeWidgetItem;
QTreeWidgetItem *m_pHistoryTreeWidgetItem;
QTreeWidgetItem *m_pCurSelectedItem;
QStringList m_recommendList;
private slots:
void customContextMenuRequested(const QPoint & pos);
void deleteFavoriteItem();
void deleteHistoryItem();
void on_playListTreeWidget_itemDoubleClicked(QTreeWidgetItem *item, int column);
void on_playListExpanded(QTreeWidgetItem * item);
void on_searchListLineEdit_textChanged(const QString & text);
};
#endif // PLAYLISTWIDGET_H