Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
ElmerCSC
GitHub Repository: ElmerCSC/elmerfem
Path: blob/devel/ElmerGUI/Application/vtkpost/streamline.h
3203 views
1
/*****************************************************************************
2
* *
3
* Elmer, A Finite Element Software for Multiphysical Problems *
4
* *
5
* Copyright 1st April 1995 - , CSC - IT Center for Science Ltd., Finland *
6
* *
7
* This program is free software; you can redistribute it and/or *
8
* modify it under the terms of the GNU General Public License *
9
* as published by the Free Software Foundation; either version 2 *
10
* of the License, or (at your option) any later version. *
11
* *
12
* This program is distributed in the hope that it will be useful, *
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15
* GNU General Public License for more details. *
16
* *
17
* You should have received a copy of the GNU General Public License *
18
* along with this program (in file fem/GPL-2); if not, write to the *
19
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, *
20
* Boston, MA 02110-1301, USA. *
21
* *
22
*****************************************************************************/
23
24
/*****************************************************************************
25
* *
26
* ElmerGUI streamline *
27
* *
28
*****************************************************************************
29
* *
30
* Authors: Mikko Lyly, Juha Ruokolainen and Peter Råback *
31
* Email: [email protected] *
32
* Web: http://www.csc.fi/elmer *
33
* Address: CSC - IT Center for Science Ltd. *
34
* Keilaranta 14 *
35
* 02101 Espoo, Finland *
36
* *
37
* Original Date: 15 Mar 2008 *
38
* *
39
*****************************************************************************/
40
41
#ifndef STREAMLINE_H
42
#define STREAMLINE_H
43
44
#include <QWidget>
45
#include "ui_streamline.h"
46
47
class ScalarField;
48
class VtkPost;
49
class TimeStep;
50
51
class StreamLine : public QDialog
52
{
53
Q_OBJECT
54
55
public:
56
StreamLine(QWidget *parent = 0);
57
~StreamLine();
58
59
Ui::streamLineDialog ui;
60
61
void populateWidgets(VtkPost*);
62
void draw(VtkPost*, TimeStep*);
63
64
signals:
65
void drawStreamLineSignal();
66
void hideStreamLineSignal();
67
68
public slots:
69
QString GetFieldName(); // get field name
70
QString GetColorName(); // get color name
71
bool SetFieldName(QString); // set field name
72
bool SetColorName(QString); // set color name
73
void SetMaxTime(double); // max time
74
void SetStepLength(double); // step length
75
void SetThreads(int); // nof threads
76
void SetIntegStepLength(double); // integ. step length
77
void UseSurfaceMesh(bool); // use for face mesh
78
void UseVolumeMesh(bool); // use volume mesh
79
void IntegrateForwards(bool); // integrate forwards
80
void IntegrateBackwards(bool); // integrate backwards
81
void SetMinColorVal(double); // color min val
82
void SetMaxColorVal(double); // color max value
83
void KeepColorLimits(bool); // keep color limits
84
void DrawLines(bool); // draw using lines
85
void DrawRibbons(bool); // draw using ribbons
86
void SetLineWidth(int); // line width
87
void SetRibbonWidth(int); // ribbon width
88
void UseSphereSource(bool); // use sphere source
89
void UseLineSource(bool); // use line source
90
void UsePointSource(bool); // use point source
91
void SetSphereSourceX(double); // sphere origin
92
void SetSphereSourceY(double); // sphere origin
93
void SetSphereSourceZ(double); // sphere origin
94
void SetSphereSourceRadius(double); // sphere radius
95
void SetSphereSourcePoints(int); // nof pts in sphere
96
void SetLineSourceStartX(double); // line start point
97
void SetLineSourceStartY(double); // line start point
98
void SetLineSourceStartZ(double); // line start point
99
void SetLineSourceEndX(double); // line end point
100
void SetLineSourceEndY(double); // line end point
101
void SetLineSourceEndZ(double); // line end point
102
void SetLineSourcePoints(int); // nof pts on line
103
104
private slots:
105
void cancelButtonClicked();
106
void okButtonClicked();
107
void applyButtonClicked();
108
void colorSelectionChanged(int);
109
void keepLimitsSlot(int);
110
void nullColorButtonClicked();
111
112
private:
113
ScalarField *scalarField;
114
int scalarFields;
115
QColor nullColor;
116
void setNullColor(QColor);
117
};
118
119
#endif // STREAMLINE_H
120
121