mirror of
https://github.com/OpenMW/openmw.git
synced 2025-11-08 20:16:43 +00:00
Accept drops on the filterbox
This commit is contained in:
parent
569533eeae
commit
dd95ed8e4c
2 changed files with 25 additions and 0 deletions
|
|
@ -2,6 +2,7 @@
|
||||||
#include "filterbox.hpp"
|
#include "filterbox.hpp"
|
||||||
|
|
||||||
#include <QHBoxLayout>
|
#include <QHBoxLayout>
|
||||||
|
#include <QDragEnterEvent>
|
||||||
|
|
||||||
#include "recordfilterbox.hpp"
|
#include "recordfilterbox.hpp"
|
||||||
|
|
||||||
|
|
@ -21,4 +22,21 @@ CSVFilter::FilterBox::FilterBox (CSMWorld::Data& data, QWidget *parent)
|
||||||
connect (recordFilterBox,
|
connect (recordFilterBox,
|
||||||
SIGNAL (filterChanged (boost::shared_ptr<CSMFilter::Node>)),
|
SIGNAL (filterChanged (boost::shared_ptr<CSMFilter::Node>)),
|
||||||
this, SIGNAL (recordFilterChanged (boost::shared_ptr<CSMFilter::Node>)));
|
this, SIGNAL (recordFilterChanged (boost::shared_ptr<CSMFilter::Node>)));
|
||||||
|
|
||||||
|
setAcceptDrops(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CSVFilter::FilterBox::dropEvent (QDropEvent* event)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void CSVFilter::FilterBox::dragEnterEvent (QDragEnterEvent* event)
|
||||||
|
{
|
||||||
|
event->acceptProposedAction();
|
||||||
|
}
|
||||||
|
|
||||||
|
void CSVFilter::FilterBox::dragMoveEvent (QDragMoveEvent* event)
|
||||||
|
{
|
||||||
|
event->accept();
|
||||||
}
|
}
|
||||||
|
|
@ -16,6 +16,12 @@ namespace CSVFilter
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
|
void dragEnterEvent (QDragEnterEvent* event);
|
||||||
|
|
||||||
|
void dropEvent (QDropEvent* event);
|
||||||
|
|
||||||
|
void dragMoveEvent(QDragMoveEvent *event);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
FilterBox (CSMWorld::Data& data, QWidget *parent = 0);
|
FilterBox (CSMWorld::Data& data, QWidget *parent = 0);
|
||||||
|
|
@ -28,3 +34,4 @@ namespace CSVFilter
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue