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

The QIntfbScreen class implements a screen driver for the INTEGRITY framebuffer drivers. More...

#include <qscreenintegrityfb_qws.h>

Inheritance diagram for QIntfbScreen:
QScreen

Public Functions

virtual void blank (bool)
 Prevents the screen driver form displaying any content on the screen. More...
 
virtual bool connect (const QString &displaySpec)
 Reimplemented Function More...
 
virtual void disconnect ()
 Reimplemented Function More...
 
virtual bool initDevice ()
 Reimplemented Function More...
 
 QIntfbScreen (int display_id)
 Constructs a QVNCScreen object. More...
 
virtual void restore ()
 Reimplemented Function More...
 
virtual void save ()
 Reimplemented Function More...
 
virtual void setDirty (const QRect &r)
 Reimplemented Function More...
 
virtual void setMode (int nw, int nh, int nd)
 Reimplemented Function More...
 
virtual void shutdownDevice ()
 Reimplemented Function More...
 
virtual ~QIntfbScreen ()
 Destroys this QIntfbScreen 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...
 
virtual void exposeRegion (QRegion r, int changing)
 This function is called by the Qt for Embedded Linux server whenever a screen update is required. 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 resumeUpdates ()
 
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
 
virtual bool supportsDepth (int) const
 Returns true if the screen supports the specified color depth; otherwise returns false. More...
 
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...
 

Static Public Functions

static void setBrightness (int b)
 
- Static Public Functions inherited from QScreen
static QScreeninstance ()
 Returns a pointer to the application's QScreen instance. More...
 

Properties

QIntfbScreenPrivated_ptr
 

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...
 
- 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 QIntfbScreen class implements a screen driver for the INTEGRITY framebuffer drivers.

Warning
This function is not part of the public interface.

Note that this class is only available in Qt for INTEGRITY. Custom screen drivers can be added by subclassing the QScreenDriverPlugin class, using the QScreenDriverFactory class to dynamically load the driver into the application, but there should only be one screen object per application.

See also
QScreen, QScreenDriverPlugin, {Running Applications}

Definition at line 57 of file qscreenintegrityfb_qws.h.

Constructors and Destructors

◆ QIntfbScreen()

QIntfbScreen::QIntfbScreen ( int  displayId)
explicit

Constructs a QVNCScreen object.

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

Definition at line 163 of file qscreenintegrityfb_qws.cpp.

164  : QScreen(display_id, IntfbClass), d_ptr(new QIntfbScreenPrivate)
165 {
166  d_ptr->handle = 0;
167  data = 0;
168 }
QIntfbScreenPrivate * d_ptr
uchar * data
points to the first visible pixel in the frame buffer.
Definition: qscreen_qws.h:311
QScreen(int display_id, ClassId classId)
Constructs a new screen driver.

◆ ~QIntfbScreen()

QIntfbScreen::~QIntfbScreen ( )
virtual

Destroys this QIntfbScreen object.

Definition at line 173 of file qscreenintegrityfb_qws.cpp.

174 {
175  delete d_ptr;
176 }
QIntfbScreenPrivate * d_ptr

Functions

◆ blank()

void QIntfbScreen::blank ( bool  on)
virtual

Prevents the screen driver form displaying any content on the screen.

Note that the default implementation does nothing.

Reimplement this function to prevent the screen driver from displaying any contents on the screen if on is true; otherwise the contents is expected to be shown.

See also
blit()

Reimplemented from QScreen.

Definition at line 338 of file qscreenintegrityfb_qws.cpp.

339 {
340 }

◆ connect()

bool QIntfbScreen::connect ( const QString displaySpec)
virtual

Reimplemented Function

Implements QScreen.

Definition at line 180 of file qscreenintegrityfb_qws.cpp.

181 {
182  CheckSuccess(gh_FB_get_driver(0, &d_ptr->fbdrv));
183  CheckSuccess(gh_FB_check_info(d_ptr->fbdrv, &d_ptr->fbinfo));
184  CheckSuccess(gh_FB_open(d_ptr->fbdrv, &d_ptr->fbinfo, &d_ptr->handle));
185  CheckSuccess(gh_FB_get_info(d_ptr->handle, &d_ptr->fbinfo));
186 
187  data = (uchar *)d_ptr->fbinfo.Start;
188 
189  d = d_ptr->fbinfo.BitsPerPixel;
190  switch (d) {
191  case 1:
193  break;
194  case 8:
196  break;
197  case 12:
199  break;
200  case 15:
202  break;
203  case 16:
205  break;
206  case 18:
208  break;
209  case 24:
211 #ifdef QT_QWS_DEPTH_GENERIC
212 #if Q_BYTE_ORDER != Q_BIG_ENDIAN
213  qt_set_generic_blit(this, 24,
214  d_ptr->fbinfo.Red.Bits,
215  d_ptr->fbinfo.Green.Bits,
216  d_ptr->fbinfo.Blue.Bits,
217  d_ptr->fbinfo.Alpha.Bits,
218  d_ptr->fbinfo.Red.Offset,
219  d_ptr->fbinfo.Green.Offset,
220  d_ptr->fbinfo.Blue.Offset,
221  d_ptr->fbinfo.Alpha.Offset);
222 #else
223  qt_set_generic_blit(this, 24,
224  d_ptr->fbinfo.Red.Bits,
225  d_ptr->fbinfo.Green.Bits,
226  d_ptr->fbinfo.Blue.Bits,
227  d_ptr->fbinfo.Alpha.Bits,
228  16 - d_ptr->fbinfo.Red.Offset,
229  16 - d_ptr->fbinfo.Green.Offset,
230  16 - d_ptr->fbinfo.Blue.Offset,
231  16 - d_ptr->fbinfo.Alpha.Offset);
232 #endif
233 #endif
234  break;
235  case 32:
237 #ifdef QT_QWS_DEPTH_GENERIC
238 #if Q_BYTE_ORDER != Q_BIG_ENDIAN
239  qt_set_generic_blit(this, 32,
240  d_ptr->fbinfo.Red.Bits,
241  d_ptr->fbinfo.Green.Bits,
242  d_ptr->fbinfo.Blue.Bits,
243  d_ptr->fbinfo.Alpha.Bits,
244  d_ptr->fbinfo.Red.Offset,
245  d_ptr->fbinfo.Green.Offset,
246  d_ptr->fbinfo.Blue.Offset,
247  d_ptr->fbinfo.Alpha.Offset);
248 #else
249  qt_set_generic_blit(this, 32,
250  d_ptr->fbinfo.Red.Bits,
251  d_ptr->fbinfo.Green.Bits,
252  d_ptr->fbinfo.Blue.Bits,
253  d_ptr->fbinfo.Alpha.Bits,
254  24 - d_ptr->fbinfo.Red.Offset,
255  24 - d_ptr->fbinfo.Green.Offset,
256  24 - d_ptr->fbinfo.Blue.Offset,
257  24 - d_ptr->fbinfo.Alpha.Offset);
258 #endif
259 #endif
260  break;
261  }
262 
263  dw = w = d_ptr->fbinfo.Width;
264  dh = h = d_ptr->fbinfo.Height;
265 
266  /* assumes no padding */
267  lstep = w * ((d + 7) >> 3);
268 
269  mapsize = size = h * lstep;
270 
271  /* default values */
272  int dpi = 72;
273  physWidth = qRound(dw * 25.4 / dpi);
274  physHeight = qRound(dh * 25.4 / dpi);
275 
276  qDebug("Connected to INTEGRITYfb server: %d x %d x %d %dx%dmm (%dx%ddpi)",
277  w, h, d, physWidth, physHeight, qRound(dw*25.4/physWidth), qRound(dh*25.4/physHeight) );
278 
279 
280  QWSServer::setDefaultMouse("integrity");
281  QWSServer::setDefaultKeyboard("integrity");
282 
283  connected = this;
284 
285  return true;
286 }
int d
the pixel depth
Definition: qscreen_qws.h:327
static void setDefaultMouse(const char *)
Sets the mouse driver that will be used if the QWS_MOUSE_PROTO environment variable is not defined...
QIntfbScreenPrivate * d_ptr
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
int physWidth
the physical width of the screen in millimeters.
Definition: qscreen_qws.h:339
void setPixelFormat(QImage::Format format)
Sets the screen&#39;s pixel format to format.
Q_CORE_EXPORT void qDebug(const char *,...)
unsigned char uchar
Definition: qglobal.h:994
uchar * data
points to the first visible pixel in the frame buffer.
Definition: qscreen_qws.h:311
static QIntfbScreen * connected
int w
the logical width of the screen.
Definition: qscreen_qws.h:324
static void setDefaultKeyboard(const char *)
Sets the keyboard driver that will be used if the QWS_KEYBOARD environment variable is not defined...
int dw
the device width
Definition: qscreen_qws.h:331
int dh
the device height
Definition: qscreen_qws.h:332
int lstep
the number of bytes representing a line in the frame buffer.
Definition: qscreen_qws.h:325
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
Q_DECL_CONSTEXPR int qRound(qreal d)
Definition: qglobal.h:1203

