Clean up wxDropTarget and wxWindow a bit more by moving DnD stuff fully into drop target (besides connecting and disconnecting).

Window doesn't have to know more than how to hook itself up.
Impl now performs function of event filter/adapter.
This commit is contained in:
Jay Nabonne
2019-01-29 16:55:31 +00:00
parent 2bceaaa572
commit 8c63c40953
4 changed files with 113 additions and 129 deletions

View File

@@ -217,16 +217,6 @@ 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;
@@ -249,10 +239,6 @@ private:
bool m_processingShortcut;
#endif // wxUSE_ACCEL
#if wxUSE_DRAG_AND_DROP
DnDEventAdapter dnd_event_adapter;
#endif
wxDECLARE_DYNAMIC_CLASS_NO_COPY( wxWindowQt );
};