diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2020-09-29 23:19:11 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-10-03 10:01:13 -0700 |
commit | f5fe6839c7672f775e35068f46fbb2d2e41b8bf5 (patch) | |
tree | 37fe93300f9fb809677d1ad3308ca0d76355b8b6 /desktop-widgets/tripselectiondialog.h | |
parent | f4ee8934243d6c924d810b5b2ec5a6c1f3b492f8 (diff) | |
download | subsurface-f5fe6839c7672f775e35068f46fbb2d2e41b8bf5.tar.gz |
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>
Diffstat (limited to 'desktop-widgets/tripselectiondialog.h')
-rw-r--r-- | desktop-widgets/tripselectiondialog.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/desktop-widgets/tripselectiondialog.h b/desktop-widgets/tripselectiondialog.h new file mode 100644 index 000000000..9cef28e17 --- /dev/null +++ b/desktop-widgets/tripselectiondialog.h @@ -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 |