1 /****************************************************************************
2 **
3 ** DQt - D bindings for the Qt Toolkit
4 **
5 ** GNU Lesser General Public License Usage
6 ** This file may be used under the terms of the GNU Lesser
7 ** General Public License version 3 as published by the Free Software
8 ** Foundation and appearing in the file LICENSE.LGPL3 included in the
9 ** packaging of this file. Please review the following information to
10 ** ensure the GNU Lesser General Public License version 3 requirements
11 ** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
12 **
13 ****************************************************************************/
14 module qt.gui.textformat;
15 extern(C++):
16 
17 import qt.config;
18 import qt.core.flags;
19 import qt.core.global;
20 import qt.core.list;
21 import qt.core.map;
22 import qt.core.metatype;
23 import qt.core.namespace;
24 import qt.core.objectdefs;
25 import qt.core.shareddata;
26 import qt.core.string;
27 import qt.core.stringlist;
28 import qt.core.typeinfo;
29 import qt.core.variant;
30 import qt.core.vector;
31 import qt.gui.brush;
32 import qt.gui.color;
33 import qt.gui.font;
34 import qt.gui.pen;
35 import qt.gui.textoption;
36 import qt.helpers;
37 
38 /+ class QString;
39 class QVariant;
40 class QFont;
41 
42 class QTextFormatCollection; +/
43 extern(C++, class) struct QTextFormatPrivate;
44 /+ class QTextBlockFormat;
45 class QTextCharFormat;
46 class QTextListFormat;
47 class QTextTableFormat;
48 class QTextFrameFormat;
49 class QTextImageFormat;
50 class QTextTableCellFormat;
51 class QTextFormat;
52 class QTextObject;
53 class QTextCursor;
54 class QTextDocument;
55 class QTextLength;
56 
57 #ifndef QT_NO_DATASTREAM
58 Q_GUI_EXPORT QDataStream &operator<<(QDataStream &, const QTextLength &);
59 Q_GUI_EXPORT QDataStream &operator>>(QDataStream &, QTextLength &);
60 #endif
61 
62 #ifndef QT_NO_DEBUG_STREAM
63 Q_GUI_EXPORT QDebug operator<<(QDebug, const QTextLength &);
64 #endif +/
65 
66 @(QMetaType.Type.QTextLength) extern(C++, class) struct /+ Q_GUI_EXPORT +/ QTextLength
67 {
68 public:
69     enum Type { VariableLength = 0, FixedLength, PercentageLength }
70 
71     /+pragma(inline, true) this()
72     {
73         this.lengthType = Type.VariableLength;
74         this.fixedValueOrPercentage = 0;
75     }+/
76 
77     /+ explicit +/pragma(inline, true) this(Type atype, qreal avalue)
78     {
79         this.lengthType = atype;
80         this.fixedValueOrPercentage = avalue;
81     }
82 
83     pragma(inline, true) Type type() const { return lengthType; }
84     pragma(inline, true) qreal value(qreal maximumLength) const
85     {
86         switch (lengthType) {
87             case Type.FixedLength: return fixedValueOrPercentage;
88             case Type.VariableLength: return maximumLength;
89             case Type.PercentageLength: return fixedValueOrPercentage * maximumLength / qreal(100);default:
90 
91         }
92         return -1;
93     }
94 
95     pragma(inline, true) qreal rawValue() const { return fixedValueOrPercentage; }
96 
97     /+pragma(inline, true) bool operator ==(ref const(QTextLength) other) const
98     { return lengthType == other.lengthType
99              && qFuzzyCompare(fixedValueOrPercentage, other.fixedValueOrPercentage); }+/
100     /+pragma(inline, true) bool operator !=(ref const(QTextLength) other) const
101     { return lengthType != other.lengthType
102              || !qFuzzyCompare(fixedValueOrPercentage, other.fixedValueOrPercentage); }+/
103     /+auto opCast(T : QVariant)() const;+/
104 
105 private:
106     Type lengthType = Type.VariableLength;
107     qreal fixedValueOrPercentage = 0;
108     /+ friend Q_GUI_EXPORT QDataStream &operator<<(QDataStream &, const QTextLength &); +/
109     /+ friend Q_GUI_EXPORT QDataStream &operator>>(QDataStream &, QTextLength &); +/
110 }
111 /+ Q_DECLARE_TYPEINFO(QTextLength, QT_VERSION >= QT_VERSION_CHECK(6,0,0) ? Q_PRIMITIVE_TYPE : Q_RELOCATABLE_TYPE);
112 
113 #ifndef QT_NO_DATASTREAM
114 Q_GUI_EXPORT QDataStream &operator<<(QDataStream &, const QTextFormat &);
115 Q_GUI_EXPORT QDataStream &operator>>(QDataStream &, QTextFormat &);
116 #endif
117 
118 #ifndef QT_NO_DEBUG_STREAM
119 Q_GUI_EXPORT QDebug operator<<(QDebug, const QTextFormat &);
120 #endif +/
121 
122 @(QMetaType.Type.QTextFormat) @Q_MOVABLE_TYPE extern(C++, class) struct /+ Q_GUI_EXPORT +/ QTextFormat
123 {
124     mixin(Q_GADGET);
125 public:
126     enum FormatType {
127         InvalidFormat = -1,
128         BlockFormat = 1,
129         CharFormat = 2,
130         ListFormat = 3,
131 /+ #if QT_DEPRECATED_SINCE(5, 3) +/
132         TableFormat = 4,
133 /+ #endif +/
134         FrameFormat = 5,
135 
136         UserFormat = 100
137     }
138     /+ Q_ENUM(FormatType) +/
139 
140     enum Property {
141         ObjectIndex = 0x0,
142 
143         // paragraph and char
144         CssFloat = 0x0800,
145         LayoutDirection = 0x0801,
146 
147         OutlinePen = 0x810,
148         BackgroundBrush = 0x820,
149         ForegroundBrush = 0x821,
150         // Internal to qtextlayout.cpp: ObjectSelectionBrush = 0x822
151         BackgroundImageUrl = 0x823,
152 
153         // paragraph
154         BlockAlignment = 0x1010,
155         BlockTopMargin = 0x1030,
156         BlockBottomMargin = 0x1031,
157         BlockLeftMargin = 0x1032,
158         BlockRightMargin = 0x1033,
159         TextIndent = 0x1034,
160         TabPositions = 0x1035,
161         BlockIndent = 0x1040,
162         LineHeight = 0x1048,
163         LineHeightType = 0x1049,
164         BlockNonBreakableLines = 0x1050,
165         BlockTrailingHorizontalRulerWidth = 0x1060,
166         HeadingLevel = 0x1070,
167         BlockQuoteLevel = 0x1080,
168         BlockCodeLanguage = 0x1090,
169         BlockCodeFence = 0x1091,
170         BlockMarker = 0x10A0,
171 
172         // character properties
173         FirstFontProperty = 0x1FE0,
174         FontCapitalization = Property.FirstFontProperty,
175         FontLetterSpacingType = 0x2033,
176         FontLetterSpacing = 0x1FE1,
177         FontWordSpacing = 0x1FE2,
178         FontStretch = 0x2034,
179         FontStyleHint = 0x1FE3,
180         FontStyleStrategy = 0x1FE4,
181         FontKerning = 0x1FE5,
182         FontHintingPreference = 0x1FE6,
183         FontFamilies = 0x1FE7,
184         FontStyleName = 0x1FE8,
185         FontFamily = 0x2000,
186         FontPointSize = 0x2001,
187         FontSizeAdjustment = 0x2002,
188         FontSizeIncrement = Property.FontSizeAdjustment, // old name, compat
189         FontWeight = 0x2003,
190         FontItalic = 0x2004,
191         FontUnderline = 0x2005, // deprecated, use TextUnderlineStyle instead
192         FontOverline = 0x2006,
193         FontStrikeOut = 0x2007,
194         FontFixedPitch = 0x2008,
195         FontPixelSize = 0x2009,
196         LastFontProperty = Property.FontPixelSize,
197 
198         TextUnderlineColor = 0x2010,
199         TextVerticalAlignment = 0x2021,
200         TextOutline = 0x2022,
201         TextUnderlineStyle = 0x2023,
202         TextToolTip = 0x2024,
203 
204         IsAnchor = 0x2030,
205         AnchorHref = 0x2031,
206         AnchorName = 0x2032,
207         ObjectType = 0x2f00,
208 
209         // list properties
210         ListStyle = 0x3000,
211         ListIndent = 0x3001,
212         ListNumberPrefix = 0x3002,
213         ListNumberSuffix = 0x3003,
214 
215         // table and frame properties
216         FrameBorder = 0x4000,
217         FrameMargin = 0x4001,
218         FramePadding = 0x4002,
219         FrameWidth = 0x4003,
220         FrameHeight = 0x4004,
221         FrameTopMargin    = 0x4005,
222         FrameBottomMargin = 0x4006,
223         FrameLeftMargin   = 0x4007,
224         FrameRightMargin  = 0x4008,
225         FrameBorderBrush = 0x4009,
226         FrameBorderStyle = 0x4010,
227 
228         TableColumns = 0x4100,
229         TableColumnWidthConstraints = 0x4101,
230         TableCellSpacing = 0x4102,
231         TableCellPadding = 0x4103,
232         TableHeaderRowCount = 0x4104,
233         TableBorderCollapse = 0x4105,
234 
235         // table cell properties
236         TableCellRowSpan = 0x4810,
237         TableCellColumnSpan = 0x4811,
238 
239         TableCellTopPadding = 0x4812,
240         TableCellBottomPadding = 0x4813,
241         TableCellLeftPadding = 0x4814,
242         TableCellRightPadding = 0x4815,
243 
244         TableCellTopBorder = 0x4816,
245         TableCellBottomBorder = 0x4817,
246         TableCellLeftBorder = 0x4818,
247         TableCellRightBorder = 0x4819,
248 
249         TableCellTopBorderStyle = 0x481a,
250         TableCellBottomBorderStyle = 0x481b,
251         TableCellLeftBorderStyle = 0x481c,
252         TableCellRightBorderStyle = 0x481d,
253 
254         TableCellTopBorderBrush = 0x481e,
255         TableCellBottomBorderBrush = 0x481f,
256         TableCellLeftBorderBrush = 0x4820,
257         TableCellRightBorderBrush = 0x4821,
258 
259         // image properties
260         ImageName = 0x5000,
261         ImageTitle = 0x5001,
262         ImageAltText = 0x5002,
263         ImageWidth = 0x5010,
264         ImageHeight = 0x5011,
265         ImageQuality = 0x5014,
266 
267         // internal
268         /*
269            SuppressText = 0x5012,
270            SuppressBackground = 0x513
271         */
272 
273         // selection properties
274         FullWidthSelection = 0x06000,
275 
276         // page break properties
277         PageBreakPolicy = 0x7000,
278 
279         // --
280         UserProperty = 0x100000
281     }
282     /+ Q_ENUM(Property) +/
283 
284     enum ObjectTypes {
285         NoObject,
286         ImageObject,
287         TableObject,
288         TableCellObject,
289 
290         UserObject = 0x1000
291     }
292     /+ Q_ENUM(ObjectTypes) +/
293 
294     enum PageBreakFlag {
295         PageBreak_Auto = 0,
296         PageBreak_AlwaysBefore = 0x001,
297         PageBreak_AlwaysAfter  = 0x010
298         // PageBreak_AlwaysInside = 0x100
299     }
300     /+ Q_DECLARE_FLAGS(PageBreakFlags, PageBreakFlag) +/
301 alias PageBreakFlags = QFlags!(PageBreakFlag);
302     /+this();+/
303 
304     /+ explicit +/this(int type)
305     {
306         format_type = type;
307     }
308 
309     //@disable this(this);
310     //this(ref const(QTextFormat) rhs);
311     /+ref QTextFormat operator =(ref const(QTextFormat) rhs);+/
312     ~this();
313 
314     /+ void swap(QTextFormat &other)
315     { qSwap(d, other.d); qSwap(format_type, other.format_type); } +/
316 
317     void merge(ref const(QTextFormat) other);
318 
319     pragma(inline, true) bool isValid() const { return type() != FormatType.InvalidFormat; }
320     pragma(inline, true) bool isEmpty() const { return propertyCount() == 0; }
321 
322     int type() const;
323 
324     int objectIndex() const;
325     void setObjectIndex(int object);
326 
327     QVariant property(int propertyId) const;
328     void setProperty(int propertyId, ref const(QVariant) value);
329     void setProperty(T)(int propertyId, T value)
330     {
331         QVariant v = QVariant(value);
332         setProperty(propertyId, v);
333     }
334     void clearProperty(int propertyId);
335     bool hasProperty(int propertyId) const;
336 
337     bool boolProperty(int propertyId) const;
338     int intProperty(int propertyId) const;
339     qreal doubleProperty(int propertyId) const;
340     QString stringProperty(int propertyId) const;
341     QColor colorProperty(int propertyId) const;
342     QPen penProperty(int propertyId) const;
343     QBrush brushProperty(int propertyId) const;
344     QTextLength lengthProperty(int propertyId) const;
345     QVector!(QTextLength) lengthVectorProperty(int propertyId) const;
346 
347     void setProperty(int propertyId, ref const(QVector!(QTextLength)) lengths);
348 
349 //    QMap!(int, QVariant) properties() const;
350     int propertyCount() const;
351 
352     pragma(inline, true) void setObjectType(int atype)
353     { setProperty(Property.ObjectType, atype); }
354     pragma(inline, true) int objectType() const
355     { return intProperty(Property.ObjectType); }
356 
357     pragma(inline, true) bool isCharFormat() const { return type() == FormatType.CharFormat; }
358     pragma(inline, true) bool isBlockFormat() const { return type() == FormatType.BlockFormat; }
359     pragma(inline, true) bool isListFormat() const { return type() == FormatType.ListFormat; }
360     pragma(inline, true) bool isFrameFormat() const { return type() == FormatType.FrameFormat; }
361     pragma(inline, true) bool isImageFormat() const { return type() == FormatType.CharFormat && objectType() == ObjectTypes.ImageObject; }
362     pragma(inline, true) bool isTableFormat() const { return type() == FormatType.FrameFormat && objectType() == ObjectTypes.TableObject; }
363     pragma(inline, true) bool isTableCellFormat() const { return type() == FormatType.CharFormat && objectType() == ObjectTypes.TableCellObject; }
364 
365     QTextBlockFormat toBlockFormat() const;
366     QTextCharFormat toCharFormat() const;
367     QTextListFormat toListFormat() const;
368     QTextTableFormat toTableFormat() const;
369     QTextFrameFormat toFrameFormat() const;
370     QTextImageFormat toImageFormat() const;
371     QTextTableCellFormat toTableCellFormat() const;
372 
373     /+bool operator ==(ref const(QTextFormat) rhs) const;+/
374     /+pragma(inline, true) bool operator !=(ref const(QTextFormat) rhs) const { return !operator==(rhs); }+/
375     /+auto opCast(T : QVariant)() const;+/
376 
377     pragma(inline, true) void setLayoutDirection(/+ Qt:: +/qt.core.namespace.LayoutDirection direction)
378         { setProperty(QTextFormat.Property.LayoutDirection, cast(int)direction); }
379     pragma(inline, true) /+ Qt:: +/qt.core.namespace.LayoutDirection layoutDirection() const
380         { return /+ Qt:: +/cast(qt.core.namespace.LayoutDirection)(intProperty(QTextFormat.Property.LayoutDirection)); }
381 
382 /*    pragma(inline, true) void setBackground(ref const(QBrush) brush)
383     { setProperty(Property.BackgroundBrush, brush); }*/
384     pragma(inline, true) QBrush background() const
385     { return brushProperty(Property.BackgroundBrush); }
386     pragma(inline, true) void clearBackground()
387     { clearProperty(Property.BackgroundBrush); }
388 
389 /+    pragma(inline, true) void setForeground(ref const(QBrush) brush)
390     { setProperty(Property.ForegroundBrush, brush); }+/
391     pragma(inline, true) QBrush foreground() const
392     { return brushProperty(Property.ForegroundBrush); }
393     pragma(inline, true) void clearForeground()
394     { clearProperty(Property.ForegroundBrush); }
395 
396 private:
397     QSharedDataPointer!(QTextFormatPrivate) d;
398     qint32 format_type = FormatType.InvalidFormat;
399 
400     /+ friend class QTextFormatCollection; +/
401     /+ friend class QTextCharFormat; +/
402     /+ friend Q_GUI_EXPORT QDataStream &operator<<(QDataStream &, const QTextFormat &); +/
403     /+ friend Q_GUI_EXPORT QDataStream &operator>>(QDataStream &, QTextFormat &); +/
404 }
405 
406 /+ Q_DECLARE_SHARED(QTextFormat) +/
407 /+pragma(inline, true) QFlags!(QTextFormat.PageBreakFlags.enum_type) operator |(QTextFormat.PageBreakFlags.enum_type f1, QTextFormat.PageBreakFlags.enum_type f2)/+noexcept+/{return QFlags!(QTextFormat.PageBreakFlags.enum_type)(f1)|f2;}+/
408 /+pragma(inline, true) QFlags!(QTextFormat.PageBreakFlags.enum_type) operator |(QTextFormat.PageBreakFlags.enum_type f1, QFlags!(QTextFormat.PageBreakFlags.enum_type) f2)/+noexcept+/{return f2|f1;}+/
409 /+pragma(inline, true) QIncompatibleFlag operator |(QTextFormat.PageBreakFlags.enum_type f1, int f2)/+noexcept+/{return QIncompatibleFlag(int(f1)|f2);}+/
410 
411 /+ Q_DECLARE_OPERATORS_FOR_FLAGS(QTextFormat::PageBreakFlags) +/
412 @Q_MOVABLE_TYPE extern(C++, class) struct /+ Q_GUI_EXPORT +/ QTextCharFormat
413 {
414     public QTextFormat base0 = QTextFormat(QTextFormat.FormatType.CharFormat);
415     alias base0 this;
416 public:
417     enum VerticalAlignment {
418         AlignNormal = 0,
419         AlignSuperScript,
420         AlignSubScript,
421         AlignMiddle,
422         AlignTop,
423         AlignBottom,
424         AlignBaseline
425     }
426     enum UnderlineStyle { // keep in sync with Qt::PenStyle!
427         NoUnderline,
428         SingleUnderline,
429         DashUnderline,
430         DotLine,
431         DashDotLine,
432         DashDotDotLine,
433         WaveUnderline,
434         SpellCheckUnderline
435     }
436 
437     /+this();+/
438 
439     bool isValid() const { return isCharFormat(); }
440 
441     enum FontPropertiesInheritanceBehavior {
442         FontPropertiesSpecifiedOnly,
443         FontPropertiesAll
444     }
445     void setFont(ref const(QFont) font, FontPropertiesInheritanceBehavior behavior);
446     void setFont(ref const(QFont) font); // ### Qt6: Merge with above
447     QFont font() const;
448 
449     pragma(inline, true) void setFontFamily(ref const(QString) family)
450     { setProperty(Property.FontFamily, family); }
451     pragma(inline, true) QString fontFamily() const
452     { return stringProperty(Property.FontFamily); }
453 
454     pragma(inline, true) void setFontFamilies(ref const(QStringList) families)
455     { auto tmp = QVariant(families); setProperty(Property.FontFamilies, tmp); }
456     pragma(inline, true) QVariant fontFamilies() const
457     { return property(Property.FontFamilies); }
458 
459     pragma(inline, true) void setFontStyleName(ref const(QString) styleName)
460     { setProperty(Property.FontStyleName, styleName); }
461     pragma(inline, true) QVariant fontStyleName() const
462     { return property(Property.FontStyleName); }
463 
464     pragma(inline, true) void setFontPointSize(qreal size)
465     { setProperty(Property.FontPointSize, size); }
466     pragma(inline, true) qreal fontPointSize() const
467     { return doubleProperty(Property.FontPointSize); }
468 
469     pragma(inline, true) void setFontWeight(int weight)
470     { setProperty(Property.FontWeight, weight); }
471     pragma(inline, true) int fontWeight() const
472     { return hasProperty(Property.FontWeight) ? intProperty(Property.FontWeight) : QFont.Weight.Normal; }
473     pragma(inline, true) void setFontItalic(bool italic)
474     { setProperty(Property.FontItalic, italic); }
475     pragma(inline, true) bool fontItalic() const
476     { return boolProperty(Property.FontItalic); }
477     pragma(inline, true) void setFontCapitalization(QFont.Capitalization capitalization)
478     { setProperty(Property.FontCapitalization, cast(int)capitalization); }
479     pragma(inline, true) QFont.Capitalization fontCapitalization() const
480     { return static_cast!(QFont.Capitalization)(intProperty(Property.FontCapitalization)); }
481     pragma(inline, true) void setFontLetterSpacingType(QFont.SpacingType letterSpacingType)
482     { setProperty(Property.FontLetterSpacingType, cast(int)letterSpacingType); }
483     pragma(inline, true) QFont.SpacingType fontLetterSpacingType() const
484     { return static_cast!(QFont.SpacingType)(intProperty(Property.FontLetterSpacingType)); }
485     pragma(inline, true) void setFontLetterSpacing(qreal spacing)
486     { setProperty(Property.FontLetterSpacing, spacing); }
487     pragma(inline, true) qreal fontLetterSpacing() const
488     { return doubleProperty(Property.FontLetterSpacing); }
489     pragma(inline, true) void setFontWordSpacing(qreal spacing)
490     { setProperty(Property.FontWordSpacing, spacing); }
491     pragma(inline, true) qreal fontWordSpacing() const
492     { return doubleProperty(Property.FontWordSpacing); }
493 
494     pragma(inline, true) void setFontUnderline(bool underline)
495     { setProperty(Property.TextUnderlineStyle, cast(int)(underline ? UnderlineStyle.SingleUnderline : UnderlineStyle.NoUnderline)); }
496     bool fontUnderline() const;
497 
498     pragma(inline, true) void setFontOverline(bool overline)
499     { setProperty(Property.FontOverline, overline); }
500     pragma(inline, true) bool fontOverline() const
501     { return boolProperty(Property.FontOverline); }
502 
503     pragma(inline, true) void setFontStrikeOut(bool strikeOut)
504     { setProperty(Property.FontStrikeOut, strikeOut); }
505     pragma(inline, true) bool fontStrikeOut() const
506     { return boolProperty(Property.FontStrikeOut); }
507 
508 /+    pragma(inline, true) void setUnderlineColor(ref const(QColor) color)
509     { setProperty(Property.TextUnderlineColor, color); }+/
510     pragma(inline, true) QColor underlineColor() const
511     { return colorProperty(Property.TextUnderlineColor); }
512 
513     pragma(inline, true) void setFontFixedPitch(bool fixedPitch)
514     { setProperty(Property.FontFixedPitch, fixedPitch); }
515     pragma(inline, true) bool fontFixedPitch() const
516     { return boolProperty(Property.FontFixedPitch); }
517 
518     pragma(inline, true) void setFontStretch(int factor)
519     { setProperty(Property.FontStretch, factor); }
520     pragma(inline, true) int fontStretch() const
521     { return intProperty(Property.FontStretch); }
522 
523     pragma(inline, true) void setFontStyleHint(QFont.StyleHint hint, QFont.StyleStrategy strategy = QFont.StyleStrategy.PreferDefault)
524     { setProperty(Property.FontStyleHint, cast(int)hint); setProperty(Property.FontStyleStrategy, cast(int)strategy); }
525     pragma(inline, true) void setFontStyleStrategy(QFont.StyleStrategy strategy)
526     { setProperty(Property.FontStyleStrategy, cast(int)strategy); }
527     QFont.StyleHint fontStyleHint() const
528     { return static_cast!(QFont.StyleHint)(intProperty(Property.FontStyleHint)); }
529     QFont.StyleStrategy fontStyleStrategy() const
530     { return static_cast!(QFont.StyleStrategy)(intProperty(Property.FontStyleStrategy)); }
531 
532     pragma(inline, true) void setFontHintingPreference(QFont.HintingPreference hintingPreference)
533     {
534         setProperty(Property.FontHintingPreference, cast(int)hintingPreference);
535     }
536 
537     pragma(inline, true) QFont.HintingPreference fontHintingPreference() const
538     {
539         return static_cast!(QFont.HintingPreference)(intProperty(Property.FontHintingPreference));
540     }
541 
542     pragma(inline, true) void setFontKerning(bool enable)
543     { setProperty(Property.FontKerning, enable); }
544     pragma(inline, true) bool fontKerning() const
545     { return boolProperty(Property.FontKerning); }
546 
547     void setUnderlineStyle(UnderlineStyle style);
548     pragma(inline, true) UnderlineStyle underlineStyle() const
549     { return static_cast!(UnderlineStyle)(intProperty(Property.TextUnderlineStyle)); }
550 
551     pragma(inline, true) void setVerticalAlignment(VerticalAlignment alignment)
552     { setProperty(Property.TextVerticalAlignment, cast(int)alignment); }
553     pragma(inline, true) VerticalAlignment verticalAlignment() const
554     { return static_cast!(VerticalAlignment)(intProperty(Property.TextVerticalAlignment)); }
555 
556 /+    pragma(inline, true) void setTextOutline(ref const(QPen) pen)
557     { setProperty(Property.TextOutline, pen); }+/
558     pragma(inline, true) QPen textOutline() const
559     { return penProperty(Property.TextOutline); }
560 
561     pragma(inline, true) void setToolTip(ref const(QString) tip)
562     { setProperty(Property.TextToolTip, tip); }
563     pragma(inline, true) QString toolTip() const
564     { return stringProperty(Property.TextToolTip); }
565 
566     pragma(inline, true) void setAnchor(bool anchor)
567     { setProperty(Property.IsAnchor, anchor); }
568     pragma(inline, true) bool isAnchor() const
569     { return boolProperty(Property.IsAnchor); }
570 
571     pragma(inline, true) void setAnchorHref(ref const(QString) value)
572     { setProperty(Property.AnchorHref, value); }
573     pragma(inline, true) QString anchorHref() const
574     { return stringProperty(Property.AnchorHref); }
575 
576 /+ #if QT_DEPRECATED_SINCE(5, 13) +/
577     /+ QT_DEPRECATED_X("Use setAnchorNames() instead") +/
578         pragma(inline, true) void setAnchorName(ref const(QString) name)
579     { QStringList tmp = QStringList.create(); tmp ~= name; setAnchorNames(tmp); }
580     /+ QT_DEPRECATED_X("Use anchorNames() instead") +/
581         QString anchorName() const;
582 /+ #endif +/
583 
584     pragma(inline, true) void setAnchorNames(ref const(QStringList) names)
585     { base0.setProperty!(const(QStringList))(Property.AnchorName, names); }
586     QStringList anchorNames() const;
587 
588     pragma(inline, true) void setTableCellRowSpan(int _tableCellRowSpan)
589     {
590         if (_tableCellRowSpan <= 1)
591             clearProperty(Property.TableCellRowSpan); // the getter will return 1 here.
592         else
593             setProperty(Property.TableCellRowSpan, _tableCellRowSpan);
594     }
595     pragma(inline, true) int tableCellRowSpan() const
596     { int s = intProperty(Property.TableCellRowSpan); if (s == 0) s = 1; return s; }
597     pragma(inline, true) void setTableCellColumnSpan(int _tableCellColumnSpan)
598     {
599         if (_tableCellColumnSpan <= 1)
600             clearProperty(Property.TableCellColumnSpan); // the getter will return 1 here.
601         else
602             setProperty(Property.TableCellColumnSpan, _tableCellColumnSpan);
603     }
604     pragma(inline, true) int tableCellColumnSpan() const
605     { int s = intProperty(Property.TableCellColumnSpan); if (s == 0) s = 1; return s; }
606 
607 protected:
608     /+ explicit +/this(ref const(QTextFormat) fmt);
609     /+ friend class QTextFormat; +/
610 }
611 
612 /+ Q_DECLARE_SHARED(QTextCharFormat) +/
613 
614 @Q_MOVABLE_TYPE extern(C++, class) struct /+ Q_GUI_EXPORT +/ QTextBlockFormat
615 {
616     public QTextFormat base0 = QTextFormat(QTextFormat.FormatType.BlockFormat);
617     alias base0 this;
618     alias PageBreakFlags = QTextFormat.PageBreakFlags;
619 public:
620     enum LineHeightTypes {
621         SingleHeight = 0,
622         ProportionalHeight = 1,
623         FixedHeight = 2,
624         MinimumHeight = 3,
625         LineDistanceHeight = 4
626     }
627 
628     enum /+ class +/ MarkerType {
629         NoMarker = 0,
630         Unchecked = 1,
631         Checked = 2
632     }
633 
634     @disable this();
635     /+this();+/
636 
637     bool isValid() const { return isBlockFormat(); }
638 
639     pragma(inline, true) void setAlignment(/+ Qt:: +/qt.core.namespace.Alignment aalignment)
640     { auto tmp = cast(int)(aalignment); setProperty(Property.BlockAlignment, tmp); }
641 /+    pragma(inline, true) /+ Qt:: +/qt.core.namespace.Alignment alignment() const
642     { int a = intProperty(Property.BlockAlignment); if (a == 0) a = /+ Qt:: +/qt.core.namespace.AlignmentFlag.AlignLeft; return QFlag(a); }+/
643 
644     pragma(inline, true) void setTopMargin(qreal margin)
645     { setProperty(Property.BlockTopMargin, margin); }
646     pragma(inline, true) qreal topMargin() const
647     { return doubleProperty(Property.BlockTopMargin); }
648 
649     pragma(inline, true) void setBottomMargin(qreal margin)
650     { setProperty(Property.BlockBottomMargin, margin); }
651     pragma(inline, true) qreal bottomMargin() const
652     { return doubleProperty(Property.BlockBottomMargin); }
653 
654     pragma(inline, true) void setLeftMargin(qreal margin)
655     { setProperty(Property.BlockLeftMargin, margin); }
656     pragma(inline, true) qreal leftMargin() const
657     { return doubleProperty(Property.BlockLeftMargin); }
658 
659     pragma(inline, true) void setRightMargin(qreal margin)
660     { setProperty(Property.BlockRightMargin, margin); }
661     pragma(inline, true) qreal rightMargin() const
662     { return doubleProperty(Property.BlockRightMargin); }
663 
664     pragma(inline, true) void setTextIndent(qreal aindent)
665     { setProperty(Property.TextIndent, aindent); }
666     pragma(inline, true) qreal textIndent() const
667     { return doubleProperty(Property.TextIndent); }
668 
669     pragma(inline, true) void setIndent(int aindent)
670     { setProperty(Property.BlockIndent, aindent); }
671     pragma(inline, true) int indent() const
672     { return intProperty(Property.BlockIndent); }
673 
674     pragma(inline, true) void setHeadingLevel(int alevel)
675     { setProperty(Property.HeadingLevel, alevel); }
676     pragma(inline, true) int headingLevel() const
677     { return intProperty(Property.HeadingLevel); }
678 
679     pragma(inline, true) void setLineHeight(qreal height, int heightType)
680     { setProperty(Property.LineHeight, height); setProperty(Property.LineHeightType, heightType); }
681 /+    pragma(inline, true) qreal lineHeight(qreal scriptLineHeight, qreal scaling) const
682     /+pragma(inline, true) qreal lineHeight(qreal scriptLineHeight, qreal scaling = 1.0) const+/
683     {
684       switch(intProperty(Property.LineHeightType)) {
685         case LineHeightTypes.SingleHeight:
686           return(scriptLineHeight);
687         case LineHeightTypes.ProportionalHeight:
688           return(scriptLineHeight * doubleProperty(Property.LineHeight) / 100.0);
689         case LineHeightTypes.FixedHeight:
690           return(doubleProperty(Property.LineHeight) * scaling);
691         case LineHeightTypes.MinimumHeight:
692           return(qMax(scriptLineHeight, doubleProperty(Property.LineHeight) * scaling));
693         case LineHeightTypes.LineDistanceHeight:
694           return(scriptLineHeight + doubleProperty(Property.LineHeight) * scaling);default:
695 
696       }
697       return(0);
698     }
699 +/
700     pragma(inline, true) qreal lineHeight() const
701     { return doubleProperty(Property.LineHeight); }
702     pragma(inline, true) int lineHeightType() const
703     { return intProperty(Property.LineHeightType); }
704 
705     pragma(inline, true) void setNonBreakableLines(bool b)
706     { setProperty(Property.BlockNonBreakableLines, b); }
707     pragma(inline, true) bool nonBreakableLines() const
708     { return boolProperty(Property.BlockNonBreakableLines); }
709 
710     pragma(inline, true) void setPageBreakPolicy(PageBreakFlags flags)
711     { auto tmp = cast(int)(flags); setProperty(Property.PageBreakPolicy, tmp); }
712 /+    pragma(inline, true) PageBreakFlags pageBreakPolicy() const
713     { return PageBreakFlags(cast(QFlag)(intProperty(Property.PageBreakPolicy))); }+/
714 
715     void setTabPositions(ref const(QList!(QTextOption.Tab)) tabs);
716     QList!(QTextOption.Tab) tabPositions() const;
717 
718     pragma(inline, true) void setMarker(MarkerType marker)
719     { auto tmp = int(marker); setProperty(Property.BlockMarker, cast(int)tmp); }
720     /+pragma(inline, true) MarkerType marker() const
721     { return MarkerType(intProperty(Property.BlockMarker)); }+/
722 
723 protected:
724     /+ explicit +/this(ref const(QTextFormat) fmt);
725     /+ friend class QTextFormat; +/
726 }
727 
728 /+ Q_DECLARE_SHARED(QTextBlockFormat) +/
729 
730 @Q_MOVABLE_TYPE extern(C++, class) struct /+ Q_GUI_EXPORT +/ QTextListFormat
731 {
732     public QTextFormat base0 = QTextFormat(QTextFormat.FormatType.ListFormat);
733     alias base0 this;
734 public:
735     /+this();+/
736 
737     bool isValid() const { return isListFormat(); }
738 
739     enum Style {
740         ListDisc = -1,
741         ListCircle = -2,
742         ListSquare = -3,
743         ListDecimal = -4,
744         ListLowerAlpha = -5,
745         ListUpperAlpha = -6,
746         ListLowerRoman = -7,
747         ListUpperRoman = -8,
748         ListStyleUndefined = 0
749     }
750 
751     pragma(inline, true) void setStyle(Style astyle)
752     { setProperty(Property.ListStyle, cast(int)astyle); }
753     pragma(inline, true) Style style() const
754     { return static_cast!(Style)(intProperty(Property.ListStyle)); }
755 
756     pragma(inline, true) void setIndent(int aindent)
757     { setProperty(Property.ListIndent, aindent); }
758     pragma(inline, true) int indent() const
759     { return intProperty(Property.ListIndent); }
760 
761     pragma(inline, true) void setNumberPrefix(ref const(QString) np)
762     { setProperty(Property.ListNumberPrefix, np); }
763     pragma(inline, true) QString numberPrefix() const
764     { return stringProperty(Property.ListNumberPrefix); }
765 
766     pragma(inline, true) void setNumberSuffix(ref const(QString) ns)
767     { setProperty(Property.ListNumberSuffix, ns); }
768     pragma(inline, true) QString numberSuffix() const
769     { return stringProperty(Property.ListNumberSuffix); }
770 
771 protected:
772     /+ explicit +/this(ref const(QTextFormat) fmt);
773     /+ friend class QTextFormat; +/
774 }
775 
776 /+ Q_DECLARE_SHARED(QTextListFormat) +/
777 
778 @Q_MOVABLE_TYPE extern(C++, class) struct /+ Q_GUI_EXPORT +/ QTextImageFormat
779 {
780     public QTextCharFormat base0;
781     alias base0 this;
782 public:
783     @disable this();
784     pragma(mangle, defaultConstructorMangling(__traits(identifier, typeof(this))))
785     ref typeof(this) rawConstructor();
786     static typeof(this) create()
787     {
788         typeof(this) r = typeof(this).init;
789         r.rawConstructor();
790         return r;
791     }
792 
793 
794     bool isValid() const { return isImageFormat(); }
795 
796     pragma(inline, true) void setName(ref const(QString) aname)
797     { setProperty(Property.ImageName, aname); }
798     pragma(inline, true) QString name() const
799     { return stringProperty(Property.ImageName); }
800 
801     pragma(inline, true) void setWidth(qreal awidth)
802     { setProperty(Property.ImageWidth, awidth); }
803     pragma(inline, true) qreal width() const
804     { return doubleProperty(Property.ImageWidth); }
805 
806     pragma(inline, true) void setHeight(qreal aheight)
807     { setProperty(Property.ImageHeight, aheight); }
808     pragma(inline, true) qreal height() const
809     { return doubleProperty(Property.ImageHeight); }
810 
811     pragma(inline, true) void setQuality(int aquality = 100)
812     { setProperty(Property.ImageQuality, aquality); }
813     pragma(inline, true) int quality() const
814     { return intProperty(Property.ImageQuality); }
815 
816 protected:
817     /+ explicit +/this(ref const(QTextFormat) format);
818     /+ friend class QTextFormat; +/
819 }
820 
821 /+ Q_DECLARE_SHARED(QTextImageFormat) +/
822 
823 @Q_MOVABLE_TYPE extern(C++, class) struct /+ Q_GUI_EXPORT +/ QTextFrameFormat
824 {
825     public QTextFormat base0 = QTextFormat(QTextFormat.FormatType.FrameFormat);
826     alias base0 this;
827     alias PageBreakFlags = QTextFormat.PageBreakFlags;
828 public:
829     @disable this();
830     /+this();+/
831 
832     bool isValid() const { return isFrameFormat(); }
833 
834     enum Position {
835         InFlow,
836         FloatLeft,
837         FloatRight
838         // ######
839 //        Absolute
840     }
841 
842     enum BorderStyle {
843         BorderStyle_None,
844         BorderStyle_Dotted,
845         BorderStyle_Dashed,
846         BorderStyle_Solid,
847         BorderStyle_Double,
848         BorderStyle_DotDash,
849         BorderStyle_DotDotDash,
850         BorderStyle_Groove,
851         BorderStyle_Ridge,
852         BorderStyle_Inset,
853         BorderStyle_Outset
854     }
855 
856     pragma(inline, true) void setPosition(Position f)
857     { setProperty(Property.CssFloat, cast(int)f); }
858     pragma(inline, true) Position position() const
859     { return static_cast!(Position)(intProperty(Property.CssFloat)); }
860 
861     pragma(inline, true) void setBorder(qreal aborder)
862     { setProperty(Property.FrameBorder, aborder); }
863     pragma(inline, true) qreal border() const
864     { return doubleProperty(Property.FrameBorder); }
865 
866 /+    pragma(inline, true) void setBorderBrush(ref const(QBrush) brush)
867     { setProperty(Property.FrameBorderBrush, brush); }+/
868     pragma(inline, true) QBrush borderBrush() const
869     { return brushProperty(Property.FrameBorderBrush); }
870 
871     pragma(inline, true) void setBorderStyle(BorderStyle style)
872     { setProperty(Property.FrameBorderStyle, cast(int)style); }
873     pragma(inline, true) BorderStyle borderStyle() const
874     { return static_cast!(BorderStyle)(intProperty(Property.FrameBorderStyle)); }
875 
876     void setMargin(qreal margin);
877     pragma(inline, true) qreal margin() const
878     { return doubleProperty(Property.FrameMargin); }
879 
880     pragma(inline, true) void setTopMargin(qreal amargin)
881     { setProperty(Property.FrameTopMargin, amargin); }
882     qreal topMargin() const;
883 
884     pragma(inline, true) void setBottomMargin(qreal amargin)
885     { setProperty(Property.FrameBottomMargin, amargin); }
886     qreal bottomMargin() const;
887 
888     pragma(inline, true) void setLeftMargin(qreal amargin)
889     { setProperty(Property.FrameLeftMargin, amargin); }
890     qreal leftMargin() const;
891 
892     pragma(inline, true) void setRightMargin(qreal amargin)
893     { setProperty(Property.FrameRightMargin, amargin); }
894     qreal rightMargin() const;
895 
896     pragma(inline, true) void setPadding(qreal apadding)
897     { setProperty(Property.FramePadding, apadding); }
898     pragma(inline, true) qreal padding() const
899     { return doubleProperty(Property.FramePadding); }
900 
901 /+    pragma(inline, true) void setWidth(qreal awidth)
902     { setProperty(Property.FrameWidth, QTextLength(QTextLength.Type.FixedLength, awidth)); }
903     pragma(inline, true) void setWidth(ref const(QTextLength) length)
904     { setProperty(Property.FrameWidth, length); }
905     pragma(inline, true) QTextLength width() const
906     { return lengthProperty(Property.FrameWidth); }
907 
908     pragma(inline, true) void setHeight(qreal aheight)
909     { setProperty(Property.FrameHeight, QTextLength(QTextLength.Type.FixedLength, aheight)); }
910     pragma(inline, true) void setHeight(ref const(QTextLength) aheight)
911     { setProperty(Property.FrameHeight, aheight); }+/
912     pragma(inline, true) QTextLength height() const
913     { return lengthProperty(Property.FrameHeight); }
914 
915     pragma(inline, true) void setPageBreakPolicy(PageBreakFlags flags)
916     { auto tmp = cast(int)(flags); setProperty(Property.PageBreakPolicy, tmp); }
917 /+    pragma(inline, true) PageBreakFlags pageBreakPolicy() const
918     { return PageBreakFlags(cast(QFlag)(intProperty(Property.PageBreakPolicy))); }+/
919 
920 protected:
921     /+ explicit +/this(ref const(QTextFormat) fmt);
922     /+ friend class QTextFormat; +/
923 }
924 
925 /+ Q_DECLARE_SHARED(QTextFrameFormat) +/
926 
927 @Q_MOVABLE_TYPE extern(C++, class) struct /+ Q_GUI_EXPORT +/ QTextTableFormat
928 {
929     public QTextFrameFormat base0;
930     alias base0 this;
931 public:
932     @disable this();
933     pragma(mangle, defaultConstructorMangling(__traits(identifier, typeof(this))))
934     ref typeof(this) rawConstructor();
935     static typeof(this) create()
936     {
937         typeof(this) r = typeof(this).init;
938         r.rawConstructor();
939         return r;
940     }
941 
942 
943     pragma(inline, true) bool isValid() const { return isTableFormat(); }
944 
945     pragma(inline, true) int columns() const
946     { int cols = intProperty(Property.TableColumns); if (cols == 0) cols = 1; return cols; }
947     pragma(inline, true) void setColumns(int acolumns)
948     {
949         if (acolumns == 1)
950             acolumns = 0;
951         setProperty(Property.TableColumns, acolumns);
952     }
953 
954     pragma(inline, true) void setColumnWidthConstraints(ref const(QVector!(QTextLength)) constraints)
955     { setProperty(Property.TableColumnWidthConstraints, constraints); }
956 
957     pragma(inline, true) QVector!(QTextLength) columnWidthConstraints() const
958     { return lengthVectorProperty(Property.TableColumnWidthConstraints); }
959 
960     pragma(inline, true) void clearColumnWidthConstraints()
961     { clearProperty(Property.TableColumnWidthConstraints); }
962 
963     pragma(inline, true) qreal cellSpacing() const
964     { return doubleProperty(Property.TableCellSpacing); }
965     pragma(inline, true) void setCellSpacing(qreal spacing)
966     { setProperty(Property.TableCellSpacing, spacing); }
967 
968     pragma(inline, true) qreal cellPadding() const
969     { return doubleProperty(Property.TableCellPadding); }
970     pragma(inline, true) void setCellPadding(qreal apadding)
971     { setProperty(Property.TableCellPadding, apadding); }
972 
973     pragma(inline, true) void setAlignment(/+ Qt:: +/qt.core.namespace.Alignment aalignment)
974     { auto tmp = cast(int)(aalignment); setProperty(Property.BlockAlignment, cast(int)tmp); }
975 /+    pragma(inline, true) /+ Qt:: +/qt.core.namespace.Alignment alignment() const
976     { return QFlag(intProperty(Property.BlockAlignment)); }+/
977 
978     pragma(inline, true) void setHeaderRowCount(int count)
979     { setProperty(Property.TableHeaderRowCount, count); }
980     pragma(inline, true) int headerRowCount() const
981     { return intProperty(Property.TableHeaderRowCount); }
982 
983     pragma(inline, true) void setBorderCollapse(bool borderCollapse)
984     { setProperty(Property.TableBorderCollapse, borderCollapse); }
985     pragma(inline, true) bool borderCollapse() const
986     { return boolProperty(Property.TableBorderCollapse); }
987 
988 protected:
989     /+ explicit +/this(ref const(QTextFormat) fmt);
990     /+ friend class QTextFormat; +/
991 }
992 
993 /+ Q_DECLARE_SHARED(QTextTableFormat) +/
994 
995 @Q_MOVABLE_TYPE extern(C++, class) struct /+ Q_GUI_EXPORT +/ QTextTableCellFormat
996 {
997     public QTextCharFormat base0;
998     alias base0 this;
999 public:
1000     @disable this();
1001     pragma(mangle, defaultConstructorMangling(__traits(identifier, typeof(this))))
1002     ref typeof(this) rawConstructor();
1003     static typeof(this) create()
1004     {
1005         typeof(this) r = typeof(this).init;
1006         r.rawConstructor();
1007         return r;
1008     }
1009 
1010 
1011     pragma(inline, true) bool isValid() const { return isTableCellFormat(); }
1012 
1013     pragma(inline, true) void setTopPadding(qreal padding)
1014     {
1015         setProperty(Property.TableCellTopPadding, padding);
1016     }
1017     pragma(inline, true) qreal topPadding() const
1018     {
1019         return doubleProperty(Property.TableCellTopPadding);
1020     }
1021 
1022     pragma(inline, true) void setBottomPadding(qreal padding)
1023     {
1024         setProperty(Property.TableCellBottomPadding, padding);
1025     }
1026     pragma(inline, true) qreal bottomPadding() const
1027     {
1028         return doubleProperty(Property.TableCellBottomPadding);
1029     }
1030 
1031     pragma(inline, true) void setLeftPadding(qreal padding)
1032     {
1033         setProperty(Property.TableCellLeftPadding, padding);
1034     }
1035     pragma(inline, true) qreal leftPadding() const
1036     {
1037         return doubleProperty(Property.TableCellLeftPadding);
1038     }
1039 
1040     pragma(inline, true) void setRightPadding(qreal padding)
1041     {
1042         setProperty(Property.TableCellRightPadding, padding);
1043     }
1044     pragma(inline, true) qreal rightPadding() const
1045     {
1046         return doubleProperty(Property.TableCellRightPadding);
1047     }
1048 
1049     pragma(inline, true) void setPadding(qreal padding)
1050     {
1051         setTopPadding(padding);
1052         setBottomPadding(padding);
1053         setLeftPadding(padding);
1054         setRightPadding(padding);
1055     }
1056 
1057     pragma(inline, true) void setTopBorder(qreal width)
1058     { setProperty(Property.TableCellTopBorder, width); }
1059     pragma(inline, true) qreal topBorder() const
1060     { return doubleProperty(Property.TableCellTopBorder); }
1061 
1062     pragma(inline, true) void setBottomBorder(qreal width)
1063     { setProperty(Property.TableCellBottomBorder, width); }
1064     pragma(inline, true) qreal bottomBorder() const
1065     { return doubleProperty(Property.TableCellBottomBorder); }
1066 
1067     pragma(inline, true) void setLeftBorder(qreal width)
1068     { setProperty(Property.TableCellLeftBorder, width); }
1069     pragma(inline, true) qreal leftBorder() const
1070     { return doubleProperty(Property.TableCellLeftBorder); }
1071 
1072     pragma(inline, true) void setRightBorder(qreal width)
1073     { setProperty(Property.TableCellRightBorder, width); }
1074     pragma(inline, true) qreal rightBorder() const
1075     { return doubleProperty(Property.TableCellRightBorder); }
1076 
1077     pragma(inline, true) void setBorder(qreal width)
1078     {
1079         setTopBorder(width);
1080         setBottomBorder(width);
1081         setLeftBorder(width);
1082         setRightBorder(width);
1083     }
1084 
1085     pragma(inline, true) void setTopBorderStyle(QTextFrameFormat.BorderStyle style)
1086     { setProperty(Property.TableCellTopBorderStyle, cast(int)style); }
1087     pragma(inline, true) QTextFrameFormat.BorderStyle topBorderStyle() const
1088     { return static_cast!(QTextFrameFormat.BorderStyle)(intProperty(Property.TableCellTopBorderStyle)); }
1089 
1090     pragma(inline, true) void setBottomBorderStyle(QTextFrameFormat.BorderStyle style)
1091     { setProperty(Property.TableCellBottomBorderStyle, cast(int)style); }
1092     pragma(inline, true) QTextFrameFormat.BorderStyle bottomBorderStyle() const
1093     { return static_cast!(QTextFrameFormat.BorderStyle)(intProperty(Property.TableCellBottomBorderStyle)); }
1094 
1095     pragma(inline, true) void setLeftBorderStyle(QTextFrameFormat.BorderStyle style)
1096     { setProperty(Property.TableCellLeftBorderStyle, cast(int)style); }
1097     pragma(inline, true) QTextFrameFormat.BorderStyle leftBorderStyle() const
1098     { return static_cast!(QTextFrameFormat.BorderStyle)(intProperty(Property.TableCellLeftBorderStyle)); }
1099 
1100     pragma(inline, true) void setRightBorderStyle(QTextFrameFormat.BorderStyle style)
1101     { setProperty(Property.TableCellRightBorderStyle, cast(int)style); }
1102     pragma(inline, true) QTextFrameFormat.BorderStyle rightBorderStyle() const
1103     { return static_cast!(QTextFrameFormat.BorderStyle)(intProperty(Property.TableCellRightBorderStyle)); }
1104 
1105     pragma(inline, true) void setBorderStyle(QTextFrameFormat.BorderStyle style)
1106     {
1107         setTopBorderStyle(style);
1108         setBottomBorderStyle(style);
1109         setLeftBorderStyle(style);
1110         setRightBorderStyle(style);
1111     }
1112 
1113 /+    pragma(inline, true) void setTopBorderBrush(ref const(QBrush) brush)
1114     { setProperty(Property.TableCellTopBorderBrush, brush); }
1115     pragma(inline, true) QBrush topBorderBrush() const
1116     { return brushProperty(Property.TableCellTopBorderBrush); }
1117 
1118     pragma(inline, true) void setBottomBorderBrush(ref const(QBrush) brush)
1119     { setProperty(Property.TableCellBottomBorderBrush, brush); }
1120     pragma(inline, true) QBrush bottomBorderBrush() const
1121     { return brushProperty(Property.TableCellBottomBorderBrush); }
1122 
1123     pragma(inline, true) void setLeftBorderBrush(ref const(QBrush) brush)
1124     { setProperty(Property.TableCellLeftBorderBrush, brush); }
1125     pragma(inline, true) QBrush leftBorderBrush() const
1126     { return brushProperty(Property.TableCellLeftBorderBrush); }
1127 
1128     pragma(inline, true) void setRightBorderBrush(ref const(QBrush) brush)
1129     { setProperty(Property.TableCellRightBorderBrush, brush); }
1130     pragma(inline, true) QBrush rightBorderBrush() const
1131     { return brushProperty(Property.TableCellRightBorderBrush); }
1132 
1133     pragma(inline, true) void setBorderBrush(ref const(QBrush) brush)
1134     {
1135         setTopBorderBrush(brush);
1136         setBottomBorderBrush(brush);
1137         setLeftBorderBrush(brush);
1138         setRightBorderBrush(brush);
1139     }
1140 +/
1141 
1142 protected:
1143     /+ explicit +/this(ref const(QTextFormat) fmt);
1144     /+ friend class QTextFormat; +/
1145 }
1146 
1147 /+ Q_DECLARE_SHARED(QTextTableCellFormat) +/
1148