diff options
| author | 2021-08-16 18:15:54 -1000 | |
|---|---|---|
| committer | 2021-08-18 13:22:02 -0700 | |
| commit | ba6f7361da873609d72ab4ba3b1d55edd8f5569d (patch) | |
| tree | 09549d48064f9dc78ba70f6e28420b6ae661dddd /desktop-widgets/tab-widgets/TabDiveComputer.cpp | |
| parent | 6c4e890960036b127eab513ca967e9454bc63d54 (diff) | |
| download | subsurface-ba6f7361da873609d72ab4ba3b1d55edd8f5569d.tar.gz | |
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>
Diffstat (limited to 'desktop-widgets/tab-widgets/TabDiveComputer.cpp')
| -rw-r--r-- | desktop-widgets/tab-widgets/TabDiveComputer.cpp | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/desktop-widgets/tab-widgets/TabDiveComputer.cpp b/desktop-widgets/tab-widgets/TabDiveComputer.cpp deleted file mode 100644 index d4b0f5cce..000000000 --- a/desktop-widgets/tab-widgets/TabDiveComputer.cpp +++ /dev/null @@ -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); -} |