|
ManiVault 1.0.0
A Flexible and Extensible Visual Analytics Framework for High-Dimensional Data
|
#include <DropWidget.h>
Classes | |
| class | DropIndicatorWidget |
| class | DropRegion |
| class | DropRegionContainerWidget |
Public Types | |
| using | DropRegions = QList< DropRegion * > |
| using | GetDropRegionsFunction = std::function< DropRegions(const QMimeData *)> |
Public Member Functions | |
| DropWidget (QWidget *parent) | |
| bool | eventFilter (QObject *target, QEvent *event) override |
| void | initialize (const GetDropRegionsFunction &getDropRegions) |
| bool | getShowDropIndicator () const |
| void | setShowDropIndicator (const bool &showDropIndicator) |
| void | setDropIndicatorWidget (QWidget *dropIndicatorWidget) |
Protected Attributes | |
| GetDropRegionsFunction | _getDropRegionsFunction |
| bool | _showDropIndicator |
| QWidget * | _dropIndicatorWidget |
Advanced drop widget class
This class adds advanced drag and drop support to arbitrary (parent) widget without having to change it Depending on the data being dragged, an overlay is presented with one or more drop regions Each region has its own visual representation and drop behaviour (with custom lambda function)
Note: Add the following line to the parent widget to enabled drag and drop: setAcceptDrops(true);
| using hdps::gui::DropWidget::DropRegions = QList<DropRegion*> |
Alias for dropping regions list
| using hdps::gui::DropWidget::GetDropRegionsFunction = std::function<DropRegions(const QMimeData*)> |
Function for obtaining a list of available drop regions
| hdps::gui::DropWidget::DropWidget | ( | QWidget * | parent | ) |
Constructor
| parent | Parent widget |
|
override |
Respond to target events
| target | Object of which an event occurred |
| event | The event that took place |
| bool hdps::gui::DropWidget::getShowDropIndicator | ( | ) | const |
Get/set whether to show the drop indicator widget
| void hdps::gui::DropWidget::initialize | ( | const GetDropRegionsFunction & | getDropRegions | ) |
Initialize the drop widget
| getDropRegions | Function that (based on mime data) returns a list of drop regions |
| void hdps::gui::DropWidget::setDropIndicatorWidget | ( | QWidget * | dropIndicatorWidget | ) |
Sets the drop indicator widget
| dropIndicatorWidget | Drop indicator widget |
| void hdps::gui::DropWidget::setShowDropIndicator | ( | const bool & | showDropIndicator | ) |
|
protected |
Whether to show a drop indicator widget overlay
|
protected |
|
protected |
Function that (based on mime data) returns a list of drop regions