Ref T529, allow to explicitly set no sort order in model/view

This commit is contained in:
Klaus Basan
2019-02-04 16:52:50 +01:00
committed by Mat Sutcliffe
parent 14c3c51585
commit 3aee73840d
5 changed files with 31 additions and 3 deletions

View File

@@ -171,9 +171,12 @@ namespace BlackGui
//! \copydoc BlackGui::Models::CListModelBaseNonTemplate::setSorting
virtual bool setSorting(const BlackMisc::CPropertyIndex &propertyIndex, Qt::SortOrder order = Qt::AscendingOrder) = 0;
//! Sort by index
//! \copydoc BlackGui::Models::CListModelBaseNonTemplate::sortByPropertyIndex
virtual void sortByPropertyIndex(const BlackMisc::CPropertyIndex &propertyIndex, Qt::SortOrder order = Qt::AscendingOrder) = 0;
//! \copydoc BlackGui::Models::CListModelBaseNonTemplate::setNoSorting
virtual void setNoSorting() = 0;
//! Allow to drag and/or drop value objects
virtual void allowDragDrop(bool allowDrag, bool allowDrop, bool allowDropJsonFile = false) = 0;
@@ -715,6 +718,7 @@ namespace BlackGui
virtual bool acceptDrop(const QMimeData *mimeData) const override;
virtual bool setSorting(const BlackMisc::CPropertyIndex &propertyIndex, Qt::SortOrder order = Qt::AscendingOrder) override;
virtual void sortByPropertyIndex(const BlackMisc::CPropertyIndex &propertyIndex, Qt::SortOrder order = Qt::AscendingOrder) override;
virtual void setNoSorting() override { m_model->setNoSorting(); }
//! @}
//! Column count