1 /* 2 * DQt - D bindings for the Qt Toolkit 3 * 4 * GNU Lesser General Public License Usage 5 * This file may be used under the terms of the GNU Lesser 6 * General Public License version 3 as published by the Free Software 7 * Foundation and appearing in the file LICENSE.LGPL3 included in the 8 * packaging of this file. Please review the following information to 9 * ensure the GNU Lesser General Public License version 3 requirements 10 * will be met: https://www.gnu.org/licenses/lgpl-3.0.html. 11 */ 12 module qt.gui.fontinfo; 13 extern(C++): 14 15 import qt.config; 16 import qt.core.global; 17 import qt.core.shareddata; 18 import qt.core.string; 19 import qt.core.typeinfo; 20 import qt.gui.font; 21 import qt.helpers; 22 23 /// Binding for C++ class [QFontInfo](https://doc.qt.io/qt-6/qfontinfo.html). 24 @Q_RELOCATABLE_TYPE extern(C++, class) struct /+ Q_GUI_EXPORT +/ QFontInfo 25 { 26 public: 27 this(ref const(QFont) ); 28 @disable this(this); 29 this(ref const(QFontInfo) ); 30 ~this(); 31 32 /+ref QFontInfo operator =(ref const(QFontInfo) );+/ 33 34 /+ void swap(QFontInfo &other) { qSwap(d, other.d); } +/ 35 36 QString family() const; 37 QString styleName() const; 38 int pixelSize() const; 39 int pointSize() const; 40 qreal pointSizeF() const; 41 bool italic() const; 42 QFont.Style style() const; 43 int weight() const; 44 pragma(inline, true) bool bold() const { return weight() > QFont.Weight.Normal; } 45 bool underline() const; 46 bool overline() const; 47 bool strikeOut() const; 48 bool fixedPitch() const; 49 QFont.StyleHint styleHint() const; 50 51 /+ #if QT_DEPRECATED_SINCE(6, 0) +/ 52 /+ QT_DEPRECATED_VERSION_X_6_0("Use weight() instead") +/ int legacyWeight() const; 53 /+ #endif +/ 54 55 bool exactMatch() const; 56 57 private: 58 QExplicitlySharedDataPointer!(QFontPrivate) d; 59 mixin(CREATE_CONVENIENCE_WRAPPERS); 60 } 61 62 /+ Q_DECLARE_SHARED(QFontInfo) +/ 63