File: DustFormationTesterTab.h

package info (click to toggle)
dyssol 1.5.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 18,184 kB
  • sloc: cpp: 53,870; sh: 85; python: 59; makefile: 11
file content (66 lines) | stat: -rw-r--r-- 1,876 bytes parent folder | download | duplicates (2)
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/* Copyright (c) 2020, Dyssol Development Team.
 * Copyright (c) 2023, DyssolTEC GmbH.
 * All rights reserved. This file is part of Dyssol. See LICENSE file for license information. */

#pragma once

#include "ui_DustFormationTesterTab.h"
#include "DustFormationTester.h"
#include "QtDialog.h"

class CFlowsheet;
class CUnitContainer;
class CBaseStream;
class CStream;
class CHoldup;
class CMaterialsDatabase;

class CDustFormationTesterTab
	: public CQtDialog
{
	Q_OBJECT
private:
	Ui::DustFormationTesterTabClass ui;
	CDustFormationTester m_tester;
	const CFlowsheet* m_pFlowsheet;
	const CMaterialsDatabase* m_matrialsDB;
	enum class EType { STREAMS = 0, UNITS = 1 } m_focusType{ EType::STREAMS };

public:
	CDustFormationTesterTab(const CFlowsheet* _pFlowsheet, const CMaterialsDatabase* _matrialsDB, QWidget* _parent = nullptr);

	void InitializeConnections();
	void UpdateFromFlowsheet();
	void UpdateWholeView();

public slots:
	void setVisible(bool _bVisible) override;

private:
	void UpdateStreams() const;
	void UpdateUnits() const;
	void UpdateHoldups() const;
	void UpdatePorosity() const;
	void UpdateMoisture() const;
	void UpdateMoisture90() const;
	void UpdateCompounds() const;
	void UpdateDataTable();

	static void AddItemToList(QListWidget* _pList, const std::string& _sName, const std::string& _sKey);
	static void RestoreSelectedRow(QListWidget* _pList, int iRow);
	const CBaseStream* GetSelectedStream() const;
	const CUnitContainer* GetSelectedModel() const;
	const CHoldup* GetSelectedHoldup() const;
	const CStream* GetSelectedMaterialStream() const;
	std::string GetSelectedCompound() const;

private slots:
	void StreamsUnitsFocusChanged(int _index);
	void SelectedStreamChanged();
	void SelectedUnitChanged();
	void SelectedHoldupChanged();
	void PorosityChanged();
	void MoistureChanged();
	void Moisture90Changed();
	void CompoundChanged();
};