diff options
author | Tomaz Canabrava <tomaz.canabrava@intel.com> | 2015-01-06 14:54:58 -0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-01-06 19:35:03 -0800 |
commit | 2034508c074c55774a489cb86076365d2acee050 (patch) | |
tree | cb3aac88e6618374ea56c600cd29f40210f0a68f /qt-ui | |
parent | d57d86f5dc657971cb6596aec25b7692b1880bfb (diff) | |
download | subsurface-2034508c074c55774a489cb86076365d2acee050.tar.gz |
Add class skeleton that will handle the drag starts
This class will handle the drag 'n drop "drag" part.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r-- | qt-ui/divelogimportdialog.cpp | 10 | ||||
-rw-r--r-- | qt-ui/divelogimportdialog.h | 9 | ||||
-rw-r--r-- | qt-ui/divelogimportdialog.ui | 9 |
3 files changed, 27 insertions, 1 deletions
diff --git a/qt-ui/divelogimportdialog.cpp b/qt-ui/divelogimportdialog.cpp index 60d74a952..d3a29ba0d 100644 --- a/qt-ui/divelogimportdialog.cpp +++ b/qt-ui/divelogimportdialog.cpp @@ -57,6 +57,16 @@ int ColumnNameProvider::rowCount(const QModelIndex &parent) const return columnNames.count(); } +ColumnNameView::ColumnNameView(QWidget *parent) +{ + +} + +void ColumnNameView::mousePressEvent(QMouseEvent *press) +{ + +} + DiveLogImportDialog::DiveLogImportDialog(QStringList *fn, QWidget *parent) : QDialog(parent), selector(true), ui(new Ui::DiveLogImportDialog) diff --git a/qt-ui/divelogimportdialog.h b/qt-ui/divelogimportdialog.h index f658e5df4..9441fa71a 100644 --- a/qt-ui/divelogimportdialog.h +++ b/qt-ui/divelogimportdialog.h @@ -3,6 +3,7 @@ #include <QDialog> #include <QAbstractListModel> +#include <QListView> #include "../dive.h" #include "../divelist.h" @@ -24,6 +25,14 @@ private: QStringList columnNames; }; +class ColumnNameView : public QListView { + Q_OBJECT +public: + ColumnNameView(QWidget *parent); +protected: + void mousePressEvent(QMouseEvent *press); +}; + class DiveLogImportDialog : public QDialog { Q_OBJECT diff --git a/qt-ui/divelogimportdialog.ui b/qt-ui/divelogimportdialog.ui index 287d67e11..8cbf9bc0e 100644 --- a/qt-ui/divelogimportdialog.ui +++ b/qt-ui/divelogimportdialog.ui @@ -98,7 +98,7 @@ </layout> </item> <item> - <widget class="QListView" name="avaliableColumns"> + <widget class="ColumnNameView" name="avaliableColumns"> <property name="maximumSize"> <size> <width>16777215</width> @@ -138,6 +138,13 @@ </item> </layout> </widget> + <customwidgets> + <customwidget> + <class>ColumnNameView</class> + <extends>QListView</extends> + <header>divelogimportdialog.h</header> + </customwidget> + </customwidgets> <tabstops> <tabstop>buttonBox</tabstop> </tabstops> |