digiKam
rgwidget.h
Go to the documentation of this file.
1 /* ============================================================
2  *
3  * This file is a part of digiKam project
4  * https://www.digikam.org
5  *
6  * Date : 2010-05-12
7  * Description : A widget to apply Reverse Geocoding
8  *
9  * Copyright (C) 2010 by Michael G. Hansen <mike at mghansen dot de>
10  * Copyright (C) 2010 by Gabriel Voicu <ping dot gabi at gmail dot com>
11  *
12  * This program is free software; you can redistribute it
13  * and/or modify it under the terms of the GNU General
14  * Public License as published by the Free Software Foundation;
15  * either version 2, or (at your option)
16  * any later version.
17  *
18  * This program is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21  * GNU General Public License for more details.
22  *
23  * ============================================================ */
24 
25 #ifndef DIGIKAM_RG_WIDGET_H
26 #define DIGIKAM_RG_WIDGET_H
27 
28 // Qt includes
29 
30 #include <QUrl>
31 #include <QWidget>
32 
33 // Local includes
34 
35 #include "geoifacetypes.h"
36 
37 // Local includes
38 
39 #include "gpsitemcontainer.h"
40 #include "digikam_export.h"
41 
42 class QItemSelectionModel;
43 class QAbstractItemModel;
44 class KConfigGroup;
45 
46 namespace Digikam
47 {
48 
49 class GPSItemModel;
50 class GPSUndoCommand;
51 
52 class DIGIKAM_EXPORT RGWidget : public QWidget
53 {
54  Q_OBJECT
55 
56 public:
57 
58  explicit RGWidget(GPSItemModel* const imageModel,
59  QItemSelectionModel* const selectionModel,
60  QAbstractItemModel* externTagModel,
61  QWidget* const parent = nullptr);
62  ~RGWidget() override;
63 
64  void setUIEnabled(const bool state);
65  void readSettingsFromGroup(const KConfigGroup* const group);
66  void saveSettingsToGroup(KConfigGroup* const group);
67 
68 private Q_SLOTS:
69 
70  void slotButtonRGSelected();
71  void slotRGReady(QList<RGInfo>& returnedRGList);
72  void slotHideOptions();
73  void updateUIState();
74  void slotAddCustomizedSpacer();
75  void slotRemoveTag();
76  void slotRemoveAllSpacers();
77  void slotReaddNewTags();
78  void slotRegenerateNewTags();
79  void slotAddAllAddressElementsToTag();
80  void slotAddSingleSpacer();
81  void slotRGCanceled();
82 
83 Q_SIGNALS:
84 
89  void signalSetUIEnabled(const bool enabledState);
90  void signalSetUIEnabled(const bool enabledState,
91  QObject* const cancelObject,
92  const QString& cancelSlot);
93 
97  void signalProgressSetup(const int maxProgress, const QString& progressText);
98 
103  void signalProgressChanged(const int currentProgress);
104 
109  void signalUndoCommand(GPSUndoCommand* undoCommand);
110 
111 protected:
112 
113  bool eventFilter(QObject* watched, QEvent* event) override;
114 
115 private:
116 
117  class Private;
118  Private* const d;
119 };
120 
121 } // namespace Digikam
122 
123 #endif // DIGIKAM_RG_WIDGET_H
Definition: gpsitemmodel.h:43
Definition: gpsundocommand.h:41
The RGWidget class represents the main widget for reverse geocoding.
Definition: rgwidget.h:53
void signalSetUIEnabled(const bool enabledState)
void signalUndoCommand(GPSUndoCommand *undoCommand)
void signalProgressSetup(const int maxProgress, const QString &progressText)
void signalProgressChanged(const int currentProgress)
void signalSetUIEnabled(const bool enabledState, QObject *const cancelObject, const QString &cancelSlot)
Definition: piwigotalker.h:48
Definition: datefolderview.cpp:43