Project

General

Profile

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

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

View differences:

src/Wt/WAbstractItemModel.h
575 575
  virtual void dropEvent(const WDropEvent& e, DropAction action,
576 576
			 int row, int column, const WModelIndex& parent);
577 577

  
578
  virtual void dropEvent(const WDropEvent& e, DropAction action,
579
                         const WModelIndex& index, Wt::Side side);
580

  
578 581
  /*! \brief Inserts one column.
579 582
   *
580 583
   * This is a convenience method that adds a single column, and is
src/Wt/WAbstractItemView.h
48 48
  PositionAtCenter       //!< Positions the item at the center of the viewport
49 49
};
50 50

  
51
enum class DropLocation {
52
  OnItem,
53
  BetweenRows,
54
  BetweenColumns
55
};
56

  
51 57
  class WAbstractItemDelegate;
52 58
  class WAbstractItemModel;
53 59
  class WApplication;
......
466 472
   */
467 473
  void setDropsEnabled(bool enable);
468 474

  
475
  /*! \brief Enables drop operations (drag & drop).
476
   *
477
   * When DropLocation::BetweenRows is enabled, the view will
478
   * indicate that something may be dropped between any two items.
479
   * When DropLocation::OnItem and DropLocation::BetweenRows are both enabled,
480
   * the drop indication differs depending on whether ItemFlag::DropEnabled
481
   * is set on the item.
482
   *
483
   * Drop events must be handled in dropEvent().
484
   */
485
  void setEnabledDropLocation(WFlags<DropLocation> droplocation);
486

  
469 487
  /*! \brief Sets the row height.
470 488
   *
471 489
   * The view renders all rows with a same height. This method
......
891 909
   */
892 910
  virtual void dropEvent(const WDropEvent& event, const WModelIndex& target);
893 911

  
912
  virtual void dropEvent(const WDropEvent& event, const WModelIndex& index,
913
                         Wt::Side side);
914

  
894 915
  using WWidget::dropEvent;
895 916

  
896 917
  /*! \brief Create an extra widget in the header.
    (1-1/1)