digiKam
gpssearchview.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 : 2008-05-30
7  * Description : GPS search sidebar tab contents.
8  *
9  * Copyright (C) 2008-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
10  * Copyright (C) 2009 by Johannes Wienke <languitar at semipol dot de>
11  * Copyright (C) 2010-2011 by Michael G. Hansen <mike at mghansen dot de>
12  * Copyright (C) 2014 by Mohamed_Anwer <m_dot_anwer at gmx dot com>
13  *
14  * This program is free software; you can redistribute it
15  * and/or modify it under the terms of the GNU General
16  * Public License as published by the Free Software Foundation;
17  * either version 2, or (at your option)
18  * any later version.
19  *
20  * This program is distributed in the hope that it will be useful,
21  * but WITHOUT ANY WARRANTY; without even the implied warranty of
22  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23  * GNU General Public License for more details.
24  *
25  * ============================================================ */
26 
27 #ifndef DIGIKAM_GPS_SEARCH_VIEW_H
28 #define DIGIKAM_GPS_SEARCH_VIEW_H
29 
30 // Qt includes
31 
32 #include <QWidget>
33 
34 // Local includes
35 
36 #include "geomodelhelper.h"
37 #include "mapwidget.h"
38 #include "statesavingobject.h"
39 #include "itemfiltermodel.h"
40 
41 namespace Digikam
42 {
43 
44 class Album;
45 class SAlbum;
46 class SearchModel;
47 class SearchModificationHelper;
48 
49 class GPSSearchView : public QWidget, public StateSavingObject
50 {
51  Q_OBJECT
52 
53 public:
54 
55  explicit GPSSearchView(QWidget* const parent,
56  SearchModel* const searchModel,
57  SearchModificationHelper* const searchModificationHelper,
58  ItemFilterModel* const imageFilterModel,
59  QItemSelectionModel* const itemSelectionModel);
60  ~GPSSearchView() override;
61 
62  void setActive(bool state);
63 
64  void changeAlbumFromHistory(SAlbum* const album);
65 
66  void doLoadState() override;
67  void doSaveState() override;
68 
69  void setConfigGroup(const KConfigGroup& group) override;
70 
71 public Q_SLOTS:
72 
73  void slotRefreshMap();
74  void slotClearImages();
75 
76 private:
77 
78  bool checkName(QString& name);
79  bool checkAlbum(const QString& name) const;
80 
81  void createNewGPSSearchAlbum(const QString& name);
82 
83 private Q_SLOTS:
84 
85  void slotAlbumSelected(Album*);
86 
87  void slotSaveGPSSAlbum();
88  void slotCheckNameEditGPSConditions();
89 
90  void slotRegionSelectionChanged();
91  void slotRemoveCurrentFilter();
92  void slotMapSoloItems(const QList<qlonglong>& idList);
93 
94  void showNonGeolocatedItems();
95 
96 Q_SIGNALS:
97 
98  void signalMapSoloItems(const QList<qlonglong>& idList, const QString& id);
99 
100 private:
101 
102  class Private;
103  Private* const d;
104 };
105 
106 } // namespace Digikam
107 
108 #endif // DIGIKAM_GPS_SEARCH_VIEW_H
Abstract base class for all album types.
Definition: album.h:67
Definition: gpssearchview.h:50
void setActive(bool state)
Sets the widget active or inactive.
Definition: gpssearchview.cpp:369
void setConfigGroup(const KConfigGroup &group) override
Definition: gpssearchview.cpp:315
void doLoadState() override
Definition: gpssearchview.cpp:321
void changeAlbumFromHistory(SAlbum *const album)
Definition: gpssearchview.cpp:391
~GPSSearchView() override
Definition: gpssearchview.cpp:310
void doSaveState() override
Definition: gpssearchview.cpp:348
void slotRefreshMap()
Definition: gpssearchview.cpp:677
void signalMapSoloItems(const QList< qlonglong > &idList, const QString &id)
void slotClearImages()
Definition: gpssearchview.cpp:682
GPSSearchView(QWidget *const parent, SearchModel *const searchModel, SearchModificationHelper *const searchModificationHelper, ItemFilterModel *const imageFilterModel, QItemSelectionModel *const itemSelectionModel)
Constructor.
Definition: gpssearchview.cpp:113
Definition: itemfiltermodel.h:125
Definition: album.h:493
Definition: albummodel.h:95
Definition: searchmodificationhelper.h:59
Definition: statesavingobject.h:76
@ Album
Definition: coredbfields.h:58
Definition: datefolderview.cpp:43