diff libgui/graphics/Figure.h @ 27099:2cd31365c84a

Implement "pointer" and related figure properties for Qt toolkit (bug #56347) * genpropdoc.m: Document "pointer", "pointershapecdata" and "pointershapehotspot" properties. * libgui/src/icons, libgui/src/module.mk, libgui/src/resource.qrc: Add new cursor png images extracted from the standard DMZ theme. Also add circle.png/svg designed to look like DMZ icons. * Canvas.[h, cc] (Canvas::setCursor): Change signature to include, pointer name, cdata and hotspot location. Use Qt standard QCursors for "arrow", "ibeam", and "watch" cursors. Use DMZ theme cursors for others. Build QCursor from Qimage for "custom" pointers. * Figure.[h,cc](m_pointer_cdata): New QImage data member. (pointer_to_qimage): New static function to convert from Matrix to QImage. (Figure::update): Call Canvas::setCursor whenever "pointer" or "pointershapehotspot" is updated. Refresh m_pointer_cdata when updating "pointershapecdata" and eventually call Canvas::setCursor. * graphics.in.h(figure::properties::pointershapecdata): Use 1 as default value for all pixels.
author Pantxo Diribarne <pantxo.diribarne@gmail.com>
date Sun, 19 May 2019 11:15:10 +0200
parents cb5c1ea2062c
children 1952e110d346
line wrap: on
line diff
--- a/libgui/graphics/Figure.h	Tue May 21 10:00:52 2019 +0200
+++ b/libgui/graphics/Figure.h	Sun May 19 11:15:10 2019 +0200
@@ -124,6 +124,7 @@
     QStatusBar *m_statusBar;
     QRect m_innerRect;
     QRect m_outerRect;
+    QImage m_pointer_cdata;
     int m_previousHeight;
     bool m_resizable;
   };