File indexing completed on 2024-11-24 04:44:33

0001 /*
0002    SPDX-FileCopyrightText: 2010 Thomas McGuire <mcguire@kde.org>
0003 
0004    SPDX-License-Identifier: LGPL-2.0-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
0005 */
0006 
0007 #pragma once
0008 
0009 #include "settingsbase.h"
0010 
0011 #include <qwindowdefs.h>
0012 
0013 /**
0014  * Extended settings class that allows setting the password over dbus, which is used by the
0015  * wizard.
0016  */
0017 class Settings : public SettingsBase
0018 {
0019     Q_OBJECT
0020     Q_CLASSINFO("D-Bus Interface", "org.kde.Akonadi.POP3.Wallet")
0021 public:
0022     enum class Option {
0023         NoOption = 0,
0024         ExportToDBus = 1,
0025     };
0026     Q_DECLARE_FLAGS(Options, Option)
0027 
0028     explicit Settings(const KSharedConfigPtr &config, Options options = Option::ExportToDBus);
0029 
0030     void setWindowId(WId id);
0031     void setResourceId(const QString &resourceIdentifier);
0032 
0033 public Q_SLOTS:
0034     Q_SCRIPTABLE void setPassword(const QString &password);
0035 
0036 private:
0037     WId mWinId;
0038     QString mResourceId;
0039 };
0040 
0041 Q_DECLARE_OPERATORS_FOR_FLAGS(Settings::Options)