Changeset 65223 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Jan 10, 2017 12:41:21 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/platform/darwin/UICocoaSpecialControls.mm
r63962 r65223 638 638 } 639 639 640 641 /** QAccessibleWidget extension used as an accessibility interface for search-field. */ 642 class UIAccessibilityInterfaceForUICocoaSearchField : public QAccessibleWidget 643 { 644 public: 645 646 /** Returns an accessibility interface for passed @a strClassname and @a pObject. */ 647 static QAccessibleInterface *pFactory(const QString &strClassname, QObject *pObject) 648 { 649 /* Creating segmented-button accessibility interface: */ 650 if (pObject && strClassname == QLatin1String("UICocoaSearchField")) 651 return new UIAccessibilityInterfaceForUICocoaSearchField(qobject_cast<QWidget*>(pObject)); 652 653 /* Null by default: */ 654 return 0; 655 } 656 657 /** Constructs an accessibility interface passing @a pWidget to the base-class. */ 658 UIAccessibilityInterfaceForUICocoaSearchField(QWidget *pWidget) 659 : QAccessibleWidget(pWidget, QAccessible::EditableText) 660 { 661 // For now this class doesn't implement interface casting. 662 // Which means there will be no editable text accessible 663 // in basic accessibility layer, only in advanced one. 664 } 665 666 private: 667 668 /** Returns corresponding search-field. */ 669 UICocoaSearchField *field() const { return qobject_cast<UICocoaSearchField*>(widget()); } 670 }; 671 672 640 673 UICocoaSearchField::UICocoaSearchField(QWidget *pParent) 641 674 : QMacCocoaViewContainer(0, pParent) 642 675 { 676 /* Install segmented-button accessibility interface factory: */ 677 QAccessible::installFactory(UIAccessibilityInterfaceForUICocoaSearchField::pFactory); 678 643 679 /* Prepare auto-release pool: */ 644 680 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
Note:
See TracChangeset
for help on using the changeset viewer.