mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
selection: rename selectionChanged() to divesSelected()
The signals/slot names for dive selection changes were a mess. Unify on divesSelected(). Firstly, selectionChanged() is a Qt thing. Secondly, it is consistent with tripSelected(). Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
de2c4d93e0
commit
908da77863
6 changed files with 18 additions and 18 deletions
|
@ -39,7 +39,7 @@ DiveListView::DiveListView(QWidget *parent) : QTreeView(parent),
|
|||
setItemDelegateForColumn(DiveTripModelBase::RATING, new StarWidgetsDelegate(this));
|
||||
MultiFilterSortModel *m = MultiFilterSortModel::instance();
|
||||
setModel(m);
|
||||
connect(m, &MultiFilterSortModel::selectionChanged, this, &DiveListView::diveSelectionChanged);
|
||||
connect(m, &MultiFilterSortModel::divesSelected, this, &DiveListView::divesSelectedSlot);
|
||||
connect(m, &MultiFilterSortModel::tripSelected, this, &DiveListView::tripSelected);
|
||||
connect(&diveListNotifier, &DiveListNotifier::settingsChanged, this, &DiveListView::settingsChanged);
|
||||
|
||||
|
@ -225,7 +225,7 @@ void DiveListView::reset()
|
|||
}
|
||||
|
||||
// If items were selected, inform the selection model
|
||||
void DiveListView::diveSelectionChanged(const QVector<QModelIndex> &indices, QModelIndex currentDive, int currentDC)
|
||||
void DiveListView::divesSelectedSlot(const QVector<QModelIndex> &indices, QModelIndex currentDive, int currentDC)
|
||||
{
|
||||
// This is the entry point for programmatical selection changes.
|
||||
// Set a flag so that selection changes are not further processed,
|
||||
|
|
|
@ -52,7 +52,7 @@ slots:
|
|||
void renumberDives();
|
||||
void addDivesToTrip();
|
||||
void shiftTimes();
|
||||
void diveSelectionChanged(const QVector<QModelIndex> &indices, QModelIndex currentDive, int currentDC);
|
||||
void divesSelectedSlot(const QVector<QModelIndex> &indices, QModelIndex currentDive, int currentDC);
|
||||
void tripSelected(QModelIndex trip, QModelIndex currentDive);
|
||||
private:
|
||||
void rowsInserted(const QModelIndex &parent, int start, int end) override;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue