File indexing completed on 2025-03-09 03:59:04
0001 /* ============================================================ 0002 * 0003 * This file is a part of digiKam project 0004 * https://www.digikam.org 0005 * 0006 * Date : 2020-07-26 0007 * Description : System settings container. 0008 * 0009 * SPDX-FileCopyrightText: 2020-2023 by Maik Qualmann <metzpinguin at gmail dot com> 0010 * 0011 * SPDX-License-Identifier: GPL-2.0-or-later 0012 * 0013 * ============================================================ */ 0014 0015 #ifndef DIGIKAM_SYSTEM_SETTINGS_H 0016 #define DIGIKAM_SYSTEM_SETTINGS_H 0017 0018 // Qt includes 0019 0020 #include <QString> 0021 0022 // Local includes 0023 0024 #include "digikam_export.h" 0025 0026 namespace Digikam 0027 { 0028 0029 class DIGIKAM_EXPORT SystemSettings 0030 { 0031 public: 0032 0033 /** 0034 * @brief This enum is used to specify the proxy that is used. 0035 */ 0036 enum ProxyType 0037 { 0038 HttpProxy = 0, ///< Uses an Http proxy. 0039 Socks5Proxy ///< Uses a Socks5 proxy. 0040 }; 0041 0042 public: 0043 0044 explicit SystemSettings(const QString& name); 0045 ~SystemSettings(); 0046 0047 public: 0048 0049 void saveSettings(); 0050 0051 public: 0052 0053 #if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) 0054 0055 bool useHighDpiScaling = false; 0056 bool useHighDpiPixmaps = false; 0057 0058 #endif 0059 0060 bool enableFaceEngine = false; 0061 bool enableAesthetic = false; 0062 bool enableAutoTags = false; 0063 bool softwareOpenGL = false; 0064 bool enableLogging = false; 0065 bool disableOpenCL = true; 0066 0067 // Proxy Settings. 0068 0069 QString proxyUrl; 0070 int proxyPort = 8080; 0071 QString proxyUser; 0072 QString proxyPass; 0073 int proxyType = HttpProxy; 0074 bool proxyAuth = false; 0075 0076 private: 0077 0078 void readSettings(); 0079 0080 private: 0081 0082 QString m_path; 0083 }; 0084 0085 } // namespace Digikam 0086 0087 #endif // DIGIKAM_SYSTEM_SETTINGS_H