Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QTextOption::Tab Class Reference

#include <qtextoption.h>

+ Collaboration diagram for QTextOption::Tab:

Public Member Functions

 Tab ()
 \variable QTextOption::Tab::position Distance from the start of the paragraph.
 
 Tab (qreal pos, TabType tabType, QChar delim=QChar())
 Creates a tab with the given position, tab type, and delimiter (pos, tabType, delim).
 
bool operator== (const Tab &other) const
 Returns true if tab other is equal to this tab; otherwise returns false.
 
bool operator!= (const Tab &other) const
 Returns true if tab other is not equal to this tab; otherwise returns false.
 

Public Attributes

qreal position
 
TabType type
 
QChar delimiter
 

Detailed Description

Since
4.4 \inmodule QtGui Each tab definition is represented by this struct.

Definition at line 27 of file qtextoption.h.

Constructor & Destructor Documentation

◆ Tab() [1/2]

QTextOption::Tab::Tab ( )
inline

\variable QTextOption::Tab::position Distance from the start of the paragraph.

The position of a tab is from the start of the paragraph which implies that when the alignment of the paragraph is set to centered, the tab is interpreted to be moved the same distance as the left edge of the paragraph does. In case the paragraph is set to have a layoutDirection() RightToLeft the position is interpreted to be from the right side of the paragraph with higher numbers moving the tab to the left.

\variable QTextOption::Tab::type Determine which type is used. In a paragraph that has layoutDirection() RightToLeft the type LeftTab will be interpreted to be a RightTab and vice versa.

\variable QTextOption::Tab::delimiter If type is DelimitorTab; tab until this char is found in the text.

Creates a default left tab with position 80.

Definition at line 28 of file qtextoption.h.

◆ Tab() [2/2]

QTextOption::Tab::Tab ( qreal pos,
TabType tabType,
QChar delim = QChar() )
inline

Creates a tab with the given position, tab type, and delimiter (pos, tabType, delim).

Note
delim is only used when tabType is DelimiterTab.
Since
4.7

Definition at line 29 of file qtextoption.h.

Member Function Documentation

◆ operator!=()

bool QTextOption::Tab::operator!= ( const Tab & other) const
inline

Returns true if tab other is not equal to this tab; otherwise returns false.

Definition at line 38 of file qtextoption.h.

References operator==(), and other().

+ Here is the call graph for this function:

◆ operator==()

bool QTextOption::Tab::operator== ( const Tab & other) const
inline

Returns true if tab other is equal to this tab; otherwise returns false.

Definition at line 32 of file qtextoption.h.

References other(), position(), and qFuzzyCompare().

+ Here is the call graph for this function:

Member Data Documentation

◆ delimiter

QChar QTextOption::Tab::delimiter

Definition at line 44 of file qtextoption.h.

◆ position

qreal QTextOption::Tab::position

Definition at line 42 of file qtextoption.h.

Referenced by QTextOption::setTabArray().

◆ type

TabType QTextOption::Tab::type

Definition at line 43 of file qtextoption.h.

Referenced by QTextEngine::calculateTabWidth().


The documentation for this class was generated from the following files: