Loading...
Searching...
No Matches
BackgroundRenderer.hpp
1#pragma once
2#include <score/config.hpp>
3#include <score/plugins/InterfaceList.hpp>
4#include <score/selection/Selection.hpp>
5
6#include <QPainter>
7
8#include <score_lib_base_export.h>
9
10namespace score
11{
12class SCORE_LIB_BASE_EXPORT BackgroundRenderer : public QObject
13{
14public:
15 using QObject::QObject;
16 ~BackgroundRenderer() override;
17
18 virtual bool render(QPainter* painter, const QRectF& rect) = 0;
19};
20
21class SCORE_LIB_BASE_EXPORT BackgroundRendererFactory : public score::InterfaceBase
22{
23 SCORE_INTERFACE(BackgroundRendererFactory, "c9f82f26-7dec-4b87-a66f-3b883d27682a")
24public:
26
27 virtual bool matches(const Selection& cst, QObject* parent) const noexcept = 0;
28 virtual BackgroundRenderer* make(const Selection& sel, QObject* parent) const = 0;
29};
30
31class SCORE_LIB_BASE_EXPORT BackgroundRendererList final
32 : public score::MatchingFactory<BackgroundRendererFactory>
33{
34public:
35 ~BackgroundRendererList() override;
36};
37}
Definition Selection.hpp:12
Definition BackgroundRenderer.hpp:22
Definition BackgroundRenderer.hpp:13
Definition BackgroundRenderer.hpp:33
Base class for plug-in interfaces.
Definition Interface.hpp:52
Utility class for making a factory interface list.
Definition InterfaceList.hpp:173
Base toolkit upon which the software is built.
Definition Application.cpp:111
Definition ObjectMatches.hpp:6