◆ disconnect()

void QIntfbScreen::disconnect ( )
virtual

Reimplemented Function

Implements QScreen.

Definition at line 288 of file qscreenintegrityfb_qws.cpp.

289 {
290  connected = 0;
291 }
static QIntfbScreen * connected

◆ initDevice()

bool QIntfbScreen::initDevice ( )
virtual

Reimplemented Function

Implements QScreen.

Definition at line 293 of file qscreenintegrityfb_qws.cpp.

294 {
295 #ifndef QT_NO_QWS_CURSOR
297 #endif
298  return true;
299 }
static void initSoftwareCursor()
Initializes the screen cursor.

◆ restore()

void QIntfbScreen::restore ( )
virtual

Reimplemented Function

Reimplemented from QScreen.

Definition at line 319 of file qscreenintegrityfb_qws.cpp.

320 {
321 }

◆ save()

void QIntfbScreen::save ( )
virtual

Reimplemented Function

Reimplemented from QScreen.

Definition at line 313 of file qscreenintegrityfb_qws.cpp.

314 {
315  // nothing to do.
316 }

◆ setBrightness()

void QIntfbScreen::setBrightness ( int  b)
static

Definition at line 332 of file qscreenintegrityfb_qws.cpp.

333 {
334  if (connected) {
335  }
336 }
static QIntfbScreen * connected

◆ setDirty()

void QIntfbScreen::setDirty ( const QRect r)
virtual

Reimplemented Function

Reimplemented from QScreen.

Definition at line 322 of file qscreenintegrityfb_qws.cpp.

323 {
324  FBRect fbrect;
325  fbrect.dx = rect.x();
326  fbrect.dy = rect.y();
327  fbrect.Width = rect.width();
328  fbrect.Height = rect.height();
329  gh_FB_expose(d_ptr->handle, &fbrect, 0);
330 }
QIntfbScreenPrivate * d_ptr

◆ setMode()

void QIntfbScreen::setMode ( int  nw,
int  nh,
int  nd 
)
virtual

Reimplemented Function

Implements QScreen.

Definition at line 306 of file qscreenintegrityfb_qws.cpp.

307 {
308 }

◆ shutdownDevice()

void QIntfbScreen::shutdownDevice ( )
virtual

Reimplemented Function

Reimplemented from QScreen.

Definition at line 301 of file qscreenintegrityfb_qws.cpp.

302 {
303  gh_FB_close(d_ptr->handle);
304 }
QIntfbScreenPrivate * d_ptr

Properties

◆ d_ptr

QIntfbScreenPrivate* QIntfbScreen::d_ptr
private

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