Commit Graph

121 Commits

Author SHA1 Message Date
Tats 9bb6d7bcbc Include QtPropertyBrowser build in libremapping.pro 2013-12-08 12:02:49 -05:00
Tats bffbe2415c Include QtPropertyBrowser build in libremapping.pro 2013-12-08 12:02:18 -05:00
Tats 1551f5cbc1 Added contributed code QtPropertyBrowser 2013-12-08 12:01:22 -05:00
Tats 65b956a28d Initialize MainWindow instance in main.cpp 2013-12-08 11:58:26 -05:00
Tats 8502ef3b37 Added basic properties widget for current selected mapper (bidirectional update of input shape vertices, though wrongly initialized) 2013-12-08 11:58:05 -05:00
Tats cd2639812d Replaced signal quadChanged for shapeChanged 2013-12-08 11:56:55 -05:00
Tats 26866dc9ab Add map of mappers (forgot to include it in earlier commit) 2013-12-08 11:56:02 -05:00
Tats f5f8b36a1d Small fix: was using mapping id instead of layer id in addLayerItem() call 2013-12-08 11:55:17 -05:00
Tats 8caab2875b Added method MainWindow::updateAll() to update the canvases 2013-12-08 11:54:39 -05:00
Tats 3517b7a71d Generalized the use of Mapper from within DestinationGLCanvas 2013-12-08 11:53:49 -05:00
Tats 28a5521131 Adjust scalings of splitter elements 2013-12-07 17:41:54 -05:00
Tats 2960144393 Fixed seg fault on exit due to MainWindow singleton 2013-12-07 17:41:19 -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 50649d2a40 Reordering of layers with drag and drop 2013-12-05 02:16:55 -05:00
Tats dd3189e847 Checkbox for toggling visibility of layers (+ some cleanup) 2013-12-05 01:38:03 -05:00
Tats 71ad58787f Added Layers (model side) 2013-12-05 00:51:33 -05:00
Tats 80f2d92eab Added unique ids to Mapping and Paint 2013-12-05 00:16:37 -05:00
Tats b988a9a814 Increased min. width/height fo canvases and set them to 16:9 2013-12-05 00:16:04 -05:00
Tats 30b9f0f09b Renamed sourceSplitter for resourceSplitter 2013-12-05 00:15:39 -05: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
Alexandre Quessy e95d1585d1 Merge branch 'master' of github.com:libremapping/libremapping 2013-12-03 03:32:15 -05:00
Alexandre Quessy 3181d4ffa3 add index.html (maquette de GUI en HTML) 2013-12-03 03:31:31 -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 cf95edaf6f Bug fix: When switching to a source that has no mapping attached to it, last selected mapping was still in use 2013-12-01 13:43:24 -05:00
Tats 8d0473410b Removed some of the "normal" pointers and replaced them by smart pointer to prevent memory problems 2013-12-01 00:16:33 -05:00
Tats 0015e237c9 Added support for triangles 2013-11-30 23:55:25 -05:00
Tats 8b205526fe Completed integration of one source -> many quads (everything working) 2013-11-30 21:48:01 -05:00
Tats fab560760e Added quad creation to shapeList (not working yet) 2013-11-30 20:39:45 -05:00
Tats 4ca1f190ec Added icons for shape actions 2013-11-30 19:24:24 -05:00
Tats 73d934b4d0 Some cleanup in switching of image source 2013-11-30 19:23:35 -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 282f74c083 Save splitter geometry / state 2013-11-30 16:44:50 -05:00
Tats 4107b38a87 Manages resizing correctly (with preferred stretching of the canvases rather than the source list) 2013-11-30 16:22:23 -05:00
Tats 8d2d7749d8 Set minimum size for canvases 2013-11-30 16:21:53 -05:00
Tats 9ee929a260 Add icons to imported image sources 2013-11-30 15:32:30 -05:00
Tats 5bcefdcf16 Added import of image files (from File menu and toolbar) 2013-11-30 13:15:07 -05:00
Tats 8880a18c7d Added image resources (icons) 2013-11-30 13:14:45 -05:00
Tats 7b953a7479 Added basic GUI frame: menu, toolbar, resources, status bar, etc. 2013-11-30 12:01:15 -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
Tats 97379366e3 Merge remote-tracking branch 'vliaskov/try-to-catch-key'
Conflicts:
	prototypes/wx-01-simple/main.cpp
2013-11-29 11:49:48 -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
Alexandre Quessy 9d1db533fa add a note 2013-11-26 22:33:10 -05:00
Alexandre Quessy 944ede8587 Add typedefs for std::tr1::shared_ptr<*> 2013-11-26 22:25:11 -05:00
Alexandre Quessy 83404dac47 Add Util::map_[float|int].
Change Util for a namespace, not a class with static methods.
2013-11-26 22:13:46 -05:00
Alexandre Quessy ed1056527d Always draw OpenGL shapes' vertices in a counterclockwise order 2013-11-26 22:08:02 -05:00
Alexandre Quessy b6bcd27706 update README 2013-11-26 22:04:39 -05:00