Commit Graph

104 Commits

Author SHA1 Message Date
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
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
Alexandre Quessy 9d36bc4922 Use GL_CLAMP, not GL_REPEAT (and other changes)
And also:
* Use glVertex2f, not glVertex3f
* Opening curly brackets on a new line
* spaces between most operators
* avoir some very long lines, or indentations
2013-11-26 21:46:08 -05:00
Alexandre Quessy c70af60c89 git ignore more files 2013-11-26 21:31:58 -05:00
Tats 11616282b0 Allows selection of the source: changes the source in the canvases 2013-11-26 13:38:36 -05:00
Tats 89f8ba130b Automatically added pre-loaded source images to list view 2013-11-25 23:43:59 -05:00
Tats 0ff60f6108 - Added an empty QListView in the layout, with two splitters
- Also created a class for the main window
2013-11-25 23:16:32 -05:00
sylvain ddf7659678 added GLU dependency 2013-11-25 22:10:18 -05:00
Alexandre Quessy e5e81ec875 Remove autotools packaging files 2013-11-24 14:01:29 -05:00
Tats 3964f7b7d1 Fix: textures were upside down 2013-11-24 11:02:11 -05:00
Tats 3addaf0728 Changed build to work with Qt4 2013-11-24 10:39:16 -05:00
Tats 485dc54a00 Merge branch 'master' of github.com:libremapping/libremapping
Conflicts:
	MapperGLCanvas.cpp
2013-11-24 10:35:35 -05:00
Tats 3889b68ad3 Merge branch 'qt-port'
Conflicts:
	MapperGLCanvas.cpp
2013-11-24 10:34: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
Alexandre Quessy 17b197e019 Merge branch 'master' of github.com:libremapping/libremapping 2013-11-23 19:50:27 -05:00
Alexandre Quessy 724c1fc67d add shm proto 2013-11-23 19:50:20 -05:00
sylvain b57d8b3c02 Fix flicker 2013-11-23 19:31:40 -05:00
Tats fbeddb0def Fix: move lines (focus by clicking) 2013-11-23 17:43:12 -05:00