mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
Add skeleton code for the table view that will accepts drops
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
cedf339e1e
commit
aa33ae9526
3 changed files with 44 additions and 2 deletions
|
@ -96,7 +96,6 @@ void ColumnNameView::mousePressEvent(QMouseEvent *press)
|
|||
|
||||
void ColumnNameView::dragLeaveEvent(QDragLeaveEvent *leave)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void ColumnNameView::dragEnterEvent(QDragEnterEvent *event)
|
||||
|
@ -118,6 +117,30 @@ void ColumnNameView::dropEvent(QDropEvent *event)
|
|||
}
|
||||
}
|
||||
|
||||
ColumnDropCSVView::ColumnDropCSVView(QWidget *parent)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void ColumnDropCSVView::dragLeaveEvent(QDragLeaveEvent *leave)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void ColumnDropCSVView::dragEnterEvent(QDragEnterEvent *event)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void ColumnDropCSVView::dragMoveEvent(QDragMoveEvent *event)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void ColumnDropCSVView::dropEvent(QDropEvent *event)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
DiveLogImportDialog::DiveLogImportDialog(QStringList *fn, QWidget *parent) : QDialog(parent),
|
||||
selector(true),
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
#include <QAbstractListModel>
|
||||
#include <QListView>
|
||||
#include <QDragLeaveEvent>
|
||||
#include <QTableView>
|
||||
|
||||
#include "../dive.h"
|
||||
#include "../divelist.h"
|
||||
|
@ -40,6 +41,19 @@ private:
|
|||
int currentDraggedIndex;
|
||||
};
|
||||
|
||||
class ColumnDropCSVView : public QTableView {
|
||||
Q_OBJECT
|
||||
public:
|
||||
ColumnDropCSVView(QWidget *parent);
|
||||
protected:
|
||||
void dragLeaveEvent(QDragLeaveEvent *leave);
|
||||
void dragEnterEvent(QDragEnterEvent *event);
|
||||
void dragMoveEvent(QDragMoveEvent *event);
|
||||
void dropEvent(QDropEvent *event);
|
||||
private:
|
||||
QStringList columns;
|
||||
};
|
||||
|
||||
class DiveLogImportDialog : public QDialog {
|
||||
Q_OBJECT
|
||||
|
||||
|
|
|
@ -118,7 +118,7 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTableView" name="tableView"/>
|
||||
<widget class="ColumnDropCSVView" name="tableView"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
|
@ -144,6 +144,11 @@
|
|||
<extends>QListView</extends>
|
||||
<header>divelogimportdialog.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>ColumnDropCSVView</class>
|
||||
<extends>QTableView</extends>
|
||||
<header>divelogimportdialog.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<tabstops>
|
||||
<tabstop>buttonBox</tabstop>
|
||||
|
|
Loading…
Reference in a new issue