Provide an plugin system
Plugin system should cover:
1. Tools (inc. brushes, shapes, selections, whatever else),
2. Filters
Plugin system should provide an unified process for implementing plugins, including customized plugin settings.
Blueprint information
- Status:
- Started
- Approver:
- None
- Priority:
- High
- Drafter:
- None
- Direction:
- Needs approval
- Assignee:
- None
- Definition:
- Review
- Series goal:
- Accepted for trunk
- Implementation:
- Beta Available
- Milestone target:
- chihiro
- Started by
- janisozaur
- Completed by
Related branches
Related bugs
Bug #603784: Tools should be extracted to plugins | Fix Committed |
Bug #603788: Tools shouldn't be identified by their names | Fix Committed |
Bug #633232: There should be one instance of tool per image | In Progress |
Sprints
Whiteboard
[2010-08-18] The proposal
Actual plugin system offers plugin types which are seem to be more like a tool specific types(brush, shape) along with tool specific features. But among them there is an filter type which does not fit to the others. In effect the Plugin becomes excessively narrowed and a little mashed.
Therefore the Plugin should be more general and should not constraint derivates in matter of types.
The basic core derivatives (provided by carto-core-
A sample class definition hierarchy:
Plugin definition provides an API for meta-data information.
Filter : Plugin provides a filter specific API including:
* filter types if needed
* filter settings API for implementing a filter specific settings (including UI)
Tool : Plugin provides a tool specific API including:
* tool types if needed
* tool settings API for implementing a tool specific settings (including UI)
Any other plugin type would appended as an derivative from Plugin
Tool or Filter (or other plugin) would be extended with new type along with corresponding interface.
-------
rawo[2010-08-23] sample 'code'
Plugin{
Tool : Plugin {
typedef enum ToolType{
Brush = 0x0, //all type of drawing tools, including rubber
Shape = 0x1, // tools allowing to draw a shapes, lines
Select = 0x2, //any kind of selections, i.e. magic wand, square selection, elipse selection, etc.
Fill = 0x4, // tools that fill the image, like bucket, gradient fill, etc.
View = 0x8, //zoom, freehand - moving the image in scroll view.
} ToolType;
typedef enum ToolFeature{
NoFeateure = 0x0,
SizeChange = 0x1,
ColorChange = 0x2,
AlphaChange = 0x4,
AntiAliasing = 0x8,
AllFeatuers = 0xFFFFFF // everywhere 1
} ToolFeature;
//common events for all Tools
onPressEvent(
onMoveEvent(const QUuid &brush, QImage &image, QPainter &painter,
onReleaseEven
//settings dialog should provide an container which could be freely filled with settings
//specific for a given tool
//a &container would be the container for qwidgets representing a bunch off settings
getSettings(
}
Filter : Plugin {
getSettings(
executeFilte
}
What do you think about this?
Work Items
Dependency tree
* Blueprints in grey have been implemented.