1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77
|
/* -*- mode: C++ -*-
SPDX-FileCopyrightText: 2003 Andreas Gungl <a.gungl@gmx.de>
SPDX-FileCopyrightText: 2014-2024 Laurent Montel <montel@kde.org>
SPDX-License-Identifier: GPL-2.0-only
*/
#pragma once
#include "mailcommon_export.h"
#include <QDialog>
namespace MailCommon
{
/**
* @short A dialog to request information about message redirection from the user.
*
* The dialog is used to collect redirect addresses when
* manually redirecting messages. Only Redirect-To is
* supported so far.
*
* @author Andreas Gungl <a.gungl@gmx.de>
*/
class MAILCOMMON_EXPORT RedirectDialog : public QDialog
{
Q_OBJECT
public:
/**
* Describes the send mode.
*/
enum SendMode {
SendNow,
SendLater,
};
/**
* Creates a new redirect dialog.
*
* @param mode The preferred send mode.
* @param parent The parent widget.
*/
explicit RedirectDialog(SendMode mode = SendNow, QWidget *parent = nullptr);
/**
* Destroys the redirect dialog.
*/
~RedirectDialog() override;
/**
* Returns the addresses for the redirection.
*/
[[nodiscard]] QString to() const;
/**
* Returns the send mode.
*/
[[nodiscard]] SendMode sendMode() const;
[[nodiscard]] int transportId() const;
[[nodiscard]] int identity() const;
[[nodiscard]] QString cc() const;
[[nodiscard]] QString bcc() const;
protected:
void accept() override;
private:
//@cond PRIVATE
class RedirectDialogPrivate;
std::unique_ptr<RedirectDialogPrivate> const d;
//@endcond
};
}
|