File: DistrFunctionDialog.h

package info (click to toggle)
dyssol 1.5.0-1.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 18,204 kB
  • sloc: cpp: 53,870; sh: 85; python: 59; makefile: 11
file content (48 lines) | stat: -rw-r--r-- 1,204 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/* Copyright (c) 2020, Dyssol Development Team. All rights reserved. This file is part of Dyssol. See LICENSE file for license information. */

#pragma once

#include "DistributionFunctions.h"
#include "DyssolDefines.h"
#include "ui_Functional.h"

class CMultidimensionalGrid;

class CDistrFunctionDialog : public QDialog
{
	Q_OBJECT
private:
	Ui::CFunctional ui;

	double m_dParam1;
	double m_dParam2;
	std::vector<double> m_gridMeans; // mean values of the grid of distributed value
	std::vector<double> m_vDistr;
	EDistributionFunction m_distrFun;
	const CMultidimensionalGrid* m_pGrid;
	EDistrTypes m_nDimType;
	EPSDGridType m_PSDGridType;

public:
	CDistrFunctionDialog(QWidget* parent = nullptr);

	void SetDistributionsGrid(const CMultidimensionalGrid* _pGrid, EDistrTypes _nType, EPSDGridType _nPSDGridType);

	std::vector<double> GetDistribution() const;

private slots:
	void setVisible(bool _bVisible) override;

private:
	void CreateDistrFunCombo() const;

	void UpdateWholeView() const;
	void UpdateDistrFunction() const;
	void UpdateUnits() const;
	void UpdateParamLabels() const;
	void UpdateParams() const;

	void FunctionChanged(int _index);
	void OKClicked();
	void CancelClicked();
};