mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Remove unused divesitepicturemodel from qt-models
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
This commit is contained in:
parent
3479c9e197
commit
a11622623a
4 changed files with 0 additions and 55 deletions
|
@ -91,7 +91,6 @@ SOURCES += ../../../subsurface-mobile-main.cpp \
|
|||
../../../qt-models/divecomputermodel.cpp \
|
||||
../../../qt-models/divelocationmodel.cpp \
|
||||
../../../qt-models/divepicturemodel.cpp \
|
||||
../../../qt-models/divesitepicturesmodel.cpp \
|
||||
../../../qt-models/divetripmodel.cpp \
|
||||
../../../qt-models/diveimportedmodel.cpp \
|
||||
../../../qt-models/filtermodels.cpp \
|
||||
|
@ -210,7 +209,6 @@ HEADERS += \
|
|||
../../../qt-models/cleanertablemodel.h \
|
||||
../../../qt-models/divepicturemodel.h \
|
||||
../../../qt-models/ssrfsortfilterproxymodel.h \
|
||||
../../../qt-models/divesitepicturesmodel.h \
|
||||
../../../qt-models/completionmodels.h \
|
||||
../../../qt-models/weigthsysteminfomodel.h \
|
||||
../../../qt-models/divecomputerextradatamodel.h \
|
||||
|
|
|
@ -18,7 +18,6 @@ set(SUBSURFACE_MODELS_LIB_SRCS
|
|||
divepicturemodel.cpp
|
||||
diveplotdatamodel.cpp
|
||||
divelocationmodel.cpp
|
||||
divesitepicturesmodel.cpp
|
||||
ssrfsortfilterproxymodel.cpp
|
||||
divelistmodel.cpp
|
||||
gpslistmodel.cpp
|
||||
|
|
|
@ -1,36 +0,0 @@
|
|||
// SPDX-License-Identifier: GPL-2.0
|
||||
#include "qt-models/divesitepicturesmodel.h"
|
||||
#include "core/dive.h"
|
||||
#include <stdint.h>
|
||||
|
||||
#include <QtConcurrent>
|
||||
#include <QPixmap>
|
||||
|
||||
DiveSitePicturesModel* DiveSitePicturesModel::instance() {
|
||||
static DiveSitePicturesModel *self = new DiveSitePicturesModel();
|
||||
return self;
|
||||
}
|
||||
|
||||
DiveSitePicturesModel::DiveSitePicturesModel() {
|
||||
|
||||
}
|
||||
|
||||
void DiveSitePicturesModel::updateDivePictures() {
|
||||
beginResetModel();
|
||||
pictures.clear();
|
||||
endResetModel();
|
||||
|
||||
const uint32_t ds_uuid = displayed_dive_site.uuid;
|
||||
struct dive *d;
|
||||
int i;
|
||||
|
||||
for_each_dive (i, d)
|
||||
if (d->dive_site_uuid == ds_uuid && dive_get_picture_count(d))
|
||||
FOR_EACH_PICTURE(d)
|
||||
pictures.push_back({picture, picture->filename, QImage(), picture->offset.seconds});
|
||||
|
||||
QtConcurrent::blockingMap(pictures, scaleImages);
|
||||
|
||||
beginInsertRows(QModelIndex(), 0, pictures.count() - 1);
|
||||
endInsertRows();
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
// SPDX-License-Identifier: GPL-2.0
|
||||
#ifndef DIVESITEPICTURESMODEL_H
|
||||
#define DIVESITEPICTURESMODEL_H
|
||||
|
||||
#include "divepicturemodel.h"
|
||||
|
||||
class DiveSitePicturesModel : public DivePictureModel {
|
||||
Q_OBJECT
|
||||
public:
|
||||
static DiveSitePicturesModel *instance();
|
||||
void updateDivePictures();
|
||||
private:
|
||||
DiveSitePicturesModel();
|
||||
};
|
||||
|
||||
#endif
|
Loading…
Add table
Reference in a new issue