Changeset View
Changeset View
Standalone View
Standalone View
scene_qpainter.h
Show First 20 Lines • Show All 74 Lines • ▼ Show 20 Line(s) | 32 | public: | |||
---|---|---|---|---|---|
75 | /** | 75 | /** | ||
76 | * Overload for the case that there is a different buffer per screen. | 76 | * Overload for the case that there is a different buffer per screen. | ||
77 | * Default implementation just calls buffer. | 77 | * Default implementation just calls buffer. | ||
78 | * @param screenId The id of the screen as used in Screens | 78 | * @param screenId The id of the screen as used in Screens | ||
79 | * @todo Get a better identifier for screen then a counter variable | 79 | * @todo Get a better identifier for screen then a counter variable | ||
80 | **/ | 80 | **/ | ||
81 | virtual QImage *bufferForScreen(int screenId); | 81 | virtual QImage *bufferForScreen(int screenId); | ||
82 | virtual bool needsFullRepaint() const = 0; | 82 | virtual bool needsFullRepaint() const = 0; | ||
83 | virtual void renderCursor(QPainter *painter); | | |||
84 | /** | 83 | /** | ||
85 | * Whether the rendering needs to be split per screen. | 84 | * Whether the rendering needs to be split per screen. | ||
86 | * Default implementation returns @c false. | 85 | * Default implementation returns @c false. | ||
87 | **/ | 86 | **/ | ||
88 | virtual bool perScreenRendering() const; | 87 | virtual bool perScreenRendering() const; | ||
89 | 88 | | |||
90 | protected: | 89 | protected: | ||
91 | QPainterBackend(); | 90 | QPainterBackend(); | ||
Show All 33 Lines | 109 | public: | |||
125 | static SceneQPainter *createScene(QObject *parent); | 124 | static SceneQPainter *createScene(QObject *parent); | ||
126 | 125 | | |||
127 | protected: | 126 | protected: | ||
128 | virtual void paintBackground(QRegion region) override; | 127 | virtual void paintBackground(QRegion region) override; | ||
129 | virtual Scene::Window *createWindow(Toplevel *toplevel) override; | 128 | virtual Scene::Window *createWindow(Toplevel *toplevel) override; | ||
130 | 129 | | |||
131 | private: | 130 | private: | ||
132 | explicit SceneQPainter(QPainterBackend *backend, QObject *parent = nullptr); | 131 | explicit SceneQPainter(QPainterBackend *backend, QObject *parent = nullptr); | ||
132 | void paintCursor(); | ||||
133 | QScopedPointer<QPainterBackend> m_backend; | 133 | QScopedPointer<QPainterBackend> m_backend; | ||
134 | QScopedPointer<QPainter> m_painter; | 134 | QScopedPointer<QPainter> m_painter; | ||
135 | class Window; | 135 | class Window; | ||
136 | }; | 136 | }; | ||
137 | 137 | | |||
138 | class SceneQPainter::Window : public Scene::Window | 138 | class SceneQPainter::Window : public Scene::Window | ||
139 | { | 139 | { | ||
140 | public: | 140 | public: | ||
▲ Show 20 Lines • Show All 119 Lines • Show Last 20 Lines |