mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
8cd191c271
Make it possible for the individual tab-widgets to access the parent widget. In principle this could have been done by downcasting the pointer returned by parent(), but this makes it explicit. The goal here is to store information on the selection, current dive, etc. without repeating it in every subwidget. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
22 lines
416 B
C++
22 lines
416 B
C++
// SPDX-License-Identifier: GPL-2.0
|
|
#ifndef TAB_BASE_H
|
|
#define TAB_BASE_H
|
|
|
|
#include <QWidget>
|
|
|
|
struct dive;
|
|
class MainTab;
|
|
|
|
class TabBase : public QWidget {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
TabBase(MainTab *parent);
|
|
virtual void updateData(const std::vector<dive *> &selection, dive *currentDive, int currentDC) = 0;
|
|
virtual void clear() = 0;
|
|
virtual void updateUi(QString titleColor);
|
|
protected:
|
|
MainTab &parent;
|
|
};
|
|
|
|
#endif
|