kgpg
kgpgsettings_addons.h
Go to the documentation of this file.00001 /*************************************************************************** 00002 kgpgsettings_addons.h - description 00003 ------------------- 00004 begin : Mon Jul 8 2002 00005 copyright : (C) 2003Waldo Bastian 00006 email : bastian@kde.org 00007 ***************************************************************************/ 00008 00009 /*************************************************************************** 00010 * * 00011 * This program is free software; you can redistribute it and/or modify * 00012 * it under the terms of the GNU General Public License as published by * 00013 * the Free Software Foundation; either version 2 of the License, or * 00014 * (at your option) any later version. * 00015 * * 00016 ***************************************************************************/ 00017 00018 #ifndef KGPGSETTINGS_ADDONS_H 00019 #define KGPGSETTINGS_ADDONS_H 00020 00021 public: 00022 static 00023 QString defaultKey() 00024 { 00025 if (self()->mDefaultKey.isEmpty()) 00026 { 00027 self()->mDefaultKey = KgpgInterface::getGpgSetting("default-key", gpgConfigPath()); 00028 } 00029 return self()->mDefaultKey; 00030 } 00031 00032 static 00033 void setDefaultKey(const QString &_defaultKey) 00034 { 00035 self()->mDefaultKey = _defaultKey; 00036 KgpgInterface::setGpgSetting("default-key", _defaultKey, gpgConfigPath()); 00037 } 00038 00039 private: 00040 QString mDefaultKey; 00041 00042 #endif //KGPGSETTINGS_ADDONS_H
KDE 4.0 API Reference