31 Commits

Author SHA1 Message Date
baydam 539d189f9d Fixed issue Adjust position of vertices using arrow keys not working on output display #77 2014-11-05 17:17:37 +00:00
Alexandre Quessy 3bcbbc7697 Display test signal 2014-10-27 06:04:12 -04:00
Tats d075bdedad Added detailed comments (documentation) in MapperGlCanvas. 2014-10-23 14:02:49 +00:00
Tats 07e1b26436 Allows individual selection of a vertex to be shown on screen. 2014-10-23 13:40:01 +00:00
Alexandre Quessy 5e6e4909e1 Fix: radius for dragging vertices. Drag shape with left click. 2014-10-14 06:20:22 -04:00
Alexandre Quessy 1b73d45a89 New feature: menu option toggle sticky vertices 2014-10-14 01:48:00 -04:00
Tats 4a4b1f05b2 Cosmetic refactoring and variable inits 2014-06-23 18:30:49 -04:00
Tats 27b41db8af Renamed _active_vertex to _activeVertex. 2014-05-03 13:30:00 -04:00
Tats 4d3694fe28 Added an option to toggle the display of shape control points 2014-04-10 18:27:40 -04:00
Tats 419834b0ee Removed MainWindow singleton, replacing it with much more appropriate member pointers in custom widgets 2014-04-10 17:39:37 -04:00
Tats 195c426991 Removed the Point class and replace all instances by QPointF. 2014-02-09 01:02:13 -05:00
Tats 0ff52de66a Major reconfiguration of the GL canvases and the Mapper interface to allow for the use of a QPainter and for integrating ColorPaint mappings 2014-01-22 15:01:00 -05:00
Tats 34a5f6e36c Fixed bug: wrong shape were selected when the mappings were reordered 2014-01-11 23:02:05 -05:00
Tats f66f67c654 Better managing of vertex selection 2013-12-10 22:27:39 -05:00
Tats cd2639812d Replaced signal quadChanged for shapeChanged 2013-12-08 11:56:55 -05:00
Tats 4a80c0a328 Merge branch 'sticky-vertices' of github.com:vliaskov/libremapping into develop
Conflicts:
	Shape.h
	SourceGLCanvas.cpp
2013-12-06 18:06:28 -05:00
Vasilis Liaskovitis b3340e2633 GLCanvas: Implement sticky vertex movement
If the vertex of the current Shape is being moved, it may be useful to "glue" it
to a vertex of another shape, if the 2 vertices are close together. This patch
implements this. THe sticky-sensitivity is controlled by the dist_stick
variable, which is currently hardcoded but could be made configurable e.g.
through the GUI.

The patch also uses a new pure virtual method called getShapeFromMappingId(),
which is implemented by Source / Dest Canvas subclasses. getCurrentShape() is
now using this function, so it is now a non-virtual function in MapperGLCanvas.
2013-12-05 23:48:16 +02:00
Tats 3e34947a88 Merge branch 'shape-drag' of github.com:vliaskov/libremapping
Conflicts:
	MapperGLCanvas.h
	Shape.h
2013-12-04 23:02:47 -05:00
Vasilis Liaskovitis d7c09a5426 Move active_vertex from Shape to MapperGLCanvas 2013-12-03 01:34:49 +02:00
Vasilis Liaskovitis 35fb1ca821 Implement shape drag-and-drop
A user may find it useful in some cases to drag and drop a whole shape, instead
of moving each vertex separately. This patch implements shape drag-and-drop by
pressing and holding the right mouse button. Point inclusion algorithm should
work for non-convex and convex polygons, as suggested in
http://www.cs.tufts.edu/comp/163/notes05/point_inclusion_handout.pdf
2013-12-03 01:14:17 +02:00
Tats 8b205526fe Completed integration of one source -> many quads (everything working) 2013-11-30 21:48:01 -05:00
Tats 5a999f1983 - Put all mappings and paints in a single MappingManager class
- Basic compiling / running program (no quads for now)
2013-11-30 19:19:29 -05:00
Tats 7fce243072 Merge remote-tracking branch 'vliaskov/click-drag' 2013-11-29 12:09:58 -05:00
Tats fd958cecf2 Merge branch 'master' of github.com:libremapping/libremapping
Conflicts:
	Common.cpp
	Common.h
	DestinationGLCanvas.cpp
	SourceGLCanvas.cpp
	main.cpp
2013-11-29 12:09:49 -05:00
Vasilis Liaskovitis 74894e59d1 MapperGLCanvas: Add click and drag functionality
Pressing the left-mouse button close enough to a vertex makes that vertex the
current / active one to operate on. If the button is not released, the vertex
can be dragged on the canvas. If on the source canvas, updates on the
destination canvas can be seen dynamically.

The user needs to click within a specific distance around a vertex otherwise
the click will have no effect in vertex selection. Distances of all vertices
from the point clicked are calculated (manhattan distance, but other can be
used) and the vertex with the smallest distance is declared as the new active
one.

An active vertex variable is also added in the Shape class. Both mouse and key
events update the active vertex of a shape (tested only with quad so far). So
the active vertex is no longer a static variable in the key event handler, but
is common state shared by both mouse and key event handlers.
2013-11-29 15:35:34 +02:00
Alexandre Quessy 0e73f157f8 Document with Doxygen 2013-11-27 01:33:04 -05:00
Tats 11616282b0 Allows selection of the source: changes the source in the canvases 2013-11-26 13:38:36 -05:00
Tats 54c199f8fd Correct management of source<->destionation interaction using signals/slots 2013-11-24 09:27:28 -05:00
Tats 4310f297d1 Done: reproduced the wxwidgets prototype in Qt 2013-11-23 23:16:04 -05:00
Tats 5c1ec14662 Basic switch from wxWidget to Qt (not working yet) 2013-11-23 17:37:59 -05:00
Tats 32924471e0 Copy wx-02-input-output to root 2013-11-15 16:12:22 +01:00