settingsdialog.h 765 Bytes
Newer Older
1
/*
2
3
4
   SPDX-FileCopyrightText: 2018 Daniel Vrátil <dvratil@kde.org>

   SPDX-License-Identifier: GPL-2.0-or-later
5
6
*/

Laurent Montel's avatar
Laurent Montel committed
7
#pragma once
8
9
10
11
12
13
14
15
16
17
18
19
20
21

#include <QDialog>

#include <KSharedConfig>

#include "unifiedmailboxmanager.h"

class QStandardItemModel;
class MailKernel;

class SettingsDialog : public QDialog
{
    Q_OBJECT
public:
Laurent Montel's avatar
Laurent Montel committed
22
    explicit SettingsDialog(const KSharedConfigPtr &config, UnifiedMailboxManager &manager, WId windowId, QWidget *parent = nullptr);
23
    ~SettingsDialog() override;
Laurent Montel's avatar
Laurent Montel committed
24

25
26
private:
    void loadBoxes();
27
    void addBox(UnifiedMailbox *box);
28
29

private:
Laurent Montel's avatar
Laurent Montel committed
30
31
    void readConfig();
    void writeConfig();
Laurent Montel's avatar
Laurent Montel committed
32
    QStandardItemModel *const mBoxModel;
33
    UnifiedMailboxManager &mBoxManager;
Laurent Montel's avatar
Laurent Montel committed
34
    MailKernel *const mKernel;
Laurent Montel's avatar
Laurent Montel committed
35
    const KSharedConfigPtr mConfig;
36
37
};