File indexing completed on 2025-01-19 03:58:09

0001 /* ============================================================
0002  *
0003  * This file is a part of digiKam project
0004  * https://www.digikam.org
0005  *
0006  * Date        : 2010-12-05
0007  * Description : Merges tiles into groups
0008  *
0009  * SPDX-FileCopyrightText: 2010-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
0010  * SPDX-FileCopyrightText: 2010-2011 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_TILE_GROUPER_H
0017 #define DIGIKAM_TILE_GROUPER_H
0018 
0019 // Local includes
0020 
0021 #include "digikam_export.h"
0022 #include "geoifacecommon.h"
0023 
0024 namespace Digikam
0025 {
0026 class MapBackend;
0027 
0028 class DIGIKAM_EXPORT TileGrouper : public QObject
0029 {
0030     Q_OBJECT
0031 
0032 public:
0033 
0034     explicit TileGrouper(const QExplicitlySharedDataPointer<GeoIfaceSharedData>& sharedData,
0035                          QObject* const parent);
0036     ~TileGrouper() override;
0037 
0038     void setClustersDirty();
0039     bool getClustersDirty() const;
0040     void updateClusters();
0041     void setCurrentBackend(MapBackend* const backend);
0042 
0043 private:
0044 
0045     bool currentBackendReady();
0046 
0047 private:
0048 
0049     class Private;
0050     const QScopedPointer<Private>                          d;
0051 
0052     const QExplicitlySharedDataPointer<GeoIfaceSharedData> s;
0053 };
0054 
0055 } // namespace Digikam
0056 
0057 #endif // DIGIKAM_TILE_GROUPER_H