File indexing completed on 2024-12-22 04:52:50

0001 /*
0002    SPDX-FileCopyrightText: 2012-2024 Laurent Montel <montel@kde.org>
0003 
0004    SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #pragma once
0008 
0009 #include "abstractsettings.h"
0010 
0011 #include <QString>
0012 
0013 class KConfigGroup;
0014 class QFile;
0015 
0016 class SylpheedSettings : public AbstractSettings
0017 {
0018 public:
0019     SylpheedSettings();
0020     ~SylpheedSettings() override;
0021     virtual void importSettings(const QString &filename, const QString &path);
0022 
0023 protected:
0024     void readCustomHeader(QFile *customHeaderFile);
0025     virtual void readGlobalSettings(const KConfigGroup &group);
0026     void readAccount(const KConfigGroup &accountConfig, bool checkMailOnStartup, int intervalCheckMail);
0027     void readIdentity(const KConfigGroup &accountConfig);
0028     QString readTransport(const KConfigGroup &accountConfig);
0029     void readPop3Account(const KConfigGroup &accountConfig, bool checkMailOnStartup, int intervalCheckMail);
0030     void readImapAccount(const KConfigGroup &accountConfig, bool checkMailOnStartup, int intervalCheckMail);
0031     void readSignature(const KConfigGroup &accountConfig, KIdentityManagementCore::Identity *identity);
0032 
0033     virtual void readSettingsColor(const KConfigGroup &group);
0034     virtual void readTemplateFormat(const KConfigGroup &group);
0035 
0036     virtual void readTagColor(const KConfigGroup &group);
0037 
0038     virtual void readDateFormat(const KConfigGroup &group);
0039     QString convertToKmailTemplate(const QString &templateStr);
0040 };