mirror of https://github.com/qt/qtbase.git
a11y macOS: Implement accessibilityMinValue and accessibilityMaxValue
Use the ValueInterface to provide accessibilityMinValue and accessibilityMaxValue. Task-number: QTBUG-139712 Pick-to: 6.8 6.9 6.10 Change-Id: I774997fe90d457ac67604ec89187a20befee6570 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This commit is contained in:
parent
c887a780fd
commit
9f2fbc962b
|
@ -723,6 +723,26 @@ static void convertLineOffset(QAccessibleTextInterface *text, int *line, int *of
|
|||
return nil;
|
||||
}
|
||||
|
||||
|
||||
- (id) accessibilityMinValue {
|
||||
if (QAccessibleInterface *iface = self.qtInterface) {
|
||||
if (iface->valueInterface()) {
|
||||
return iface->valueInterface()->minimumValue().toString().toNSString();
|
||||
}
|
||||
}
|
||||
return nil;
|
||||
}
|
||||
|
||||
|
||||
- (id) accessibilityMaxValue {
|
||||
if (QAccessibleInterface *iface = self.qtInterface) {
|
||||
if (iface->valueInterface()) {
|
||||
return iface->valueInterface()->maximumValue().toString().toNSString();
|
||||
}
|
||||
}
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (NSInteger) accessibilityNumberOfCharacters {
|
||||
if (QAccessibleInterface *iface = self.qtInterface) {
|
||||
if (QAccessibleTextInterface *text = iface->textInterface())
|
||||
|
|
Loading…
Reference in New Issue