mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Remove the divecomputer naming tab
The TabDiveComputer model won't work in the new world order, where you can't even insert a new device entry without a nickname to be edited. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
6c4e890960
commit
ba6f7361da
5 changed files with 0 additions and 100 deletions
|
@ -53,7 +53,6 @@ set (SUBSURFACE_UI
|
|||
tab-widgets/TabDiveExtraInfo.ui
|
||||
tab-widgets/TabDiveEquipment.ui
|
||||
tab-widgets/TabDiveSite.ui
|
||||
tab-widgets/TabDiveComputer.ui
|
||||
)
|
||||
|
||||
# the interface, in C++
|
||||
|
@ -124,8 +123,6 @@ set(SUBSURFACE_INTERFACE
|
|||
tab-widgets/TabDiveStatistics.h
|
||||
tab-widgets/TabDiveSite.cpp
|
||||
tab-widgets/TabDiveSite.h
|
||||
tab-widgets/TabDiveComputer.cpp
|
||||
tab-widgets/TabDiveComputer.h
|
||||
tab-widgets/maintab.cpp
|
||||
tab-widgets/maintab.h
|
||||
tableview.cpp
|
||||
|
|
|
@ -1,38 +0,0 @@
|
|||
// SPDX-License-Identifier: GPL-2.0
|
||||
#include "TabDiveComputer.h"
|
||||
#include "ui_TabDiveExtraInfo.h"
|
||||
#include "qt-models/divecomputermodel.h"
|
||||
|
||||
TabDiveComputer::TabDiveComputer(QWidget *parent) : TabBase(parent)
|
||||
{
|
||||
ui.setupUi(this);
|
||||
|
||||
DiveComputerModel *model = new DiveComputerModel(this);
|
||||
sortedModel = new DiveComputerSortedModel(this);
|
||||
|
||||
sortedModel->setSourceModel(model);
|
||||
ui.devices->setModel(sortedModel);
|
||||
ui.devices->view()->setSelectionBehavior(QAbstractItemView::SelectRows);
|
||||
ui.devices->view()->setSelectionMode(QAbstractItemView::SingleSelection);
|
||||
ui.devices->view()->setSortingEnabled(true);
|
||||
ui.devices->view()->sortByColumn(DiveComputerModel::MODEL, Qt::AscendingOrder);
|
||||
ui.devices->view()->horizontalHeader()->setStretchLastSection(true);
|
||||
connect(ui.devices, &TableView::itemClicked, this, &TabDiveComputer::tableClicked);
|
||||
}
|
||||
|
||||
void TabDiveComputer::updateData()
|
||||
{
|
||||
}
|
||||
|
||||
void TabDiveComputer::clear()
|
||||
{
|
||||
}
|
||||
|
||||
void TabDiveComputer::tableClicked(const QModelIndex &index)
|
||||
{
|
||||
if (!index.isValid())
|
||||
return;
|
||||
|
||||
if (index.column() == DiveComputerModel::REMOVE)
|
||||
sortedModel->remove(index);
|
||||
}
|
|
@ -1,23 +0,0 @@
|
|||
// SPDX-License-Identifier: GPL-2.0
|
||||
#ifndef TAB_DIVE_COMPUTER_H
|
||||
#define TAB_DIVE_COMPUTER_H
|
||||
|
||||
#include "TabBase.h"
|
||||
#include "ui_TabDiveComputer.h"
|
||||
|
||||
class DiveComputerSortedModel;
|
||||
|
||||
class TabDiveComputer : public TabBase {
|
||||
Q_OBJECT
|
||||
public:
|
||||
TabDiveComputer(QWidget *parent = 0);
|
||||
void updateData() override;
|
||||
void clear() override;
|
||||
public slots:
|
||||
void tableClicked(const QModelIndex &index);
|
||||
private:
|
||||
Ui::TabDiveComputer ui;
|
||||
DiveComputerSortedModel *sortedModel;
|
||||
};
|
||||
|
||||
#endif
|
|
@ -1,33 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>TabDiveComputer</class>
|
||||
<widget class="QWidget" name="TabDiveComputer">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>400</width>
|
||||
<height>300</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="TableView" name="devices">
|
||||
<property name="title">
|
||||
<string>Dive Computers</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>TableView</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>desktop-widgets/tableview.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
|
@ -31,7 +31,6 @@
|
|||
#include "TabDivePhotos.h"
|
||||
#include "TabDiveStatistics.h"
|
||||
#include "TabDiveSite.h"
|
||||
#include "TabDiveComputer.h"
|
||||
|
||||
#include <QCompleter>
|
||||
#include <QScrollBar>
|
||||
|
@ -72,8 +71,6 @@ MainTab::MainTab(QWidget *parent) : QTabWidget(parent),
|
|||
ui.tabWidget->addTab(extraWidgets.last(), tr("Extra Info"));
|
||||
extraWidgets << new TabDiveSite(this);
|
||||
ui.tabWidget->addTab(extraWidgets.last(), tr("Dive sites"));
|
||||
extraWidgets << new TabDiveComputer(this);
|
||||
ui.tabWidget->addTab(extraWidgets.last(), tr("Device names"));
|
||||
|
||||
// make sure we know if this is a light or dark mode
|
||||
isDark = paletteIsDark(palette());
|
||||
|
|
Loading…
Add table
Reference in a new issue