File indexing completed on 2024-12-22 04:57:33

0001 /*
0002     SPDX-FileCopyrightText: 2008 Volker Krause <vkrause@kde.org>
0003 
0004     SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #pragma once
0008 
0009 #include <QWidget>
0010 
0011 #include "ui_settings.h"
0012 class QPushButton;
0013 class KConfigDialogManager;
0014 namespace Akonadi_Maildir_Resource
0015 {
0016 class MaildirSettings;
0017 }
0018 class FolderArchiveSettingPage;
0019 class ConfigWidget : public QWidget
0020 {
0021     Q_OBJECT
0022 public:
0023     explicit ConfigWidget(Akonadi_Maildir_Resource::MaildirSettings *settings, const QString &identifier, QWidget *parent = nullptr);
0024     ~ConfigWidget() override;
0025 
0026     void load();
0027     bool save() const;
0028 
0029 Q_SIGNALS:
0030     void okEnabled(bool enabled);
0031 
0032 private Q_SLOTS:
0033     void checkPath();
0034 
0035 private:
0036     Ui::ConfigWidget ui;
0037     KConfigDialogManager *mManager = nullptr;
0038     FolderArchiveSettingPage *mFolderArchiveSettingPage = nullptr;
0039     Akonadi_Maildir_Resource::MaildirSettings *mSettings = nullptr;
0040     bool mToplevelIsContainer = false;
0041     QPushButton *mOkButton = nullptr;
0042 };