* Renamed classes/files to something more unique so that they're easily distinguishable from Tiled sources. * Fixed several memory leaks. Some remain, but for a converter it's not very important. * Improved UI (resizable, QTreeView rather than QTableView, disabled 'save' button until you've added files, etc.)
This commit will break existing rule maps, since the expected layer naming of the rule maps changed. Instead of prefixing all layers in the rulemap with 'rule', now the prefixes are depending on the function of the layer. 'regions' describes where rules are placed. (Previous 'RuleRegions') Alternatively there can be 'regions_input' and 'regions_output' which describe the 'input_*' and the 'output_*' regions respectively. 'input<index>_<name>' replaces the 'ruleset<index>' layer. 'inputnot<index>_<name>' replaces the 'rulenotset' layer. The set layers name in the working map can be specified via the <name> part. The <index> part now seperates different inputs. (So input* layers having different <index> parts will belong to different input conditions.) different indexes lead to multiple conditions. Only one condition needs to be true and the rule gets applied. If the indexes are the same, then all conditions accross diffferent <name> layers must all be true. 'output<index>_<name>' is the replaced name of 'rule<index>_<name>' The clearRegion function was dropped and the erase function of tilelayers are used now. The prepareLoad functionality was put into the constructor. The return value of prepareLoad can be determined by checking the length of the error string. The functions in automapper.cpp have been reordered to fit the workflow.
* Automapping now uses the coherentRegions implementation from Tiled::Utils I am not sure which of both implementations is actually faster in finding the list of coherent regions, since there are multiple parameters to turn. (mapsize mattered in the current implementation, which does not in the Tiled::Utils implementation; the complexity and size of each region counts there; Overall the number of different regions count in both implementations) This change also closes #150. * remove Automapper::mapDocument(), since it is unused * Remove timer and filewatcher of AutomappingManager It was unused anyway. (No actual filenames were inserted into the watchlist.) The Automapping data structures are all reloaded, when switching between documents, which is needed after modifying a rulesfile. But due to the documentswitching to the working map, you usually don't need the explicit watching for filechanges. (In case of multiple instances of tiled running, whereas one instance modifies the rulemaps and the other tries to use the updated rules on a workingmap, it will fail. As explained above that is no regression, this never worked) * Also Automapper::ruleSetPath() was deleted, since it is not being used now. Use of ruleSetPath was eliminated by removing the filewatcher above. * comments are adapted and corrected * setupRulesMap renamed to setupRuleMapProperties In this function only the map properties of the rulesmap are parsed, hence its name.
This will be used by both the difftool and the automapping.
This fixes the translations of some built-in strings like those on 'OK' and 'Close' buttons, context menu of scroll bars and built-in error messages. The qt.conf fixes loading of shipped Qt plugins used for supporting jpeg, gif and tiff as image formats as well as some text codecs.
The Command and Random Mode button tool tips were not picking up a change of language.
The displayed pixel size assumed plain orthogonal maps. Now it relies on the appropriate map renderer to tell it the pixel size of the map.
Since recently the object color is cached in the MapObjectItem class, so we need to emit the objectsChanged signal rather than just asking for a repaint. Fixes #106
Tiled crashed when right-click dragging an empty area and then trying to paint with Random Mode enabled. Since no random tile could be selected, brushItem()->tileLayer() ended up as NULL, but when painting it was used unconditionally (the mStamp was checked, but that is no longer the tile layer used for painting). The check whether the stamp is outside the map was corrected as well.