File indexing completed on 2024-12-08 12:53:23
0001 /* 0002 SPDX-FileCopyrightText: 2019-2024 Laurent Montel <montel@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #include "autotranslatelanguage.h" 0008 0009 AutotranslateLanguage::AutotranslateLanguage() = default; 0010 0011 QString AutotranslateLanguage::language() const 0012 { 0013 return mLanguage; 0014 } 0015 0016 void AutotranslateLanguage::setLanguage(const QString &language) 0017 { 0018 mLanguage = language; 0019 } 0020 0021 QString AutotranslateLanguage::displayLanguage() const 0022 { 0023 return mDisplayLanguage.isEmpty() ? mLanguage : mDisplayLanguage; 0024 } 0025 0026 void AutotranslateLanguage::setDisplayLanguage(const QString &displayLanguage) 0027 { 0028 mDisplayLanguage = displayLanguage; 0029 } 0030 0031 QDebug operator<<(QDebug d, const AutotranslateLanguage &t) 0032 { 0033 d.space() << "language name:" << t.language() << "\n"; 0034 d.space() << "Display language name:" << t.displayLanguage() << "\n"; 0035 return d; 0036 }