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 {
34 SendNow,
35 SendLater,
36 };
37
38 /**
39 * Creates a new redirect dialog.
40 *
41 * @param mode The preferred send mode.
42 * @param parent The parent widget.
43 */
44 explicit RedirectDialog(SendMode mode = SendNow, QWidget *parent = nullptr);
45
46 /**
47 * Destroys the redirect dialog.
48 */
49 ~RedirectDialog() override;
50
51 /**
52 * Returns the addresses for the redirection.
53 */
54 [[nodiscard]] QString to() const;
55
56 /**
57 * Returns the send mode.
58 */
59 [[nodiscard]] SendMode sendMode() const;
60
61 [[nodiscard]] int transportId() const;
62
63 [[nodiscard]] int identity() const;
64
65 [[nodiscard]] QString cc() const;
66 [[nodiscard]] QString bcc() const;
67
68protected:
69 void accept() override;
70
71private:
72 //@cond PRIVATE
73 class RedirectDialogPrivate;
74 std::unique_ptr<RedirectDialogPrivate> const d;
75 //@endcond
76};
77}
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 Mon Nov 18 2024 12:09:01 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.