Qt 4.8
Public Functions | Properties | List of all members
QQnxScreen Class Reference

The QQnxScreen class implements a screen driver for QNX io-display based devices. More...

#include <qscreenqnx_qws.h>

Inheritance diagram for QQnxScreen:
QScreen

Public Functions

void blank (bool on)
 Reimplemented Function More...
 
bool connect (const QString &displaySpec)
 Connects to QNX's io-display based device based on the displaySpec parameters from the QWS_DISPLAY environment variable. More...
 
void disconnect ()
 Reimplemented Function More...
 
void exposeRegion (QRegion r, int changing)
 Reimplemented Function More...
 
bool initDevice ()
 Reimplemented Function More...
 
 QQnxScreen (int display_id)
 Constructs a QQnxScreen object. More...
 
void setDirty (const QRect &)
 Marks the given rectangle as dirty. More...
 
void setMode (int, int, int)
 QQnxScreen doesn't support setting the mode, use io-display instead. More...
 
void shutdownDevice ()
 Reimplemented Function More...
 
bool supportsDepth (int) const
 Reimplemented Function More...
 
 ~QQnxScreen ()
 Destroys this QQnxScreen object. More...
 
- Public Functions inherited from QScreen
virtual int alloc (unsigned int, unsigned int, unsigned int)
 Returns the index in the screen's palette which is the closest match to the given RGB value (red, green, blue). More...
 
ucharbase () const
 Returns a pointer to the beginning of the framebuffer. More...
 
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. More...
 
void blit (QWSWindow *bs, const QRegion &clip)
 
virtual ucharcache (int)
 
ClassId classId () const
 Returns the class identifier for the screen object. More...
 
QRgbclut ()
 Returns a pointer to the screen's color lookup table (i. More...
 
int colorCount ()
 Returns the number of entries in the screen's color lookup table (i. More...
 
virtual QWSWindowSurfacecreateSurface (QWidget *widget) const
 Creates and returns a new window surface for the given widget. More...
 
virtual QWSWindowSurfacecreateSurface (const QString &key) const
 Creates and returns a new window surface matching the given key. More...
 
int depth () const
 Returns the depth of the framebuffer, in bits per pixel. More...
 
int deviceHeight () const
 Returns the full height of the framebuffer device in pixels. More...
 
int deviceWidth () const
 Returns the physical width of the framebuffer device in pixels. More...
 
QGraphicsSystemgraphicsSystem () const
 
virtual void haltUpdates ()
 
int height () const
 Returns the logical height of the framebuffer in pixels. More...
 
