From 94dc618e375f5c85b57a2932a516d69828279eac Mon Sep 17 00:00:00 2001 From: vsr Date: Thu, 2 Aug 2007 12:56:59 +0000 Subject: [PATCH] *** empty log message *** --- src/Qtx/QtxTreeView.cxx | 26 ++++++++++++++++++++++++++ src/Qtx/QtxTreeView.h | 2 ++ 2 files changed, 28 insertions(+) diff --git a/src/Qtx/QtxTreeView.cxx b/src/Qtx/QtxTreeView.cxx index 15acdb6f2..b3016bfed 100644 --- a/src/Qtx/QtxTreeView.cxx +++ b/src/Qtx/QtxTreeView.cxx @@ -276,6 +276,21 @@ void QtxTreeView::onHeaderClicked( int column ) sortByColumn( column, header()->sortIndicatorOrder() ); } +/*! + \brief Called when the selection is changed. + + Emits selectionChanged() signal. + + \param selected new selection + \param deselected previous selection +*/ +void QtxTreeView::selectionChanged( const QItemSelection& selected, + const QItemSelection& deselected ) +{ + QTreeView::selectionChanged( selected, deselected ); + emit( selectionChanged() ); +} + /*! \brief Expand/collapse the specified item (recursively). \param index model index @@ -299,6 +314,17 @@ void QtxTreeView::setOpened( const QModelIndex& index, const int levels, bool op } } +/*! + \fn QtxTreeView::sortingEnabled( bool on ); + \brief Emitted when "Sorting" commans is enabled/disabled from the popup menu. + \param on \c true if sorting is enabled and \c false otherwise +*/ + +/*! + \fn QtxTreeView::selectionChanged(); + \brief Emitted when selection is changed in the tree view. +*/ + /*! \brief Emit sortingEnabled(bool) signal. \param enabled "enable sorting" flag state diff --git a/src/Qtx/QtxTreeView.h b/src/Qtx/QtxTreeView.h index 0f0971227..4d5935f8d 100644 --- a/src/Qtx/QtxTreeView.h +++ b/src/Qtx/QtxTreeView.h @@ -53,12 +53,14 @@ public: protected slots: void onHeaderClicked( int ); + void selectionChanged( const QItemSelection&, const QItemSelection& ); protected: void setOpened( const QModelIndex&, const int, bool ); signals: void sortingEnabled( bool ); + void selectionChanged(); private: void emitSortingEnabled( bool ); -- 2.39.2