File indexing completed on 2024-05-12 05:55:42

0001 /*
0002     This file is part of the Okteta Kasten module, made within the KDE community.
0003 
0004     SPDX-FileCopyrightText: 2023 Friedrich W. H. Kossebau <kossebau@kde.org>
0005 
0006     SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
0007 */
0008 
0009 #ifndef KASTEN_FINDDIRECTIONCONFIGENTRY_HPP
0010 #define KASTEN_FINDDIRECTIONCONFIGENTRY_HPP
0011 
0012 // lib
0013 #include "directionconfigentry.hpp"
0014 // libfinddialog
0015 #include <finddirection.hpp>
0016 
0017 template <>
0018 inline Kasten::FindDirection KConfigGroup::readEntry(const char *key, const Kasten::FindDirection &defaultValue) const
0019 {
0020     return static_cast<Kasten::FindDirection>(KConfigGroup::readEntry(key, static_cast<Kasten::Direction>(defaultValue)));
0021 }
0022 
0023 template <>
0024 inline void KConfigGroup::writeEntry(const char *key, const Kasten::FindDirection &value,
0025                                      KConfigBase::WriteConfigFlags flags)
0026 {
0027     writeEntry(key, static_cast<Kasten::Direction>(value), flags);
0028 }
0029 
0030 #endif