virtual bool isInterlaced () const
 Returns true if the display is interlaced (i. More...
 
virtual bool isTransformed () const
 Returns true if the screen is transformed (for instance, rotated 90 degrees); otherwise returns false. More...
 
int linestep () const
 Returns the length of each scanline of the framebuffer in bytes. More...
 
virtual QSize mapFromDevice (const QSize &) const
 Maps the given size from the framebuffer coordinate system to the coordinate space used by the application. More...
 
virtual QPoint mapFromDevice (const QPoint &, const QSize &) const
 Maps the given point from the framebuffer coordinate system to the coordinate space used by the application, passing the device's screenSize as argument. More...
 
virtual QRect mapFromDevice (const QRect &, const QSize &) const
 Maps the given rectangle from the framebuffer coordinate system to the coordinate space used by the application, passing the device's screenSize as argument. More...
 
virtual QImage mapFromDevice (const QImage &) const
 Maps the given image from the framebuffer coordinate system to the coordinate space used by the application. More...
 
virtual QRegion mapFromDevice (const QRegion &, const QSize &) const
 Maps the given region from the framebuffer coordinate system to the coordinate space used by the application, passing the device's screenSize as argument. More...
 
virtual QSize mapToDevice (const QSize &) const
 Maps the given size from the coordinate space used by the application to the framebuffer coordinate system. More...
 
virtual QPoint mapToDevice (const QPoint &, const QSize &) const
 Maps the given point from the coordinate space used by the application to the framebuffer coordinate system, passing the device's screenSize as argument. More...
 
virtual QRect mapToDevice (const QRect &, const QSize &) const
 Maps the given rectangle from the coordinate space used by the application to the framebuffer coordinate system, passing the device's screenSize as argument. More...
 
virtual QImage mapToDevice (const QImage &) const
 Maps the given image from the coordinate space used by the application to the framebuffer coordinate system. More...
 
virtual QRegion mapToDevice (const QRegion &, const QSize &) const
 Maps the given region from the coordinate space used by the application to the framebuffer coordinate system, passing the device's screenSize as argument. More...
 
virtual int memoryNeeded (const QString &)
 
QT_DEPRECATED int numCols ()
 
QPoint offset () const
 Returns the logical offset of the screen, i. More...
 
virtual bool onCard (const unsigned char *) const
 Returns true if the specified buffer is within the graphics card's memory; otherwise returns false (i.e. More...
 
virtual bool onCard (const unsigned char *, ulong &out_offset) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.If the specified buffer is within the graphics card's memory, this function stores the offset from the start of graphics card memory (in bytes), in the location specified by the offset parameter. More...
 
int physicalHeight () const
 Returns the physical height of the screen in millimeters. More...
 
int physicalWidth () const
 Returns the physical width of the screen in millimeters. More...
 
QImage::Format pixelFormat () const
 Returns the pixel format of the screen, or QImage::Format_Invalid if the pixel format is not a supported image format. More...
 
PixelType pixelType () const
 Returns the pixel storage format of the screen. More...
 
QPixmapDataFactorypixmapDataFactory () const
 
virtual int pixmapDepth () const
 Returns the preferred depth for pixmaps, in bits per pixel. More...
 
virtual int pixmapLinestepAlignment ()
 Returns the value (in bits) to which individual scanlines of pixmaps held in the graphics card's memory, should be aligned. More...
 
virtual int pixmapOffsetAlignment ()
 Returns the value (in bits) to which the start address of pixmaps held in the graphics card's memory, should be aligned. More...
 
 QScreen (int display_id, ClassId classId)
 Constructs a new screen driver. More...
 
 QScreen (int display_id)
 Constructs a new screen driver. More...
 
virtual QRegion region () const
 Returns the region covered by this screen driver. More...
 
virtual void restore ()
 Restores the previously saved state of the graphics card. More...
 
virtual void resumeUpdates ()
 
virtual void save ()
 Saves the current state of the graphics card. More...
 
int screenSize () const
 Returns the size of the screen in bytes. More...
 
virtual void set (unsigned int, unsigned int, unsigned int, unsigned int)
 
void setOffset (const QPoint &p)
 
virtual int sharedRamSize (void *)
 
virtual void solidFill (const QColor &color, const QRegion &region)
 Fills the given region of the screen with the specified color. More...
 
int subScreenIndexAt (const QPoint &p) const
 Returns the index of the subscreen at the given position; returns -1 if no screen is found. More...
 
virtual QList< QScreen * > subScreens () const
 
int totalSize () const
 Returns the size of the available graphics card memory (including the screen) in bytes. More...
 
virtual int transformOrientation () const
 Returns the current rotation as an integer value. More...
 
virtual void uncache (uchar *)
 
int width () const
 Returns the logical width of the framebuffer in pixels. More...
 
virtual ~QScreen ()
 Destroys this screen driver. More...
 

Properties

QQnxScreenContext *const d
 

Additional Inherited Members

- Public Types inherited from QScreen
enum  ClassId {
  LinuxFBClass, TransformedClass, VNCClass, MultiClass,
  VFbClass, DirectFBClass, SvgalibClass, ProxyClass,
  GLClass, IntfbClass, CustomClass = 1024
}
 This enum defines the class identifiers for the known screen subclasses. More...
 
enum  PixelType { NormalPixel, BGRPixel }
 This enum describes the pixel storage format of the screen, i. More...
 
- Static Public Functions inherited from QScreen
static QScreeninstance ()
 Returns a pointer to the application's QScreen instance. More...
 
- Protected Functions inherited from QScreen
void setGraphicsSystem (QGraphicsSystem *system)
 
void setPixelFormat (QImage::Format format)
 Sets the screen's pixel format to format. More...
 
void setPixmapDataFactory (QPixmapDataFactory *factory)
 
- Protected Variables inherited from QScreen
int d
 the pixel depth More...
 
uchardata
 points to the first visible pixel in the frame buffer. More...
 
int dh
 the device height More...
 
int displayId
 
int dw
 the device width More...
 
QPoolEntryentries
 
int * entryp
 
bool grayscale
 the gray scale screen mode flag More...
 
int h
 the logical height of the screen. More...
 
unsigned int * lowest
 
int lstep
 the number of bytes representing a line in the frame buffer. More...
 
int mapsize
 the total number of bytes in the frame buffer More...
 
int physHeight
 the physical height of the screen in millimeters. More...
 
int physWidth
 the physical width of the screen in millimeters. More...
 
PixelType pixeltype
 set to BGRPixel More...
 
QRgb screenclut [256]
 the color table More...
 
int screencols
 the number of entries in the color table More...
 
int size
 the number of bytes in the visible region of the frame buffer More...
 
int w
 the logical width of the screen. More...
 
- Static Protected Variables inherited from QScreen
static ClearCacheFunc clearCacheFunc = 0
 

Detailed Description

The QQnxScreen class implements a screen driver for QNX io-display based devices.

This function is under development and subject to change.

Since
4.6
Warning
This function is not part of the public interface.

Note - you never have to instanciate this class, the QScreenDriverFactory does that for us based on the QWS_DISPLAY environment variable.

To activate this driver, set QWS_DISPLAY to qnx.

Example: QWS_DISPLAY=qnx; export QWS_DISPLAY

By default, the main layer of the first display of the first device is used. If you have multiple graphic cards, multiple displays or multiple layers and don't want to connect to the default, you can override that with setting the corresponding options device, display or layer in the QWS_DISPLAY variable:

QWS_DISPLAY=qnx:device=3:display=4:layer=5

In addition, it is suggested to set the physical width and height of the display. QQnxScreen will use that information to compute the dots per inch (DPI) in order to render fonts correctly. If this informaiton is omitted, QQnxScreen defaults to 72 dpi.

QWS_DISPLAY=qnx:mmWidth=120:mmHeight=80

mmWidth and mmHeight are the physical width/height of the screen in millimeters.

See also
QScreen, QScreenDriverPlugin, {Running Qt for Embedded Linux Applications}{Running Applications}

Definition at line 57 of file qscreenqnx_qws.h.

Constructors and Destructors

◆ QQnxScreen()

QQnxScreen::QQnxScreen ( int  display_id)
explicit

Constructs a QQnxScreen object.

The display_id argument identifies the Qt for Embedded Linux server to connect to.

Definition at line 145 of file qscreenqnx_qws.cpp.

146  : QScreen(display_id), d(new QQnxScreenContext)
147 {
148 }
QScreen(int display_id, ClassId classId)
Constructs a new screen driver.
QQnxScreenContext *const d

◆ ~QQnxScreen()

QQnxScreen::~QQnxScreen ( )

Destroys this QQnxScreen object.

Definition at line 153 of file qscreenqnx_qws.cpp.

154 {
155  delete d;
156 }
QQnxScreenContext *const d

Functions

◆ blank()

void QQnxScreen::blank ( bool  on)
virtual

Reimplemented Function

Reimplemented from QScreen.

Definition at line 504 of file qscreenqnx_qws.cpp.

505 {
506  int ret = gf_display_set_dpms(d->display, on ? GF_DPMS_OFF : GF_DPMS_ON);
507  if (ret != GF_ERR_OK)
508  qWarning("QQnxScreen: gf_display_set_dpms() failed with error code %d", ret);
509 }
Q_CORE_EXPORT void qWarning(const char *,...)
gf_display_t display
QQnxScreenContext *const d

◆ connect()

bool QQnxScreen::connect ( const QString displaySpec)
virtual

Connects to QNX's io-display based device based on the displaySpec parameters from the QWS_DISPLAY environment variable.

Reimplemented Function See the QQnxScreen class documentation for possible parameters.

See also
QQnxScreen

Implements QScreen.

Definition at line 320 of file qscreenqnx_qws.cpp.

321 {
322  const QStringList params = displaySpec.split(QLatin1Char(':'), QString::SkipEmptyParts);
323 
324  // default to device 0
325  int deviceIndex = 0;
326  if (!params.isEmpty()) {
327  QRegExp deviceRegExp(QLatin1String("^device=(.+)$"));
328  if (params.indexOf(deviceRegExp) != -1)
329  deviceIndex = deviceRegExp.cap(1).toInt();
330  }
331 
332  if (!attachDevice(d, GF_DEVICE_INDEX(deviceIndex)))
333  return false;
334 
335  qDebug("QQnxScreen: Attached to Device, number of displays: %d", d->deviceInfo.ndisplays);
336 
337  // default to display id passed to constructor
338  int displayIndex = displayId;
339  if (!params.isEmpty()) {
340  QRegExp displayRegexp(QLatin1String("^display=(\\d+)$"));
341  if (params.indexOf(displayRegexp) != -1)
342  displayIndex = displayRegexp.cap(1).toInt();
343  }
344 
345  if (!attachDisplay(d, displayIndex))
346  return false;
347 
348  qDebug("QQnxScreen: Attached to Display %d, resolution %dx%d, refresh %d Hz",
349  displayIndex, d->displayInfo.xres, d->displayInfo.yres, d->displayInfo.refresh);
350 
351  // default to main_layer_index from the displayInfo struct
352  int layerIndex = d->displayInfo.main_layer_index;
353  if (!params.isEmpty()) {
354  QRegExp layerRegexp(QLatin1String("^layer=(\\d+)$"));
355  if (params.indexOf(layerRegexp) != -1)
356  layerIndex = layerRegexp.cap(1).toInt();
357  }
358 
359  if (!attachLayer(d, layerIndex))
360  return false;
361 
362  // determine the pixel format and the pixel type
363  switch (d->displayInfo.format) {
364 #if defined(QT_QWS_DEPTH_32) || defined(QT_QWS_DEPTH_GENERIC)
365  case GF_FORMAT_ARGB8888:
367  // fall through
368  case GF_FORMAT_BGRA8888:
370  break;
371 #endif
372 #if defined(QT_QWS_DEPTH_24)
373  case GF_FORMAT_BGR888:
376  break;
377 #endif
378 #if defined(QT_QWS_DEPTH_16) || defined(QT_QWS_DEPTH_GENERIC)
379  case GF_FORMAT_PACK_RGB565:
380  case GF_FORMAT_PKLE_RGB565:
381  case GF_FORMAT_PKBE_RGB565:
382 #if Q_BYTE_ORDER == Q_BIG_ENDIAN
383  setFrameBufferLittleEndian((d->displayInfo.format & GF_FORMAT_PKLE) == GF_FORMAT_PKLE);
384 #endif
386  break;
387 #endif
388  default:
389  return false;
390  }
391 
392  // tell QWSDisplay the width and height of the display
393  w = dw = d->displayInfo.xres;
394  h = dh = d->displayInfo.yres;
395  QScreen::d = (d->displayInfo.format & GF_FORMAT_BPP); // colour depth
396 
397  // assume 72 dpi as default, to calculate the physical dimensions if not specified
398  const int defaultDpi = 72;
399  // Handle display physical size
400  physWidth = qRound(dw * 25.4 / defaultDpi);
401  physHeight = qRound(dh * 25.4 / defaultDpi);
402  if (!params.isEmpty()) {
403  QRegExp mmWidthRegexp(QLatin1String("^mmWidth=(\\d+)$"));
404  if (params.indexOf(mmWidthRegexp) != -1)
405  physWidth = mmWidthRegexp.cap(1).toInt();
406 
407  QRegExp mmHeightRegexp(QLatin1String("^mmHeight=(\\d+)$"));
408  if (params.indexOf(mmHeightRegexp) != -1)
409  physHeight = mmHeightRegexp.cap(1).toInt();
410  }
411 
413  // create a hardware surface with our dimensions. In the old days, it was possible
414  // to get a pointer directly to the hw surface, so we could blit directly. Now, we
415  // have to use one indirection more, because it's not guaranteed that the hw surface
416  // is mappable into our process.
417  if (!createHwSurface(d, w, h))
418  return false;
419  }
420 
421  // create an in-memory linear surface that is used by QWS. QWS will blit directly in here.
422  if (!createMemSurface(d, w, h))
423  return false;
424 
425  // set the address of the in-memory buffer that QWS is blitting to
426  data = d->memSurfaceInfo.vaddr;
427  // set the line stepping
428  lstep = d->memSurfaceInfo.stride;
429 
430  // the overall size of the in-memory buffer is linestep * height
431  size = mapsize = lstep * h;
432 
433  // done, the driver should be connected to the display now.
434  return true;
435 }
int d
the pixel depth
Definition: qscreen_qws.h:327
The QRegExp class provides pattern matching using regular expressions.
Definition: qregexp.h:61
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
int physHeight
the physical height of the screen in millimeters.
Definition: qscreen_qws.h:340
int size
the number of bytes in the visible region of the frame buffer
Definition: qscreen_qws.h:334
static bool attachDevice(QQnxScreenContext *const d, const char *name)
Attaches to the named device name.
PixelType pixeltype
set to BGRPixel
Definition: qscreen_qws.h:328
int physWidth
the physical width of the screen in millimeters.
Definition: qscreen_qws.h:339
bool isEmpty() const
Returns true if the list contains no items; otherwise returns false.
Definition: qlist.h:152
void setPixelFormat(QImage::Format format)
Sets the screen&#39;s pixel format to format.
Q_CORE_EXPORT void qDebug(const char *,...)
uchar * data
points to the first visible pixel in the frame buffer.
Definition: qscreen_qws.h:311
int indexOf(const QRegExp &rx, int from=0) const
Returns the index position of the first exact match of rx in the list, searching forward from index p...
Definition: qstringlist.h:195
static bool createHwSurface(QQnxScreenContext *const d, int w, int h)
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
int displayId
Definition: qscreen_qws.h:337
int dw
the device width
Definition: qscreen_qws.h:331
int dh
the device height
Definition: qscreen_qws.h:332
void setFrameBufferLittleEndian(bool littleEndian)
gf_dev_info_t deviceInfo
static bool attachLayer(QQnxScreenContext *const d, int layerIndex)
Attaches to the layer layerIndex.
gf_surface_info_t memSurfaceInfo
static bool attachDisplay(QQnxScreenContext *const d, int displayIndex)
Attaches to the display at index displayIndex.
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
gf_display_info_t displayInfo
int h
the logical height of the screen.
Definition: qscreen_qws.h:326
int mapsize
the total number of bytes in the frame buffer
Definition: qscreen_qws.h:335
QQnxScreenContext *const d
static Type type()
Returns the type of application (Tty , GuiClient, or GuiServer).
The QLatin1Char class provides an 8-bit ASCII/Latin-1 character.
Definition: qchar.h:55
static bool createMemSurface(QQnxScreenContext *const d, int w, int h)
Q_DECL_CONSTEXPR int qRound(qreal d)
Definition: qglobal.h:1203

