ManiVault 1.0.0
A Flexible and Extensible Visual Analytics Framework for High-Dimensional Data
Loading...
Searching...
No Matches
hdps::gui::DropWidget::DropRegion Class Reference

#include <DropWidget.h>

Inheritance diagram for hdps::gui::DropWidget::DropRegion:

Classes

class  StandardWidget
 

Public Types

using Dropped = std::function< void(void)>
 

Public Member Functions

 DropRegion (QObject *parent, QWidget *widget, const Dropped &dropped=Dropped())
 
 DropRegion (QObject *parent, const QString &title, const QString &description, const QString &iconName="file-import", const bool &dropAllowed=true, const Dropped &dropped=Dropped())
 
QWidget * getWidget () const
 
void drop ()
 

Protected Attributes

QWidget * _widget
 
const Dropped _dropped
 

Detailed Description

Drop region class

This class represents a drop region (a region where mime data can be dropped) It has a visual representation widget and a callback function dropped when dropping takes place

Author
Thomas Kroes

Member Typedef Documentation

◆ Dropped

using hdps::gui::DropWidget::DropRegion::Dropped = std::function<void(void)>

Callback function when mime data is dropped

Constructor & Destructor Documentation

◆ DropRegion() [1/2]

hdps::gui::DropWidget::DropRegion::DropRegion ( QObject *  parent,
QWidget *  widget,
const Dropped dropped = Dropped() 
)

Constructs a drop region object with a custom widget

Parameters
parentParent widget to enable drag and drop behavior for
widgetWidget for the visual representation of the region
iconNameName of the icon
droppedCallback function when mime data is dropped

◆ DropRegion() [2/2]

hdps::gui::DropWidget::DropRegion::DropRegion ( QObject *  parent,
const QString &  title,
const QString &  description,
const QString &  iconName = "file-import",
const bool &  dropAllowed = true,
const Dropped dropped = Dropped() 
)

Constructs a drop region object with a standard widget

Parameters
parentParent widget to enable drag and drop behavior for
titleTitle of the drop region
descriptionDescription of the drop region
iconNameName of the icon
dropAllowedWhether dropping is allowed in the region
droppedCallback function when mime data is dropped

Member Function Documentation

◆ drop()

void hdps::gui::DropWidget::DropRegion::drop ( )

Initiate the dropping process

◆ getWidget()

QWidget * hdps::gui::DropWidget::DropRegion::getWidget ( ) const

Get visual representation of the region

Member Data Documentation

◆ _dropped

const Dropped hdps::gui::DropWidget::DropRegion::_dropped
protected

visual representation of the region

◆ _widget

QWidget* hdps::gui::DropWidget::DropRegion::_widget
protected

The documentation for this class was generated from the following files: