mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
desktop: make dive site list an independent widget
This used to be one of the tab-widgets, which was illogical and caused confusion. Notably, erroneously clicking on the tab header led to a reset of the dive selection. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
b5889f0f3c
commit
17033d0d83
10 changed files with 94 additions and 65 deletions
30
desktop-widgets/divesitelistview.h
Normal file
30
desktop-widgets/divesitelistview.h
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
// SPDX-License-Identifier: GPL-2.0
|
||||
#ifndef DIVE_SITE_LIST_VIEW_H
|
||||
#define DIVE_SITE_LIST_VIEW_H
|
||||
|
||||
#include "ui_divesitelistview.h"
|
||||
|
||||
class DiveSiteSortedModel;
|
||||
|
||||
class DiveSiteListView : public QWidget {
|
||||
Q_OBJECT
|
||||
public:
|
||||
DiveSiteListView(QWidget *parent = 0);
|
||||
private slots:
|
||||
void add();
|
||||
void done();
|
||||
void diveSiteAdded(struct dive_site *, int idx);
|
||||
void diveSiteChanged(struct dive_site *ds, int field);
|
||||
void diveSiteClicked(const QModelIndex &);
|
||||
void on_purgeUnused_clicked();
|
||||
void on_filterText_textChanged(const QString &text);
|
||||
void selectionChanged(const QItemSelection &selected, const QItemSelection &deselected);
|
||||
private:
|
||||
Ui::DiveSiteListView ui;
|
||||
DiveSiteSortedModel *model;
|
||||
QVector<dive_site *> selectedDiveSites();
|
||||
void hideEvent(QHideEvent *) override;
|
||||
void showEvent(QShowEvent *) override;
|
||||
};
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue