From cdb6009b0d38b537de49a9972aaae2dbd6da0c3b Mon Sep 17 00:00:00 2001 From: Klaus Basan Date: Tue, 18 Feb 2014 14:22:03 +0100 Subject: [PATCH] refs #139 , added method to directly get indexToPropertyIndex by QModelIndex --- src/blackgui/listmodelbase.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/blackgui/listmodelbase.h b/src/blackgui/listmodelbase.h index 9168e917d..54e7977ed 100644 --- a/src/blackgui/listmodelbase.h +++ b/src/blackgui/listmodelbase.h @@ -70,6 +70,14 @@ namespace BlackGui */ virtual int columnToPropertyIndex(int column) const; + /*! + * \brief Index to property index + * \param index + */ + virtual int indexToPropertyIndex(const QModelIndex &index) const { + return this->columnToPropertyIndex(index.column()); + } + /*! * \brief Set sort column * \param column column index