folderlistwidget.h
36 lines
| 870 B
| text/x-c
|
CLexer
/ src / folderlistwidget.h
r1 | #ifndef FOLDERLISTWIDGET_H | |||
#define FOLDERLISTWIDGET_H | ||||
#include <QWidget> | ||||
#include <QListWidget> | ||||
#include <QPoint> | ||||
#include <mainwindow.h> | ||||
class FolderListWidget : public QListWidget | ||||
{ | ||||
Q_OBJECT | ||||
public: | ||||
explicit FolderListWidget(QWidget *parent = 0); | ||||
~FolderListWidget(); | ||||
bool contains(const QString& name); | ||||
bool isDraging(const QString& name); | ||||
void setMainWindow(MainWindow* mw); | ||||
void setPath(const QString& path); | ||||
signals: | ||||
void askGlobalRescan(); | ||||
public slots: | ||||
protected: | ||||
void dragEnterEvent(QDragEnterEvent *event); | ||||
void dragMoveEvent(QDragMoveEvent *event); | ||||
void dragLeaveEvent(QDragLeaveEvent* event); | ||||
void dropEvent(QDropEvent *event); | ||||
void mousePressEvent(QMouseEvent *event); | ||||
void mouseMoveEvent(QMouseEvent *event); | ||||
private: | ||||
QStringList lastDragItems; | ||||
MainWindow* p_mainWin; | ||||
QString p_path; | ||||
}; | ||||
#endif // FOLDERLISTWIDGET_H | ||||