digiKam
mailsettings.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 : 2007-11-07
7  * Description : mail settings container.
8  *
9  * Copyright (C) 2007-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
10  * Copyright (C) 2010 by Andi Clemens <andi dot clemens at googlemail dot com>
11  *
12  * This program is free software; you can redistribute it
13  * and/or modify it under the terms of the GNU General
14  * Public License as published by the Free Software Foundation;
15  * either version 2, or (at your option) any later version.
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU General Public License for more details.
21  *
22  * ============================================================ */
23 
24 #ifndef DIGIKAM_MAIL_SETTINGS_H
25 #define DIGIKAM_MAIL_SETTINGS_H
26 
27 // Qt includes
28 
29 #include <QtGlobal>
30 #include <QList>
31 #include <QString>
32 #include <QStringList>
33 #include <QUrl>
34 #include <QMap>
35 
36 class KConfigGroup;
37 
39 {
40 
42 {
43 
44 public:
45 
49  enum Selection
50  {
51  IMAGES = 0,
52  ALBUMS
53  };
54 
56  {
57  BALSA = 0,
65  };
66 
68  {
69  JPEG = 0,
70  PNG
71  };
72 
73 public:
74 
75  explicit MailSettings();
76  ~MailSettings();
77 
81  void readSettings(KConfigGroup& group);
82  void writeSettings(KConfigGroup& group);
83 
84  QString format() const;
85 
89  qint64 attachementLimit() const;
90 
91  void setMailUrl(const QUrl& orgUrl, const QUrl& emailUrl);
92  QUrl mailUrl(const QUrl& orgUrl) const;
93 
97  static QMap<MailClient, QString> mailClientNames();
98  static QMap<ImageFormat, QString> imageFormatNames();
99 
100 public:
101 
103 
105 
108 
110 
112 
114 
115  QString tempPath;
116 
118 
120 
122 
123  QMap<QUrl, QUrl> itemsList;
124 
125  QMap<MailClient, QString> binPaths;
126 };
127 
128 } // namespace DigikamGenericSendByMailPlugin
129 
130 #endif // DIGIKAM_MAIL_SETTINGS_H
static QMap< MailClient, QString > mailClientNames()
Definition: mailsettings.cpp:118
bool addFileProperties
Definition: mailsettings.h:106
QString tempPath
Definition: mailsettings.h:115
QString format() const
Definition: mailsettings.cpp:86
~MailSettings()
Definition: mailsettings.cpp:47
bool removeMetadata
Definition: mailsettings.h:109
bool imagesChangeProp
Definition: mailsettings.h:107
void setMailUrl(const QUrl &orgUrl, const QUrl &emailUrl)
Definition: mailsettings.cpp:96
void readSettings(KConfigGroup &group)
Definition: mailsettings.cpp:51
qint64 attLimitInMbytes
Definition: mailsettings.h:113
qint64 attachementLimit() const
Definition: mailsettings.cpp:111
int imageSize
Definition: mailsettings.h:119
MailSettings()
Definition: mailsettings.cpp:34
MailClient mailProgram
Definition: mailsettings.h:117
QMap< MailClient, QString > binPaths
Map of paths for all mail clients.
Definition: mailsettings.h:125
ImageFormat imageFormat
Definition: mailsettings.h:121
void writeSettings(KConfigGroup &group)
Definition: mailsettings.cpp:73
QUrl mailUrl(const QUrl &orgUrl) const
Definition: mailsettings.cpp:101
QList< QUrl > inputImages
Selected items to send.
Definition: mailsettings.h:104
Selection selMode
Items selection mode.
Definition: mailsettings.h:102
QMap< QUrl, QUrl > itemsList
Map of original item and attached item (can be resized).
Definition: mailsettings.h:123
int imageCompression
Definition: mailsettings.h:111
Selection
Definition: mailsettings.h:50
@ ALBUMS
Definition: mailsettings.h:52
@ IMAGES
Definition: mailsettings.h:51
ImageFormat
Definition: mailsettings.h:68
@ JPEG
Definition: mailsettings.h:69
@ PNG
Definition: mailsettings.h:70
static QMap< ImageFormat, QString > imageFormatNames()
Definition: mailsettings.cpp:134
MailClient
Definition: mailsettings.h:56
@ CLAWSMAIL
Definition: mailsettings.h:58
@ KMAIL
Definition: mailsettings.h:60
@ BALSA
Definition: mailsettings.h:57
@ OUTLOOK
Definition: mailsettings.h:62
@ THUNDERBIRD
Definition: mailsettings.h:64
@ SYLPHEED
Definition: mailsettings.h:63
@ NETSCAPE
Messenger (https://en.wikipedia.org/wiki/Netscape_Messenger_9)
Definition: mailsettings.h:61
@ EVOLUTION
Definition: mailsettings.h:59
Definition: imageresizejob.cpp:44