digiKam
mailprocess.h
Go to the documentation of this file.
1 /* ============================================================
2  *
3  * This file is a part of digiKam project
4  * https://www.digikam.org
5  *
6  * Date : 2004-02-25
7  * Description : a tool to e-mailing images
8  *
9  * Copyright (C) 2004-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
10  *
11  * This program is free software; you can redistribute it
12  * and/or modify it under the terms of the GNU General
13  * Public License as published by the Free Software Foundation;
14  * either version 2, or (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU General Public License for more details.
20  *
21  * ============================================================ */
22 
23 #ifndef DIGIKAM_MAIL_PROCESS_H
24 #define DIGIKAM_MAIL_PROCESS_H
25 
26 // Qt includes
27 
28 #include <QObject>
29 
30 // Local includes
31 
32 #include "mailsettings.h"
33 #include "dinfointerface.h"
34 
35 using namespace Digikam;
36 
38 {
39 
40 class MailProcess : public QObject
41 {
42  Q_OBJECT
43 
44 public:
45 
46  explicit MailProcess(MailSettings* const settings,
47  DInfoInterface* const iface,
48  QObject* const parent);
49  ~MailProcess() override;
50 
51  void firstStage();
52 
53 Q_SIGNALS:
54 
55  void signalProgress(int);
56  void signalMessage(QString, bool);
57  void signalDone(bool);
58 
59 public Q_SLOTS:
60 
61  void slotCancel();
62 
63 private Q_SLOTS:
64 
65  void slotStartingResize(const QUrl&);
66  void slotFinishedResize(const QUrl&, const QUrl&, int);
67  void slotFailedResize(const QUrl&, const QString&, int);
68  void slotCompleteResize();
69  void slotCleanUp();
70 
71 private:
72 
73  void secondStage();
74  void invokeMailAgentError(const QString& prog, const QStringList& args);
75  void invokeMailAgentDone(const QString& prog, const QStringList& args);
76 
80  void buildPropertiesFile();
81 
86  bool invokeMailAgent();
87 
91  bool showFailedResizedImages() const;
92 
99  QList<QUrl> divideEmails();
100 
101 private:
102 
103  class Private;
104  Private* const d;
105 };
106 
107 } // namespace DigikamGenericSendByMailPlugin
108 
109 #endif // DIGIKAM_MAIL_PROCESS_H
Definition: dinfointerface.h:56
Definition: imageresizejob.cpp:44
Definition: datefolderview.cpp:43