digiKam
Loading...
Searching...
No Matches
itemversionsmodel.h
Go to the documentation of this file.
1/* ============================================================
2 *
3 * This file is a part of digiKam project
4 * https://www.digikam.org
5 *
6 * Date : 2010-07-13
7 * Description : Model for item versions
8 *
9 * SPDX-FileCopyrightText: 2010 by Martin Klapetek <martin dot klapetek at gmail dot com>
10 *
11 * SPDX-License-Identifier: GPL-2.0-or-later
12 *
13 * ============================================================ */
14
15#pragma once
16
17// Qt includes
18
19#include <QModelIndex>
20#include <QPixmap>
21
22// Local includes
23
24#include "digikam_export.h"
25
26namespace Digikam
27{
28
29class DIGIKAM_DATABASE_EXPORT ItemVersionsModel : public QAbstractListModel
30{
31 Q_OBJECT
32
33public:
34
35 explicit ItemVersionsModel(QObject* const parent = nullptr);
36 ~ItemVersionsModel() override;
37
38 Qt::ItemFlags flags(const QModelIndex& index) const override;
39 QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override;
40 int rowCount(const QModelIndex& parent = QModelIndex()) const override;
41
42 void setupModelData(QList<QPair<QString, int> >& data);
43 void clearModelData();
44
45 QString currentSelectedImage() const;
46 void setCurrentSelectedImage(const QString& path);
47 QModelIndex currentSelectedImageIndex() const;
48
49 bool paintTree() const;
50 int listIndexOf(const QString& item) const;
51
52public Q_SLOTS:
53
54 void slotAnimationStep();
55 void setPaintTree(bool paint);
56
57private:
58
59 class Private;
60 Private* const d = nullptr;
61};
62
63} // namespace Digikam
Definition itemversionsmodel.h:30
Definition datefolderview.cpp:34