diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-05-23 21:00:50 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-05-23 21:00:50 +0200 |
commit | 31bf3102fe8f8cdd3f1448f0f22f182d0c2820d2 (patch) | |
tree | b5b508c3f065e0f51c8ce40aaf97d7070b5f9ef5 /framework/src/domain/mimetreeparser/otp/autotests/testcsshelper.cpp | |
parent | 1948369d4da2d0bc23b6af93683982b0e65d4992 (diff) | |
download | kube-31bf3102fe8f8cdd3f1448f0f22f182d0c2820d2.tar.gz kube-31bf3102fe8f8cdd3f1448f0f22f182d0c2820d2.zip |
Moved MIME related stuff to a mime subdir
Diffstat (limited to 'framework/src/domain/mimetreeparser/otp/autotests/testcsshelper.cpp')
-rw-r--r-- | framework/src/domain/mimetreeparser/otp/autotests/testcsshelper.cpp | 106 |
1 files changed, 0 insertions, 106 deletions
diff --git a/framework/src/domain/mimetreeparser/otp/autotests/testcsshelper.cpp b/framework/src/domain/mimetreeparser/otp/autotests/testcsshelper.cpp deleted file mode 100644 index 0e411e8f..00000000 --- a/framework/src/domain/mimetreeparser/otp/autotests/testcsshelper.cpp +++ /dev/null | |||
@@ -1,106 +0,0 @@ | |||
1 | /* | ||
2 | testcsshelper.cpp | ||
3 | |||
4 | This file is part of KMail, the KDE mail client. | ||
5 | Copyright (c) 2013 Sandro Knauß <bugs@sandroknauss.de> | ||
6 | |||
7 | KMail is free software; you can redistribute it and/or modify it | ||
8 | under the terms of the GNU General Public License, version 2, as | ||
9 | published by the Free Software Foundation. | ||
10 | |||
11 | KMail is distributed in the hope that it will be useful, but | ||
12 | WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
14 | General Public License for more details. | ||
15 | |||
16 | You should have received a copy of the GNU General Public License | ||
17 | along with this program; if not, write to the Free Software | ||
18 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
19 | |||
20 | In addition, as a special exception, the copyright holders give | ||
21 | permission to link the code of this program with any edition of | ||
22 | the Qt library by Trolltech AS, Norway (or with modified versions | ||
23 | of Qt that use the same license as Qt), and distribute linked | ||
24 | combinations including the two. You must obey the GNU General | ||
25 | Public License in all respects for all of the code used other than | ||
26 | Qt. If you modify this file, you may extend this exception to | ||
27 | your version of the file, but you are not obligated to do so. If | ||
28 | you do not wish to do so, delete this exception statement from | ||
29 | your version. | ||
30 | */ | ||
31 | |||
32 | #include "testcsshelper.h" | ||
33 | |||
34 | #include <QColor> | ||
35 | #include <QFont> | ||
36 | #include <QPalette> | ||
37 | #include <QApplication> | ||
38 | |||
39 | namespace MimeTreeParser | ||
40 | { | ||
41 | |||
42 | TestCSSHelper::TestCSSHelper(const QPaintDevice *pd) : | ||
43 | CSSHelperBase(pd) | ||
44 | { | ||
45 | mRecycleQuoteColors = false; | ||
46 | mBackgroundColor = QColor(0xff, 0xff, 0xff); | ||
47 | mForegroundColor = QColor(0x1f, 0x1c, 0x1b); | ||
48 | mLinkColor = QColor(0x00, 0x57, 0xae); | ||
49 | cPgpEncrH = QColor(0x00, 0x80, 0xff); | ||
50 | cPgpOk1H = QColor(0x40, 0xff, 0x40); | ||
51 | cPgpOk0H = QColor(0xff, 0xff, 0x40); | ||
52 | cPgpWarnH = QColor(0xff, 0xff, 0x40); | ||
53 | cPgpErrH = QColor(0xff, 0x00, 0x00); | ||
54 | |||
55 | cPgpEncrHT = QColor(0xff, 0xff, 0xff); | ||
56 | cPgpOk1HT = QColor(0x27, 0xae, 0x60); | ||
57 | cPgpOk0HT = QColor(0xf6, 0x74, 0x00); | ||
58 | cPgpWarnHT = QColor(0xf6, 0x74, 0x00); | ||
59 | cPgpErrHT = QColor(0xda, 0x44, 0x53); | ||
60 | |||
61 | cHtmlWarning = QColor(0xff, 0x40, 0x40); | ||
62 | for (int i = 0; i < 3; ++i) { | ||
63 | mQuoteColor[i] = QColor(0x00, 0x80 - i * 0x10, 0x00); | ||
64 | } | ||
65 | |||
66 | QFont defaultFont = QFont(QStringLiteral("Sans Serif"), 9); | ||
67 | mBodyFont = defaultFont; | ||
68 | mPrintFont = defaultFont; | ||
69 | mFixedFont = defaultFont; | ||
70 | mFixedPrintFont = defaultFont; | ||
71 | defaultFont.setItalic(true); | ||
72 | for (int i = 0; i < 3; ++i) { | ||
73 | mQuoteFont[i] = defaultFont; | ||
74 | } | ||
75 | |||
76 | mShrinkQuotes = false; | ||
77 | |||
78 | QPalette pal; | ||
79 | |||
80 | pal.setColor(QPalette::Background, QColor(0xd6, 0xd2, 0xd0)); | ||
81 | pal.setColor(QPalette::Foreground, QColor(0x22, 0x1f, 0x1e)); | ||
82 | pal.setColor(QPalette::Highlight, QColor(0x43, 0xac, 0xe8)); | ||
83 | pal.setColor(QPalette::HighlightedText, QColor(0xff, 0xff, 0xff)); | ||
84 | pal.setColor(QPalette::Mid, QColor(0xb3, 0xab, 0xa7)); | ||
85 | |||
86 | QApplication::setPalette(pal); | ||
87 | |||
88 | recalculatePGPColors(); | ||
89 | } | ||
90 | |||
91 | TestCSSHelper::~TestCSSHelper() | ||
92 | { | ||
93 | |||
94 | } | ||
95 | |||
96 | QString TestCSSHelper::htmlHead(bool fixed) const | ||
97 | { | ||
98 | Q_UNUSED(fixed); | ||
99 | return | ||
100 | QStringLiteral("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n" | ||
101 | "<html>\n" | ||
102 | "<body>\n"); | ||
103 | } | ||
104 | |||
105 | } | ||
106 | |||