diff options
author | Tomaz Canabrava <tomaz.canabrava@intel.com> | 2015-01-06 16:52:15 -0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-01-06 19:38:08 -0800 |
commit | 7d532998311e840b55a36fd626b34f04942fbdfc (patch) | |
tree | 3b5d6c021e712b512ab7bca89e99ee708ffd7616 /qt-ui/divelogimportdialog.cpp | |
parent | 4e7bd86e07ce5220d54f4140730cfc25a8cb818c (diff) | |
download | subsurface-7d532998311e840b55a36fd626b34f04942fbdfc.tar.gz |
Implement most of the drag operation
Only thing missing is the Drop.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/divelogimportdialog.cpp')
-rw-r--r-- | qt-ui/divelogimportdialog.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/qt-ui/divelogimportdialog.cpp b/qt-ui/divelogimportdialog.cpp index e483cb8ef..0b6dfb7d4 100644 --- a/qt-ui/divelogimportdialog.cpp +++ b/qt-ui/divelogimportdialog.cpp @@ -121,22 +121,25 @@ void ColumnNameView::dropEvent(QDropEvent *event) ColumnDropCSVView::ColumnDropCSVView(QWidget *parent) { - + setAcceptDrops(true); } void ColumnDropCSVView::dragLeaveEvent(QDragLeaveEvent *leave) { - + Q_UNUSED(leave); } void ColumnDropCSVView::dragEnterEvent(QDragEnterEvent *event) { - + event->acceptProposedAction(); } void ColumnDropCSVView::dragMoveEvent(QDragMoveEvent *event) { - + QModelIndex curr = indexAt(event->pos()); + if (!curr.isValid() || curr.row() != 0) + return; + event->acceptProposedAction(); } void ColumnDropCSVView::dropEvent(QDropEvent *event) |