From: san Date: Fri, 12 Aug 2011 09:29:52 +0000 (+0000) Subject: Methods sortIndicator() and setSortIndicator are added. X-Git-Tag: V5_1_14~3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=5fd73dce521a23a0406011986227a9d15f8d5512;p=modules%2Fgui.git Methods sortIndicator() and setSortIndicator are added. --- diff --git a/src/Qtx/QtxTreeView.cxx b/src/Qtx/QtxTreeView.cxx index bf84aa366..996496563 100644 --- a/src/Qtx/QtxTreeView.cxx +++ b/src/Qtx/QtxTreeView.cxx @@ -640,6 +640,22 @@ bool QtxTreeView::sortingEnabled() const return h && ( h->sortingEnabled() ); } +void QtxTreeView::setSortIndicators( const QVector& inds, const QVector& sorder) +{ + Header* h = dynamic_cast( header() ); + if( h ){ + h->clearSortIndicators(); + h->setSortIndicators( inds, sorder); + } +} + +void QtxTreeView::sortIndicators( QVector& inds, QVector& sorder ) const +{ + Header* h = dynamic_cast( header() ); + if( h ) + h->sortIndicators( inds, sorder); +} + /*! \brief Enables multi-column sorting. As soon as multi-column sorting is enabled, the user can click diff --git a/src/Qtx/QtxTreeView.h b/src/Qtx/QtxTreeView.h index bdb2409a0..a80f9976b 100644 --- a/src/Qtx/QtxTreeView.h +++ b/src/Qtx/QtxTreeView.h @@ -57,6 +57,8 @@ public: void setSortingEnabled( const bool ); bool sortingEnabled() const; + void setSortIndicators( const QVector&, const QVector& ); + void sortIndicators( QVector&, QVector& ) const; void setMultiSortEnabled( const bool ); bool multiSortEnabled() const;