CopperSpice API
1.9.2
|
The QTextOption class provides a description of general rich text properties. More...
Classes | |
class | Tab |
Structure which represents a tab stop More... | |
Public Types | |
enum | TabType |
enum | WrapMode |
Public Methods | |
QTextOption () | |
QTextOption (const QTextOption &other) | |
QTextOption (Qt::Alignment alignment) | |
~QTextOption () | |
Qt::Alignment | alignment () const |
Flags | flags () const |
QTextOption & | operator= (const QTextOption &other) |
void | setAlignment (Qt::Alignment alignment) |
void | setFlags (Flags flags) |
void | setTabArray (const QList< qreal > &tabStops) |
void | setTabs (const QList< Tab > &tabStops) |
void | setTabStop (qreal tabStop) |
void | setTextDirection (Qt::LayoutDirection layoutDirection) |
void | setUseDesignMetrics (bool enable) |
void | setWrapMode (WrapMode mode) |
QList< qreal > | tabArray () const |
QList< Tab > | tabs () const |
qreal | tabStop () const |
Qt::LayoutDirection | textDirection () const |
bool | useDesignMetrics () const |
WrapMode | wrapMode () const |
The QTextOption class provides a description of general rich text properties. QTextOption is used to encapsulate common rich text properties in a single object. It contains information about text alignment, layout direction, word wrapping, and other standard properties associated with text rendering and layout.
enum QTextOption::TabType |
This enum holds the different types of tabulator
Constant | Value | Description |
---|---|---|
QTextOption::LeftTab | 0 | A left-tab |
QTextOption::RightTab | 1 | A right-tab |
QTextOption::CenterTab | 2 | A centered-tab |
QTextOption::DelimiterTab | 3 | A tab stopping at a certain delimiter-character |
This enum describes how text is wrapped in a document.
Constant | Value | Description |
---|---|---|
QTextOption::NoWrap | 0 | Text is not wrapped at all. |
QTextOption::WordWrap | 1 | Text is wrapped at word boundaries. |
QTextOption::ManualWrap | 2 | Same as QTextOption::NoWrap |
QTextOption::WrapAnywhere | 3 | Text can be wrapped at any point on a line, even if it occurs in the middle of a word. |
QTextOption::WrapAtWordBoundaryOrAnywhere | 4 | If possible wrapping occurs at a word boundary, otherwise it will occur at the appropriate point on the line, even in the middle of a word. |
QTextOption::QTextOption | ( | ) |
Constructs a text option with default properties for text. The text alignment property is set to Qt::AlignLeft. The word wrap property is set to QTextOption::WordWrap. The using of design metrics flag is set to false.
QTextOption::QTextOption | ( | Qt::Alignment | alignment | ) |
Constructs a text option with the given alignment for text. The word wrap property is set to QTextOption::WordWrap. The using of design metrics flag is set to false.
QTextOption::~QTextOption | ( | ) |
Destroys the text option.
QTextOption::QTextOption | ( | const QTextOption & | other | ) |
Construct a copy of the other text option.
|
inline |
Returns the text alignment defined by the option.
|
inline |
Returns the flags associated with the option.
QTextOption & QTextOption::operator= | ( | const QTextOption & | other | ) |
Returns true if the text option is the same as the other text option, otherwise returns false.
|
inline |
Sets the option's text alignment to the specified alignment.
|
inline |
Sets the flags associated with the option to the given flags.
Sets the tab positions for the text layout to those specified by tabStops.
|
inline |
Sets the default distance in device units between tab stops to the value specified by tabStop.
|
inline |
Sets the direction of the text layout defined by the option to the given layoutDirection.
|
inline |
If enable is true then the layout will use design metrics, otherwise it will use the metrics of the paint device, this is the default behavior.
|
inline |
Sets the option's text wrap mode to the given mode.
Returns a list of tab positions defined for the text layout.
Returns a list of tab positions defined for the text layout.
|
inline |
Returns the distance in device units between tab stops. Convenient function for the above method
|
inline |
Returns the direction of the text layout defined by the option.
|
inline |
Returns true if the layout uses design rather than device metrics, otherwise returns false.
|
inline |
Returns the text wrap mode defined by the option.