2 #include <score/graphics/widgets/Constants.hpp>
3 #include <score/graphics/widgets/QGraphicsEnum.hpp>
4 #include <score/widgets/Pixmap.hpp>
6 #include <QGraphicsItem>
9 #include <score_lib_base_export.h>
18 SCORE_GRAPHICS_ITEM_TYPE(140)
20 std::vector<QPixmap> on_images;
21 std::vector<QPixmap> off_images;
25 template <std::
size_t N>
27 const std::array<const char*, N>& arr,
28 const std::array<const char*, 2 * N>& pixmaps, QGraphicsItem* parent)
35 for(std::size_t i = 0; i < pixmaps.size(); i++)
38 off_images.emplace_back(score::get_pixmap(pixmaps[i]));
40 on_images.emplace_back(score::get_pixmap(pixmaps[i]));
43 setupDefaultColumns(N);
47 std::vector<QString> arr,
const std::vector<QString>& pixmaps,
48 QGraphicsItem* parent)
51 array = std::move(arr);
53 for(std::size_t i = 0; i < pixmaps.size(); i++)
56 off_images.emplace_back(score::get_pixmap(pixmaps[i]));
58 on_images.emplace_back(score::get_pixmap(pixmaps[i]));
60 setupDefaultColumns(array.size());
64 void setupDefaultColumns(
int N);
66 void paint(QPainter* painter,
const QStyleOptionGraphicsItem* option, QWidget* widget)
Definition: QGraphicsEnum.hpp:17
Definition: QGraphicsPixmapEnum.hpp:17
Base toolkit upon which the software is built.
Definition: Application.cpp:90