File indexing completed on 2025-01-05 03:35:32

0001 /*
0002     File                 : QQPlotDock.h
0003     Project              : LabPlot
0004     Description          : widget for QQ-plot properties
0005     --------------------------------------------------------------------
0006     SPDX-FileCopyrightText: 2023 Alexander Semke <alexander.semke@web.de>
0007 
0008     SPDX-License-Identifier: GPL-2.0-or-later
0009 */
0010 
0011 #ifndef QQPLOTDOCK_H
0012 #define QQPLOTDOCK_H
0013 
0014 #include "kdefrontend/dockwidgets/BaseDock.h"
0015 #include "ui_qqplotdock.h"
0016 
0017 class LineWidget;
0018 class QQPlot;
0019 class SymbolWidget;
0020 class TreeViewComboBox;
0021 
0022 class QQPlotDock : public BaseDock {
0023     Q_OBJECT
0024 
0025 public:
0026     explicit QQPlotDock(QWidget*);
0027     ~QQPlotDock() override;
0028 
0029     void setPlots(QList<QQPlot*>);
0030     void updateLocale() override;
0031 
0032 private:
0033     TreeViewComboBox* cbDataColumn;
0034 
0035     void load();
0036     void loadConfig(KConfig&);
0037 
0038 protected:
0039     Ui::QQPlotDock ui;
0040     LineWidget* lineWidget{nullptr};
0041     SymbolWidget* symbolWidget{nullptr};
0042 
0043     QList<QQPlot*> m_plots;
0044     QQPlot* m_plot{nullptr};
0045 
0046     virtual void setModel();
0047 
0048 private Q_SLOTS:
0049     void retranslateUi();
0050 
0051     // SLOTs for changes triggered in QQPlotDock
0052 
0053     // General-Tab
0054     void dataColumnChanged(const QModelIndex&);
0055     void distributionChanged(int);
0056 
0057     // SLOTs for changes triggered in QQPlot
0058     // General-Tab
0059     void plotDataColumnChanged(const AbstractColumn*);
0060     void plotDistributionChanged(nsl_sf_stats_distribution);
0061 
0062     // load and save
0063     void loadConfigFromTemplate(KConfig&);
0064     void saveConfigAsTemplate(KConfig&);
0065 
0066 Q_SIGNALS:
0067     void info(const QString&);
0068 };
0069 
0070 #endif