qfbwindow.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/platformsupport/fbconvenience/qfbwindow.cpp
Source codeSwitch to Preprocessed file
LineSourceCount
1/****************************************************************************-
2**-
3** Copyright (C) 2015 The Qt Company Ltd.-
4** Contact: http://www.qt.io/licensing/-
5**-
6** This file is part of the plugins of the Qt Toolkit.-
7**-
8** $QT_BEGIN_LICENSE:LGPL21$-
9** Commercial License Usage-
10** Licensees holding valid commercial Qt licenses may use this file in-
11** accordance with the commercial license agreement provided with the-
12** Software or, alternatively, in accordance with the terms contained in-
13** a written agreement between you and The Qt Company. For licensing terms-
14** and conditions see http://www.qt.io/terms-conditions. For further-
15** information use the contact form at http://www.qt.io/contact-us.-
16**-
17** GNU Lesser General Public License Usage-
18** Alternatively, this file may be used under the terms of the GNU Lesser-
19** General Public License version 2.1 or version 3 as published by the Free-
20** Software Foundation and appearing in the file LICENSE.LGPLv21 and-
21** LICENSE.LGPLv3 included in the packaging of this file. Please review the-
22** following information to ensure the GNU Lesser General Public License-
23** requirements will be met: https://www.gnu.org/licenses/lgpl.html and-
24** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.-
25**-
26** As a special exception, The Qt Company gives you certain additional-
27** rights. These rights are described in The Qt Company LGPL Exception-
28** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.-
29**-
30** $QT_END_LICENSE$-
31**-
32****************************************************************************/-
33-
34#include "qfbwindow_p.h"-
35#include "qfbscreen_p.h"-
36-
37#include <QtGui/QScreen>-
38#include <qpa/qwindowsysteminterface.h>-
39-
40QT_BEGIN_NAMESPACE-
41-
42QFbWindow::QFbWindow(QWindow *window)-
43 : QPlatformWindow(window), mBackingStore(0), mWindowState(Qt::WindowNoState)-
44{-
45 static QAtomicInt winIdGenerator(1);-
46 mWindowId = winIdGenerator.fetchAndAddRelaxed(1);-
47}
never executed: end of block
0
48-
49QFbWindow::~QFbWindow()-
50{-
51}-
52-
53QFbScreen *QFbWindow::platformScreen() const-
54{-
55 return static_cast<QFbScreen *>(window()->screen()->handle());
never executed: return static_cast<QFbScreen *>(window()->screen()->handle());
0
56}-
57-
58void QFbWindow::setGeometry(const QRect &rect)-
59{-
60 // store previous geometry for screen update-
61 mOldGeometry = geometry();-
62-
63 platformScreen()->invalidateRectCache();-
64 QWindowSystemInterface::handleGeometryChange(window(), rect);-
65-
66 QPlatformWindow::setGeometry(rect);-
67}
never executed: end of block
0
68-
69void QFbWindow::setVisible(bool visible)-
70{-
71 if (visible) {
visibleDescription
TRUEnever evaluated
FALSEnever evaluated
0
72 if (mWindowState & Qt::WindowFullScreen)
mWindowState &...ndowFullScreenDescription
TRUEnever evaluated
FALSEnever evaluated
0
73 setGeometry(platformScreen()->geometry());
never executed: setGeometry(platformScreen()->geometry());
0
74 else if (mWindowState & Qt::WindowMaximized)
mWindowState &...indowMaximizedDescription
TRUEnever evaluated
FALSEnever evaluated
0
75 setGeometry(platformScreen()->availableGeometry());
never executed: setGeometry(platformScreen()->availableGeometry());
0
76 }
never executed: end of block
0
77 QPlatformWindow::setVisible(visible);-
78-
79 if (visible)
visibleDescription
TRUEnever evaluated
FALSEnever evaluated
0
80 platformScreen()->addWindow(this);
never executed: platformScreen()->addWindow(this);
0
81 else-
82 platformScreen()->removeWindow(this);
never executed: platformScreen()->removeWindow(this);
0
83}-
84-
85-
86void QFbWindow::setWindowState(Qt::WindowState state)-
87{-
88 QPlatformWindow::setWindowState(state);-
89 mWindowState = state;-
90 platformScreen()->invalidateRectCache();-
91}
never executed: end of block
0
92-
93-
94void QFbWindow::setWindowFlags(Qt::WindowFlags flags)-
95{-
96 mWindowFlags = flags;-
97 platformScreen()->invalidateRectCache();-
98}
never executed: end of block
0
99-
100Qt::WindowFlags QFbWindow::windowFlags() const-
101{-
102 return mWindowFlags;
never executed: return mWindowFlags;
0
103}-
104-
105void QFbWindow::raise()-
106{-
107 platformScreen()->raise(this);-
108}
never executed: end of block
0
109-
110void QFbWindow::lower()-
111{-
112 platformScreen()->lower(this);-
113}
never executed: end of block
0
114-
115void QFbWindow::repaint(const QRegion &region)-
116{-
117 QRect currentGeometry = geometry();-
118-
119 QRect dirtyClient = region.boundingRect();-
120 QRect dirtyRegion(currentGeometry.left() + dirtyClient.left(),-
121 currentGeometry.top() + dirtyClient.top(),-
122 dirtyClient.width(),-
123 dirtyClient.height());-
124 QRect mOldGeometryLocal = mOldGeometry;-
125 mOldGeometry = currentGeometry;-
126 // If this is a move, redraw the previous location-
127 if (mOldGeometryLocal != currentGeometry)
mOldGeometryLo...urrentGeometryDescription
TRUEnever evaluated
FALSEnever evaluated
0
128 platformScreen()->setDirty(mOldGeometryLocal);
never executed: platformScreen()->setDirty(mOldGeometryLocal);
0
129 platformScreen()->setDirty(dirtyRegion);-
130}
never executed: end of block
0
131-
132QT_END_NAMESPACE-
133-
Source codeSwitch to Preprocessed file

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