digiKam
itemqueryposthooks.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 : 2007-03-22
7  * Description : database SQL queries helper class
8  *
9  * Copyright (C) 2007-2012 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
10  * Copyright (C) 2012-2022 by Gilles Caulier <caulier dot gilles 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_ITEM_QUERY_POST_HOOKS_H
26 #define DIGIKAM_ITEM_QUERY_POST_HOOKS_H
27 
28 // Qt includes
29 
30 #include <QList>
31 
32 // Local includes
33 
34 #include "digikam_export.h"
35 
36 namespace Digikam
37 {
38 
39 class Q_DECL_HIDDEN ItemQueryPostHook
40 {
41 public:
42 
44  ItemQueryPostHook() = default;
45  virtual ~ItemQueryPostHook() = default;
46 
47  virtual bool checkPosition(double /*latitudeNumber*/, double /*longitudeNumber*/)
48  {
49  return true;
50  };
51 
52 private:
53 
54  Q_DISABLE_COPY(ItemQueryPostHook)
55 };
56 
57 // --------------------------------------------------------------------
58 
59 class DIGIKAM_DATABASE_EXPORT ItemQueryPostHooks
60 {
61 public:
62 
63  explicit ItemQueryPostHooks();
65 
70  bool checkPosition(double latitudeNumber, double longitudeNumber);
71 
75  void addHook(ItemQueryPostHook* const hook);
76 
77 protected:
78 
80 };
81 
82 } // namespace Digikam
83 
84 #endif // DIGIKAM_ITEM_QUERY_POST_HOOKS_H
Definition: itemqueryposthooks.h:40
ItemQueryPostHook()=default
This is the single hook, ItemQueryPostHookS is the container.
virtual ~ItemQueryPostHook()=default
virtual bool checkPosition(double, double)
Definition: itemqueryposthooks.h:47
Definition: itemqueryposthooks.h:60
QList< ItemQueryPostHook * > m_postHooks
Definition: itemqueryposthooks.h:79
Definition: piwigotalker.h:48
Definition: datefolderview.cpp:43