Qt 4.8
qscreenmulti_qws.cpp
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
4 ** Contact: http://www.qt-project.org/legal
5 **
6 ** This file is part of the QtGui module of the Qt Toolkit.
7 **
8 ** $QT_BEGIN_LICENSE:LGPL$
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 Digia. For licensing terms and
14 ** conditions see http://qt.digia.com/licensing. For further information
15 ** use the contact form at http://qt.digia.com/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 as published by the Free Software
20 ** Foundation and appearing in the file LICENSE.LGPL included in the
21 ** packaging of this file. Please review the following information to
22 ** ensure the GNU Lesser General Public License version 2.1 requirements
23 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
24 **
25 ** In addition, as a special exception, Digia gives you certain additional
26 ** rights. These rights are described in the Digia Qt LGPL Exception
27 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
28 **
29 ** GNU General Public License Usage
30 ** Alternatively, this file may be used under the terms of the GNU
31 ** General Public License version 3.0 as published by the Free Software
32 ** Foundation and appearing in the file LICENSE.GPL included in the
33 ** packaging of this file. Please review the following information to
34 ** ensure the GNU General Public License version 3.0 requirements will be
35 ** met: http://www.gnu.org/copyleft/gpl.html.
36 **
37 **
38 ** $QT_END_LICENSE$
39 **
40 ****************************************************************************/
41 
42 #include "qscreenmulti_qws_p.h"
43 
44 #ifndef QT_NO_QWS_MULTISCREEN
45 
46 #include <qlist.h>
47 #include <qstringlist.h>
48 #include <qwidget.h>
49 #include <qdebug.h>
50 
52 
53 #ifndef QT_NO_QWS_CURSOR
54 
56 {
57 public:
60 
61  void set(const QImage &image, int hotx, int hoty);
62  void move(int x, int y);
63  void show();
64  void hide();
65 
67 
68 private:
69  void setCurrentCursor(QScreenCursor *newCursor);
70 
73 };
74 
75 void QMultiScreenCursor::set(const QImage &image, int hotx, int hoty)
76 {
77  QScreenCursor::set(image, hotx, hoty);
78  if (currentCursor)
79  currentCursor->set(image, hotx, hoty);
80 }
81 
83 {
84  *((QScreenCursor*)this) = *newCursor;
85  currentCursor = newCursor;
86 }
87 
88 // XXX: this is a mess!
89 void QMultiScreenCursor::move(int x, int y)
90 {
91  const int oldIndex = qt_screen->subScreenIndexAt(pos);
92  QScreenCursor::move(x, y); // updates pos
93  const int newIndex = qt_screen->subScreenIndexAt(pos);
94 
95  if (!currentCursor && oldIndex != -1)
96  setCurrentCursor(cursors.at(oldIndex));
97  QScreenCursor *oldCursor = currentCursor;
98 
99  if (oldIndex != -1) {
100  const QScreen *oldScreen = qt_screen->subScreens().at(oldIndex);
101  if (newIndex == -1 || oldScreen->region().contains(pos)) {
102  oldCursor->move(x, y);
103  return;
104  }
105  }
106 
107  if (newIndex != -1) {
108  QScreenCursor *newCursor = cursors.at(newIndex);
109  newCursor->set(cursor, hotspot.x(), hotspot.y());
110 
111  if (oldCursor) {
112  if (oldCursor->isVisible())
113  newCursor->show();
114  oldCursor->hide();
115  }
116 
117  newCursor->move(x, y);
118 
119  setCurrentCursor(newCursor);
120  }
121 }
122 
124 {
125  if (currentCursor)
126  currentCursor->show();
127 }
128 
130 {
131  if (currentCursor)
132  currentCursor->hide();
133 }
134 
136 {
137  cursors.append(cursor);
138 }
139 
140 #endif
141 
143 {
144 public:
146 #ifndef QT_NO_QWS_CURSOR
147  : cursor(0)
148 #endif
149  {}
151  {
152 #ifndef QT_NO_QWS_CURSOR
153  delete cursor;
154 #endif
155  }
156 
159 #ifndef QT_NO_QWS_CURSOR
161 #endif
162 };
163 
165  : QScreen(displayId, MultiClass), d_ptr(new QMultiScreenPrivate)
166 {
167 }
168 
170 {
171  delete d_ptr;
172 }
173 
175 {
176  bool ok = true;
177 
178 #ifndef QT_NO_QWS_CURSOR
180 #endif
181 
182  const int n = d_ptr->screens.count();
183  for (int i = 0; i < n; ++i) {
184  QScreen *s = d_ptr->screens.at(i);
185  ok = s->initDevice() && ok;
186 #ifndef QT_NO_QWS_CURSOR
188 #endif
189  }
190 
191 #ifndef QT_NO_QWS_CURSOR
192  // XXX
194 #endif
195 
196  return ok;
197 }
198 
199 static int getDisplayId(const QString &spec)
200 {
201  QRegExp regexp(QLatin1String(":(\\d+)\\b"));
202  if (regexp.lastIndexIn(spec) != -1) {
203  const QString capture = regexp.cap(1);
204  return capture.toInt();
205  }
206  return 0;
207 }
208 
210 {
211  QRegExp regexp(QLatin1String(":offset=(\\d+),(\\d+)\\b"));
212  if (regexp.indexIn(spec) == -1)
213  return QPoint();
214 
215  const int x = regexp.cap(1).toInt();
216  const int y = regexp.cap(2).toInt();
217  spec.remove(regexp.pos(0), regexp.matchedLength());
218  return QPoint(x, y);
219 }
220 
221 bool QMultiScreen::connect(const QString &displaySpec)
222 {
223  QString dSpec = displaySpec;
224  if (dSpec.startsWith(QLatin1String("Multi:"), Qt::CaseInsensitive))
225  dSpec = dSpec.mid(QString::fromLatin1("Multi:").size());
226 
227  const QString displayIdSpec = QString::fromLatin1(" :%1").arg(displayId);
228  if (dSpec.endsWith(displayIdSpec))
229  dSpec = dSpec.left(dSpec.size() - displayIdSpec.size());
230 
232  foreach (QString spec, specs) {
233  const int id = getDisplayId(spec);
234  if (spec.startsWith("vnc:", Qt::CaseInsensitive)) {
235  spec.append(":noDisablePainting");
236  }
237  const QPoint offset = filterDisplayOffset(spec);
238  QScreen *s = qt_get_screen(id, spec.toLatin1().constData());
239  s->setOffset(offset);
240  addSubScreen(s);
241  }
242 
243  QScreen *firstScreen = d_ptr->screens.at(0);
244  Q_ASSERT(firstScreen);
245 
246  // XXX
247  QScreen::d = firstScreen->depth();
248 
249  QScreen::lstep = 0;
250  QScreen::data = 0;
251  QScreen::size = 0;
252 
255 
258 
259  // XXX - Extend the physical size based on the first screen
260  // to encompass all screens, so that code that uses the multi
261  // screen to calculate dpi values will get the right numbers.
262  QScreen::physWidth = firstScreen->physicalWidth() * w / firstScreen->width();
263  QScreen::physHeight = firstScreen->physicalHeight() * h / firstScreen->height();
264 
265  // XXXXX
266  qt_screen = this;
267 
268  return true;
269 }
270 
272 {
273  const int n = d_ptr->screens.size();
274  for (int i = 0; i < n; ++i)
275  d_ptr->screens.at(i)->disconnect();
276 }
277 
279 {
280  const int n = d_ptr->screens.size();
281  for (int i = 0; i < n; ++i)
283 }
284 
285 void QMultiScreen::setMode(int, int, int)
286 {
287  return;
288 }
289 
291 {
292  return false;
293 }
294 
296 {
297  const int n = d_ptr->screens.size();
298  for (int i = 0; i < n; ++i)
299  d_ptr->screens.at(i)->save();
300 }
301 
303 {
304  const int n = d_ptr->screens.size();
305  for (int i = 0; i < n; ++i)
306  d_ptr->screens.at(i)->restore();
307 }
308 
309 void QMultiScreen::blank(bool on)
310 {
311  const int n = d_ptr->screens.size();
312  for (int i = 0; i < n; ++i)
313  d_ptr->screens.at(i)->blank(on);
314 }
315 
316 bool QMultiScreen::onCard(const unsigned char *ptr) const
317 {
318  const int n = d_ptr->screens.size();
319  for (int i = 0; i < n; ++i)
320  if (d_ptr->screens.at(i)->onCard(ptr))
321  return true;
322  return false;
323 }
324 
325 bool QMultiScreen::onCard(const unsigned char *ptr, ulong &offset) const
326 {
327  const int n = d_ptr->screens.size();
328  for (int i = 0; i < n; ++i)
329  if (d_ptr->screens.at(i)->onCard(ptr, offset))
330  return true;
331  return false;
332 }
333 
335 {
336  const int n = d_ptr->screens.size();
337  for (int i = 0; i < n; ++i)
338  if (d_ptr->screens.at(i)->isInterlaced())
339  return true;
340 
341  return false;
342 }
343 
345 {
346  int total = 0;
347  const int n = d_ptr->screens.size();
348  for (int i = 0; i < n; ++i)
349  total += d_ptr->screens.at(i)->memoryNeeded(string);
350  return total;
351 }
352 
354 {
355  int total = 0;
356  const int n = d_ptr->screens.size();
357  for (int i = 0; i < n; ++i)
358  total += d_ptr->screens.at(i)->sharedRamSize(arg);
359  return total;
360 }
361 
363 {
364  const int n = d_ptr->screens.size();
365  for (int i = 0; i < n; ++i)
366  d_ptr->screens.at(i)->haltUpdates();
367 }
368 
370 {
371  const int n = d_ptr->screens.size();
372  for (int i = 0; i < n; ++i)
373  d_ptr->screens.at(i)->resumeUpdates();
374 }
375 
377 {
378  const int n = d_ptr->screens.size();
379  for (int i = 0; i < n; ++i) {
380  QScreen *screen = d_ptr->screens.at(i);
381  const QRegion r = region & screen->region();
382  if (r.isEmpty())
383  continue;
384  screen->exposeRegion(r, changing);
385  }
386 }
387 
388 void QMultiScreen::solidFill(const QColor &color, const QRegion &region)
389 {
390  const int n = d_ptr->screens.size();
391  for (int i = 0; i < n; ++i) {
392  QScreen *screen = d_ptr->screens.at(i);
393  const QRegion r = region & screen->region();
394  if (r.isEmpty())
395  continue;
396  screen->solidFill(color, r);
397  }
398 }
399 
400 void QMultiScreen::blit(const QImage &img, const QPoint &topLeft,
401  const QRegion &region)
402 {
403  const int n = d_ptr->screens.size();
404  for (int i = 0; i < n; ++i) {
405  QScreen *screen = d_ptr->screens.at(i);
406  const QRegion r = region & screen->region();
407  if (r.isEmpty())
408  continue;
409  screen->blit(img, topLeft, r);
410  }
411 }
412 
413 void QMultiScreen::blit(QWSWindow *bs, const QRegion &clip)
414 {
415  const int n = d_ptr->screens.size();
416  for (int i = 0; i < n; ++i) {
417  QScreen *screen = d_ptr->screens.at(i);
418  const QRegion r = clip & screen->region();
419  if (r.isEmpty())
420  continue;
421  screen->blit(bs, r);
422  }
423 }
424 
425 void QMultiScreen::setDirty(const QRect &rect)
426 {
427  const int n = d_ptr->screens.size();
428  for (int i = 0; i < n; ++i) {
429  QScreen *screen = d_ptr->screens.at(i);
430  const QRegion r = screen->region() & rect;
431  if (r.isEmpty())
432  continue;
433  screen->setDirty(r.boundingRect());
434  }
435 }
436 
437 
439 {
440  QWSWindowSurface* surf = 0;
441  const int n = d_ptr->screens.size();
442  for (int i = 0; i < n; ++i) {
443  QScreen *screen = d_ptr->screens.at(i);
444  surf = screen->createSurface(key);
445  if (surf)
446  break;
447  }
448  return surf;
449 }
450 
451 
453 {
454  const QPoint midpoint = (widget->frameGeometry().topLeft()
455  + widget->frameGeometry().bottomRight()) / 2;
456  int index = subScreenIndexAt(midpoint);
457  if (index == -1)
458  index = 0; // XXX
459  return d_ptr->screens.at(index)->createSurface(widget);
460 }
461 
463 {
464  return d_ptr->screens;
465 }
466 
468 {
469  return d_ptr->region;
470 }
471 
473 {
474  d_ptr->screens.append(screen);
475  d_ptr->region += screen->region();
476 }
477 
479 {
480  d_ptr->screens.removeAll(screen);
481  d_ptr->region -= screen->region();
482 }
483 
485 
486 #endif // QT_NO_QWS_MULTISCREEN
Q_GUI_EXPORT QScreen * qt_screen
Definition: qscreen_qws.cpp:69
The QColor class provides colors based on RGB, HSV or CMYK values.
Definition: qcolor.h:67
The QScreenCursor class is a base class for screen cursors in Qt for Embedded Linux.
Definition: qscreen_qws.h:135
QScreenCursor * currentCursor
bool initDevice()
This function is called by the Qt for Embedded Linux server to initialize the framebuffer.
bool onCard(const unsigned char *) const
Returns true if the specified buffer is within the graphics card&#39;s memory; otherwise returns false (i...
The QWSWindowSurface class provides the drawing area for top-level windows in Qt for Embedded Linux...
virtual void move(int x, int y)
Moves the mouse cursor to the given position, i.e., (x, y).
int height() const
Returns the logical height of the framebuffer in pixels.
Definition: qscreen_qws.h:228
void move(int x, int y)
Moves the mouse cursor to the given position, i.e., (x, y).
void exposeRegion(QRegion r, int changing)
This function is called by the Qt for Embedded Linux server whenever a screen update is required...
void setOffset(const QPoint &p)
QString cap(int nth=0) const
Returns the text captured by the nth subexpression.
Definition: qregexp.cpp:4310
#define QT_END_NAMESPACE
This macro expands to.
Definition: qglobal.h:90
int lastIndexIn(const QString &str, int offset=-1, CaretMode caretMode=CaretAtZero) const
Attempts to find a match backwards in str from position offset.
Definition: qregexp.cpp:4167
QPointer< QWidget > widget
virtual int sharedRamSize(void *)
Definition: qscreen_qws.h:215
int physicalHeight() const
Returns the physical height of the screen in millimeters.
Definition: qscreen_qws.h:291
int d
the pixel depth
Definition: qscreen_qws.h:327
The QRegExp class provides pattern matching using regular expressions.
Definition: qregexp.h:61
int toInt(bool *ok=0, int base=10) const
Returns the string converted to an int using base base, which is 10 by default and must be between 2 ...
Definition: qstring.cpp:6090
bool connect(const QString &displaySpec)
This function is called by every Qt for Embedded Linux application on startup, and must be implemente...
void setCurrentCursor(QScreenCursor *newCursor)
QMultiScreen(int displayId)
The QWidget class is the base class of all user interface objects.
Definition: qwidget.h:150
virtual void restore()
Restores the previously saved state of the graphics card.
QRect frameGeometry
geometry of the widget relative to its parent including any window frame
Definition: qwidget.h:159
int pos(int nth=0) const
Returns the position of the nth captured text in the searched string.
Definition: qregexp.cpp:4337
int matchedLength() const
Returns the length of the last matched string, or -1 if there was no match.
Definition: qregexp.cpp:4193
int width() const
Returns the width of the rectangle.
Definition: qrect.h:303
bool startsWith(const QString &s, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Returns true if the string starts with s; otherwise returns false.
Definition: qstring.cpp:3734
QPoint hotspot
Definition: qscreen_qws.h:163
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
Q_GUI_EXPORT QScreen * qt_get_screen(int display_id, const char *spec)
int count(const T &t) const
Returns the number of occurrences of value in the list.
Definition: qlist.h:891
QRect boundingRect() const
Returns the bounding rectangle of this region.
Definition: qregion.cpp:4363
int physHeight
the physical height of the screen in millimeters.
Definition: qscreen_qws.h:340
int height() const
Returns the height of the rectangle.
Definition: qrect.h:306
The QString class provides a Unicode character string.
Definition: qstring.h:83
QRegion region() const
Returns the region covered by this screen driver.
int size
the number of bytes in the visible region of the frame buffer
Definition: qscreen_qws.h:334
#define Q_ASSERT(cond)
Definition: qglobal.h:1823
virtual void setDirty(const QRect &)
Marks the given rectangle as dirty.
void removeSubScreen(QScreen *screen)
void hide()
Hides the cursor from the screen.
void addCursor(QScreenCursor *cursor)
QList< QScreenCursor * > cursors
int physWidth
the physical width of the screen in millimeters.
Definition: qscreen_qws.h:339
QImage image() const
Returns the cursor&#39;s image.
Definition: qscreen_qws.h:151
virtual void blit(const QImage &img, const QPoint &topLeft, const QRegion &region)
Copies the given region in the given image to the point specified by topLeft using device coordinates...
void shutdownDevice()
This function is called by the Qt for Embedded Linux server before it calls the disconnect() function...
bool supportsDepth(int) const
Returns true if the screen supports the specified color depth; otherwise returns false.
The QWSWindow class encapsulates a top-level window in Qt for Embedded Linux.
void addSubScreen(QScreen *screen)
virtual void disconnect()=0
This function is called by every Qt for Embedded Linux application before exiting, and must be implemented to unmap the framebuffer.
virtual QRegion region() const
Returns the region covered by this screen driver.
Definition: qscreen_qws.h:284
int width() const
Returns the logical width of the framebuffer in pixels.
Definition: qscreen_qws.h:227
uchar * data
points to the first visible pixel in the frame buffer.
Definition: qscreen_qws.h:311
void append(const T &t)
Inserts value at the end of the list.
Definition: qlist.h:507
void setMode(int, int, int)
Implement this function to reset the framebuffer&#39;s resolution (width and height) and bit depth...
#define QT_BEGIN_NAMESPACE
This macro expands to.
Definition: qglobal.h:89
virtual void resumeUpdates()
void blank(bool on)
Prevents the screen driver form displaying any content on the screen.
QPoint bottomRight() const
Returns the position of the rectangle&#39;s bottom-right corner.
Definition: qrect.h:291
int indexIn(const QString &str, int offset=0, CaretMode caretMode=CaretAtZero) const
Attempts to find a match in str from position offset (0 by default).
Definition: qregexp.cpp:4136
QString left(int n) const Q_REQUIRED_RESULT
Returns a substring that contains the n leftmost characters of the string.
Definition: qstring.cpp:3664
int size() const
Returns the number of characters in this string.
Definition: qstring.h:102
static int getDisplayId(const QString &spec)
bool isEmpty() const
Returns true if the region is empty; otherwise returns false.
Definition: qregion.cpp:4098
virtual bool initDevice()=0
This function is called by the Qt for Embedded Linux server to initialize the framebuffer.
QList< QScreen * > screens
const T & at(int i) const
Returns the item at index position i in the list.
Definition: qlist.h:468
The QStringList class provides a list of strings.
Definition: qstringlist.h:66
int w
the logical width of the screen.
Definition: qscreen_qws.h:324
The QImage class provides a hardware-independent image representation that allows direct access to th...
Definition: qimage.h:87
bool contains(const QPoint &p) const
Returns true if the region contains the point p; otherwise returns false.
Definition: qregion.cpp:4104
void show()
Shows the mouse cursor.
The QLatin1String class provides a thin wrapper around an US-ASCII/Latin-1 encoded string literal...
Definition: qstring.h:654
The QRegion class specifies a clip region for a painter.
Definition: qregion.h:68
const T * ptr(const T &t)
QByteArray toLatin1() const Q_REQUIRED_RESULT
Returns a Latin-1 representation of the string as a QByteArray.
Definition: qstring.cpp:3993
int displayId
Definition: qscreen_qws.h:337
unsigned long ulong
Definition: qglobal.h:997
void set(const QImage &image, int hotx, int hoty)
Sets the cursor&#39;s image to be the given image.
int memoryNeeded(const QString &)
void blit(const QImage &img, const QPoint &topLeft, const QRegion &region)
Copies the given region in the given image to the point specified by topLeft using device coordinates...
void solidFill(const QColor &color, const QRegion &region)
Fills the given region of the screen with the specified color.
virtual void hide()
Hides the cursor from the screen.
QList< QScreen * > subScreens() const
virtual QWSWindowSurface * createSurface(QWidget *widget) const
Creates and returns a new window surface for the given widget.
void save()
Saves the current state of the graphics card.
int sharedRamSize(void *)
const char * constData() const
Returns a pointer to the data stored in the byte array.
Definition: qbytearray.h:433
QString mid(int position, int n=-1) const Q_REQUIRED_RESULT
Returns a string that contains n characters of this string, starting at the specified position index...
Definition: qstring.cpp:3706
int subScreenIndexAt(const QPoint &p) const
Returns the index of the subscreen at the given position; returns -1 if no screen is found...
int dw
the device width
Definition: qscreen_qws.h:331
int dh
the device height
Definition: qscreen_qws.h:332
QString arg(qlonglong a, int fieldwidth=0, int base=10, const QChar &fillChar=QLatin1Char(' ')) const Q_REQUIRED_RESULT
Definition: qstring.cpp:7186
virtual void blank(bool on)
Prevents the screen driver form displaying any content on the screen.
virtual void save()
Saves the current state of the graphics card.
QString & append(QChar c)
Definition: qstring.cpp:1777
virtual int memoryNeeded(const QString &)
virtual void haltUpdates()
virtual bool isInterlaced() const
Returns true if the display is interlaced (i.
static QString fromLatin1(const char *, int size=-1)
Returns a QString initialized with the first size characters of the Latin-1 string str...
Definition: qstring.cpp:4188
virtual QList< QScreen * > subScreens() const
Definition: qscreen_qws.h:283
void disconnect()
This function is called by every Qt for Embedded Linux application before exiting, and must be implemented to unmap the framebuffer.
int key
The QPoint class defines a point in the plane using integer precision.
Definition: qpoint.h:53
int size() const
Returns the number of items in the list.
Definition: qlist.h:137
QMultiScreenCursor * cursor
void restore()
Restores the previously saved state of the graphics card.
QMultiScreenPrivate * d_ptr
The QRect class defines a rectangle in the plane using integer precision.
Definition: qrect.h:58
The QScreen class is a base class for screen drivers in Qt for Embedded Linux.
Definition: qscreen_qws.h:191
virtual void shutdownDevice()
This function is called by the Qt for Embedded Linux server before it calls the disconnect() function...
int y() const
Returns the y coordinate of this point.
Definition: qpoint.h:131
quint16 index
virtual bool onCard(const unsigned char *) const
Returns true if the specified buffer is within the graphics card&#39;s memory; otherwise returns false (i...
int lstep
the number of bytes representing a line in the frame buffer.
Definition: qscreen_qws.h:325
QStringList split(const QString &sep, SplitBehavior behavior=KeepEmptyParts, Qt::CaseSensitivity cs=Qt::CaseSensitive) const Q_REQUIRED_RESULT
Splits the string into substrings wherever sep occurs, and returns the list of those strings...
Definition: qstring.cpp:6526
int x() const
Returns the x coordinate of this point.
Definition: qpoint.h:128
int h
the logical height of the screen.
Definition: qscreen_qws.h:326
Q_GUI_EXPORT QScreenCursor * qt_screencursor
Definition: qscreen_qws.cpp:67
static QPoint filterDisplayOffset(QString &spec)
QString & remove(int i, int len)
Removes n characters from the string, starting at the given position index, and returns a reference t...
Definition: qstring.cpp:1867
virtual void exposeRegion(QRegion r, int changing)
This function is called by the Qt for Embedded Linux server whenever a screen update is required...
bool endsWith(const QString &s, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Returns true if the string ends with s; otherwise returns false.
Definition: qstring.cpp:3796
void setDirty(const QRect &)
Marks the given rectangle as dirty.
virtual void show()
Shows the mouse cursor.
QWSWindowSurface * createSurface(QWidget *widget) const
Creates and returns a new window surface for the given widget.
int physicalWidth() const
Returns the physical width of the screen in millimeters.
Definition: qscreen_qws.h:290
The QLatin1Char class provides an 8-bit ASCII/Latin-1 character.
Definition: qchar.h:55
virtual void solidFill(const QColor &color, const QRegion &region)
Fills the given region of the screen with the specified color.
virtual void set(const QImage &image, int hotx, int hoty)
Sets the cursor&#39;s image to be the given image.
QPoint offset() const
Returns the logical offset of the screen, i.
int depth() const
Returns the depth of the framebuffer, in bits per pixel.
Definition: qscreen_qws.h:229
bool isInterlaced() const
Returns true if the display is interlaced (i.
The QList class is a template class that provides lists.
Definition: qdatastream.h:62
QPoint topLeft() const
Returns the position of the rectangle&#39;s top-left corner.
Definition: qrect.h:288
int removeAll(const T &t)
Removes all occurrences of value in the list and returns the number of entries removed.
Definition: qlist.h:770