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

0001 /*
0002     File                 : RandomValuesDialog.h
0003     Project              : LabPlot
0004     Description          : Dialog for generating uniformly and non-uniformly distributed random numbers
0005     --------------------------------------------------------------------
0006     SPDX-FileCopyrightText: 2014 Alexander Semke <alexander.semke@web.de>
0007     SPDX-License-Identifier: GPL-2.0-or-later
0008 */
0009 
0010 #ifndef RANDOMVALUESDIALOG_H
0011 #define RANDOMVALUESDIALOG_H
0012 
0013 #include "ui_randomvalueswidget.h"
0014 #include <QDialog>
0015 
0016 class Column;
0017 class Spreadsheet;
0018 class QPushButton;
0019 
0020 class RandomValuesDialog : public QDialog {
0021     Q_OBJECT
0022 
0023 public:
0024     explicit RandomValuesDialog(Spreadsheet*, QWidget* parent = nullptr);
0025     ~RandomValuesDialog() override;
0026     void setColumns(const QVector<Column*>&);
0027 
0028 private:
0029     Ui::RandomValuesWidget ui;
0030     QVector<Column*> m_columns;
0031     Spreadsheet* m_spreadsheet;
0032     QPushButton* m_okButton;
0033 
0034 private Q_SLOTS:
0035     void generate();
0036     void distributionChanged(int index = 0);
0037     void checkValues();
0038 };
0039 
0040 #endif