Trying to get fonts working with marquee.
5 #include <QQuickWindow>
8 class MiniDisplay : public QQuickItem
11 Q_DISABLE_COPY(MiniDisplay)
13 Q_PROPERTY(bool isOpen READ isOpen NOTIFY statusChanged)
14 Q_PROPERTY(bool offScreenMode READ offScreenMode WRITE setOffScreenMode NOTIFY offScreenModeChanged)
15 Q_PROPERTY(QFont font READ font WRITE setFont NOTIFY fontChanged)
16 Q_PROPERTY(QString vendor READ vendor)
17 Q_PROPERTY(QString product READ product)
18 Q_PROPERTY(QString serialNumber READ serialNumber)
19 Q_PROPERTY(int brightness READ brightness WRITE setBrightness NOTIFY brightnessChanged)
20 Q_PROPERTY(int maxBrightness READ maxBrightness NOTIFY opened)
21 Q_PROPERTY(int minBrightness READ minBrightness NOTIFY opened)
22 Q_PROPERTY(bool frameDifferencing READ frameDifferencing WRITE setFrameDifferencing NOTIFY frameDifferencingChanged)
24 Q_PROPERTY(QPoint framePosition READ framePosition WRITE setFramePosition NOTIFY closed)
28 Q_INVOKABLE void open();
29 Q_INVOKABLE void close();
31 Q_INVOKABLE void clear();
32 Q_INVOKABLE void fill();
33 Q_INVOKABLE void swapBuffers();
35 Q_INVOKABLE void requestPowerStatus();
36 Q_INVOKABLE void requestDeviceId();
37 Q_INVOKABLE void requestFirmwareVersion();
39 Q_INVOKABLE void renderOwnWindow();
40 Q_INVOKABLE void renderWindow(QQuickWindow* aWindow);
41 Q_INVOKABLE void renderImage(QImage* aImage);
43 Q_INVOKABLE void connectRenderLoop(QQuickWindow* aWindow, QJSValue aFunction);
44 Q_INVOKABLE void disconnectRenderLoop();
46 Q_INVOKABLE void setPixel(int x, int y, bool on);
54 QFont font() const {return iFont;}
55 void setFont(const QFont& aFont);
58 void setOffScreenMode(bool aOn);
62 QString serialNumber();
64 int maxBrightness() const;
65 int minBrightness() const;
66 int brightness() const;
67 void setBrightness(int aBrightness);
69 bool frameDifferencing() const;
70 void setFrameDifferencing(bool aOn);
72 QPoint framePosition() const;
73 void setFramePosition(const QPoint& aPoint);
76 void onAfterAnimating();
85 void brightnessChanged();
86 void offScreenModeChanged();
87 void frameDifferencingChanged();
89 void powerStatus(bool powerOn);
90 void deviceId(QString deviceId);
91 void firmwareVersion(QString version);
98 MiniDisplay(QQuickItem *parent = 0);
106 QPoint iFramePosition;
107 QJSValue iAfterAnimatingCallback;
108 QQuickWindow* iWindow;
112 #endif // MINIDISPLAY_H