mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
desktop: add trip selection dialog
A simple dialog to select a trip. Simply fill a QListWidget without the model/view rigmarole. So much less painful! Of course that means that the dialog has to be regenerated everytime it is used. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
f4ee893424
commit
f5fe6839c7
4 changed files with 151 additions and 0 deletions
23
desktop-widgets/tripselectiondialog.h
Normal file
23
desktop-widgets/tripselectiondialog.h
Normal file
|
@ -0,0 +1,23 @@
|
|||
// SPDX-License-Identifier: GPL-2.0
|
||||
#ifndef TRIPSELECTIONDIALOG_H
|
||||
#define TRIPSELECTIONDIALOG_H
|
||||
|
||||
#include <QDialog>
|
||||
#include "ui_tripselectiondialog.h"
|
||||
|
||||
struct dive_trip;
|
||||
|
||||
class TripSelectionDialog : public QDialog {
|
||||
Q_OBJECT
|
||||
private
|
||||
slots:
|
||||
void selectionChanged();
|
||||
public:
|
||||
TripSelectionDialog(QWidget *parent); // Must pass in MainWindow for QShortcut hackery.
|
||||
dive_trip *getTrip(); // NULL if user canceled.
|
||||
private:
|
||||
dive_trip *selectedTrip() const;
|
||||
Ui::TripSelectionDialog ui;
|
||||
};
|
||||
|
||||
#endif // TRIPSELECTIONDIALOG_H
|
Loading…
Add table
Add a link
Reference in a new issue