File indexing completed on 2024-05-12 04:42:07

0001 /*
0002     SPDX-FileCopyrightText: 2023 Volker Krause <vkrause@kde.org>
0003     SPDX-License-Identifier: LGPL-2.0-or-later
0004 */
0005 
0006 #ifndef KOSM_EDITORCONTROLLER_H
0007 #define KOSM_EDITORCONTROLLER_H
0008 
0009 #include "kosmeditorcontroller_export.h"
0010 
0011 #include <osm/element.h>
0012 
0013 #include <memory>
0014 
0015 namespace KOSM {
0016 
0017 /** Filtering/sorting on top of the AmenityModel.
0018  *  - filters on all visible roles
0019  *  - sorts while keeping the grouping intact
0020  */
0021 class KOSMEDITORCONTROLLER_EXPORT EditorController
0022 {
0023     Q_GADGET
0024 public:
0025     enum Editor {
0026         ID,
0027         JOSM,
0028         Vespucci
0029     };
0030     Q_ENUM(Editor)
0031 
0032     Q_INVOKABLE static bool hasEditor(Editor editor);
0033     Q_INVOKABLE static void editElement(OSM::Element element, Editor editor);
0034     Q_INVOKABLE static void editBoundingBox(OSM::BoundingBox box, Editor editor);
0035 };
0036 
0037 }
0038 
0039 #endif