High Level Design
Overview
This is to help figure out a higher level design for how different Qt components interact in ParaView. Each component should be somewhat independent, but it should be easy to integrate them for rapid development of applications.
Core
There exists *core* functionality which *every* application will have. This is both to facilitate rapid development and to provide a framework that components can build on to ease the integration of components. Core includes the following (but not limited to):
- pqApplicationCore - a singleton which has methods to access other global instances.
- pipeline builder - used to create/delete sources/filters/displays/other proxies. For example, when creating a source and a display for that source, Qt based objects are created that "wrap" the server manager objects. These Qt based objects provide extra functionality not found in the server manager, such as querying a filter for its consumers (other filters for which this filter is an input).
- undo/redo - a central place to make undo/redo work
- selection model - a central place to handle selections between different components
- server manager model - a model class that Qt models can be built on top of
As a general rule, signal/slot connections between classes in the core should be kept to a minimum. signal & slot connections generally mean that behavior between classes is being introduced. Application should be able to define their own behavior by picking objects they want to use, then connect signal to slots. Also, application specific state should not be in the core. For example, the concept of an "active source" is application specific. Another way to view the core is to think of it as a Qt wrapper of the server manager.
Components
There are several components available to an application. And more will be made. As a guideline:
- signal & slot signatures should use *core* types (for example, pqPipelineSource* instead of vtkSMSourceProxy*). This helps make connections easier. Some classes in the past didn't conform to this, but that was mostly due to a lack of infrastructure in the core.
- components should be self contained. They may contain one or more classes. They should not have connections with other components, unless it is an extension to another component. A component may have internal connections between signals & slots.
Application
At this level, all the pieces are brought together to make a wonderful application !
Convenience
We have ParaView and a few ParaView-like applications that can share code. They usually bring the same components together, and have somewhat similar behavior. This is a layer on top of core & components.