Debian Codegraph @

core/tests/geolocation/geoiface/calibrator/calibrator.h

raw symbols SCIP
1 /* ============================================================
2 *
3 * This file is a part of digiKam project
4 * https://www.digikam.org
5 *
6 * Date : 2010-09-18
7 * Description : A tool to calibrate the tiling levels
8 * used in geolocation interface
9 *
10 * SPDX-FileCopyrightText: 2010 by Michael G. Hansen <mike at mghansen dot de>
11 *
12 * SPDX-License-Identifier: GPL-2.0-or-later
13 *
14 * ============================================================ */
15
16 #pragma once
17
18 // Qt includes
19
20 #include <QMainWindow>
21
22 // Local includes
23
24 #include "geomodelhelper.h"
25
26 class QStandardItemModel;
27
28 using namespace Digikam;
29
30 class CalibratorModelHelper : public GeoModelHelper
31 {
32 Q_OBJECT
33
34 public:
35
36 explicit CalibratorModelHelper(QStandardItemModel* const model, QObject* const parent = nullptr);
37 ~CalibratorModelHelper() override;
38
39 void setItemCoordinates(const QModelIndex& index, const GeoCoordinates& coordinates);
40
41 // these are necessary for grouped and ungrouped models
42 QAbstractItemModel* model() const override;
43 QItemSelectionModel* selectionModel() const override;
44 PropertyFlags modelFlags() const override;
45 bool itemCoordinates(const QModelIndex& index, GeoCoordinates* const coordinates) const override;
46
47 private:
48
49 class Private;
50 Private* const d = nullptr;
51
52 Q_DISABLE_COPY(CalibratorModelHelper)
53 };
54
55 // -----------------------------------------------------------------------------------------------------------
56
57 class Calibrator : public QMainWindow
58 {
59 Q_OBJECT
60
61 public:
62
63 explicit Calibrator(QWidget* const parent = nullptr);
64 ~Calibrator() override;
65
66 private:
67
68 void addMarkerAt(const GeoCoordinates& coordinates);
69
70 private Q_SLOTS:
71
72 void updateGroupingMode();
73 void updateMarkers();
74 void updateZoomView();
75 void slotAddMapWidget();
76 void slotRemoveMapWidget();
77 void slotActivateMapActionTriggered(bool state);
78
79 private:
80
81 class Private;
82 Private* const d = nullptr;
83
84 Q_DISABLE_COPY(Calibrator)
85 };