1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-21 10:35:08 +00:00

LibGUI: Let GModel specify the drag data type

GModel subclasses can now override drag_data_type() to specify which type
GAbstractView should set for drag data. The default implementation returns a
null string, which disables dragging from this widget.
This commit is contained in:
Sergey Bugaev 2020-01-22 21:15:46 +03:00 committed by Andreas Kling
parent d3ce7ae0e3
commit dec95cb8b3
5 changed files with 14 additions and 2 deletions

View file

@ -117,6 +117,7 @@ public:
virtual void update() override;
virtual GModelIndex parent_index(const GModelIndex&) const override;
virtual GModelIndex index(int row, int column = 0, const GModelIndex& parent = GModelIndex()) const override;
virtual StringView drag_data_type() const override { return "url-list"; }
static String timestamp_string(time_t timestamp)
{