◆ disconnect()

void QQnxScreen::disconnect ( )
virtual

Reimplemented Function

Implements QScreen.

Definition at line 440 of file qscreenqnx_qws.cpp.

441 {
442  d->cleanup();
443 }
QQnxScreenContext *const d

◆ exposeRegion()

void QQnxScreen::exposeRegion ( QRegion  r,
int  changing 
)
virtual

Reimplemented Function

Reimplemented from QScreen.

Definition at line 514 of file qscreenqnx_qws.cpp.

515 {
516  // here is where the actual magic happens. QWS will call exposeRegion whenever
517  // a region on the screen is dirty and needs to be updated on the actual screen.
518 
519  // first, call the parent implementation. The parent implementation will update
520  // the region on our in-memory surface
521  QScreen::exposeRegion(r, changing);
522 
523 #ifndef QT_NO_QWS_TRANSFORMED
524  if (qt_screen->isTransformed())
525  return;
526 #endif
527  // now our in-memory surface should be up to date with the latest changes.
528 
529  if (!d->hwSurface)
530  return;
531 
532  // the code below copies the region from the in-memory surface to the hardware.
533 
534  // start drawing.
535  int ret = gf_draw_begin(d->context);
536  if (ret != GF_ERR_OK) {
537  qWarning("QQnxScreen: gf_draw_begin() failed with error code %d", ret);
538  return;
539  }
540  QVector<QRect> rects = r.rects();
541  Q_FOREACH (QRect rect, rects) {
542  if (!rect.isEmpty()) {
543  // blit the changed region from the memory surface to the hardware surface
544  ret = gf_draw_blit2(d->context, d->memSurface, d->hwSurface,
545  rect.x(), rect.y(), rect.right(), rect.bottom(), rect.x(), rect.y());
546  if (ret != GF_ERR_OK)
547  qWarning("QQnxScreen: gf_draw_blit2() failed with error code %d", ret);
548  }
549  }
550  // flush all drawing commands (in our case, a single blit)
551  ret = gf_draw_flush(d->context);
552  if (ret != GF_ERR_OK)
553  qWarning("QQnxScreen: gf_draw_flush() failed with error code %d", ret);
554 
555  // tell QNX that we're done drawing.
556  gf_draw_end(d->context);
557 }
Q_GUI_EXPORT QScreen * qt_screen
Definition: qscreen_qws.cpp:69
gf_surface_t hwSurface
int bottom() const
Returns the y-coordinate of the rectangle&#39;s bottom edge.
Definition: qrect.h:249
Q_CORE_EXPORT void qWarning(const char *,...)
gf_context_t context
bool isEmpty() const
Returns true if the rectangle is empty, otherwise returns false.
Definition: qrect.h:234
int right() const
Returns the x-coordinate of the rectangle&#39;s right edge.
Definition: qrect.h:246
int y() const
Returns the y-coordinate of the rectangle&#39;s top edge.
Definition: qrect.h:255
int x() const
Returns the x-coordinate of the rectangle&#39;s left edge.
Definition: qrect.h:252
virtual bool isTransformed() const
Returns true if the screen is transformed (for instance, rotated 90 degrees); otherwise returns false...
QVector< QRect > rects() const
Returns an array of non-overlapping rectangles that make up the region.
Definition: qregion.cpp:4412
The QRect class defines a rectangle in the plane using integer precision.
Definition: qrect.h:58
gf_surface_t memSurface
#define Q_FOREACH(variable, container)
Same as foreach(variable, container).
Definition: qglobal.h:2435
virtual void exposeRegion(QRegion r, int changing)
This function is called by the Qt for Embedded Linux server whenever a screen update is required...
QQnxScreenContext *const d

