File indexing completed on 2024-05-05 10:14:02

0001 /*
0002     SPDX-FileCopyrightText: 2003 Waldo Bastian <bastian@kde.org>
0003     SPDX-License-Identifier: GPL-2.0-or-later
0004 */
0005 
0006 #ifndef KGPGSETTINGS_ADDONS_H
0007 #define KGPGSETTINGS_ADDONS_H
0008 
0009 public:
0010    static
0011    QString defaultKey()
0012    {
0013      if (self()->mDefaultKey.isEmpty())
0014      {
0015         self()->mDefaultKey = KgpgInterface::getGpgSetting(QLatin1String( "default-key" ), gpgConfigPath());
0016      }
0017      return self()->mDefaultKey;
0018    }
0019 
0020    static
0021    void setDefaultKey(const QString &_defaultKey)
0022    {
0023      self()->mDefaultKey = _defaultKey;
0024      KgpgInterface::setGpgSetting(QLatin1String( "default-key" ), _defaultKey, gpgConfigPath());
0025    }
0026 
0027 private:
0028    QString mDefaultKey;
0029 
0030 #endif //KGPGSETTINGS_ADDONS_H