Absolute File Name: | /home/qt/qt5_coco/qt5/qtbase/src/gui/kernel/qpaintdevicewindow.cpp |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | - | |||||||||||||
2 | - | |||||||||||||
3 | - | |||||||||||||
4 | void QPaintDeviceWindow::update() | - | ||||||||||||
5 | { | - | ||||||||||||
6 | update(QRect(QPoint(0,0), size())); | - | ||||||||||||
7 | } never executed: end of block | 0 | ||||||||||||
8 | void QPaintDeviceWindow::update(const QRect &rect) | - | ||||||||||||
9 | { | - | ||||||||||||
10 | QPaintDeviceWindowPrivate * const d = d_func(); | - | ||||||||||||
11 | d->dirtyRegion += rect; | - | ||||||||||||
12 | if (isExposed()
| 0 | ||||||||||||
13 | requestUpdate(); never executed: requestUpdate(); | 0 | ||||||||||||
14 | } never executed: end of block | 0 | ||||||||||||
15 | void QPaintDeviceWindow::update(const QRegion ®ion) | - | ||||||||||||
16 | { | - | ||||||||||||
17 | QPaintDeviceWindowPrivate * const d = d_func(); | - | ||||||||||||
18 | d->dirtyRegion += region; | - | ||||||||||||
19 | if (isExposed()
| 0 | ||||||||||||
20 | requestUpdate(); never executed: requestUpdate(); | 0 | ||||||||||||
21 | } never executed: end of block | 0 | ||||||||||||
22 | void QPaintDeviceWindow::paintEvent(QPaintEvent *event) | - | ||||||||||||
23 | { | - | ||||||||||||
24 | (void)event;; | - | ||||||||||||
25 | - | |||||||||||||
26 | } never executed: end of block | 0 | ||||||||||||
27 | - | |||||||||||||
28 | - | |||||||||||||
29 | - | |||||||||||||
30 | - | |||||||||||||
31 | int QPaintDeviceWindow::metric(PaintDeviceMetric metric) const | - | ||||||||||||
32 | { | - | ||||||||||||
33 | QScreen *screen = this->screen(); | - | ||||||||||||
34 | if (!screen
| 0 | ||||||||||||
35 | screen = QGuiApplication::primaryScreen(); never executed: screen = QGuiApplication::primaryScreen(); | 0 | ||||||||||||
36 | - | |||||||||||||
37 | switch (metric) { | - | ||||||||||||
38 | case never executed: PdmWidth:case PdmWidth: never executed: case PdmWidth: | 0 | ||||||||||||
39 | return never executed: width();return width(); never executed: return width(); | 0 | ||||||||||||
40 | case never executed: PdmWidthMM:case PdmWidthMM: never executed: case PdmWidthMM: | 0 | ||||||||||||
41 | if (screen
| 0 | ||||||||||||
42 | return never executed: width() * screen->physicalSize().width() / screen->geometry().width();return width() * screen->physicalSize().width() / screen->geometry().width(); never executed: return width() * screen->physicalSize().width() / screen->geometry().width(); | 0 | ||||||||||||
43 | break; never executed: break; | 0 | ||||||||||||
44 | case never executed: PdmHeight:case PdmHeight: never executed: case PdmHeight: | 0 | ||||||||||||
45 | return never executed: height();return height(); never executed: return height(); | 0 | ||||||||||||
46 | case never executed: PdmHeightMM:case PdmHeightMM: never executed: case PdmHeightMM: | 0 | ||||||||||||
47 | if (screen
| 0 | ||||||||||||
48 | return never executed: height() * screen->physicalSize().height() / screen->geometry().height();return height() * screen->physicalSize().height() / screen->geometry().height(); never executed: return height() * screen->physicalSize().height() / screen->geometry().height(); | 0 | ||||||||||||
49 | break; never executed: break; | 0 | ||||||||||||
50 | case never executed: PdmDpiX:case PdmDpiX: never executed: case PdmDpiX: | 0 | ||||||||||||
51 | if (screen
| 0 | ||||||||||||
52 | return never executed: qRound(screen->logicalDotsPerInchX());return qRound(screen->logicalDotsPerInchX()); never executed: return qRound(screen->logicalDotsPerInchX()); | 0 | ||||||||||||
53 | break; never executed: break; | 0 | ||||||||||||
54 | case never executed: PdmDpiY:case PdmDpiY: never executed: case PdmDpiY: | 0 | ||||||||||||
55 | if (screen
| 0 | ||||||||||||
56 | return never executed: qRound(screen->logicalDotsPerInchY());return qRound(screen->logicalDotsPerInchY()); never executed: return qRound(screen->logicalDotsPerInchY()); | 0 | ||||||||||||
57 | break; never executed: break; | 0 | ||||||||||||
58 | case never executed: PdmPhysicalDpiX:case PdmPhysicalDpiX: never executed: case PdmPhysicalDpiX: | 0 | ||||||||||||
59 | if (screen
| 0 | ||||||||||||
60 | return never executed: qRound(screen->physicalDotsPerInchX());return qRound(screen->physicalDotsPerInchX()); never executed: return qRound(screen->physicalDotsPerInchX()); | 0 | ||||||||||||
61 | break; never executed: break; | 0 | ||||||||||||
62 | case never executed: PdmPhysicalDpiY:case PdmPhysicalDpiY: never executed: case PdmPhysicalDpiY: | 0 | ||||||||||||
63 | if (screen
| 0 | ||||||||||||
64 | return never executed: qRound(screen->physicalDotsPerInchY());return qRound(screen->physicalDotsPerInchY()); never executed: return qRound(screen->physicalDotsPerInchY()); | 0 | ||||||||||||
65 | break; never executed: break; | 0 | ||||||||||||
66 | case never executed: PdmDevicePixelRatio:case PdmDevicePixelRatio: never executed: case PdmDevicePixelRatio: | 0 | ||||||||||||
67 | return never executed: int(QWindow::devicePixelRatio());return int(QWindow::devicePixelRatio()); never executed: return int(QWindow::devicePixelRatio()); | 0 | ||||||||||||
68 | break; dead code: break; | - | ||||||||||||
69 | case never executed: PdmDevicePixelRatioScaled:case PdmDevicePixelRatioScaled: never executed: case PdmDevicePixelRatioScaled: | 0 | ||||||||||||
70 | return never executed: int(QWindow::devicePixelRatio() * devicePixelRatioFScale());return int(QWindow::devicePixelRatio() * devicePixelRatioFScale()); never executed: return int(QWindow::devicePixelRatio() * devicePixelRatioFScale()); | 0 | ||||||||||||
71 | break; dead code: break; | - | ||||||||||||
72 | default never executed: :default: never executed: default: | 0 | ||||||||||||
73 | break; never executed: break; | 0 | ||||||||||||
74 | } | - | ||||||||||||
75 | - | |||||||||||||
76 | return never executed: QPaintDevice::metric(metric);return QPaintDevice::metric(metric); never executed: return QPaintDevice::metric(metric); | 0 | ||||||||||||
77 | } | - | ||||||||||||
78 | - | |||||||||||||
79 | - | |||||||||||||
80 | - | |||||||||||||
81 | - | |||||||||||||
82 | void QPaintDeviceWindow::exposeEvent(QExposeEvent *exposeEvent) | - | ||||||||||||
83 | { | - | ||||||||||||
84 | (void)exposeEvent;; | - | ||||||||||||
85 | QPaintDeviceWindowPrivate * const d = d_func(); | - | ||||||||||||
86 | if (isExposed()
| 0 | ||||||||||||
87 | d->markWindowAsDirty(); | - | ||||||||||||
88 | - | |||||||||||||
89 | - | |||||||||||||
90 | - | |||||||||||||
91 | - | |||||||||||||
92 | d->doFlush(QRect(QPoint(0, 0), size())); | - | ||||||||||||
93 | } never executed: else if (!d->dirtyRegion.isEmpty()end of block
| 0 | ||||||||||||
94 | - | |||||||||||||
95 | requestUpdate(); | - | ||||||||||||
96 | } never executed: end of block | 0 | ||||||||||||
97 | } never executed: end of block | 0 | ||||||||||||
98 | - | |||||||||||||
99 | - | |||||||||||||
100 | - | |||||||||||||
101 | - | |||||||||||||
102 | bool QPaintDeviceWindow::event(QEvent *event) | - | ||||||||||||
103 | { | - | ||||||||||||
104 | QPaintDeviceWindowPrivate * const d = d_func(); | - | ||||||||||||
105 | - | |||||||||||||
106 | if (event->type() == QEvent::UpdateRequest
| 0 | ||||||||||||
107 | if (handle()
| 0 | ||||||||||||
108 | d->handleUpdateEvent(); never executed: d->handleUpdateEvent(); | 0 | ||||||||||||
109 | return never executed: true;return true; never executed: return true; | 0 | ||||||||||||
110 | } | - | ||||||||||||
111 | - | |||||||||||||
112 | return never executed: QWindow::event(event);return QWindow::event(event); never executed: return QWindow::event(event); | 0 | ||||||||||||
113 | } | - | ||||||||||||
114 | - | |||||||||||||
115 | - | |||||||||||||
116 | - | |||||||||||||
117 | - | |||||||||||||
118 | QPaintDeviceWindow::QPaintDeviceWindow(QPaintDeviceWindowPrivate &dd, QWindow *parent) | - | ||||||||||||
119 | : QWindow(dd, parent) | - | ||||||||||||
120 | { | - | ||||||||||||
121 | } never executed: end of block | 0 | ||||||||||||
122 | - | |||||||||||||
123 | - | |||||||||||||
124 | - | |||||||||||||
125 | - | |||||||||||||
126 | QPaintEngine *QPaintDeviceWindow::paintEngine() const | - | ||||||||||||
127 | { | - | ||||||||||||
128 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||
129 | } | - | ||||||||||||
130 | - | |||||||||||||
131 | - | |||||||||||||
Switch to Source code | Preprocessed file |