◆ initDevice()

bool QQnxScreen::initDevice ( )
virtual

Reimplemented Function

Implements QScreen.

Definition at line 161 of file qscreenqnx_qws.cpp.

162 {
163 #ifndef QT_NO_QWS_CURSOR
165 #endif
166 
167  return true;
168 }
static void initSoftwareCursor()
Initializes the screen cursor.

◆ setDirty()

void QQnxScreen::setDirty ( const QRect rectangle)
virtual

Marks the given rectangle as dirty.

Note that the default implementation does nothing; reimplement this function to indicate that the given rectangle has been altered.

Reimplemented from QScreen.

Definition at line 560 of file qscreenqnx_qws.cpp.

561 {
562  //This function is called only when the screen is transformed
563  if (!qt_screen->isTransformed())
564  return;
565 
566  if (!d->hwSurface)
567  return;
568 
569  int ret = gf_draw_begin(d->context);
570 
571  if (ret != GF_ERR_OK) {
572  qWarning("QQnxScreen: gf_draw_begin() failed with error code %d in setDirty", ret);
573  return;
574  }
575 
576  // blit the changed region from the memory surface to the hardware surface
577  ret = gf_draw_blit2(d->context, d->memSurface, d->hwSurface,
578  r.x(), r.y(), r.x()+ r.width(), r.y()+r.height(), r.x(), r.y());
579  if (ret != GF_ERR_OK)
580  qWarning("QQnxScreen: gf_draw_blit2() failed with error code %d in setDirty", ret);
581 
582  ret = gf_draw_flush(d->context);
583  if (ret != GF_ERR_OK)
584  qWarning("QQnxScreen: gf_draw_flush() failed with error code %d in setDirty", ret);
585 
586  // tell QNX that we're done drawing.
587  gf_draw_end(d->context);
588 }
Q_GUI_EXPORT QScreen * qt_screen
Definition: qscreen_qws.cpp:69
gf_surface_t hwSurface
Q_CORE_EXPORT void qWarning(const char *,...)
gf_context_t context
virtual bool isTransformed() const
Returns true if the screen is transformed (for instance, rotated 90 degrees); otherwise returns false...
gf_surface_t memSurface
QQnxScreenContext *const d

