File indexing completed on 2025-01-19 03:50:50
0001 /* ============================================================ 0002 * 0003 * This file is a part of digiKam project 0004 * https://www.digikam.org 0005 * 0006 * Date : 2013-03-02 0007 * Description : Table view: Tree view subelement 0008 * 0009 * SPDX-FileCopyrightText: 2017-2024 by Gilles Caulier <caulier dot gilles at gmail dot com> 0010 * SPDX-FileCopyrightText: 2013 by Michael G. Hansen <mike at mghansen dot de> 0011 * 0012 * SPDX-License-Identifier: GPL-2.0-or-later 0013 * 0014 * ============================================================ */ 0015 0016 #ifndef DIGIKAM_TABLE_VIEW_TREEVIEW_DELEGATE_H 0017 #define DIGIKAM_TABLE_VIEW_TREEVIEW_DELEGATE_H 0018 0019 // Qt includes 0020 0021 #include <QItemDelegate> 0022 #include <QTreeView> 0023 0024 // Local includes 0025 0026 #include "digikam_export.h" 0027 #include "itemalbummodel.h" 0028 #include "itemfiltermodel.h" 0029 #include "statesavingobject.h" 0030 #include "tableview_columnfactory.h" 0031 #include "tableview_shared.h" 0032 #include "thumbnailloadthread.h" 0033 0034 class QMenu; 0035 class QContextMenuEvent; 0036 0037 namespace Digikam 0038 { 0039 0040 class TableViewItemDelegate : public QItemDelegate 0041 { 0042 Q_OBJECT 0043 0044 public: 0045 0046 explicit TableViewItemDelegate(TableViewShared* const tableViewShared, QObject* const parent = nullptr); 0047 ~TableViewItemDelegate() override; 0048 0049 void paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& tableViewModelIndex) const override; 0050 QSize sizeHint(const QStyleOptionViewItem& option, const QModelIndex& tableViewModelIndex) const override; 0051 0052 private: 0053 0054 TableViewShared* const s; 0055 }; 0056 0057 } // namespace Digikam 0058 0059 #endif // DIGIKAM_TABLE_VIEW_TREEVIEW_DELEGATE_H