File indexing completed on 2024-05-12 03:48:20

0001 /*
0002     File                 : LinePrivate.h
0003     Project              : LabPlot
0004     Description          : Private members of Line
0005     --------------------------------------------------------------------
0006     SPDX-FileCopyrightText: 2022 Alexander Semke <alexander.semke@web.de>
0007 
0008     SPDX-License-Identifier: GPL-2.0-or-later
0009 */
0010 
0011 #ifndef LINEPRIVATE_H
0012 #define LINEPRIVATE_H
0013 
0014 #include "backend/worksheet/Worksheet.h"
0015 
0016 #include <QPen>
0017 
0018 class LinePrivate {
0019 public:
0020     explicit LinePrivate(Line*);
0021 
0022     QString name() const;
0023     void update();
0024     void updatePixmap();
0025 
0026     QString prefix{QLatin1String("Line")};
0027     bool createXmlElement{true};
0028 
0029     // histogram specific parameters
0030     bool histogramLineTypeAvailable{false};
0031     Histogram::LineType histogramLineType{Histogram::Bars};
0032 
0033     XYCurve::DropLineType dropLineType{XYCurve::DropLineType::NoDropLine};
0034 
0035     // common parameters
0036     Qt::PenStyle style{Qt::SolidLine};
0037     double width{Worksheet::convertToSceneUnits(1.0, Worksheet::Unit::Point)};
0038     QColor color{Qt::black};
0039     QPen pen;
0040     double opacity{1.0};
0041 
0042     Line* const q{nullptr};
0043 };
0044 
0045 #endif