◆ setMode()

void QQnxScreen::setMode ( int  ,
int  ,
int   
)
virtual

QQnxScreen doesn't support setting the mode, use io-display instead.

Reimplemented Function

Implements QScreen.

Definition at line 459 of file qscreenqnx_qws.cpp.

460 {
461  qWarning("QQnxScreen: Unable to change mode, use io-display instead.");
462 }
Q_CORE_EXPORT void qWarning(const char *,...)

◆ shutdownDevice()

void QQnxScreen::shutdownDevice ( )
virtual

Reimplemented Function

Reimplemented from QScreen.

Definition at line 448 of file qscreenqnx_qws.cpp.

449 {
450 }

◆ supportsDepth()

bool QQnxScreen::supportsDepth ( int  depth) const
virtual

Reimplemented Function

Reimplemented from QScreen.

Definition at line 467 of file qscreenqnx_qws.cpp.

468 {
469  gf_modeinfo_t displayMode;
470  for (int i = 0; gf_display_query_mode(d->display, i, &displayMode) == GF_ERR_OK; ++i) {
471  switch (displayMode.primary_format) {
472 #if defined(QT_QWS_DEPTH_32) || defined(QT_QWS_DEPTH_GENERIC)
473  case GF_FORMAT_ARGB8888:
474  case GF_FORMAT_BGRA8888:
475  if (depth == 32)
476  return true;
477  break;
478 #endif
479 #if defined(QT_QWS_DEPTH_24)
480  case GF_FORMAT_BGR888:
481  if (depth == 24)
482  return true;
483  break;
484 #endif
485 #if defined(QT_QWS_DEPTH_16) || defined(QT_QWS_DEPTH_GENERIC)
486  case GF_FORMAT_PACK_RGB565:
487  case GF_FORMAT_PKLE_RGB565:
488  case GF_FORMAT_PKBE_RGB565:
489  if (depth == 16)
490  return true;
491  break;
492 #endif
493  default:
494  break;
495  }
496  }
497 
498  return false;
499 }
gf_display_t display
QQnxScreenContext *const d
int depth() const
Returns the depth of the framebuffer, in bits per pixel.
Definition: qscreen_qws.h:229

Properties

◆ d

QQnxScreenContext* const QQnxScreen::d
private

The documentation for this class was generated from the following files: