Warning, file /pim/kdepim-runtime/resources/ews/ewsclient/ewsitemshape.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 /* 0002 SPDX-FileCopyrightText: 2015-2016 Krzysztof Nowicki <krissn@op.pl> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #pragma once 0008 0009 #include "ewsfoldershape.h" 0010 0011 class EwsItemShape : public EwsFolderShape 0012 { 0013 public: 0014 enum Flag { 0015 IncludeMimeContent = 0x01, 0016 FilterHtmlContent = 0x02, 0017 ConvertHtmlToUtf8 = 0x04, 0018 }; 0019 enum BodyType { 0020 BodyNone, 0021 BodyBest, 0022 BodyHtml, 0023 BodyText, 0024 }; 0025 0026 Q_DECLARE_FLAGS(Flags, Flag) 0027 0028 explicit EwsItemShape(EwsBaseShape shape = EwsShapeDefault) 0029 : EwsFolderShape(shape) 0030 , mBodyType(BodyNone) 0031 { 0032 } 0033 0034 EwsItemShape(const EwsItemShape &other) 0035 : EwsFolderShape(other) 0036 , mBodyType(BodyNone) 0037 { 0038 } 0039 0040 explicit EwsItemShape(EwsFolderShape &&other) 0041 : EwsFolderShape(other) 0042 , mBodyType(BodyNone) 0043 { 0044 } 0045 0046 EwsItemShape &operator=(EwsItemShape &&other) 0047 { 0048 mBaseShape = other.mBaseShape; 0049 mProps = std::move(other.mProps); 0050 mFlags = other.mFlags; 0051 mBodyType = other.mBodyType; 0052 return *this; 0053 } 0054 0055 EwsItemShape &operator=(const EwsItemShape &other) 0056 { 0057 mBaseShape = other.mBaseShape; 0058 mProps = other.mProps; 0059 mFlags = other.mFlags; 0060 mBodyType = other.mBodyType; 0061 return *this; 0062 } 0063 0064 void setFlags(Flags flags) 0065 { 0066 mFlags = flags; 0067 } 0068 0069 void setBodyType(BodyType type) 0070 { 0071 mBodyType = type; 0072 } 0073 0074 void write(QXmlStreamWriter &writer) const; 0075 0076 protected: 0077 Flags mFlags; 0078 BodyType mBodyType; 0079 }; 0080 0081 Q_DECLARE_OPERATORS_FOR_FLAGS(EwsItemShape::Flags)