qaccessiblewidgetfactory.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/widgets/accessible/qaccessiblewidgetfactory.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6-
7QAccessibleInterface *qAccessibleFactory(const QString &classname, QObject *object)-
8{-
9 QAccessibleInterface *iface = 0;-
10 if (!object || !object->isWidgetType())-
11 return iface;-
12-
13 QWidget *widget = static_cast<QWidget*>(object);-
14-
15-
16-
17-
18-
19 if (QWidgetPrivate::get(widget)->data.in_destructor)-
20 return iface;-
21-
22 if (false) {
dead code: { }
-
23-
24 }
dead code: { }
else if (classname == QLatin1String("QLineEdit")) {
-
25 if (widget->objectName() == QLatin1String("qt_spinbox_lineedit"))-
26 iface = 0;-
27 else-
28 iface = new QAccessibleLineEdit(widget);-
29-
30-
31 } else if (classname == QLatin1String("QComboBox")) {-
32 iface = new QAccessibleComboBox(widget);-
33-
34-
35 } else if (classname == QLatin1String("QAbstractSpinBox")) {-
36 iface = new QAccessibleAbstractSpinBox(widget);-
37 } else if (classname == QLatin1String("QSpinBox")) {-
38 iface = new QAccessibleSpinBox(widget);-
39 } else if (classname == QLatin1String("QDoubleSpinBox")) {-
40 iface = new QAccessibleDoubleSpinBox(widget);-
41-
42-
43 } else if (classname == QLatin1String("QScrollBar")) {-
44 iface = new QAccessibleScrollBar(widget);-
45-
46 } else if (classname == QLatin1String("QAbstractSlider")) {-
47 iface = new QAccessibleAbstractSlider(widget);-
48-
49 } else if (classname == QLatin1String("QSlider")) {-
50 iface = new QAccessibleSlider(widget);-
51-
52-
53 } else if (classname == QLatin1String("QToolButton")) {-
54 iface = new QAccessibleToolButton(widget);-
55-
56 } else if (classname == QLatin1String("QCheckBox")-
57 || classname == QLatin1String("QRadioButton")-
58 || classname == QLatin1String("QPushButton")-
59 || classname == QLatin1String("QAbstractButton")) {-
60 iface = new QAccessibleButton(widget);-
61 } else if (classname == QLatin1String("QDialog")) {-
62 iface = new QAccessibleWidget(widget, QAccessible::Dialog);-
63 } else if (classname == QLatin1String("QMessageBox")) {-
64 iface = new QAccessibleWidget(widget, QAccessible::AlertMessage);-
65-
66 } else if (classname == QLatin1String("QMainWindow")) {-
67 iface = new QAccessibleMainWindow(widget);-
68-
69 } else if (classname == QLatin1String("QLabel") || classname == QLatin1String("QLCDNumber")) {-
70 iface = new QAccessibleDisplay(widget);-
71-
72 } else if (classname == QLatin1String("QGroupBox")) {-
73 iface = new QAccessibleGroupBox(widget);-
74-
75 } else if (classname == QLatin1String("QStatusBar")) {-
76 iface = new QAccessibleDisplay(widget);-
77-
78 } else if (classname == QLatin1String("QProgressBar")) {-
79 iface = new QAccessibleProgressBar(widget);-
80-
81 } else if (classname == QLatin1String("QToolBar")) {-
82 iface = new QAccessibleWidget(widget, QAccessible::ToolBar, widget->windowTitle());-
83-
84 } else if (classname == QLatin1String("QMenuBar")) {-
85 iface = new QAccessibleMenuBar(widget);-
86-
87-
88 } else if (classname == QLatin1String("QMenu")) {-
89 iface = new QAccessibleMenu(widget);-
90-
91-
92 } else if (classname == QLatin1String("QTreeView")) {-
93 iface = new QAccessibleTree(widget);-
94 } else if (classname == QLatin1String("QTableView") || classname == QLatin1String("QListView")) {-
95 iface = new QAccessibleTable(widget);-
96-
97-
98-
99 } else if (classname == QLatin1String("QTabBar")) {-
100 iface = new QAccessibleTabBar(widget);-
101-
102 } else if (classname == QLatin1String("QSizeGrip")) {-
103 iface = new QAccessibleWidget(widget, QAccessible::Grip);-
104-
105 } else if (classname == QLatin1String("QSplitter")) {-
106 iface = new QAccessibleWidget(widget, QAccessible::Splitter);-
107 } else if (classname == QLatin1String("QSplitterHandle")) {-
108 iface = new QAccessibleWidget(widget, QAccessible::Grip);-
109-
110-
111 } else if (classname == QLatin1String("QTextEdit")) {-
112 iface = new QAccessibleTextEdit(widget);-
113 } else if (classname == QLatin1String("QPlainTextEdit")) {-
114 iface = new QAccessiblePlainTextEdit(widget);-
115-
116 } else if (classname == QLatin1String("QTipLabel")) {-
117 iface = new QAccessibleDisplay(widget, QAccessible::ToolTip);-
118 } else if (classname == QLatin1String("QFrame")) {-
119 iface = new QAccessibleWidget(widget, QAccessible::Border);-
120-
121 } else if (classname == QLatin1String("QStackedWidget")) {-
122 iface = new QAccessibleStackedWidget(widget);-
123-
124-
125 } else if (classname == QLatin1String("QToolBox")) {-
126 iface = new QAccessibleToolBox(widget);-
127-
128-
129 } else if (classname == QLatin1String("QMdiArea")) {-
130 iface = new QAccessibleMdiArea(widget);-
131 } else if (classname == QLatin1String("QMdiSubWindow")) {-
132 iface = new QAccessibleMdiSubWindow(widget);-
133-
134 } else if (classname == QLatin1String("QDialogButtonBox")) {-
135 iface = new QAccessibleDialogButtonBox(widget);-
136-
137 } else if (classname == QLatin1String("QDial")) {-
138 iface = new QAccessibleDial(widget);-
139-
140-
141 } else if (classname == QLatin1String("QRubberBand")) {-
142 iface = new QAccessibleWidget(widget, QAccessible::Border);-
143-
144-
145 } else if (classname == QLatin1String("QTextBrowser")) {-
146 iface = new QAccessibleTextBrowser(widget);-
147-
148-
149 } else if (classname == QLatin1String("QAbstractScrollArea")) {-
150 iface = new QAccessibleAbstractScrollArea(widget);-
151 } else if (classname == QLatin1String("QScrollArea")) {-
152 iface = new QAccessibleScrollArea(widget);-
153-
154-
155 } else if (classname == QLatin1String("QCalendarWidget")) {-
156 iface = new QAccessibleCalendarWidget(widget);-
157-
158-
159 } else if (classname == QLatin1String("QDockWidget")) {-
160 iface = new QAccessibleDockWidget(widget);-
161-
162-
163 } else if (classname == QLatin1String("QDesktopScreenWidget")) {-
164 iface = 0;-
165 } else if (classname == QLatin1String("QWidget")) {-
166 iface = new QAccessibleWidget(widget);-
167 } else if (classname == QLatin1String("QWindowContainer")) {-
168 iface = new QAccessibleWindowContainer(widget);-
169 }-
170-
171 return iface;-
172}-
173-
174-
Switch to Source codePreprocessed file

Generated by Squish Coco Non-Commercial 4.3.0-BETA-master-30-08-2018-4cb69e9