File indexing completed on 2025-04-27 03:58:26
0001 /* ============================================================ 0002 * 0003 * This file is a part of digiKam project 0004 * https://www.digikam.org 0005 * 0006 * Date : 2010-08-03 0007 * Description : widget displaying all image versions in a list 0008 * 0009 * SPDX-FileCopyrightText: 2010 by Martin Klapetek <martin dot klapetek at gmail dot com> 0010 * 0011 * SPDX-License-Identifier: GPL-2.0-or-later 0012 * 0013 * ============================================================ */ 0014 0015 #ifndef DIGIKAM_VERSIONS_WIDGET_H 0016 #define DIGIKAM_VERSIONS_WIDGET_H 0017 0018 // Qt includes 0019 0020 #include <QWidget> 0021 #include <QModelIndex> 0022 #include <QUrl> 0023 0024 // Local includes 0025 0026 #include "digikam_export.h" 0027 0028 class KConfigGroup; 0029 0030 namespace Digikam 0031 { 0032 0033 class ActionVersionsOverlay; 0034 class ItemInfo; 0035 class ShowHideVersionsOverlay; 0036 class VersionsDelegate; 0037 class VersionsTreeView; 0038 0039 class VersionsWidget : public QWidget 0040 { 0041 Q_OBJECT 0042 0043 public: 0044 0045 explicit VersionsWidget(QWidget* const parent = nullptr); 0046 ~VersionsWidget() override; 0047 0048 void readSettings(const KConfigGroup& group); 0049 void writeSettings(KConfigGroup& group); 0050 0051 VersionsTreeView* view() const; 0052 VersionsDelegate* delegate() const; 0053 0054 ActionVersionsOverlay* addActionOverlay(const QIcon& icon, const QString& text, const QString& tip = QString()); 0055 ShowHideVersionsOverlay* addShowHideOverlay(); 0056 0057 public Q_SLOTS: 0058 0059 void setCurrentItem(const ItemInfo& info); 0060 0061 Q_SIGNALS: 0062 0063 void imageSelected(const ItemInfo& info); 0064 0065 protected Q_SLOTS: 0066 0067 void slotViewCurrentChanged(const QModelIndex& current, const QModelIndex& previous); 0068 void slotViewModeChanged(int mode); 0069 void slotSetupChanged(); 0070 0071 private: 0072 0073 void applyViewMode(); 0074 0075 private: 0076 0077 class Private; 0078 Private* const d; 0079 }; 0080 0081 } // namespace Digikam 0082 0083 #endif // DIGIKAM_VERSIONS_WIDGET_H