qpaintdevicewindow.cpp

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

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