diff options
-rw-r--r-- | qt-ui/divelogimportdialog.cpp | 14 | ||||
-rw-r--r-- | qt-ui/divelogimportdialog.h | 9 |
2 files changed, 23 insertions, 0 deletions
diff --git a/qt-ui/divelogimportdialog.cpp b/qt-ui/divelogimportdialog.cpp index aabd6df6a..506f9c8d6 100644 --- a/qt-ui/divelogimportdialog.cpp +++ b/qt-ui/divelogimportdialog.cpp @@ -480,3 +480,17 @@ void DiveLogImportDialog::on_buttonBox_accepted() process_dives(true, false); MainWindow::instance()->refreshDisplay(); } + +TagDragDelegate::TagDragDelegate(QObject *parent) : QStyledItemDelegate(parent) +{ +} + +QSize TagDragDelegate::sizeHint(const QStyleOptionViewItem & option, const QModelIndex & index) const +{ + return QStyledItemDelegate::sizeHint(option, index); +} + +void TagDragDelegate::paint(QPainter * painter, const QStyleOptionViewItem & option, const QModelIndex & index) const +{ + QStyledItemDelegate::paint(painter, option, index); +} diff --git a/qt-ui/divelogimportdialog.h b/qt-ui/divelogimportdialog.h index 9a75bb14d..cc017e8c9 100644 --- a/qt-ui/divelogimportdialog.h +++ b/qt-ui/divelogimportdialog.h @@ -7,6 +7,7 @@ #include <QDragLeaveEvent> #include <QTableView> #include <QAbstractTableModel> +#include <QStyledItemDelegate> #include "../dive.h" #include "../divelist.h" @@ -110,4 +111,12 @@ private: static const CSVAppConfig CSVApps[CSVAPPS]; }; +class TagDragDelegate : public QStyledItemDelegate { + Q_OBJECT +public: + TagDragDelegate(QObject *parent); + QSize sizeHint(const QStyleOptionViewItem & option, const QModelIndex & index) const; + void paint(QPainter * painter, const QStyleOptionViewItem & option, const QModelIndex & index) const; +}; + #endif // DIVELOGIMPORTDIALOG_H |