Project

General

Profile

Feature #8636 ยป dragdrop-between-v2.diff

Korneel Dumon, 06/03/2021 05:33 PM

View differences:

src/Wt/WAbstractItemModel.h
virtual void dropEvent(const WDropEvent& e, DropAction action,
int row, int column, const WModelIndex& parent);
virtual void dropEvent(const WDropEvent& e, DropAction action,
const WModelIndex& index, Wt::Side side);
/*! \brief Inserts one column.
*
* This is a convenience method that adds a single column, and is
src/Wt/WAbstractItemView.h
PositionAtCenter //!< Positions the item at the center of the viewport
};
enum class DropLocation {
OnItem,
BetweenRows,
BetweenColumns
};
class WAbstractItemDelegate;
class WAbstractItemModel;
class WApplication;
......
*/
void setDropsEnabled(bool enable);
/*! \brief Enables drop operations (drag & drop).
*
* When DropLocation::BetweenRows is enabled, the view will
* indicate that something may be dropped between any two items.
* When DropLocation::OnItem and DropLocation::BetweenRows are both enabled,
* the drop indication differs depending on whether ItemFlag::DropEnabled
* is set on the item.
*
* Drop events must be handled in dropEvent().
*/
void setEnabledDropLocation(WFlags<DropLocation> droplocation);
/*! \brief Sets the row height.
*
* The view renders all rows with a same height. This method
......
*/
virtual void dropEvent(const WDropEvent& event, const WModelIndex& target);
virtual void dropEvent(const WDropEvent& event, const WModelIndex& index,
Wt::Side side);
using WWidget::dropEvent;
/*! \brief Create an extra widget in the header.
    (1-1/1)