14#include <QQuickPaintedItem>
53 QList<QPointF> Points_;
58 std::optional<QColor> BrushColor_;
63 double MinXValue_ = -1;
64 double MaxXValue_ = -1;
65 double MinYValue_ = -1;
66 double MaxYValue_ = -1;
68 bool YGridEnabled_ =
false;
69 bool YMinorGridEnabled_ =
false;
75 bool LeftAxisEnabled_ =
false;
76 bool BottomAxisEnabled_ =
false;
78 QString LeftAxisTitle_;
79 QString BottomAxisTitle_;
83 QColor BackgroundColor_;
85 QColor GridLinesColor_;
90 std::shared_ptr<QwtPlot> Plot_;
92 explicit PlotItem (QQuickItem* =
nullptr);
97 QVariant GetMultipoints ()
const;
98 void SetMultipoints (
const QVariant&);
100 double GetMinXValue ()
const;
101 void SetMinXValue (
double);
102 double GetMaxXValue ()
const;
103 void SetMaxXValue (
double);
104 double GetMinYValue ()
const;
105 void SetMinYValue (
double);
106 double GetMaxYValue ()
const;
107 void SetMaxYValue (
double);
109 bool GetYGridEnabled ()
const;
110 void SetYGridEnabled (
bool);
111 bool GetYMinorGridEnabled ()
const;
112 void SetYMinorGridEnabled (
bool);
114 double GetAlpha ()
const;
115 void SetAlpha (
double);
117 QColor GetColor ()
const;
118 void SetColor (
const QColor&);
120 bool GetLeftAxisEnabled ()
const;
121 void SetLeftAxisEnabled (
bool);
122 bool GetBottomAxisEnabled ()
const;
123 void SetBottomAxisEnabled (
bool);
125 QString GetLeftAxisTitle ()
const;
126 void SetLeftAxisTitle (
const QString&);
127 QString GetBottomAxisTitle ()
const;
128 void SetBottomAxisTitle (
const QString&);
130 QString GetPlotTitle ()
const;
131 void SetPlotTitle (
const QString&);
133 QColor GetBackground ()
const;
134 void SetBackground (
const QColor&);
135 QColor GetTextColor ()
const;
136 void SetTextColor (
const QColor&);
137 QColor GetGridLinesColor ()
const;
138 void SetGridLinesColor (
const QColor&);
140 int GetXExtent ()
const;
141 int GetYExtent ()
const;
143 void paint (QPainter*)
override;
145 template<
typename T,
typename Notifier>
146 void SetNewValue (T val, T& ourVal, Notifier&& notifier);
148 int CalcXExtent (QwtPlot&)
const;
149 int CalcYExtent (QwtPlot&)
const;
void bottomAxisEnabledChanged()
void SetLeftAxisTitle(const QString &)
bool GetYGridEnabled() const
QColor GetBackground() const
double GetMaxYValue() const
void leftAxisTitleChanged()
void SetPlotTitle(const QString &)
void multipointsChanged()
void SetBottomAxisEnabled(bool)
void SetMinYValue(double)
double GetMinYValue() const
bool GetLeftAxisEnabled() const
void SetMaxXValue(double)
void SetMinXValue(double)
bool GetYMinorGridEnabled() const
QString GetLeftAxisTitle() const
QList< QPointF > GetPoints() const
void SetMaxYValue(double)
void SetTextColor(const QColor &)
QString GetBottomAxisTitle() const
QString GetPlotTitle() const
void leftAxisEnabledChanged()
void SetBackground(const QColor &)
double GetMinXValue() const
void SetMultipoints(const QVariant &)
void SetPoints(const QList< QPointF > &)
PlotItem(QQuickItem *=nullptr)
bool GetBottomAxisEnabled() const
QColor GetGridLinesColor() const
void SetLeftAxisEnabled(bool)
void SetBottomAxisTitle(const QString &)
QColor GetTextColor() const
void gridLinesColorChanged()
void SetGridLinesColor(const QColor &)
void SetYMinorGridEnabled(bool)
QVariant GetMultipoints() const
void SetColor(const QColor &)
double GetMaxXValue() const
void bottomAxisTitleChanged()
void SetYGridEnabled(bool)