47 #include "private/qtextedit_p.h" 53 #include <QApplication> 54 #include <QStackedWidget> 57 #include <QMdiSubWindow> 59 #include <QDialogButtonBox> 61 #include <QRubberBand> 62 #include <QTextBrowser> 63 #include <QCalendarWidget> 64 #include <QAbstractItemView> 65 #include <QDockWidget> 66 #include <QMainWindow> 67 #include <QAbstractButton> 68 #include <private/qdockwidget_p.h> 69 #include <QtGui/QFocusFrame> 71 #ifndef QT_NO_ACCESSIBILITY 86 for (
int i = 0; i < list.
size(); ++i) {
91 if ((includeTopLevel || !w->
isWindow())
92 && !qobject_cast<QFocusFrame*>(w)
95 && objectName !=
QLatin1String(
"qt_qmainwindow_extended_splitter")) {
105 if (!source || !target)
108 int returnValue = -1;
111 if (target->
y() <= source->
y())
112 returnValue = source->
y() - target->
y();
115 if (target->
y() >= source->
y() + source->
height())
116 returnValue = target->
y() - (source->
y() + source->
height());
119 if (target->
x() >= source->
x() + source->
width())
120 returnValue = target->
x() - (source->
x() + source->
width());
123 if (target->
x() <= source->
x())
124 returnValue = source->
x() - target->
x();
135 #if defined(QT_NO_MDIAREA) && defined(QT_NO_WORKSPACE) 138 #ifndef QT_NO_MDIAREA 141 #ifndef QT_NO_WORKSPACE 155 #ifndef QT_NO_MDIAREA 162 #ifndef QT_NO_WORKSPACE 168 if (windows.
isEmpty() || entry < 1 || entry > windows.
count())
174 if (source == window)
176 int candidateDistance =
distance(source, window, relation);
177 if (candidateDistance >= 0)
178 candidates.
insert(candidateDistance, window);
183 foreach (
QWidget *candidate, candidates) {
187 if (
qAbs(candidate->
x() - source->
x()) < minimumDistance) {
189 minimumDistance =
qAbs(candidate->
x() - source->
x());
194 if (
qAbs(candidate->
y() - source->
y()) < minimumDistance) {
196 minimumDistance =
qAbs(candidate->
y() - source->
y());
202 if (minimumDistance == 0)
206 #ifndef QT_NO_WORKSPACE 217 #ifndef QT_NO_TEXTEDIT 234 while (block.
isValid() && i < pos) {
235 block = block.
next();
344 result.
setX(
textEdit()->horizontalScrollBar() ?
textEdit()->horizontalScrollBar()->sliderPosition() : 0);
345 result.
setY(
textEdit()->verticalScrollBar() ?
textEdit()->verticalScrollBar()->sliderPosition() : 0);
454 #endif // QT_NO_TEXTEDIT 456 #ifndef QT_NO_STACKEDWIDGET 461 Q_ASSERT(qobject_cast<QStackedWidget *>(widget));
515 return *target ? 0 : -1;
522 #endif // QT_NO_STACKEDWIDGET 524 #ifndef QT_NO_TOOLBOX 529 Q_ASSERT(qobject_cast<QToolBox *>(widget));
534 if (textType !=
Value || child <= 0 || child >
toolBox()->count())
541 if (textType !=
Value || child <= 0 || child >
toolBox()->count()) {
554 if (
toolBox()->currentWidget() == childWidget)
587 if (entry <= 0 || entry >
toolBox()->count())
595 return *target ? 0: -1;
602 #endif // QT_NO_TOOLBOX 605 #ifndef QT_NO_MDIAREA 609 Q_ASSERT(qobject_cast<QMdiArea *>(widget));
655 if (entry < 1 || subWindows.
isEmpty() || entry > subWindows.
count())
657 targetObject = subWindows.
at(entry - 1);
669 return *target ? 0: -1;
681 Q_ASSERT(qobject_cast<QMdiSubWindow *>(widget));
751 if (entry != 1 || !source->
widget())
753 targetObject = source->
widget();
762 while (parent && !parent->
inherits(
"QMdiArea"))
772 return *target ? 0 : -1;
780 return *target ? 0: -1;
796 return QRect(pos.
x() + contentsRect.
x(), pos.
y() + contentsRect.
y(),
811 const QRect globalChildGeometry =
rect(1);
823 #endif // QT_NO_MDIAREA 826 #ifndef QT_NO_WORKSPACE 830 Q_ASSERT(qobject_cast<QWorkspace *>(widget));
876 if (entry < 1 || subWindows.
isEmpty() || entry > subWindows.
count())
878 targetObject = subWindows.
at(entry - 1);
890 return *target ? 0: -1;
899 #ifndef QT_NO_DIALOGBUTTONBOX 904 Q_ASSERT(qobject_cast<QDialogButtonBox*>(widget));
911 #endif // QT_NO_DIALOGBUTTONBOX 913 #ifndef QT_NO_TEXTBROWSER 917 Q_ASSERT(qobject_cast<QTextBrowser *>(widget));
926 #endif // QT_NO_TEXTBROWSER 928 #ifndef QT_NO_CALENDARWIDGET 933 Q_ASSERT(qobject_cast<QCalendarWidget *>(widget));
950 if (qobject_cast<QAbstractItemView *>(child->
object()))
984 return *target ? 0: -1;
1004 if (!
rect(0).contains(globalTargetPos))
1006 if (
rect(1).contains(globalTargetPos))
1008 if (
rect(2).contains(globalTargetPos))
1022 return static_cast<QAbstractItemView *>(child);
1031 return static_cast<QWidget *>(child);
1035 #endif // QT_NO_CALENDARWIDGET 1037 #ifndef QT_NO_DOCKWIDGET 1046 if (relation ==
Child) {
1050 }
else if (entry == 2) {
1064 if (
rect(i).contains(x,y))
1112 bool mapToGlobal =
true;
1116 mapToGlobal =
false;
1120 }
else if (child == 1) {
1123 }
else if (child == 2) {
1150 : m_dockWidget(widget)
1157 if (entry == 0 || relation ==
Self) {
1262 bool mapToGlobal =
true;
1271 mapToGlobal =
false;
1277 }
else if (child >= 1 && child <=
childCount()) {
1284 if (index == child) {
1302 if (
rect(i).contains(x,y))
1397 #endif // QT_NO_DOCKWIDGET 1420 int relativeOffset = offset - block.
position();
1430 w = line.
cursorToX(relativeOffset + 1) - x;
1435 averageCharWidth *= -1;
1439 int height = line.
height();
1444 r =
QRect(layoutPosition.
x() + x, layoutPosition.
y() + line.
y(),
1499 *startOffset = offset;
1501 while (*startOffset > 0) {
1505 if ((charFormat == charFormatComp) && (blockFormat == blockFormatComp))
1512 *endOffset = offset + 1;
1514 while (*endOffset < limit) {
1518 if ((charFormat == charFormatComp) && (cursor.
blockFormat() == blockFormatComp))
1526 family = family.
replace(
'\\',
"\\\\");
1527 family = family.
replace(
':',
"\\:");
1528 family = family.
replace(
',',
"\\,");
1529 family = family.
replace(
'=',
"\\=");
1530 family = family.
replace(
';',
"\\;");
1531 family = family.
replace(
'\"',
"\\\"");
1532 attrs[
"font-family"] =
'"'+family+
'"';
1545 attrs[
"text-underline-style"] = charFormat.
font().
underline() ?
"solid" :
"none";
1562 attrs[
"text-align"] =
"left";
1565 attrs[
"text-align"] =
"right";
1568 attrs[
"text-align"] =
"center";
1571 attrs[
"text-align"] =
"left";
1576 foreach (
const QString &attributeName, attrs.
keys()) {
1590 *startOffset = *endOffset = 0;
1626 cursor.setPosition(offset);
1627 switch (boundaryType) {
1629 result.
first = cursor.position();
1631 result.
second = cursor.position();
1635 result.
first = cursor.position();
1637 result.
second = cursor.position();
1643 result.
first = cursor.position();
1645 result.
second = cursor.position();
1649 result.
first = cursor.position();
1651 result.
second = cursor.position();
1658 qDebug(
"QAccessibleTextWidget::getBoundaries: Unknown boundary type %d", boundaryType);
1666 int *startOffset,
int *endOffset)
1674 *startOffset = boundaries.
first;
1675 *endOffset = boundaries.
second;
1681 int *startOffset,
int *endOffset)
1689 *startOffset = boundaries.
first;
1690 *endOffset = boundaries.
second;
1696 int *startOffset,
int *endOffset)
1703 *startOffset = boundaries.
first;
1704 *endOffset = boundaries.
second;
1723 if (selectionIndex != 0)
1733 if (selectionIndex != 0)
1783 #ifndef QT_NO_CLIPBOARD 1791 #ifndef QT_NO_CLIPBOARD 1800 #ifndef QT_NO_CLIPBOARD 1806 #ifndef QT_NO_TEXTEDIT 1815 cursor.setPosition(endIndex);
1823 qWarning(
"AccessibleTextEdit::scrollToSubstring failed!");
1828 #ifndef QT_NO_CLIPBOARD 1829 QTextCursor previousCursor = textEdit()->textCursor();
1835 textEdit()->setTextCursor(cursor);
1837 textEdit()->setTextCursor(previousCursor);
1843 #ifndef QT_NO_CLIPBOARD 1849 textEdit()->setTextCursor(cursor);
1863 #ifndef QT_NO_CLIPBOARD 1877 #endif // QT_NO_TEXTEDIT 1879 #ifndef QT_NO_MAINWINDOW 1891 return kids.
count();
1897 int childIndex = kids.
indexOf(static_cast<QWidget*>(iface->
object()));
1898 return childIndex == -1 ? -1 : ++childIndex;
1903 if (relation ==
Child && entry >= 1) {
1905 if (entry <= kids.
count()) {
1907 return *iface ? 0 : -1;
1924 for (
int i = 0; i < kids.
size(); ++i) {
1938 #endif //QT_NO_MAINWINDOW 1942 #endif // QT_NO_ACCESSIBILITY static QString number(int, int base=10)
This is an overloaded member function, provided for convenience. It differs from the above function o...
The QVariant class acts like a union for the most common Qt data types.
QAccessibleTextBrowser(QWidget *widget)
QMdiArea * mdiArea() const
T qobject_cast(QObject *object)
QRect rect(int child) const
Returns the geometry of the object, or of the object's child if child is not 0.
QWorkspace * workspace() const
void cutText(int startOffset, int endOffset)
QTextDocument * textDocument() const
QTextCursor cursorForPosition(const QPoint &pos) const
returns a QTextCursor at position pos (in viewport coordinates).
QFont font() const
Returns the font for this character format.
QString text() const
Returns the block's contents as plain text.
bool isNull() const
Returns true if the rectangle is a null rectangle, otherwise returns false.
The QAccessible2 namespace defines constants relating to IAccessible2-based interfaces.
QPointF position() const
The global position of the layout.
QAccessibleTextEdit(QWidget *o)
Constructs a QAccessibleTextEdit object for a widget.
The QTextCharFormat class provides formatting information for characters in a QTextDocument.
void setBottom(int pos)
Sets the bottom edge of the rectangle to the given y coordinate.
QTextEdit * textEdit() const
Returns the text edit.
QTextCharFormat charFormat() const
Returns the format of the character immediately before the cursor position().
The QFontMetrics class provides font metrics information.
void setTextCursor(const QTextCursor &textCursor)
void pasteText(int offset)
#define QT_END_NAMESPACE
This macro expands to.
qreal y() const
Returns the line's y position.
const QColor & color() const
Returns the brush color.
QPointer< QWidget > widget
QTextCursor textCursorForRange(int startOffset, int endOffset) const
virtual QTextCursor textCursor() const =0
QAccessibleTextWidget(QWidget *o, Role r=EditableText, const QString &name=QString())
int childCount() const
Returns the number of children that belong to this object.
int offsetAtPoint(const QPoint &point, QAccessible2::CoordinateType coordType)
QTextBlock begin() const
Returns the document's first text block.
QString text(int startOffset, int endOffset)
int childCount() const
Returns the number of children that belong to this object.
int childAt(int x, int y) const
Returns the 1-based index of the child that contains the screen coordinates (x, y).
bool underline() const
Returns true if underline has been set; otherwise returns false.
int blockCount
Returns the number of text blocks in the document.
QVariant invokeMethodEx(QAccessible::Method method, int child, const QVariantList ¶ms)
int navigate(RelationFlag relation, int entry, QAccessibleInterface **target) const
Navigates from this object to an object that has a relationship relation to this object, and returns the respective object in target.
QObject * object() const
Returns a pointer to the QObject this interface implementation provides information for...
QRect rect(int child) const
Returns the geometry of the object, or of the object's child if child is not 0.
QObject * object() const
Returns a pointer to the QObject this interface implementation provides information for...
int selectionEnd() const
Returns the end of the selection or position() if the cursor doesn't have a selection.
QString objectName
the name of this object
QTextDocument * document() const
Returns a pointer to the underlying document.
QString & replace(int i, int len, QChar after)
int childAt(int x, int y) const
Returns the 1-based index of the child that contains the screen coordinates (x, y).
QAccessibleMainWindow(QWidget *widget)
Role
This enum defines the role of an accessible object.
The QPointF class defines a point in the plane using floating point precision.
void paste()
Pastes the text from the clipboard into the text edit at the current cursor position.
QRect intersect(const QRect &r) const
Use intersected(rectangle) instead.
bool doAction(int action, int child, const QVariantList ¶ms=QVariantList())
Asks the object, or the object's child if child is not 0, to execute action using the parameters...
QRect rect(int child) const
Returns the geometry of the object, or of the object's child if child is not 0.
The QTextLine class represents a line of text inside a QTextLayout.
Style style() const
Returns the style of the font.
virtual void setTextCursor(const QTextCursor &)=0
State state(int child) const
Returns the current state of the object, or of the object's child if child is not 0...
static qreal position(QGraphicsObject *item, QDeclarativeAnchorLine::AnchorLine anchorLine)
void insertText(int offset, const QString &text)
int textLength() const
Returns the length of the text in the line.
Role role(int child) const
Reimplemented Function
QTextBlockFormat blockFormat() const
Returns the block format of the block the cursor is in.
QRect translated(int dx, int dy) const
Returns a copy of the rectangle that is translated dx along the x axis and dy along the y axis...
qreal leading() const
Returns the line's leading.
int width() const
Returns the width of the rectangle.
int & ry()
Returns a reference to the y coordinate of this point.
#define Q_ARG(type, data)
static QString tr(const char *sourceText, const char *comment=0, int n=-1)
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
void setCursorPosition(int position)
int count(const T &t) const
Returns the number of occurrences of value in the list.
void moveTo(int x, int t)
Moves the rectangle, leaving the top-left corner at the given position (x, y).
QTextCursor textCursor() const
Returns a copy of the QTextCursor that represents the currently visible cursor.
ushort red
Returns the red color component of this color.
int height() const
Returns the height of the rectangle.
int indexOfChild(const QAccessibleInterface *iface) const
Returns the 1-based index of the object child in this object's children list, or -1 if child is not a...
The QString class provides a Unicode character string.
virtual QObject * object() const =0
Returns a pointer to the QObject this interface implementation provides information for...
void setText(const QString &, Mode mode=Clipboard)
Copies text into the clipboard as plain text.
QVariant invokeMethodEx(QAccessible::Method method, int child, const QVariantList ¶ms)
Q_DECL_CONSTEXPR T qAbs(const T &t)
The QObject class is the base class of all Qt objects.
int childCount() const
Returns the number of children that belong to this object.
Qt::Alignment alignment() const
Returns the paragraph's alignment.
QString selectedText() const
Returns the current selection's text (which may be empty).
bool isValid() const
Returns true if this text line is valid; otherwise returns false.
State state(int child) const
Returns the current state of the object, or of the object's child if child is not 0...
void insertText(const QString &text)
Inserts text at the current position, using the current character format.
QWidgetList windowList(WindowOrder order=CreationOrder) const
Returns a list of all visible or minimized child windows.
QPair< int, int > getBoundaries(int offset, QAccessible2::BoundaryType boundaryType)
int childCount() const
Returns the number of children that belong to this object.
Qt::LayoutDirection layoutDirection() const
Returns the document's layout direction.
bool isEmpty() const
Returns true if the list contains no items; otherwise returns false.
qreal x() const
Returns the x-coordinate of this point.
void setText(Text t, int child, const QString &text)
Sets the text property t of the object, or of the object's child if child is not 0, to text.
QTextBlock next() const
Returns the text block in the document after this block, or an empty text block if this is the last o...
void setTextCursor(const QTextCursor &cursor)
Sets the visible cursor.
QTextLine lineForTextPosition(int pos) const
Returns the line that contains the cursor position specified by pos.
The QWorkspace widget provides a workspace window that can be used in an MDI application.
int toInt(bool *ok=0) const
Returns the variant as an int if the variant has type() Int , Bool , ByteArray , Char ...
int position() const
Returns the index of the block's first character within the document.
QRect cursorRect(const QTextCursor &cursor) const
returns a rectangle (in viewport coordinates) that includes the cursor.
QString toPlainText() const
Returns the text of the text edit as plain text.
bool leadingIncluded() const
Returns true if positive leading is included into the line's height; otherwise returns false...
QTextBlock previous() const
Returns the text block in the document before this block, or an empty text block if this is the first...
Q_CORE_EXPORT void qDebug(const char *,...)
void setAttributes(int startOffset, int endOffset, const QString &attributes)
int navigate(RelationFlag relation, int entry, QAccessibleInterface **target) const
Navigates from this object to an object that has a relationship relation to this object, and returns the respective object in target.
VerticalAlignment
This enum describes the ways that adjacent characters can be vertically aligned.
QPlainTextEdit * plainTextEdit() const
void append(const T &t)
Inserts value at the end of the list.
void setText(Text t, int control, const QString &text)
Reimplemented Function
qreal cursorToX(int *cursorPos, Edge edge=Leading) const
Converts the cursor position cursorPos to the corresponding x position inside the line...
void scrollToSubstring(int startIndex, int endIndex)
int averageCharWidth() const
Returns the average width of glyphs in the font.
#define QT_BEGIN_NAMESPACE
This macro expands to.
QVariant invokeMethodEx(QAccessible::Method method, int child, const QVariantList ¶ms)
int indexOfChild(const QAccessibleInterface *child) const
Returns the 1-based index of the object child in this object's children list, or -1 if child is not a...
The QRectF class defines a rectangle in the plane using floating point precision. ...
QPoint bottomRight() const
Returns the position of the rectangle's bottom-right corner.
bool hasSelection() const
Returns true if the cursor contains a selection; otherwise returns false.
void deleteText(int startOffset, int endOffset)
static QClipboard * clipboard()
Returns a pointer to the application global clipboard.
QWidget * widget() const
Returns the current internal widget.
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
QDockWidget * dockWidget() const
The QTextCursor class offers an API to access and modify QTextDocuments.
RelationFlag
This enum type defines bit flags that can be combined to indicate the relationship between two access...
QVariant invokeMethodEx(QAccessible::Method method, int child, const QVariantList ¶ms)
Method
This enum describes the possible types of methods that can be invoked on an accessible object...
void setTextCursor(const QTextCursor &textCursor)
The QMdiArea widget provides an area in which MDI windows are displayed.
const T & at(int i) const
Returns the item at index position i in the list.
QString attributes(int offset, int *startOffset, int *endOffset)
QList< QMdiSubWindow * > subWindowList(WindowOrder order=CreationOrder) const
Returns a list of all subwindows in the MDI area.
void setText(Text t, int child, const QString &text)
Sets the text property t of the object, or of the object's child if child is not 0, to text.
int fontWeight() const
Returns the text format's font weight.
QPoint scrollBarPosition() const
Q_CORE_EXPORT void qWarning(const char *,...)
int navigate(RelationFlag relation, int entry, QAccessibleInterface **iface) const
Navigates from this object to an object that has a relationship relation to this object, and returns the respective object in target.
int childCount() const
Returns the number of children that belong to this object.
QRect characterRect(int offset, QAccessible2::CoordinateType coordType)
The QTextBlock class provides a container for text fragments in a QTextDocument.
The QPlainTextEdit class provides a widget that is used to edit and display plain text...
State state(int child) const
Returns the current state of the object, or of the object's child if child is not 0...
QAccessiblePlainTextEdit(QWidget *o)
QAccessibleTitleBar(QDockWidget *widget)
QMdiSubWindow * mdiSubWindow() const
T value(int i) const
Returns the value at index position i in the list.
void select(SelectionType selection)
Selects text in the document according to the given selection.
QList< Key > keys() const
Returns a list containing all the keys in the map in ascending order.
void copyText(int startOffset, int endOffset)
int position() const
Returns the absolute position of the cursor within the document.
QBrush background() const
Returns the brush used to paint the document's background.
Qt::BrushStyle style() const
Returns the brush style.
static QVariant fromValue(const T &value)
Returns a QVariant containing a copy of value.
QTextCursor textCursor() const
int indexOfChild(const QAccessibleInterface *child) const
Returns the 1-based index of the object child in this object's children list, or -1 if child is not a...
bool inherits(const char *classname) const
Returns true if this object is an instance of a class that inherits className or a QObject subclass t...
Style
This enum describes the different styles of glyphs that are used to display text. ...
Role role(int child) const
Returns the role of the object, or of the object's child if child is not 0.
QRect toRect() const
Returns a QRect based on the values of this rectangle.
void removeSelectedText()
If there is a selection, its content is deleted; otherwise does nothing.
bool contains(const QPoint &p, bool proper=false) const
Returns true if the given point is inside or on the edge of the rectangle, otherwise returns false...
QTextBlock block() const
Returns the block that contains the cursor.
void setBottomRight(const QPoint &p)
Set the bottom-right corner of the rectangle to the given position.
void moveTopLeft(const QPoint &p)
Moves the rectangle, leaving the top-left corner at the given position.
void clearSelection()
Clears the current selection by setting the anchor to the cursor position.
Role role(int child) const
Reimplemented Function
QString textAfterOffset(int offset, QAccessible2::BoundaryType boundaryType, int *startOffset, int *endOffset)
virtual QTextDocument * textDocument() const =0
QTextCursor textCursor() const
void setAttributes(int startOffset, int endOffset, const QString &attributes)
void addSelection(int startOffset, int endOffset)
static QAccessibleInterface * queryAccessibleInterface(QObject *)
If a QAccessibleInterface implementation exists for the given object, this function returns a pointer...
int navigate(RelationFlag relation, int entry, QAccessibleInterface **target) const
Navigates from this object to an object that has a relationship relation to this object, and returns the respective object in target.
bool isEmpty() const
Returns true if the rectangle is empty, otherwise returns false.
virtual QWidget * viewport() const =0
The QBrush class defines the fill pattern of shapes drawn by QPainter.
VerticalAlignment verticalAlignment() const
Returns the vertical alignment used for characters with this format.
QMdiSubWindow * activeSubWindow() const
Returns a pointer to the current active subwindow.
virtual Role role(int child) const =0
Returns the role of the object, or of the object's child if child is not 0.
The QAbstractItemView class provides the basic functionality for item view classes.
The QAccessibleTextEdit class implements the QAccessibleInterface for richtext editors.
QMainWindow * mainWindow() const
QTextCursor textCursor() const
Returns a copy of the QTextCursor that represents the currently visible cursor.
void setY(int y)
Sets the y coordinate of this point to the given y coordinate.
The QTextLayout class is used to lay out and render text.
QString arg(qlonglong a, int fieldwidth=0, int base=10, const QChar &fillChar=QLatin1Char(' ')) const Q_REQUIRED_RESULT
QTextDocument * textDocument() const
int indexOfChild(const QAccessibleInterface *child) const
Returns the 1-based index of the object child in this object's children list, or -1 if child is not a...
int childAt(int x, int y) const
Returns the 1-based index of the child that contains the screen coordinates (x, y).
virtual QRectF blockBoundingRect(const QTextBlock &block) const =0
Returns the bounding rectangle of block.
QAccessibleMdiArea(QWidget *widget)
QString & append(QChar c)
ushort blue
Returns the blue color component of this color.
void selection(int selectionIndex, int *startOffset, int *endOffset)
virtual QPoint scrollBarPosition() const
int indexOf(const T &t, int from=0) const
Returns the index position of the first occurrence of value in the list, searching forward from index...
QString textBeforeOffset(int offset, QAccessible2::BoundaryType boundaryType, int *startOffset, int *endOffset)
int childAt(int x, int y) const
Returns the 1-based index of the child that contains the screen coordinates (x, y).
QAccessibleMdiSubWindow(QWidget *widget)
int y() const
Returns the y-coordinate of the rectangle's top edge.
The QAccessibleInterface class defines an interface that exposes information about accessible objects...
QTextBlock findBlock(int pos) const
Returns the text block that contains the {pos}-th character.
bool isValid() const
Returns true if all the data necessary to use this interface implementation is valid (e...
QDockWidgetLayout * dockWidgetLayout() const
iterator insert(const Key &key, const T &value)
Inserts a new item with the key key and a value of value.
int x() const
Returns the x-coordinate of the rectangle's left edge.
QTextDocument * document() const
Returns a pointer to the underlying document.
The QPoint class defines a point in the plane using integer precision.
QAbstractTextDocumentLayout * documentLayout() const
Returns the document layout for this document.
QString text(Text textType, int child) const
Returns the value of the text property t of the object, or of the object's child if child is not 0...
The QMainWindow class provides a main application window.
int size() const
Returns the number of items in the list.
The QTextBlockFormat class provides formatting information for blocks of text in a QTextDocument...
void setText(Text textType, int child, const QString &text)
Sets the text property t of the object, or of the object's child if child is not 0, to text.
void setWidth(int w)
Sets the width of the rectangle to the given width.
QBrush foreground() const
Returns the brush used to render foreground details, such as text, frame outlines, and table borders.
QWidget * viewport() const
QString objectName() const
The QRect class defines a rectangle in the plane using integer precision.
const QObjectList & children() const
Returns a list of child objects.
void removeSelection(int selectionIndex)
T qvariant_cast(const QVariant &)
QVariant invokeMethodEx(QAccessible::Method method, int child, const QVariantList ¶ms)
bool movePosition(MoveOperation op, MoveMode=MoveAnchor, int n=1)
Moves the cursor by performing the given operation n times, using the specified mode, and returns true if all operations were completed successfully; otherwise returns false.
int y() const
Returns the y coordinate of this point.
QString textAtOffset(int offset, QAccessible2::BoundaryType boundaryType, int *startOffset, int *endOffset)
void cutText(int startOffset, int endOffset)
qreal y() const
Returns the y-coordinate of this point.
void setTextCursor(const QTextCursor &cursor)
Sets the visible cursor.
void setPosition(int pos, MoveMode mode=MoveAnchor)
Moves the cursor to the absolute position in the document specified by pos using a MoveMode specified...
QPoint scrollBarPosition() const
int navigate(RelationFlag relation, int entry, QAccessibleInterface **iface) const
Navigates from this object to an object that has a relationship relation to this object, and returns the respective object in target.
The QTextDocument class holds formatted text that can be viewed and edited using a QTextEdit...
bool isValid() const
Returns true if this text block is valid; otherwise returns false.
int userActionCount(int child) const
Returns the number of custom actions of the object, or of the object's child if child is not 0...
QAccessibleWorkspace(QWidget *widget)
int childCount() const
Returns the number of children that belong to this object.
void replaceText(int startOffset, int endOffset, const QString &text)
int childCount() const
Returns the number of children that belong to this object.
int indexOfChild(const QAccessibleInterface *child) const
Returns the 1-based index of the object child in this object's children list, or -1 if child is not a...
QString text(Text t, int child) const
Reimplemented Function
int x() const
Returns the x coordinate of this point.
virtual int hitTest(const QPointF &point, Qt::HitTestAccuracy accuracy) const =0
Returns the cursor postion for the given point with the specified accuracy.
qreal fontPointSize() const
Returns the font size used to display text in this format.
Relation relationTo(int child, const QAccessibleInterface *other, int otherChild) const
Returns the relationship between this object's \a child and the \a other object's \a otherChild...
bool isValid() const
Returns true if the rectangle is valid, otherwise returns false.
QString text(Text t, int child) const
Returns the value of the text property t of the object, or of the object's child if child is not 0...
void translate(int dx, int dy)
Moves the rectangle dx along the x axis and dy along the y axis, relative to the current position...
void copyText(int startOffset, int endOffset)
void pasteText(int offset)
QString fontFamily() const
Returns the text format's font family.
QString actionText(int action, Text t, int child) const
Returns the text property t of the action action supported by the object, or of the object's child if...
void setX(int x)
Sets the x coordinate of this point to the given x coordinate.
static QWidget * focusWidget()
Returns the application widget that has the keyboard input focus, or 0 if no widget in this applicati...
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
ushort green
Returns the green color component of this color.
QPointer< QDockWidget > m_dockWidget
QString text(Mode mode=Clipboard) const
Returns the clipboard text as plain text, or an empty string if the clipboard does not contain any te...
void setText(const QString &text)
Sets the text edit's text.
QTextBlockFormat blockFormat() const
Returns the QTextBlockFormat that describes block-specific properties.
qreal height() const
Returns the line's height.
void scrollToSubstring(int startIndex, int endIndex)
The QMdiSubWindow class provides a subwindow class for QMdiArea.
Q_DECL_CONSTEXPR int qRound(qreal d)
int selectionStart() const
Returns the start of the selection or position() if the cursor doesn't have a selection.
QWidget * viewport() const
The QMap class is a template class that provides a skip-list-based dictionary.
The QTextEdit class provides a widget that is used to edit and display both plain and rich text...
int textStart() const
Returns the start of the line from the beginning of the string passed to the QTextLayout.
The QAccessible class provides enums and static functions relating to accessibility.
State state(int child) const
Returns the current state of the object, or of the object's child if child is not 0...
static int area(const QSize &s)
The Text item allows you to add formatted text to a scene.
QPoint topLeft() const
Returns the position of the rectangle's top-left corner.
QWidget * activeWindow() const
Returns a pointer to the widget corresponding to the active child window, or 0 if no window is active...
void setSelection(int selectionIndex, int startOffset, int endOffset)
QTextLayout * layout() const
Returns the QTextLayout that is used to lay out and display the block's contents. ...