Mailcommon

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

KDE's Doxygen guidelines are available online.