File indexing completed on 2025-01-05 03:58:34

0001 /* ============================================================
0002  *
0003  * This file is a part of digiKam project
0004  * https://www.digikam.org
0005  *
0006  * Date        : 2010-05-12
0007  * Description : A model to hold information about image tags.
0008  *
0009  * SPDX-FileCopyrightText: 2010 by Michael G. Hansen <mike at mghansen dot de>
0010  * SPDX-FileCopyrightText: 2010 by Gabriel Voicu <ping dot gabi at gmail dot com>
0011  *
0012  * SPDX-License-Identifier: GPL-2.0-or-later
0013  *
0014  * ============================================================ */
0015 
0016 #ifndef DIGIKAM_TREE_BRANCH_H
0017 #define DIGIKAM_TREE_BRANCH_H
0018 
0019 // Qt includes
0020 
0021 #include <QPersistentModelIndex>
0022 #include <QList>
0023 
0024 // Local includes
0025 
0026 #include "gpsitemcontainer.h"
0027 
0028 namespace Digikam
0029 {
0030 
0031 class TreeBranch
0032 {
0033 public:
0034 
0035     explicit TreeBranch()
0036       : parent(nullptr),
0037         type  (TypeChild)
0038     {
0039     }
0040 
0041     ~TreeBranch()
0042     {
0043         qDeleteAll(oldChildren);
0044     }
0045 
0046 public:
0047 
0048     QPersistentModelIndex sourceIndex;
0049     TreeBranch*           parent;
0050     QString               data;
0051     QString               help;
0052     Type                  type;
0053     QList<TreeBranch*>    oldChildren;
0054     QList<TreeBranch*>    spacerChildren;
0055     QList<TreeBranch*>    newChildren;
0056 };
0057 
0058 } // namespace Digikam
0059 
0060 #endif // DIGIKAM_TREE_BRANCH_H