File indexing completed on 2024-05-12 15:28:16

0001 /***************************************************************************
0002     File                 : ImageWidget.h
0003     Project              : LabPlot
0004     Description          : widget for datapicker properties
0005     --------------------------------------------------------------------
0006     Copyright            : (C) 2015 by Ankit Wagadre (wagadre.ankit@gmail.com)
0007     Copyright            : (C) 2015 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 
0029 
0030 #ifndef DATAPICKERCURVEWIDGET_H
0031 #define DATAPICKERCURVEWIDGET_H
0032 
0033 #include "ui_datapickercurvewidget.h"
0034 #include "backend/datapicker/DatapickerCurve.h"
0035 #include "kdefrontend/dockwidgets/BaseDock.h"
0036 
0037 
0038 class DatapickerCurveWidget : public BaseDock {
0039     Q_OBJECT
0040 
0041 public:
0042     explicit DatapickerCurveWidget(QWidget*);
0043     ~DatapickerCurveWidget() override;
0044 
0045     void setCurves(QList<DatapickerCurve*>);
0046     void load();
0047     void updateLocale() override;
0048 
0049 private:
0050     Ui::DatapickerCurveWidget ui;
0051     void init();
0052     void hideErrorBarWidgets(bool);
0053 
0054     DatapickerCurve* m_curve{nullptr};
0055     QList<DatapickerCurve*> m_curveList;
0056     bool m_initializing;
0057     bool m_suppressTypeChange{false};
0058 
0059 private slots:
0060     //SLOTs for changes triggered in DatapickerCurveDock
0061     void updateSymbolWidgets();
0062     void xErrorTypeChanged(int);
0063     void yErrorTypeChanged(int);
0064     void styleChanged(int);
0065     void sizeChanged(double);
0066     void rotationChanged(int);
0067     void opacityChanged(int);
0068     void fillingStyleChanged(int);
0069     void fillingColorChanged(const QColor&);
0070     void borderStyleChanged(int);
0071     void borderColorChanged(const QColor&);
0072     void borderWidthChanged(double);
0073     void visibilityChanged(bool);
0074     void errorBarFillingStyleChanged(int);
0075     void errorBarFillingColorChanged(const QColor&);
0076     void errorBarSizeChanged(double);
0077 
0078     //SLOTs for changes triggered in DatapickerCurve
0079     void curveDescriptionChanged(const AbstractAspect*);
0080     void curveErrorsChanged(DatapickerCurve::Errors);
0081     void symbolStyleChanged(Symbol::Style);
0082     void symbolSizeChanged(qreal);
0083     void symbolRotationAngleChanged(qreal);
0084     void symbolOpacityChanged(qreal);
0085     void symbolBrushChanged(const QBrush&);
0086     void symbolPenChanged(const QPen&);
0087     void symbolVisibleChanged(bool);
0088     void symbolErrorBarSizeChanged(qreal);
0089     void symbolErrorBarBrushChanged(const QBrush&);
0090 };
0091 
0092 #endif // DATAPICKERCURVEWIDGET_H