File indexing completed on 2025-01-05 03:51:10
0001 /* ============================================================ 0002 * 0003 * This file is a part of digiKam project 0004 * https://www.digikam.org 0005 * 0006 * Date : 2009-04-19 0007 * Description : Qt model-view for items - the delegate 0008 * 0009 * SPDX-FileCopyrightText: 2002-2005 by Renchi Raju <renchi dot raju at gmail dot com> 0010 * SPDX-FileCopyrightText: 2002-2024 by Gilles Caulier <caulier dot gilles at gmail dot com> 0011 * SPDX-FileCopyrightText: 2009-2011 by Andi Clemens <andi dot clemens at gmail dot com> 0012 * SPDX-FileCopyrightText: 2006-2011 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de> 0013 * 0014 * SPDX-License-Identifier: GPL-2.0-or-later 0015 * 0016 * ============================================================ */ 0017 0018 #ifndef DIGIKAM_ITEM_DELEGATE_P_H 0019 #define DIGIKAM_ITEM_DELEGATE_P_H 0020 0021 // Qt includes 0022 0023 #include <QRect> 0024 #include <QCache> 0025 0026 // Local includes 0027 0028 #include "itemviewdelegate_p.h" 0029 0030 namespace Digikam 0031 { 0032 0033 class ItemCategoryDrawer; 0034 0035 class Q_DECL_HIDDEN ItemDelegate::ItemDelegatePrivate : public ItemViewDelegatePrivate 0036 { 0037 public: 0038 0039 ItemDelegatePrivate() 0040 { 0041 contentWidth = 0; 0042 drawFocusFrame = true; 0043 drawCoordinates = false; 0044 drawImageFormat = false; 0045 drawImageFormatTop = false; 0046 drawMouseOverFrame = true; 0047 ratingOverThumbnail = false; 0048 categoryDrawer = nullptr; 0049 currentView = nullptr; 0050 currentModel = nullptr; 0051 0052 actualPixmapRectCache.setMaxCost(250); 0053 } 0054 0055 int contentWidth; 0056 0057 QRect dateRect; 0058 QRect modDateRect; 0059 QRect pixmapRect; 0060 QRect specialInfoRect; 0061 QRect nameRect; 0062 QRect titleRect; 0063 QRect commentsRect; 0064 QRect resolutionRect; 0065 QRect arRect; 0066 QRect sizeRect; 0067 QRect tagRect; 0068 QRect imageInformationRect; 0069 QRect coordinatesRect; 0070 QRect pickLabelRect; 0071 QRect groupRect; 0072 0073 bool drawFocusFrame; 0074 bool drawCoordinates; 0075 bool drawImageFormat; 0076 bool drawImageFormatTop; 0077 bool drawMouseOverFrame; 0078 bool ratingOverThumbnail; 0079 0080 QCache<int, QRect> actualPixmapRectCache; 0081 ItemCategoryDrawer* categoryDrawer; 0082 0083 ItemCategorizedView* currentView; 0084 QAbstractItemModel* currentModel; 0085 0086 public: 0087 0088 void clearRects() override; 0089 }; 0090 0091 } // namespace Digikam 0092 0093 #endif // DIGIKAM_ITEM_DELEGATE_P_H