File indexing completed on 2024-05-12 15:26:41

0001 /***************************************************************************
0002   File                 : DatapickerImagePrivate.h
0003   Project              : LabPlot
0004   Description          : Worksheet for Datapicker, private class
0005   --------------------------------------------------------------------
0006   Copyright            : (C) 2015-2016 by Ankit Wagadre (wagadre.ankit@gmail.com)
0007   Copyright            : (C) 2015-2016 by Alexander Semke (alexander.semke@web.de)
0008 
0009 ***************************************************************************/
0010 /***************************************************************************
0011  *                                                                         *
0012  *  This program is free software; you can redistribute it and/or modify   *
0013  *  it under the terms of the GNU General Public License as published by   *
0014  *  the Free Software Foundation; either version 2 of the License, or      *
0015  *  (at your option) any later version.                                    *
0016  *                                                                         *
0017  *  This program is distributed in the hope that it will be useful,        *
0018  *  but WITHOUT ANY WARRANTY; without even the implied warranty of         *
0019  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
0020  *  GNU General Public License for more details.                           *
0021  *                                                                         *
0022  *   You should have received a copy of the GNU General Public License     *
0023  *   along with this program; if not, write to the Free Software           *
0024  *   Foundation, Inc., 51 Franklin Street, Fifth Floor,                    *
0025  *   Boston, MA  02110-1301  USA                                           *
0026  *                                                                         *
0027  ***************************************************************************/
0028 #ifndef DATAPICKERIMAGEPRIVATE_H
0029 #define DATAPICKERIMAGEPRIVATE_H
0030 
0031 class QBrush;
0032 class QGraphicsScene;
0033 
0034 class DatapickerImagePrivate {
0035 public:
0036     explicit DatapickerImagePrivate(DatapickerImage*);
0037     virtual ~DatapickerImagePrivate();
0038 
0039     DatapickerImage::ReferencePoints axisPoints;
0040     DatapickerImage::EditorSettings settings;
0041     DatapickerImage::PointsType plotPointsType{DatapickerImage::PointsType::AxisPoints};
0042     DatapickerImage::PlotImageType plotImageType{DatapickerImage::PlotImageType::NoImage};
0043 
0044     DatapickerImage* const q;
0045     QRectF pageRect;
0046     QGraphicsScene* m_scene;
0047     float rotationAngle{0.0};
0048     QString fileName;
0049     int pointSeparation{30};
0050     int minSegmentLength{30};
0051 
0052     qreal pointRotationAngle{0.0};
0053     Symbol::Style pointStyle;
0054     QBrush pointBrush;
0055     QPen pointPen;
0056     qreal pointOpacity;
0057     qreal pointSize;
0058     bool pointVisibility{true};
0059 
0060     QString name() const;
0061     void retransform();
0062     void updateFileName();
0063     void discretize();
0064     void makeSegments();
0065     bool uploadImage(const QString&);
0066 };
0067 
0068 #endif