Qt 4.8
Public Functions | Public Variables | List of all members
QTextOption::Tab Class Reference

Each tab definition is represented by this struct. More...

#include <qtextoption.h>

Public Functions

bool operator!= (const Tab &other) const
 Returns true if tab other is not equal to this tab; otherwise returns false. More...
 
bool operator== (const Tab &other) const
 
 Tab ()
 Creates a default left tab with position 80. More...
 
 Tab (qreal pos, TabType tabType, QChar delim=QChar())
 

Public Variables

QChar delimiter
 If type is DelimitorTab; tab until this char is found in the text. More...
 
qreal position
 Distance from the start of the paragraph. More...
 
TabType type
 Determine which type is used. More...
 

Detailed Description

Each tab definition is represented by this struct.

Since
4.4

Definition at line 69 of file qtextoption.h.

Constructors and Destructors

◆ Tab() [1/2]

Tab::Tab ( )
inline

Creates a default left tab with position 80.

Definition at line 70 of file qtextoption.h.

TabType type
Determine which type is used.
Definition: qtextoption.h:85
qreal position
Distance from the start of the paragraph.
Definition: qtextoption.h:84

◆ Tab() [2/2]

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

Definition at line 71 of file qtextoption.h.

72  : position(pos), type(tabType), delimiter(delim) {}
TabType type
Determine which type is used.
Definition: qtextoption.h:85
qreal position
Distance from the start of the paragraph.
Definition: qtextoption.h:84
QChar delimiter
If type is DelimitorTab; tab until this char is found in the text.
Definition: qtextoption.h:86

Functions

◆ operator!=()

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

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

Definition at line 80 of file qtextoption.h.

80  {
81  return !operator==(other);
82  }
bool operator==(const Tab &other) const
Definition: qtextoption.h:74

◆ operator==()

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

Definition at line 74 of file qtextoption.h.

74  {
75  return type == other.type
76  && qFuzzyCompare(position, other.position)
77  && delimiter == other.delimiter;
78  }
static Q_DECL_CONSTEXPR bool qFuzzyCompare(double p1, double p2)
Definition: qglobal.h:2030
TabType type
Determine which type is used.
Definition: qtextoption.h:85
qreal position
Distance from the start of the paragraph.
Definition: qtextoption.h:84
QChar delimiter
If type is DelimitorTab; tab until this char is found in the text.
Definition: qtextoption.h:86

Properties

◆ delimiter

Tab::delimiter

If type is DelimitorTab; tab until this char is found in the text.

Definition at line 86 of file qtextoption.h.

Referenced by QTextEngine::calculateTabWidth(), and operator==().

◆ position

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 ege 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.

Definition at line 84 of file qtextoption.h.

Referenced by QTextEngine::calculateTabWidth(), operator==(), and QTextOption::setTabArray().

◆ type

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.

Definition at line 85 of file qtextoption.h.

Referenced by QTextEngine::calculateTabWidth(), and operator==().


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