On selection change, pass down selection (including current dive and dc) to the tab widgets. Ultimately, this should remove access to global variables. A number of new accesses are marked as TODO. They shall be removed in due course. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
20 lines
370 B
C++
20 lines
370 B
C++
// SPDX-License-Identifier: GPL-2.0
|
|
#ifndef TAB_BASE_H
|
|
#define TAB_BASE_H
|
|
|
|
#include <QWidget>
|
|
|
|
struct dive;
|
|
|
|
class TabBase : public QWidget {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
using QWidget::QWidget;
|
|
virtual void updateData(const std::vector<dive *> &selection, dive *currentDive, int currentDC) = 0;
|
|
virtual void clear() = 0;
|
|
virtual void updateUi(QString titleColor);
|
|
};
|
|
|
|
#endif
|