File indexing completed on 2024-05-12 05:11:13

0001 /*
0002     SPDX-FileCopyrightText: 2006-2007 Volker Krause <vkrause@kde.org>
0003     SPDX-FileCopyrightText: 2009 Constantin Berzan <exit3219@gmail.com>
0004 
0005     SPDX-License-Identifier: LGPL-2.0-or-later
0006 */
0007 
0008 #pragma once
0009 
0010 #include <QWidget>
0011 #include <widgets/transportcombobox.h>
0012 
0013 class KJob;
0014 class QLineEdit;
0015 class KTextEdit;
0016 
0017 namespace MailTransport
0018 {
0019 class MessageQueueJob;
0020 }
0021 
0022 /**
0023   Mostly stolen from transportmgr.{h,cpp}
0024 */
0025 class MessageQueuer : public QWidget
0026 {
0027     Q_OBJECT
0028 
0029 public:
0030     MessageQueuer();
0031 
0032 private Q_SLOTS:
0033     void sendNowClicked();
0034     void sendQueuedClicked();
0035     void sendOnDateClicked();
0036     void jobResult(KJob *job);
0037     void jobPercent(KJob *job, unsigned long percent);
0038     void jobInfoMessage(KJob *job, const QString &info, const QString &info2);
0039 
0040 private:
0041     MailTransport::TransportComboBox *mComboBox = nullptr;
0042     QLineEdit *mSenderEdit = nullptr;
0043     QLineEdit *mToEdit = nullptr;
0044     QLineEdit *mCcEdit = nullptr;
0045     QLineEdit *mBccEdit = nullptr;
0046     KTextEdit *mMailEdit = nullptr;
0047 
0048     MailTransport::MessageQueueJob *createQueueJob();
0049 };