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_BYTEARRAYCOMBOBOXCODINGCONFIGENTRY_HPP
0010 #define KASTEN_BYTEARRAYCOMBOBOXCODINGCONFIGENTRY_HPP
0011 
0012 // lib
0013 #include "bytearraycodingconfigentry.hpp"
0014 // Okteta Kasten gui
0015 #include <Kasten/Okteta/ByteArrayComboBox>
0016 
0017 template <>
0018 Okteta::ByteArrayComboBox::Coding
0019 inline KConfigGroup::readEntry(const char *key,
0020                                const Okteta::ByteArrayComboBox::Coding &defaultValue) const
0021 {
0022     return static_cast<Okteta::ByteArrayComboBox::Coding>(KConfigGroup::readEntry(key, static_cast<Kasten::ByteArrayCoding>(defaultValue)));
0023 }
0024 
0025 
0026 template <>
0027 inline void KConfigGroup::writeEntry(const char *key,
0028                                      const Okteta::ByteArrayComboBox::Coding &value,
0029                                      KConfigBase::WriteConfigFlags flags)
0030 {
0031     writeEntry(key, static_cast<Kasten::ByteArrayCoding>(value), flags);
0032 }
0033 
0034 #endif