Mailcommon

redirectdialog.h
1 /* -*- mode: C++ -*-
2 
3  SPDX-FileCopyrightText: 2003 Andreas Gungl <[email protected]>
4  SPDX-FileCopyrightText: 2014-2022 Laurent Montel <[email protected]>
5 
6  SPDX-License-Identifier: GPL-2.0-only
7 */
8 #pragma once
9 
10 #include "mailcommon_export.h"
11 
12 #include <QDialog>
13 
14 namespace 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 <[email protected]>
24  */
25 class MAILCOMMON_EXPORT RedirectDialog : public QDialog
26 {
27  Q_OBJECT
28 
29 public:
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  Q_REQUIRED_RESULT QString to() const;
52 
53  /**
54  * Returns the send mode.
55  */
56  Q_REQUIRED_RESULT SendMode sendMode() const;
57 
58  Q_REQUIRED_RESULT int transportId() const;
59 
60  Q_REQUIRED_RESULT int identity() const;
61 
62  Q_REQUIRED_RESULT QString cc() const;
63  Q_REQUIRED_RESULT QString bcc() const;
64 
65 protected:
66  void accept() override;
67 
68 private:
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.
SendMode
Describes the send mode.
The filter dialog.
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Sat Oct 1 2022 04:00:53 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.