File indexing completed on 2025-01-19 03:53:40
0001 /* ============================================================ 0002 * 0003 * This file is a part of digiKam project 0004 * https://www.digikam.org 0005 * 0006 * Date : 2007-03-22 0007 * Description : database SQL queries helper class 0008 * 0009 * SPDX-FileCopyrightText: 2007-2012 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de> 0010 * SPDX-FileCopyrightText: 2012-2024 by Gilles Caulier <caulier dot gilles at gmail dot com> 0011 * 0012 * SPDX-License-Identifier: GPL-2.0-or-later 0013 * 0014 * ============================================================ */ 0015 0016 #include "itemqueryposthooks.h" 0017 0018 // Local includes 0019 0020 #include "digikam_debug.h" 0021 0022 namespace Digikam 0023 { 0024 0025 ItemQueryPostHooks::ItemQueryPostHooks() 0026 { 0027 } 0028 0029 ItemQueryPostHooks::~ItemQueryPostHooks() 0030 { 0031 Q_FOREACH (ItemQueryPostHook* const hook, m_postHooks) 0032 { 0033 delete hook; 0034 } 0035 } 0036 0037 void ItemQueryPostHooks::addHook(ItemQueryPostHook* const hook) 0038 { 0039 m_postHooks << hook; 0040 } 0041 0042 bool ItemQueryPostHooks::checkPosition(double latitudeNumber, double longitudeNumber) 0043 { 0044 Q_FOREACH (ItemQueryPostHook* const hook, m_postHooks) 0045 { 0046 if (!hook->checkPosition(latitudeNumber, longitudeNumber)) 0047 { // cppcheck-suppress useStlAlgorithm 0048 return false; 0049 } 0050 } 0051 0052 return true; 0053 } 0054 0055 } // namespace Digikam