6#if QT_CONFIG(abstractbutton)
12#if QT_CONFIG(pushbutton)
15#if QT_CONFIG(progressbar)
18#if QT_CONFIG(statusbar)
21#if QT_CONFIG(radiobutton)
24#if QT_CONFIG(toolbutton)
33#if QT_CONFIG(groupbox)
36#if QT_CONFIG(lcdnumber)
39#if QT_CONFIG(lineedit)
41#include <private/qlineedit_p.h>
44#include <QtGui/qpicture.h>
46#if QT_CONFIG(messagebox)
53#include <private/qwindowcontainer_p.h>
54#include <QtCore/qvarlengtharray.h>
55#include <QtGui/qvalidator.h>
65#if QT_CONFIG(accessibility)
72#if QT_CONFIG(abstractbutton)
84QAccessibleButton::QAccessibleButton(
QWidget *
w)
91 if (
button()->isCheckable())
92 addControllingSignal(
"toggled(bool)"_L1);
94 addControllingSignal(
"clicked()"_L1);
100 return qobject_cast<QAbstractButton*>(
object());
104QString QAccessibleButton::text(QAccessible::Text
t)
const
108 case QAccessible::Accelerator:
110#if QT_CONFIG(shortcut) && QT_CONFIG(pushbutton)
111 QPushButton *pb = qobject_cast<QPushButton*>(
object());
119 case QAccessible::Name:
128 str = QAccessibleWidget::text(
t);
137#if QT_CONFIG(checkbox)
140 if (
b->isCheckable())
141 state.checkable =
true;
143 state.checked =
true;
144#if QT_CONFIG(checkbox)
146 state.checkStateMixed =
true;
149 state.pressed =
true;
150#if QT_CONFIG(pushbutton)
154 state.defaultButton =
true;
157 state.hasPopup =
true;
165QRect QAccessibleButton::rect()
const
171#if QT_CONFIG(checkbox)
172 if (
QCheckBox *
cb = qobject_cast<QCheckBox *>(ab)) {
175 cb->initStyleOption(&
opt);
179#if QT_CONFIG(radiobutton)
180 else if (
QRadioButton *rb = qobject_cast<QRadioButton *>(ab)) {
183 rb->initStyleOption(&
opt);
187 return QAccessibleWidget::rect();
190QAccessible::Role QAccessibleButton::role()
const
195 if (
QPushButton *pb = qobject_cast<QPushButton*>(ab)) {
197 return QAccessible::ButtonMenu;
202 return ab->
autoExclusive() ? QAccessible::RadioButton : QAccessible::CheckBox;
204 return QAccessible::Button;
212 case QAccessible::ButtonMenu:
213 names << showMenuAction();
215 case QAccessible::RadioButton:
216 names << toggleAction();
219 if (
button()->isCheckable())
220 names << toggleAction();
221 names << pressAction();
225 names << QAccessibleWidget::actionNames();
229void QAccessibleButton::doAction(
const QString &actionName)
233 if (actionName == pressAction() ||
234 actionName == showMenuAction()) {
236 QPushButton *pb = qobject_cast<QPushButton*>(
object());
237 if (pb && pb->menu())
242 }
else if (actionName == toggleAction()) {
245 QAccessibleWidget::doAction(actionName);
251 if (actionName == pressAction()) {
252#ifndef QT_NO_SHORTCUT
260#if QT_CONFIG(toolbutton)
272QAccessibleToolButton::QAccessibleToolButton(
QWidget *
w)
273: QAccessibleButton(
w)
279QToolButton *QAccessibleToolButton::toolButton()
const
281 return qobject_cast<QToolButton*>(
object());
287bool QAccessibleToolButton::isSplitButton()
const
299 if (toolButton()->autoRaise())
300 st.hotTracked =
true;
302 if (toolButton()->
menu())
308int QAccessibleToolButton::childCount()
const
310 return isSplitButton() ? 1 : 0;
313QAccessible::Role QAccessibleToolButton::role()
const
319 return tb->
isCheckable() ? QAccessible::CheckBox : QAccessible::PushButton;
321 return QAccessible::ButtonDropDown;
324 return QAccessible::ButtonMenu;
327QAccessibleInterface *QAccessibleToolButton::child(
int index)
const
332 return QAccessible::queryAccessibleInterface(toolButton()->
menu());
346QStringList QAccessibleToolButton::actionNames()
const
351 if (toolButton()->
menu())
352 names << showMenuAction();
354 names << QAccessibleButton::actionNames();
360void QAccessibleToolButton::doAction(
const QString &actionName)
365 if (actionName == pressAction()) {
367 }
else if (actionName == showMenuAction()) {
370 toolButton()->setDown(
true);
371 toolButton()->showMenu();
375 QAccessibleButton::doAction(actionName);
394QAccessibleDisplay::QAccessibleDisplay(
QWidget *
w, QAccessible::Role role)
395: QAccessibleWidget(
w, role)
399QAccessible::Role QAccessibleDisplay::role()
const
402 QLabel *l = qobject_cast<QLabel*>(
object());
405 return QAccessible::Graphic;
408 return QAccessible::Graphic;
412 return QAccessible::Animation;
414#if QT_CONFIG(progressbar)
415 }
else if (qobject_cast<QProgressBar*>(
object())) {
416 return QAccessible::ProgressBar;
418#if QT_CONFIG(statusbar)
419 }
else if (qobject_cast<QStatusBar*>(
object())) {
420 return QAccessible::StatusBar;
424 return QAccessibleWidget::role();
434QString QAccessibleDisplay::text(QAccessible::Text
t)
const
438 case QAccessible::Name:
443 }
else if (qobject_cast<QLabel*>(
object())) {
446#ifndef QT_NO_TEXTHTMLPARSER
454#ifndef QT_NO_SHORTCUT
456 str = qt_accStripAmp(
str);
459#if QT_CONFIG(lcdnumber)
460 }
else if (qobject_cast<QLCDNumber*>(
object())) {
461 QLCDNumber *l = qobject_cast<QLCDNumber*>(
object());
467#if QT_CONFIG(statusbar)
468 }
else if (qobject_cast<QStatusBar*>(
object())) {
469 return qobject_cast<QStatusBar*>(
object())->currentMessage();
474 case QAccessible::Value:
475#if QT_CONFIG(progressbar)
476 if (qobject_cast<QProgressBar*>(
object()))
484 str = QAccessibleWidget::text(
t);
490QAccessibleDisplay::relations(QAccessible::Relation
match )
const
493 QAccessibleWidget::relations(
match);
494# if QT_CONFIG(shortcut) && QT_CONFIG(label)
495 if (
match & QAccessible::Labelled) {
496 if (
QLabel *
label = qobject_cast<QLabel*>(
object())) {
497 const QAccessible::Relation rel = QAccessible::Labelled;
498 if (QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(
label->buddy()))
506void *QAccessibleDisplay::interface_cast(QAccessible::InterfaceType
t)
508 if (
t == QAccessible::ImageInterface)
509 return static_cast<QAccessibleImageInterface*
>(
this);
510 return QAccessibleWidget::interface_cast(
t);
514QString QAccessibleDisplay::imageDescription()
const
516#if QT_CONFIG(tooltip)
517 return widget()->toolTip();
524QSize QAccessibleDisplay::imageSize()
const
532 return label->pixmap().size();
537QPoint QAccessibleDisplay::imagePosition()
const
545 if (
label->pixmap().isNull())
552#if QT_CONFIG(groupbox)
553QAccessibleGroupBox::QAccessibleGroupBox(
QWidget *
w)
554: QAccessibleWidget(
w)
558QGroupBox* QAccessibleGroupBox::groupBox()
const
563QString QAccessibleGroupBox::text(QAccessible::Text
t)
const
569 case QAccessible::Name:
572#if QT_CONFIG(tooltip)
573 case QAccessible::Description:
577 case QAccessible::Accelerator:
596QAccessible::Role QAccessibleGroupBox::role()
const
602QAccessibleGroupBox::relations(QAccessible::Relation
match )
const
605 QAccessibleWidget::relations(
match);
610 QAccessibleInterface *
iface = QAccessible::queryAccessibleInterface(kid);
612 rels.
append(
qMakePair(iface, QAccessible::Relation(QAccessible::Labelled)));
618QStringList QAccessibleGroupBox::actionNames()
const
620 QStringList actions = QAccessibleWidget::actionNames();
623 actions.prepend(QAccessibleActionInterface::toggleAction());
628void QAccessibleGroupBox::doAction(
const QString &actionName)
630 if (actionName == QAccessibleActionInterface::toggleAction())
641#if QT_CONFIG(lineedit)
657 addControllingSignal(
"textChanged(const QString&)"_L1);
658 addControllingSignal(
"returnPressed()"_L1);
662QLineEdit *QAccessibleLineEdit::lineEdit()
const
664 return qobject_cast<QLineEdit*>(
object());
667QString QAccessibleLineEdit::text(QAccessible::Text
t)
const
671 case QAccessible::Value:
681 str = QAccessibleWidget::text(
t);
682 if (
str.
isEmpty() &&
t == QAccessible::Description)
687void QAccessibleLineEdit::setText(QAccessible::Text
t,
const QString &
text)
689 if (
t != QAccessible::Value) {
690 QAccessibleWidget::setText(
t,
text);
695#if QT_CONFIG(validator)
710 state.editable =
true;
712 state.readOnly =
true;
715 state.passwordEdit =
true;
717 state.selectableText =
true;
721void *QAccessibleLineEdit::interface_cast(QAccessible::InterfaceType
t)
723 if (
t == QAccessible::TextInterface)
724 return static_cast<QAccessibleTextInterface*
>(
this);
725 if (
t == QAccessible::EditableTextInterface)
726 return static_cast<QAccessibleEditableTextInterface*
>(
this);
727 return QAccessibleWidget::interface_cast(
t);
730void QAccessibleLineEdit::addSelection(
int startOffset,
int endOffset)
735QString QAccessibleLineEdit::attributes(
int offset,
int *startOffset,
int *endOffset)
const
738 *startOffset = *endOffset =
offset;
742int QAccessibleLineEdit::cursorPosition()
const
747QRect QAccessibleLineEdit::characterRect(
int offset)
const
755 int w = fm.horizontalAdvance(
ch);
758 r.moveTo(
lineEdit()->mapToGlobal(
r.topLeft()));
762int QAccessibleLineEdit::selectionCount()
const
767int QAccessibleLineEdit::offsetAtPoint(
const QPoint &point)
const
774void QAccessibleLineEdit::selection(
int selectionIndex,
int *startOffset,
int *endOffset)
const
776 *startOffset = *endOffset = 0;
777 if (selectionIndex != 0)
784QString QAccessibleLineEdit::text(
int startOffset,
int endOffset)
const
786 if (startOffset > endOffset)
795QString QAccessibleLineEdit::textBeforeOffset(
int offset, QAccessible::TextBoundaryType boundaryType,
796 int *startOffset,
int *endOffset)
const
799 *startOffset = *endOffset = -1;
803 offset = cursorPosition();
804 return QAccessibleTextInterface::textBeforeOffset(
offset, boundaryType, startOffset, endOffset);
807QString QAccessibleLineEdit::textAfterOffset(
int offset, QAccessible::TextBoundaryType boundaryType,
808 int *startOffset,
int *endOffset)
const
811 *startOffset = *endOffset = -1;
815 offset = cursorPosition();
816 return QAccessibleTextInterface::textAfterOffset(
offset, boundaryType, startOffset, endOffset);
819QString QAccessibleLineEdit::textAtOffset(
int offset, QAccessible::TextBoundaryType boundaryType,
820 int *startOffset,
int *endOffset)
const
823 *startOffset = *endOffset = -1;
827 offset = cursorPosition();
828 return QAccessibleTextInterface::textAtOffset(
offset, boundaryType, startOffset, endOffset);
831void QAccessibleLineEdit::removeSelection(
int selectionIndex)
833 if (selectionIndex != 0)
839void QAccessibleLineEdit::setCursorPosition(
int position)
844void QAccessibleLineEdit::setSelection(
int selectionIndex,
int startOffset,
int endOffset)
846 if (selectionIndex != 0)
852int QAccessibleLineEdit::characterCount()
const
857void QAccessibleLineEdit::scrollToSubstring(
int startIndex,
int endIndex)
863void QAccessibleLineEdit::deleteText(
int startOffset,
int endOffset)
873void QAccessibleLineEdit::replaceText(
int startOffset,
int endOffset,
const QString &
text)
880#if QT_CONFIG(progressbar)
881QAccessibleProgressBar::QAccessibleProgressBar(
QWidget *
o)
882 : QAccessibleDisplay(
o)
887void *QAccessibleProgressBar::interface_cast(QAccessible::InterfaceType
t)
889 if (
t == QAccessible::ValueInterface)
890 return static_cast<QAccessibleValueInterface*
>(
this);
891 return QAccessibleDisplay::interface_cast(
t);
894QVariant QAccessibleProgressBar::currentValue()
const
899QVariant QAccessibleProgressBar::maximumValue()
const
904QVariant QAccessibleProgressBar::minimumValue()
const
909QVariant QAccessibleProgressBar::minimumStepSize()
const
917QProgressBar *QAccessibleProgressBar::progressBar()
const
919 return qobject_cast<QProgressBar *>(
object());
924QAccessibleWindowContainer::QAccessibleWindowContainer(
QWidget *
w)
925 : QAccessibleWidget(
w)
929int QAccessibleWindowContainer::childCount()
const
931 if (container()->containedWindow() && QAccessible::queryAccessibleInterface(container()->containedWindow()))
936int QAccessibleWindowContainer::indexOfChild(
const QAccessibleInterface *
child)
const
938 if (
child->object() == container()->containedWindow())
943QAccessibleInterface *QAccessibleWindowContainer::child(
int i)
const
946 return QAccessible::queryAccessibleInterface(container()->containedWindow());
955#if QT_CONFIG(messagebox)
966QMessageBox *QAccessibleMessageBox::messageBox()
const
971QString QAccessibleMessageBox::text(QAccessible::Text
t)
const
976 case QAccessible::Name:
977 str = QAccessibleWidget::text(
t);
981 case QAccessible::Description:
984 case QAccessible::Value:
987 case QAccessible::Help:
The QAccessible class provides enums and static functions related to accessibility.
static constexpr QChar fromLatin1(char c) noexcept
Converts the Latin-1 character c to its equivalent QChar.
The QCheckBox widget provides a checkbox with a text label.
\reentrant \inmodule QtGui
The QGroupBox widget provides a group box frame with a title.
void setChecked(bool checked)
The QKeySequence class encapsulates a key sequence as used by shortcuts.
QString toString(SequenceFormat format=PortableText) const
The QLCDNumber widget displays a number with LCD-like digits.
double value
the displayed value
int digitCount
the current number of digits displayed
int intValue
the displayed value rounded to the nearest integer
The QLabel widget provides a text or image display.
QPixmap pixmap
the label's pixmap.
The QLineEdit widget is a one-line text editor.
QString placeholderText
the line edit's placeholder text.
int cursorPosition
the current cursor position for this line edit.
QMargins textMargins() const
EchoMode echoMode
the line edit's echo mode.
bool hasSelectedText
whether there is any text selected.
int selectionStart() const
Returns the index of the first selected character in the line edit or -1 if no text is selected.
QString selectedText
the selected text.
void setCursorPosition(int)
void setText(const QString &)
void setSelection(int, int)
Selects text from position start and for length characters.
void deselect()
Deselects any selected text.
QString text
the line edit's text.
int cursorPositionAt(const QPoint &pos)
Returns the cursor position under the point pos.
void append(parameter_type t)
constexpr int top() const noexcept
Returns the top margin.
The QMessageBox class provides a modal dialog for informing the user or for asking the user a questio...
QString text
the message box text to be displayed.
QString informativeText
the informative text that provides a fuller description for the message
bool isNull() const
Returns true if the picture contains no data; otherwise returns false.
bool isNull() const
Returns true if this is a null pixmap; otherwise returns false.
\inmodule QtCore\reentrant
The QProgressBar widget provides a horizontal or vertical progress bar.
\inmodule QtCore\reentrant
\macro QT_RESTRICTED_CAST_FROM_ASCII
qsizetype size() const
Returns the number of characters in this string.
QString mid(qsizetype position, qsizetype n=-1) const
Returns a string that contains n characters of this string, starting at the specified position index.
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
static QString number(int, int base=10)
This is an overloaded member function, provided for convenience. It differs from the above function o...
@ SE_RadioButtonClickRect
\reentrant \inmodule QtGui
void setHtml(const QString &html)
Replaces the entire contents of the document with the given HTML-formatted text in the html string.
QString toPlainText() const
Returns the plain text contained in the document.
cache insert(employee->id(), employee)
Combined button and popup list for selecting options.
constexpr QBindableInterface iface
Q_GUI_EXPORT bool mightBeRichText(const QString &)
Returns true if the string text is likely to be rich text; otherwise returns false.
QVector3D minimum(const QVector3D &v1, const QVector3D &v2) Q_DECL_NOTHROW
QVector3D maximum(const QVector3D &v1, const QVector3D &v2) Q_DECL_NOTHROW
static jboolean setSelection(JNIEnv *, jobject, jint start, jint end)
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
GLboolean GLboolean GLboolean b
GLint GLint GLint GLint GLint x
[0]
GLfloat GLfloat GLfloat w
[0]
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLuint GLsizei const GLchar * label
[43]
GLenum GLuint GLintptr offset
GLfloat GLfloat GLfloat GLfloat h
constexpr decltype(auto) qMakePair(T1 &&value1, T2 &&value2) noexcept(noexcept(std::make_pair(std::forward< T1 >(value1), std::forward< T2 >(value2))))
static qreal position(const QQuickItem *item, QQuickAnchors::Anchor anchorLine)
SSL_CTX int(* cb)(SSL *ssl, unsigned char **out, unsigned char *outlen, const unsigned char *in, unsigned int inlen, void *arg)
static bool match(const uchar *found, uint foundLen, const char *target, uint targetLen)
settings remove("monkey")
QMessageBox messageBox(this)
[2]