Line | Source | Count |
1 | | - |
2 | | - |
3 | | - |
4 | | - |
5 | | - |
6 | | - |
7 | QPlatformFontDatabase *QPlatformIntegration::fontDatabase() const | - |
8 | { | - |
9 | static QPlatformFontDatabase *db = 0; | - |
10 | if (!db) { | - |
11 | db = new QPlatformFontDatabase; | - |
12 | } | - |
13 | return db; | - |
14 | } | - |
15 | QPlatformClipboard *QPlatformIntegration::clipboard() const | - |
16 | { | - |
17 | static QPlatformClipboard *clipboard = 0; | - |
18 | if (!clipboard) { | - |
19 | clipboard = new QPlatformClipboard; | - |
20 | } | - |
21 | return clipboard; | - |
22 | } | - |
23 | QPlatformDrag *QPlatformIntegration::drag() const | - |
24 | { | - |
25 | static QSimpleDrag *drag = 0; | - |
26 | if (!drag) { | - |
27 | drag = new QSimpleDrag; | - |
28 | } | - |
29 | return drag; | - |
30 | } | - |
31 | | - |
32 | | - |
33 | QPlatformNativeInterface * QPlatformIntegration::nativeInterface() const | - |
34 | { | - |
35 | return 0; | - |
36 | } | - |
37 | | - |
38 | QPlatformServices *QPlatformIntegration::services() const | - |
39 | { | - |
40 | return 0; | - |
41 | } | - |
42 | bool QPlatformIntegration::hasCapability(Capability cap) const | - |
43 | { | - |
44 | return cap == NonFullScreenWindows || cap == NativeWidgets || cap == WindowManagement; | - |
45 | } | - |
46 | | - |
47 | QPlatformPixmap *QPlatformIntegration::createPlatformPixmap(QPlatformPixmap::PixelType type) const | - |
48 | { | - |
49 | return new QRasterPlatformPixmap(type); | - |
50 | } | - |
51 | QPlatformOpenGLContext *QPlatformIntegration::createPlatformOpenGLContext(QOpenGLContext *context) const | - |
52 | { | - |
53 | (void)context;; | - |
54 | QMessageLogger(__FILE__, 288294, __PRETTY_FUNCTION__).warning("This plugin does not support createPlatformOpenGLContext!"); | - |
55 | return 0; | - |
56 | } | - |
57 | | - |
58 | | - |
59 | | - |
60 | | - |
61 | | - |
62 | | - |
63 | QPlatformSharedGraphicsCache *QPlatformIntegration::createPlatformSharedGraphicsCache(const char *cacheId) const | - |
64 | { | - |
65 | QMessageLogger(__FILE__, 299305, __PRETTY_FUNCTION__).warning("This plugin does not support createPlatformSharedGraphicsBuffer for cacheId: %s!", | - |
66 | cacheId); | - |
67 | return 0; | - |
68 | } | - |
69 | | - |
70 | | - |
71 | | - |
72 | | - |
73 | | - |
74 | QPaintEngine *QPlatformIntegration::createImagePaintEngine(QPaintDevice *paintDevice) const | - |
75 | { | - |
76 | (void)paintDevice; | - |
77 | return 0; | - |
78 | } | - |
79 | void QPlatformIntegration::initialize() | - |
80 | { | - |
81 | } | - |
82 | | - |
83 | | - |
84 | | - |
85 | | - |
86 | | - |
87 | | - |
88 | | - |
89 | void QPlatformIntegration::destroy() | - |
90 | { | - |
91 | } | - |
92 | | - |
93 | | - |
94 | | - |
95 | | - |
96 | | - |
97 | | - |
98 | QPlatformInputContext *QPlatformIntegration::inputContext() const | - |
99 | { | - |
100 | return 0; | - |
101 | } | - |
102 | QPlatformAccessibility *QPlatformIntegration::accessibility() const | - |
103 | { | - |
104 | return 0; | - |
105 | } | - |
106 | | - |
107 | | - |
108 | | - |
109 | QVariant QPlatformIntegration::styleHint(StyleHint hint) const | - |
110 | { | - |
111 | switch (hint) { | - |
112 | case CursorFlashTime: | - |
113 | return QPlatformTheme::defaultThemeHint(QPlatformTheme::CursorFlashTime); | - |
114 | case KeyboardInputInterval: | - |
115 | return QPlatformTheme::defaultThemeHint(QPlatformTheme::KeyboardInputInterval); | - |
116 | case KeyboardAutoRepeatRate: | - |
117 | return QPlatformTheme::defaultThemeHint(QPlatformTheme::KeyboardAutoRepeatRate); | - |
118 | case MouseDoubleClickInterval: | - |
119 | return QPlatformTheme::defaultThemeHint(QPlatformTheme::MouseDoubleClickInterval); | - |
120 | case StartDragDistance: | - |
121 | return QPlatformTheme::defaultThemeHint(QPlatformTheme::StartDragDistance); | - |
122 | case StartDragTime: | - |
123 | return QPlatformTheme::defaultThemeHint(QPlatformTheme::StartDragTime); | - |
124 | case ShowIsFullScreen: | - |
125 | return false; | - |
126 | case ShowIsMaximized: | - |
127 | return false; | - |
128 | case PasswordMaskDelay: | - |
129 | return QPlatformTheme::defaultThemeHint(QPlatformTheme::PasswordMaskDelay); | - |
130 | case PasswordMaskCharacter: | - |
131 | return QPlatformTheme::defaultThemeHint(QPlatformTheme::PasswordMaskCharacter); | - |
132 | case FontSmoothingGamma: | - |
133 | return qreal(1.7); | - |
134 | case StartDragVelocity: | - |
135 | return QPlatformTheme::defaultThemeHint(QPlatformTheme::StartDragVelocity); | - |
136 | case UseRtlExtensions: | - |
137 | return QVariant(false); | - |
138 | case SetFocusOnTouchRelease: | - |
139 | return QVariant(false); | - |
140 | case MousePressAndHoldInterval: | - |
141 | return QPlatformTheme::defaultThemeHint(QPlatformTheme::MousePressAndHoldInterval); | - |
142 | case TabFocusBehavior: | - |
143 | return QPlatformTheme::defaultThemeHint(QPlatformTheme::TabFocusBehavior); | - |
144 | case ReplayMousePressOutsidePopup: | - |
145 | return true; | - |
146 | case ItemViewActivateItemOnSingleClick: | - |
147 | return QPlatformTheme::defaultThemeHint(QPlatformTheme::ItemViewActivateItemOnSingleClick); | - |
148 | } | - |
149 | | - |
150 | return 0; | - |
151 | } | - |
152 | | - |
153 | Qt::WindowState QPlatformIntegration::defaultWindowState(Qt::WindowFlags flags) const | - |
154 | { | - |
155 | | - |
156 | if (flags & Qt::Popup & ~Qt::Window) | - |
157 | return Qt::WindowNoState; | - |
158 | | - |
159 | if (styleHint(QPlatformIntegration::ShowIsFullScreen).toBool()) | - |
160 | return Qt::WindowFullScreen; | - |
161 | else if (styleHint(QPlatformIntegration::ShowIsMaximized).toBool()) | - |
162 | return Qt::WindowMaximized; | - |
163 | | - |
164 | return Qt::WindowNoState; | - |
165 | } | - |
166 | | - |
167 | Qt::KeyboardModifiers QPlatformIntegration::queryKeyboardModifiers() const | - |
168 | { | - |
169 | return QGuiApplication::keyboardModifiers(); | - |
170 | } | - |
171 | QList<int> QPlatformIntegration::possibleKeys(const QKeyEvent *) const | - |
172 | { | - |
173 | return QList<int>(); | - |
174 | } | - |
175 | void QPlatformIntegration::screenAdded(QPlatformScreen *ps, bool isPrimary) | - |
176 | { | - |
177 | QScreen *screen = new QScreen(ps); | - |
178 | | - |
179 | if (isPrimary) { | - |
180 | QGuiApplicationPrivate::screen_list.prepend(screen); | - |
181 | } else { | - |
182 | QGuiApplicationPrivate::screen_list.append(screen); | - |
183 | } | - |
184 | (static_cast<QGuiApplication *>(QCoreApplication::instance()))->screenAdded(screen); | - |
185 | | - |
186 | if (isPrimary) | - |
187 | (static_cast<QGuiApplication *>(QCoreApplication::instance()))->primaryScreenChanged(screen); | - |
188 | } | - |
189 | | - |
190 | | - |
191 | | - |
192 | | - |
193 | | - |
194 | | - |
195 | | - |
196 | void QPlatformIntegration::removeScreen(QScreen *screen) | - |
197 | { | - |
198 | const bool wasPrimary = (!QGuiApplicationPrivate::screen_list.isEmpty()TRUE | never evaluated | FALSE | never evaluated |
&& QGuiApplicationPrivate::screen_list[.at(0]) == screenTRUE | never evaluated | FALSE | never evaluated |
); | 0 |
199 | QGuiApplicationPrivate::screen_list.removeOne(screen); | - |
200 | | - |
201 | if (wasPrimaryTRUE | never evaluated | FALSE | never evaluated |
&& (static_cast<TRUE | never evaluated | FALSE | never evaluated |
QGuiApplication *>(QCoreApplication::instance()))TRUE | never evaluated | FALSE | never evaluated |
&& !QGuiApplicationPrivate::screen_list.isEmpty()TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
202 | (static_cast< never executed: (static_cast<QGuiApplication *>(QCoreApplication::instance()))->primaryScreenChanged(QGuiApplicationPrivate::screen_list.at(0)); QGuiApplication *>(QCoreApplication::instance()))->primaryScreenChanged(QGuiApplicationPrivate::screen_list[.at(0]);));never executed: (static_cast<QGuiApplication *>(QCoreApplication::instance()))->primaryScreenChanged(QGuiApplicationPrivate::screen_list.at(0)); | 0 |
203 | } never executed: end of block | 0 |
204 | void QPlatformIntegration::destroyScreen(QPlatformScreen *screen) | - |
205 | { | - |
206 | QScreen *qScreen = screen->screen(); | - |
207 | removeScreen(qScreen); | - |
208 | delete qScreen; | - |
209 | delete screen; | - |
210 | } | - |
211 | void QPlatformIntegration::setPrimaryScreen(QPlatformScreen *newPrimary) | - |
212 | { | - |
213 | QScreen* newPrimaryScreen = newPrimary->screen(); | - |
214 | int idx = QGuiApplicationPrivate::screen_list.indexOf(newPrimaryScreen); | - |
215 | ((!(idx >= 0)) ? qt_assert("idx >= 0",__FILE__,505511) : qt_noop()); | - |
216 | if (idx == 0) | - |
217 | return; | - |
218 | | - |
219 | QGuiApplicationPrivate::screen_list.swap(0, idx); | - |
220 | (static_cast<QGuiApplication *>(QCoreApplication::instance()))->primaryScreenChanged(newPrimaryScreen); | - |
221 | } | - |
222 | | - |
223 | QStringList QPlatformIntegration::themeNames() const | - |
224 | { | - |
225 | return QStringList(); | - |
226 | } | - |
227 | | - |
228 | class QPlatformTheme *QPlatformIntegration::createPlatformTheme(const QString &name) const | - |
229 | { | - |
230 | (void)name; | - |
231 | return new QPlatformTheme; | - |
232 | } | - |
233 | | - |
234 | | - |
235 | | - |
236 | | - |
237 | | - |
238 | | - |
239 | QPlatformOffscreenSurface *QPlatformIntegration::createPlatformOffscreenSurface(QOffscreenSurface *surface) const | - |
240 | { | - |
241 | (void)surface; | - |
242 | return 0; | - |
243 | } | - |
244 | QPlatformSessionManager *QPlatformIntegration::createPlatformSessionManager(const QString &id, const QString &key) const | - |
245 | { | - |
246 | return new QPlatformSessionManager(id, key); | - |
247 | } | - |
248 | void QPlatformIntegration::sync() | - |
249 | { | - |
250 | } | - |
251 | void QPlatformIntegration::beep() const | - |
252 | { | - |
253 | } | - |
254 | QOpenGLContext::OpenGLModuleType QPlatformIntegration::openGLModuleType() | - |
255 | { | - |
256 | QMessageLogger(__FILE__, 582599, __PRETTY_FUNCTION__).warning("This plugin does not support dynamic OpenGL loading!"); | - |
257 | return QOpenGLContext::LibGL; | - |
258 | } | - |
259 | void QPlatformIntegration::setApplicationIcon(const QIcon &icon) const | - |
260 | { | - |
261 | (void)icon;; | - |
262 | } | - |
263 | | - |
264 | | - |
| | |