mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
There was always this weird asymmetry that the "maintab" widget is one of the tabs itself, whereas the additional tabs were treated as extra-widgets. Turn the first tab into explicit source files to make the distinction between container and content clear. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
41 lines
742 B
C++
41 lines
742 B
C++
// SPDX-License-Identifier: GPL-2.0
|
|
/*
|
|
* maintab.h
|
|
*
|
|
* header file for the main tab of Subsurface
|
|
*
|
|
*/
|
|
#ifndef MAINTAB_H
|
|
#define MAINTAB_H
|
|
|
|
#include <QTabWidget>
|
|
|
|
#include "ui_maintab.h"
|
|
#include "core/dive.h"
|
|
#include "core/subsurface-qt/divelistnotifier.h"
|
|
|
|
class TabBase;
|
|
class MainTab : public QTabWidget {
|
|
Q_OBJECT
|
|
public:
|
|
MainTab(QWidget *parent = 0);
|
|
void clearTabs();
|
|
void nextInputField(QKeyEvent *event);
|
|
void stealFocus();
|
|
|
|
public
|
|
slots:
|
|
void updateDiveInfo();
|
|
void escDetected();
|
|
void colorsChanged();
|
|
private:
|
|
Ui::MainTab ui;
|
|
bool lastSelectedDive;
|
|
int lastTabSelectedDive;
|
|
int lastTabSelectedDiveTrip;
|
|
QList<TabBase*> extraWidgets;
|
|
void changeEvent(QEvent *ev) override;
|
|
bool isDark;
|
|
};
|
|
|
|
#endif // MAINTAB_H
|