mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 08:20:05 +00:00 
			
		
		
		
	Add ability to install event handlers from mouse picking
This commit is contained in:
		
							parent
							
								
									ff882f5c06
								
							
						
					
					
						commit
						b3e035c53d
					
				
					 26 changed files with 222 additions and 76 deletions
				
			
		|  | @ -6,6 +6,8 @@ | |||
| #include <boost/gil.hpp> | ||||
| #include <units/angle.h> | ||||
| 
 | ||||
| class QEvent; | ||||
| 
 | ||||
| namespace scwx | ||||
| { | ||||
| namespace qt | ||||
|  | @ -34,11 +36,13 @@ public: | |||
|                bool textureAtlasChanged) override; | ||||
|    void Deinitialize() override; | ||||
| 
 | ||||
|    bool RunMousePicking(const QMapLibreGL::CustomLayerRenderParameters& params, | ||||
|                         const QPointF&            mouseLocalPos, | ||||
|                         const QPointF&            mouseGlobalPos, | ||||
|                         const glm::vec2&          mouseCoords, | ||||
|                         const common::Coordinate& mouseGeoCoords) override; | ||||
|    bool | ||||
|    RunMousePicking(const QMapLibreGL::CustomLayerRenderParameters& params, | ||||
|                    const QPointF&                        mouseLocalPos, | ||||
|                    const QPointF&                        mouseGlobalPos, | ||||
|                    const glm::vec2&                      mouseCoords, | ||||
|                    const common::Coordinate&             mouseGeoCoords, | ||||
|                    std::shared_ptr<types::EventHandler>& eventHandler) override; | ||||
| 
 | ||||
|    /**
 | ||||
|     * Sets the visibility of the icons. | ||||
|  | @ -151,6 +155,16 @@ public: | |||
|     */ | ||||
|    void FinishIcons(); | ||||
| 
 | ||||
|    /**
 | ||||
|     * Registers an event handler for an icon. | ||||
|     * | ||||
|     * @param [in] di Icon draw item | ||||
|     * @param [in] eventHandler Event handler function | ||||
|     */ | ||||
|    static void | ||||
|    RegisterEventHandler(const std::shared_ptr<IconDrawItem>& di, | ||||
|                         const std::function<void(QEvent*)>&  eventHandler); | ||||
| 
 | ||||
| private: | ||||
|    class Impl; | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dan Paulat
						Dan Paulat