add drag and drop onto app icon (dock etc.) support for MacOS platform.

This commit is contained in:
Daisuke Cato
2016-10-12 02:09:46 +09:00
commit 649c203759
987 changed files with 90423 additions and 0 deletions

View File

@ -0,0 +1,36 @@
#ifndef YACREADER_FOLDERS_VIEW_H
#define YACREADER_FOLDERS_VIEW_H
#include "yacreader_treeview.h"
#include <QtWidgets>
class YACReaderFoldersView : public YACReaderTreeView
{
Q_OBJECT
public:
explicit YACReaderFoldersView(QWidget * parent = 0);
signals:
//Drops
void copyComicsToFolder(QList<QPair<QString,QString> >,QModelIndex);
void moveComicsToFolder(QList<QPair<QString,QString> >,QModelIndex);
protected:
//Drop to import
void dragEnterEvent(QDragEnterEvent *event);
void dragLeaveEvent(QDragLeaveEvent *event);
void dragMoveEvent(QDragMoveEvent *event);
void dropEvent(QDropEvent *event);
};
class YACReaderFoldersViewItemDeletegate: public QStyledItemDelegate
{
Q_OBJECT
public:
explicit YACReaderFoldersViewItemDeletegate(QObject *parent = 0);
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const;
};
#endif // YACREADER_FOLDERS_VIEW_H