File indexing completed on 2025-01-19 03:57:56
0001 /* ============================================================ 0002 * 0003 * This file is a part of digiKam project 0004 * https://www.digikam.org 0005 * 0006 * Date : 2010-09-17 0007 * Description : Managing of face tag region items on a GraphicsDImgView 0008 * 0009 * SPDX-FileCopyrightText: 2010-2011 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de> 0010 * SPDX-FileCopyrightText: 2012-2024 by Gilles Caulier <caulier dot gilles at gmail dot com> 0011 * 0012 * SPDX-License-Identifier: GPL-2.0-or-later 0013 * 0014 * ============================================================ */ 0015 0016 #ifndef DIGIKAM_FACE_GROUP_P_H 0017 #define DIGIKAM_FACE_GROUP_P_H 0018 0019 #include "facegroup.h" 0020 0021 // Qt includes 0022 0023 #include <QGraphicsSceneHoverEvent> 0024 0025 // Local includes 0026 0027 #include "digikam_debug.h" 0028 #include "addtagscombobox.h" 0029 #include "albummodel.h" 0030 #include "albumfiltermodel.h" 0031 #include "albummanager.h" 0032 #include "clickdragreleaseitem.h" 0033 #include "dimgpreviewitem.h" 0034 #include "facepipeline.h" 0035 #include "faceitem.h" 0036 #include "facetags.h" 0037 #include "faceutils.h" 0038 #include "facetagseditor.h" 0039 #include "graphicsdimgview.h" 0040 #include "iteminfo.h" 0041 #include "taggingaction.h" 0042 #include "metaenginesettings.h" 0043 #include "itemvisibilitycontroller.h" 0044 0045 namespace Digikam 0046 { 0047 0048 enum FaceGroupState 0049 { 0050 NoFaces, 0051 LoadingFaces, 0052 FacesLoaded 0053 }; 0054 0055 //------------------------------------------------------------------------------- 0056 0057 class Q_DECL_HIDDEN FaceGroup::Private 0058 { 0059 public: 0060 0061 explicit Private(FaceGroup* const q); 0062 0063 void applyVisible(); 0064 FaceItem* createItem(const FaceTagsIface& face); 0065 FaceItem* addItem(const FaceTagsIface& face); 0066 AssignNameWidget* createAssignNameWidget(const FaceTagsIface& face, 0067 const QVariant& identifier); 0068 AssignNameWidget::Mode assignWidgetMode(FaceTagsIface::Type type); 0069 void checkModels(); 0070 QList<QGraphicsItem*> hotItems(const QPointF& scenePos); 0071 0072 public: 0073 0074 GraphicsDImgView* view; 0075 ItemInfo info; 0076 bool exifRotate; 0077 bool autoSuggest; 0078 bool showOnHover; 0079 0080 QList<FaceItem*> items; 0081 0082 ClickDragReleaseItem* manuallyAddWrapItem; 0083 FaceItem* manuallyAddedItem; 0084 0085 FaceGroupState state; 0086 ItemVisibilityController* visibilityController; 0087 0088 TagModel* tagModel; 0089 CheckableAlbumFilterModel* filterModel; 0090 TagPropertiesFilterModel* filteredModel; 0091 0092 FacePipeline editPipeline; 0093 0094 FaceGroup* const q; 0095 }; 0096 0097 } // namespace Digikam 0098 0099 #endif // DIGIKAM_FACE_GROUP_P_H