#include <lcdpaintengine.h>
Collaboration diagram for LCDPaintDevice:

Public Member Functions | |
| int | width () const |
| int | height () const |
| int | widthMM () const |
| int | heightMM () const |
| int | logicalDpiX () const |
| int | logicalDpiY () const |
| int | physicalDpiX () const |
| int | physicalDpiY () const |
| int | numColors () const |
| int | depth () const |
| QPaintEngine * | paintEngine () const |
| void | setSize (int, int) |
| void | setController (ControllerInterface *) |
Static Public Member Functions | |
| static bool | isControllerInit () |
| static ControllerInterface * | controller () |
Protected Member Functions | |
| int | metric (PaintDeviceMetric metric) const |
Static Private Attributes | |
| static ControllerInterface * | m_controller = 0 |
| static QSize | m_size |
You don't need to learn another API is this not wonderfull, isn't it?
For example you draw a filled dotted circle with a bounding rectangle you can do it like this:
LCDPaintDevice device; QPainter p; p.begin(&device); p.drawRect(QRect(0,0,100,100)); p.setBrush(Qt::Dense7Pattern); p.drawEllipse(QRect(0,0,100,100)); p.end();
If you wan't direct access to the controller you can do it with the static controller() method but check it before with isControllerInit() that the controller is valid an initialized.
| ControllerInterface * LCDPaintDevice::controller | ( | ) | [static] |
This method gives you a direct access to the active controller.
| InternalException | is thrown when no controller is available |
| int LCDPaintDevice::depth | ( | ) | const [inline] |
| int LCDPaintDevice::height | ( | ) | const [inline] |
| int LCDPaintDevice::heightMM | ( | ) | const [inline] |
| bool LCDPaintDevice::isControllerInit | ( | ) | [static] |
| int LCDPaintDevice::logicalDpiX | ( | ) | const [inline] |
| int LCDPaintDevice::logicalDpiY | ( | ) | const [inline] |
| int LCDPaintDevice::metric | ( | PaintDeviceMetric | metric | ) | const [protected] |
| UnsupportedException | is thrown when you wan't a metric type that the paint device don't know |
| metric | type which you want to know |
| int LCDPaintDevice::numColors | ( | ) | const [inline] |
| QPaintEngine * LCDPaintDevice::paintEngine | ( | ) | const |
| int LCDPaintDevice::physicalDpiX | ( | ) | const [inline] |
| int LCDPaintDevice::physicalDpiY | ( | ) | const [inline] |
| void LCDPaintDevice::setController | ( | ControllerInterface * | controller | ) |
Set a new active controller to the device
| controller | is the new controller |
| void LCDPaintDevice::setSize | ( | int | width, | |
| int | height | |||
| ) |
Set the display size of the LCD in pixel.
| width | of the LCD | |
| height | of the LCD |
| int LCDPaintDevice::width | ( | ) | const [inline] |
| int LCDPaintDevice::widthMM | ( | ) | const [inline] |
ControllerInterface * LCDPaintDevice::m_controller = 0 [static, private] |
Hold the active controller
QSize LCDPaintDevice::m_size [static, private] |
1.4.7