mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-01 00:33:24 +00:00
Add delegate skeleton for the drag columns
This new class is the responsible to draw the columns that can be dragged from the top bar to the bottom one. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
2b311b1c2c
commit
8531cec100
2 changed files with 23 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue