File: redirectdialog.h

package info (click to toggle)
mailcommon 4%3A24.12.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 9,412 kB
  • sloc: cpp: 30,581; xml: 340; makefile: 17; ansic: 12; sh: 3
file content (77 lines) | stat: -rw-r--r-- 1,596 bytes parent folder | download
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
};
}