Implement initial try of wxDropTarget.
The drop target needs to use an event filter to capture drag-and-drop events from the window.
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
#define _WX_QT_WINDOW_H_
|
||||
|
||||
#include <list>
|
||||
#include <QObject>
|
||||
|
||||
class QShortcut;
|
||||
template < class T > class QList;
|
||||
@@ -216,6 +217,16 @@ protected:
|
||||
QWidget *m_qtWindow;
|
||||
|
||||
private:
|
||||
class DnDEventAdapter : public QObject
|
||||
{
|
||||
public:
|
||||
DnDEventAdapter();
|
||||
virtual bool eventFilter(QObject* watched, QEvent* event);
|
||||
void SetDropTarget(wxDropTarget* dropTarget, QWidget* window);
|
||||
private:
|
||||
wxDropTarget *m_dropTarget;
|
||||
};
|
||||
|
||||
void Init();
|
||||
QScrollArea *m_qtContainer;
|
||||
|
||||
@@ -238,6 +249,10 @@ private:
|
||||
bool m_processingShortcut;
|
||||
#endif // wxUSE_ACCEL
|
||||
|
||||
#if wxUSE_DRAG_AND_DROP
|
||||
DnDEventAdapter dnd_event_adapter;
|
||||
#endif
|
||||
|
||||
wxDECLARE_DYNAMIC_CLASS_NO_COPY( wxWindowQt );
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user