45 #include <QtCore/qnamespace.h> 46 #include <QtCore/qchar.h> 47 #include <QtCore/qmetatype.h> 56 template <
typename T>
class QList;
96 inline void setAlignment(Qt::Alignment alignment);
97 inline Qt::Alignment
alignment()
const {
return Qt::Alignment(align); }
107 WrapAtWordBoundaryOrAnywhere
113 ShowTabsAndSpaces = 0x1,
114 ShowLineAndParagraphSeparators = 0x2,
115 AddSpaceForLineAndParagraphSeparators = 0x4,
116 SuppressColors = 0x8,
117 IncludeTrailingSpaces = 0x80000000
120 inline void setFlags(
Flags flags);
123 inline void setTabStop(
qreal tabStop);
149 { align = aalignment; }
163 #endif // QTEXTOPTION_H
#define QT_END_NAMESPACE
This macro expands to.
#define Q_DECLARE_FLAGS(Flags, Enum)
The Q_DECLARE_FLAGS() macro expands to.
static qreal position(QGraphicsObject *item, QDeclarativeAnchorLine::AnchorLine anchorLine)
WrapMode
This enum describes how text is wrapped in a document.
Flags flags() const
Returns the flags associated with the option.
static Q_DECL_CONSTEXPR bool qFuzzyCompare(double p1, double p2)
void setFlags(Flags flags)
Sets the flags associated with the option to the given flags.
The QChar class provides a 16-bit Unicode character.
qreal tabStop() const
Returns the distance in device units between tab stops.
TabType type
Determine which type is used.
qreal position
Distance from the start of the paragraph.
#define QT_BEGIN_NAMESPACE
This macro expands to.
QChar delimiter
If type is DelimitorTab; tab until this char is found in the text.
#define Q_DECLARE_OPERATORS_FOR_FLAGS(Flags)
The Q_DECLARE_OPERATORS_FOR_FLAGS() macro declares global operator|() functions for Flags...
bool operator==(const Tab &other) const
void setTextDirection(Qt::LayoutDirection aDirection)
Sets the direction of the text layout defined by the option to the given direction.
Tab(qreal pos, TabType tabType, QChar delim=QChar())
Qt::LayoutDirection textDirection() const
Returns the direction of the text layout defined by the option.
WrapMode wrapMode() const
Returns the text wrap mode defined by the option.
The QTextOption class provides a description of general rich text properties.
bool useDesignMetrics() const
Returns true if the layout uses design rather than device metrics; otherwise returns false...
Qt::Alignment alignment() const
Returns the text alignment defined by the option.
void setWrapMode(WrapMode wrap)
Sets the option's text wrap mode to the given mode.
Tab()
Creates a default left tab with position 80.
void setUseDesignMetrics(bool b)
If enable is true then the layout will use design metrics; otherwise it will use the metrics of the p...
bool operator==(QBool b1, bool b2)
void setTabStop(qreal tabStop)
Sets the default distance in device units between tab stops to the value specified by tabStop...
bool operator!=(const Tab &other) const
Returns true if tab other is not equal to this tab; otherwise returns false.
The QList class is a template class that provides lists.
Each tab definition is represented by this struct.
Qt::LayoutDirection direction