mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
undo: implement undo of setting a picture time by drag&drop
Even though the functionality is seemingly trivial, this is a bit invasive, as the code has to be split into two distinct parts: 1) Post undo command 2) React to changes to the divelist Don't compile that code on mobile. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
ebdb3e3c30
commit
e61641c79c
11 changed files with 178 additions and 90 deletions
|
|
@ -18,6 +18,7 @@ struct PictureEntry {
|
|||
duration_t length;
|
||||
};
|
||||
|
||||
struct dive;
|
||||
class DivePictureModel : public QAbstractTableModel {
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
|
@ -27,12 +28,12 @@ public:
|
|||
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
|
||||
void updateDivePictures();
|
||||
void removePictures(const QVector<QString> &fileUrls);
|
||||
void updateDivePictureOffset(int diveId, const QString &filename, int offsetSeconds);
|
||||
signals:
|
||||
void picturesRemoved(const QVector<QString> &fileUrls);
|
||||
public slots:
|
||||
void setZoomLevel(int level);
|
||||
void updateThumbnail(QString filename, QImage thumbnail, duration_t duration);
|
||||
void pictureOffsetChanged(dive *d, const QString filename, offset_t offset);
|
||||
private:
|
||||
DivePictureModel();
|
||||
QVector<PictureEntry> pictures;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue