Absolute File Name: | /home/qt/qt5_coco/qt5/qtbase/src/platformsupport/fbconvenience/qfbwindow.cpp |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||
---|---|---|---|---|---|---|---|---|
1 | - | |||||||
2 | - | |||||||
3 | - | |||||||
4 | - | |||||||
5 | QFbWindow::QFbWindow(QWindow *window) | - | ||||||
6 | : QPlatformWindow(window), mBackingStore(0), mWindowState(Qt::WindowNoState) | - | ||||||
7 | { | - | ||||||
8 | static QAtomicInt winIdGenerator(1); | - | ||||||
9 | mWindowId = winIdGenerator.fetchAndAddRelaxed(1); | - | ||||||
10 | } never executed: end of block | 0 | ||||||
11 | - | |||||||
12 | QFbWindow::~QFbWindow() | - | ||||||
13 | { | - | ||||||
14 | } | - | ||||||
15 | - | |||||||
16 | QFbScreen *QFbWindow::platformScreen() const | - | ||||||
17 | { | - | ||||||
18 | return never executed: static_cast<QFbScreen *>(window()->screen()->handle());return static_cast<QFbScreen *>(window()->screen()->handle()); never executed: return static_cast<QFbScreen *>(window()->screen()->handle()); | 0 | ||||||
19 | } | - | ||||||
20 | - | |||||||
21 | void QFbWindow::setGeometry(const QRect &rect) | - | ||||||
22 | { | - | ||||||
23 | - | |||||||
24 | mOldGeometry = geometry(); | - | ||||||
25 | - | |||||||
26 | platformScreen()->invalidateRectCache(); | - | ||||||
27 | QWindowSystemInterface::handleGeometryChange(window(), rect); | - | ||||||
28 | - | |||||||
29 | QPlatformWindow::setGeometry(rect); | - | ||||||
30 | } never executed: end of block | 0 | ||||||
31 | - | |||||||
32 | void QFbWindow::setVisible(bool visible) | - | ||||||
33 | { | - | ||||||
34 | if (visible
| 0 | ||||||
35 | if (mWindowState & Qt::WindowFullScreen
| 0 | ||||||
36 | setGeometry(platformScreen()->geometry()); never executed: setGeometry(platformScreen()->geometry()); | 0 | ||||||
37 | else if (mWindowState & Qt::WindowMaximized
| 0 | ||||||
38 | setGeometry(platformScreen()->availableGeometry()); never executed: setGeometry(platformScreen()->availableGeometry()); | 0 | ||||||
39 | } never executed: end of block | 0 | ||||||
40 | QPlatformWindow::setVisible(visible); | - | ||||||
41 | - | |||||||
42 | if (visible
| 0 | ||||||
43 | platformScreen()->addWindow(this); never executed: platformScreen()->addWindow(this); | 0 | ||||||
44 | else | - | ||||||
45 | platformScreen()->removeWindow(this); never executed: platformScreen()->removeWindow(this); | 0 | ||||||
46 | } | - | ||||||
47 | - | |||||||
48 | - | |||||||
49 | void QFbWindow::setWindowState(Qt::WindowState state) | - | ||||||
50 | { | - | ||||||
51 | QPlatformWindow::setWindowState(state); | - | ||||||
52 | mWindowState = state; | - | ||||||
53 | platformScreen()->invalidateRectCache(); | - | ||||||
54 | } never executed: end of block | 0 | ||||||
55 | - | |||||||
56 | - | |||||||
57 | void QFbWindow::setWindowFlags(Qt::WindowFlags flags) | - | ||||||
58 | { | - | ||||||
59 | mWindowFlags = flags; | - | ||||||
60 | platformScreen()->invalidateRectCache(); | - | ||||||
61 | } never executed: end of block | 0 | ||||||
62 | - | |||||||
63 | Qt::WindowFlags QFbWindow::windowFlags() const | - | ||||||
64 | { | - | ||||||
65 | return never executed: mWindowFlags;return mWindowFlags; never executed: return mWindowFlags; | 0 | ||||||
66 | } | - | ||||||
67 | - | |||||||
68 | void QFbWindow::raise() | - | ||||||
69 | { | - | ||||||
70 | platformScreen()->raise(this); | - | ||||||
71 | } never executed: end of block | 0 | ||||||
72 | - | |||||||
73 | void QFbWindow::lower() | - | ||||||
74 | { | - | ||||||
75 | platformScreen()->lower(this); | - | ||||||
76 | } never executed: end of block | 0 | ||||||
77 | - | |||||||
78 | void QFbWindow::repaint(const QRegion ®ion) | - | ||||||
79 | { | - | ||||||
80 | QRect currentGeometry = geometry(); | - | ||||||
81 | - | |||||||
82 | QRect dirtyClient = region.boundingRect(); | - | ||||||
83 | QRect dirtyRegion(currentGeometry.left() + dirtyClient.left(), | - | ||||||
84 | currentGeometry.top() + dirtyClient.top(), | - | ||||||
85 | dirtyClient.width(), | - | ||||||
86 | dirtyClient.height()); | - | ||||||
87 | QRect mOldGeometryLocal = mOldGeometry; | - | ||||||
88 | mOldGeometry = currentGeometry; | - | ||||||
89 | - | |||||||
90 | if (mOldGeometryLocal != currentGeometry
| 0 | ||||||
91 | platformScreen()->setDirty(mOldGeometryLocal); never executed: platformScreen()->setDirty(mOldGeometryLocal); | 0 | ||||||
92 | platformScreen()->setDirty(dirtyRegion); | - | ||||||
93 | } never executed: end of block | 0 | ||||||
94 | - | |||||||
95 | - | |||||||
Switch to Source code | Preprocessed file |