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 : Face tag region item 0008 * 0009 * SPDX-FileCopyrightText: 2010-2011 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de> 0010 * 0011 * SPDX-License-Identifier: GPL-2.0-or-later 0012 * 0013 * ============================================================ */ 0014 0015 #ifndef DIGIKAM_FACE_ITEM_H 0016 #define DIGIKAM_FACE_ITEM_H 0017 0018 // Qt includes 0019 0020 #include <QObject> 0021 #include <QGraphicsWidget> 0022 0023 // Local includes 0024 0025 #include "facetagsiface.h" 0026 #include "assignnamewidget.h" 0027 #include "regionframeitem.h" 0028 0029 namespace Digikam 0030 { 0031 0032 class HidingStateChanger; 0033 0034 class Q_DECL_HIDDEN FaceItem : public RegionFrameItem // clazy:exclude=ctor-missing-parent-argument 0035 { 0036 Q_OBJECT 0037 0038 public: 0039 0040 explicit FaceItem(QGraphicsItem* const parent); 0041 ~FaceItem() override; 0042 0043 void setFace(const FaceTagsIface& face); 0044 FaceTagsIface face() const; 0045 void setHudWidget(AssignNameWidget* const widget); 0046 AssignNameWidget* widget() const; 0047 void switchMode(AssignNameWidget::Mode mode); 0048 void setEditable(bool allowEdit); 0049 void updateCurrentTag(); 0050 0051 protected: 0052 0053 FaceTagsIface m_face; 0054 AssignNameWidget* m_widget; 0055 HidingStateChanger* m_changer; 0056 0057 private: 0058 0059 // Disable 0060 FaceItem() = delete; 0061 FaceItem(const FaceItem&) = delete; 0062 FaceItem& operator=(const FaceItem&) = delete; 0063 }; 0064 0065 } // namespace Digikam 0066 0067 #endif // DIGIKAM_FACE_ITEM_H