* \class DatapickerImage * \brief container to open image/plot. * * Top-level container for DatapickerPoint. * * * \ingroup datapicker */
| 54 | * * \ingroup datapicker |
| 55 | */ |
| 56 | DatapickerImage::DatapickerImage(const QString& name, bool loading) |
| 57 | : AbstractPart(name, AspectType::DatapickerImage) |
| 58 | , foregroundBins(new int[ImageEditor::colorAttributeMax(ColorAttributes::Foreground) + 1]) |
| 59 | , hueBins(new int[ImageEditor::colorAttributeMax(ColorAttributes::Hue) + 1]) |
| 60 | , saturationBins(new int[ImageEditor::colorAttributeMax(ColorAttributes::Saturation) + 1]) |
| 61 | , valueBins(new int[ImageEditor::colorAttributeMax(ColorAttributes::Value) + 1]) |
| 62 | , intensityBins(new int[ImageEditor::colorAttributeMax(ColorAttributes::Intensity) + 1]) |
| 63 | , d_ptr(new DatapickerImagePrivate(this)) |
| 64 | , m_segments(new Segments(this)) { |
| 65 | Q_D(DatapickerImage); |
| 66 | connect(this, &AbstractAspect::childAspectAdded, this, &DatapickerImage::childAdded); |
| 67 | connect(this, &AbstractAspect::childAspectAboutToBeRemoved, this, &DatapickerImage::childRemoved); |
| 68 | if (!loading) |
| 69 | init(); |
| 70 | else { |
| 71 | d->symbol = new Symbol(QString()); |
| 72 | addChild(d->symbol); |
| 73 | d->symbol->setHidden(true); |
| 74 | connect(d->symbol, &Symbol::updateRequested, [=] { |
| 75 | d->retransform(); |
| 76 | }); |
| 77 | connect(d->symbol, &Symbol::updatePixmapRequested, [=] { |
| 78 | d->retransform(); |
| 79 | }); |
| 80 | } |
| 81 | } |
| 82 | |
| 83 | DatapickerImage::~DatapickerImage() { |
| 84 | delete[] hueBins; |
nothing calls this directly
no test coverage detected