digiKam
gpsbookmarkowner.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 : 2009-11-21
7  * Description : Central object for managing bookmarks
8  *
9  * Copyright (C) 2010-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
10  * Copyright (C) 2009-2010 by Michael G. Hansen <mike at mghansen dot de>
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_GPS_BOOK_MARK_OWNER_H
26 #define DIGIKAM_GPS_BOOK_MARK_OWNER_H
27 
28 // Qt includes
29 
30 #include <QMenu>
31 #include <QUrl>
32 
33 // Local includes
34 
35 #include "gpsdatacontainer.h"
36 #include "bookmarksmngr.h"
37 #include "digikam_export.h"
38 
39 namespace Digikam
40 {
41 
42 class GPSItemModel;
43 class GPSBookmarkModelHelper;
44 
45 class DIGIKAM_EXPORT GPSBookmarkOwner : public QObject
46 {
47  Q_OBJECT
48 
49 public:
50 
51  GPSBookmarkOwner(GPSItemModel* const gpsItemModel, QWidget* const parent);
52  ~GPSBookmarkOwner() override;
53 
54  void changeAddBookmark(const bool state);
55  void setPositionAndTitle(const GeoCoordinates& coordinates, const QString& title);
56 
57  QMenu* getMenu() const;
58  BookmarksManager* bookmarkManager() const;
59  GPSBookmarkModelHelper* bookmarkModelHelper() const;
60  QString currentTitle() const;
61  QString currentUrl() const;
62 
63 Q_SIGNALS:
64 
66 
67 private Q_SLOTS:
68 
69  void slotOpenBookmark(const QUrl&);
70  void slotShowBookmarksDialog();
71  void slotAddBookmark();
72 
73 private:
74 
75  void createBookmarksMenu();
76 
77 private:
78 
79  class Private;
80  Private* const d;
81 };
82 
83 } // namespace Digikam
84 
85 #endif // DIGIKAM_GPS_BOOK_MARK_OWNER_H
Definition: bookmarksmngr.h:214
Definition: gpsbookmarkmodelhelper.h:46
Definition: gpsbookmarkowner.h:46
void positionSelected(const GPSDataContainer &position)
Definition: gpsdatacontainer.h:36
Definition: gpsitemmodel.h:43
Definition: geocoordinates.h:49
Definition: datefolderview.cpp:43
Definition: scan.h:26