diff options
-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> |