File indexing completed on 2024-05-12 03:47:29

0001 /*
0002     File                 : DatapickerImagePrivate.h
0003     Project              : LabPlot
0004     Description          : Worksheet for Datapicker, private class
0005     --------------------------------------------------------------------
0006     SPDX-FileCopyrightText: 2015-2016 Ankit Wagadre <wagadre.ankit@gmail.com>
0007     SPDX-FileCopyrightText: 2015-2021 Alexander Semke <alexander.semke@web.de>
0008 
0009     SPDX-License-Identifier: GPL-2.0-or-later
0010 */
0011 #ifndef DATAPICKERIMAGEPRIVATE_H
0012 #define DATAPICKERIMAGEPRIVATE_H
0013 
0014 #include "backend/datapicker/DatapickerImage.h"
0015 
0016 #include <QString>
0017 
0018 class Symbol;
0019 class QGraphicsScene;
0020 
0021 class DatapickerImagePrivate {
0022 public:
0023     explicit DatapickerImagePrivate(DatapickerImage*);
0024     virtual ~DatapickerImagePrivate();
0025 
0026     DatapickerImage::ReferencePoints axisPoints;
0027     DatapickerImage::EditorSettings settings;
0028     DatapickerImage::PointsType plotPointsType{DatapickerImage::PointsType::AxisPoints};
0029     DatapickerImage::PlotImageType plotImageType{DatapickerImage::PlotImageType::NoImage};
0030 
0031     DatapickerImage* const q;
0032     QRectF pageRect;
0033     QGraphicsScene* m_scene;
0034     float rotationAngle{0.0};
0035     QString fileName;
0036     bool isRelativeFilePath{false};
0037     bool embedded{false};
0038     int pointSeparation{30};
0039     int minSegmentLength{30};
0040 
0041     // symbols
0042     Symbol* symbol{nullptr};
0043     bool pointVisibility{true};
0044 
0045     QString name() const;
0046     void retransform();
0047     void updateImage();
0048     void discretize();
0049     void makeSegments();
0050     bool uploadImage();
0051 };
0052 
0053 #endif