Factored out some common code shared between the visual samplers and visual tests viewer widgets into a new abstract base class widget.