-
Notifications
You must be signed in to change notification settings - Fork 0
/
pl.h
73 lines (66 loc) · 1.51 KB
/
pl.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#ifndef PL_H
#define PL_H
#include <QDialog>
#include <QList>
#include <QFileInfo>
#include <QContextMenuEvent>
#include <QAction>
#include <QMenu>
#include "ui_pl.h"
#include "openurl.h"
#include "config.h"
QT_BEGIN_NAMESPACE
class QDragEnterEvent;
class QDropEvent;
QT_END_NAMESPACE
namespace Ui {
class Pl;
}
class Pl : public QDialog {
Q_OBJECT
public:
Pl(QWidget *parent = 0);
~Pl();
bool addTrack(QString path);
void addPath(QString path);
bool addURL(QUrl url);
bool load(QString path);
bool save();
QString current();
QString path;
void setCurrent(int pos);
int getCurrent();
int getMax();
void setTitle(int idx, QString title);
void clear();
protected:
void changeEvent(QEvent *e);
void dragEnterEvent(QDragEnterEvent *event);
void dropEvent(QDropEvent *event);
void contextMenuEvent(QContextMenuEvent *event);
void hideEvent(QHideEvent *event);
void showEvent(QShowEvent *event);
private:
Ui::Pl *ui;
void select(int idx);
void createActions();
QAction *del;
QAction *addu;
const char* html;
int _curr;
int _currs;
void searcha(QString s);
QString lastSearch;
OpenUrl *ourl;
private slots:
void trackClick(QListWidgetItem *qlwi);
void deleteItem();
void addUrl();
void addUrlf();
void urlCanceled();
void search(QString s);
void nextSearch();
signals:
void changeTrack(QString);
};
#endif // PL_H