-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Major rework of Map's template API and of TemplateListWidget #1653
Commits on Jun 8, 2020
-
Map: Revise template API, part 1
Move separate inline definitions either to class or to cpp file: We don't need to force inlining for getters, and we probaly don't want inlining for setters. Consistently use identifier "pos" for the index of the template (but leaving "i" for closed templates). Use idiomatic non-member begin(). Fix implicit conversions. Rewrite findTemplateIndex using std algorithms. Revise documentation.
Configuration menu - View commit details
-
Copy full SHA for d7a8aa6 - Browse repository at this point
Copy the full SHA d7a8aa6View commit details -
Map: Revise template API, part 2
Change addTemplate and setTemplate parameter order to the more common position, template. This also matches the signals.
Configuration menu - View commit details
-
Copy full SHA for 6cc760f - Browse repository at this point
Copy the full SHA 6cc760fView commit details -
Map: Revise template API, part 3
Add method to move templates in the list, and send a new signal.
Configuration menu - View commit details
-
Copy full SHA for 0d76636 - Browse repository at this point
Copy the full SHA 0d76636View commit details -
Map: Revise template API, part 4
Explicitly take, hold, and release strong ownership of templates by using std::unique_ptr<Template>.
Configuration menu - View commit details
-
Copy full SHA for 9748301 - Browse repository at this point
Copy the full SHA 9748301View commit details -
Map: Revise template API, part 5
Update the index of the first front template when templates are added or removed in the background of the map. Introduce the special value '-1' to insert templates just below the map. Rewrite ReopenTemplateDialog::OpenTemplateList::dropEvent to make use of this API change. Note that the changed interactions at template deletion require another TemplateListWidget connection to be marked as queued: When the template table selection model emits selectionChanged, the template table still holds the row for the template which is already removed from Map, so table row <-> template index mappings do not work correctly in this moment.
Configuration menu - View commit details
-
Copy full SHA for ece807a - Browse repository at this point
Copy the full SHA ece807aView commit details -
Map: Revise template API, part 6
Emit signals before adding, moving or removing templates, and when changing the index of the first front template. This follows the pattern of signals in QAbstractItemModel. It allows to do some light-weight independent actions, e.g. initializing template visibility, before more complex actions.
Configuration menu - View commit details
-
Copy full SHA for d823597 - Browse repository at this point
Copy the full SHA d823597View commit details -
Configuration menu - View commit details
-
Copy full SHA for d670c1d - Browse repository at this point
Copy the full SHA d670c1dView commit details -
Map: Take care of setTemplatesDirty...
... when changing the list of templates, changing the start of the front templates, or being notified of a changed template. Note: This is the combined state of the templates with regard to what is saved on disk. It is not the state for repainting the screen.
Configuration menu - View commit details
-
Copy full SHA for 115d94f - Browse repository at this point
Copy the full SHA 115d94fView commit details -
Map: Take care of setTemplateAreaDirty
For all common events, Map knows that setTemplateAreaDirty needs to be called (and when). In addition, a change of template visibility shouldn't affect more than the map widgets attached to the particular map view.
Configuration menu - View commit details
-
Copy full SHA for 83096d6 - Browse repository at this point
Copy the full SHA 83096d6View commit details -
Configuration menu - View commit details
-
Copy full SHA for a92ac60 - Browse repository at this point
Copy the full SHA a92ac60View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3a2fbcc - Browse repository at this point
Copy the full SHA 3a2fbccView commit details -
Configuration menu - View commit details
-
Copy full SHA for 74ccc5e - Browse repository at this point
Copy the full SHA 74ccc5eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7f6644c - Browse repository at this point
Copy the full SHA 7f6644cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 011249b - Browse repository at this point
Copy the full SHA 011249bView commit details
Commits on Jun 9, 2020
-
TemplateListWidget: Factor out TemplateTableModel
This change leverages Qt's model/view classes, separating the template list GUI from the the data model. To let the model properly deal with templates being added to the map next to the map layer, the map must also explicitly signal whether a template is meant to be added to the background or not. To avoid a hard dependency on map.h in target slot declarations, we use a simple bool, not a more verbose enum in map.h.
Configuration menu - View commit details
-
Copy full SHA for fd86151 - Browse repository at this point
Copy the full SHA fd86151View commit details -
Configuration menu - View commit details
-
Copy full SHA for efcbfa8 - Browse repository at this point
Copy the full SHA efcbfa8View commit details -
Change order of functions for reasonable grouping. Add '*' to 'auto' where dealing with pointers. Rename 'getCurrentTemplate' to 'currentTemplate'.
Configuration menu - View commit details
-
Copy full SHA for f850d1d - Browse repository at this point
Copy the full SHA f850d1dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9c9fa35 - Browse repository at this point
Copy the full SHA 9c9fa35View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7ee3cf7 - Browse repository at this point
Copy the full SHA 7ee3cf7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4e7846c - Browse repository at this point
Copy the full SHA 4e7846cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 33e8f1e - Browse repository at this point
Copy the full SHA 33e8f1eView commit details -
TemplateListWidget: Stop move-by-hand properly
Tear down the tool when the user select another row in the list. Fixes GH-1517 (unintuitive move-template function).
Configuration menu - View commit details
-
Copy full SHA for b99a950 - Browse repository at this point
Copy the full SHA b99a950View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2a4140d - Browse repository at this point
Copy the full SHA 2a4140dView commit details
Commits on Jun 10, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 112a28d - Browse repository at this point
Copy the full SHA 112a28dView commit details -
TemplateListWidget: Normalize positioning action
Move full lifecycle control to TemplateListWidget and TemplatePositionDockWidget.
Configuration menu - View commit details
-
Copy full SHA for d308c47 - Browse repository at this point
Copy the full SHA d308c47View commit details -
Template dock widgets: Save/restore state
Turn these dock widget into regular MapEditorController/QMainWindow dock widgets for which state is saved and restored. Dock widgets need an object name in order to let QMainWindow properly save and restore the state. Fixes a runtime warning at the console.
Configuration menu - View commit details
-
Copy full SHA for 4438096 - Browse repository at this point
Copy the full SHA 4438096View commit details