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.statictext; 15 extern(C++): 16 17 import qt.config; 18 import qt.core.global; 19 import qt.core.namespace; 20 import qt.core.shareddata; 21 import qt.core.size; 22 import qt.core.string; 23 import qt.core.typeinfo; 24 import qt.gui.font; 25 import qt.gui.textoption; 26 import qt.gui.transform; 27 import qt.helpers; 28 29 extern(C++, class) struct QStaticTextPrivate; 30 @Q_MOVABLE_TYPE extern(C++, class) struct /+ Q_GUI_EXPORT +/ QStaticText 31 { 32 public: 33 enum PerformanceHint { 34 ModerateCaching, 35 AggressiveCaching 36 } 37 38 @disable this(); 39 pragma(mangle, defaultConstructorMangling(__traits(identifier, typeof(this)))) 40 ref typeof(this) rawConstructor(); 41 static typeof(this) create() 42 { 43 typeof(this) r = typeof(this).init; 44 r.rawConstructor(); 45 return r; 46 } 47 48 /+ explicit +/this(ref const(QString) text); 49 @disable this(this); 50 this(ref const(QStaticText) other); 51 /+ QStaticText &operator=(QStaticText &&other) noexcept { swap(other); return *this; } +/ 52 /+ref QStaticText operator =(ref const(QStaticText) );+/ 53 ~this(); 54 55 /+ void swap(QStaticText &other) noexcept { qSwap(data, other.data); } +/ 56 57 void setText(ref const(QString) text); 58 final void setText(const QString s){setText(s);} 59 QString text() const; 60 61 void setTextFormat(/+ Qt:: +/qt.core.namespace.TextFormat textFormat); 62 /+ Qt:: +/qt.core.namespace.TextFormat textFormat() const; 63 64 void setTextWidth(qreal textWidth); 65 qreal textWidth() const; 66 67 void setTextOption(ref const(QTextOption) textOption); 68 QTextOption textOption() const; 69 70 QSizeF size() const; 71 72 void prepare(ref const(QTransform) matrix/* = globalInitVar!QTransform*/, ref const(QFont) font/* = globalInitVar!QFont*/); 73 74 void setPerformanceHint(PerformanceHint performanceHint); 75 PerformanceHint performanceHint() const; 76 77 /+bool operator ==(ref const(QStaticText) ) const;+/ 78 /+bool operator !=(ref const(QStaticText) ) const;+/ 79 80 private: 81 void detach(); 82 83 QExplicitlySharedDataPointer!(QStaticTextPrivate) data; 84 /+ friend class QStaticTextPrivate; +/ 85 } 86 87 /+ Q_DECLARE_SHARED(QStaticText) 88 89 90 Q_DECLARE_METATYPE(QStaticText) +/ 91