File indexing completed on 2025-01-05 03:35:43
0001 /* 0002 File : StatisticsColumnWidget.h 0003 Project : LabPlot 0004 Description : Widget showing statistics for column values 0005 -------------------------------------------------------------------- 0006 SPDX-FileCopyrightText: 2021-2022 Alexander Semke <alexander.semke@web.de> 0007 SPDX-License-Identifier: GPL-2.0-or-later 0008 */ 0009 0010 #ifndef STATISTICSCOLUMNWIDGET_H 0011 #define STATISTICSCOLUMNWIDGET_H 0012 0013 #include <QWidget> 0014 0015 class CartesianPlot; 0016 class Column; 0017 class Project; 0018 0019 class QTabWidget; 0020 class QTextEdit; 0021 0022 class StatisticsColumnWidget : public QWidget { 0023 Q_OBJECT 0024 0025 public: 0026 explicit StatisticsColumnWidget(const Column*, QWidget* parent = nullptr); 0027 ~StatisticsColumnWidget() override; 0028 void setCurrentTab(int); 0029 0030 private: 0031 void showOverview(); 0032 void showOverviewPlot(); 0033 void showHistogram(); 0034 void showKDEPlot(); 0035 void showQQPlot(); 0036 void showBoxPlot(); 0037 void showBarPlot(); 0038 void showParetoPlot(); 0039 0040 CartesianPlot* addPlot(QWidget*); 0041 0042 const QString isNanValue(const double) const; 0043 QString modeValue(const Column*, double) const; 0044 void copyValidData(QVector<double>&) const; 0045 0046 const Column* m_column{nullptr}; // external column that the statistics has to be shown for 0047 Project* m_project{nullptr}; 0048 QTabWidget* m_tabWidget{nullptr}; 0049 QTextEdit* m_teOverview{nullptr}; 0050 QWidget m_overviewWidget; 0051 QWidget m_overviewPlotWidget; 0052 QWidget m_histogramWidget; 0053 QWidget m_kdePlotWidget; 0054 QWidget m_qqPlotWidget; 0055 QWidget m_boxPlotWidget; 0056 QWidget m_barPlotWidget; 0057 QWidget m_paretoPlotWidget; 0058 0059 QString m_htmlOverview; 0060 0061 bool m_overviewInitialized{false}; 0062 bool m_histogramInitialized{false}; 0063 bool m_kdePlotInitialized{false}; 0064 bool m_qqPlotInitialized{false}; 0065 bool m_boxPlotInitialized{false}; 0066 bool m_barPlotInitialized{false}; 0067 bool m_paretoPlotInitialized{false}; 0068 0069 private Q_SLOTS: 0070 void currentTabChanged(int); 0071 0072 Q_SIGNALS: 0073 void tabChanged(int); 0074 }; 0075 0076 #endif