Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
ElmerCSC
GitHub Repository: ElmerCSC/elmerfem
Path: blob/devel/ElmerGUI/Application/vtkpost/vector.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 vector *
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 VECTOR_H
42
#define VECTOR_H
43
44
#include <QWidget>
45
#include "ui_vector.h"
46
47
class VtkPost;
48
class TimeStep;
49
class ScalarField;
50
51
class Vector : public QDialog
52
{
53
Q_OBJECT
54
55
public:
56
Vector(QWidget *parent = 0);
57
~Vector();
58
59
Ui::vectorDialog ui;
60
61
void populateWidgets(VtkPost*);
62
void draw(VtkPost*, TimeStep*);
63
64
public slots:
65
QString GetFieldName(); // get field name
66
QString GetColorName(); // get color name
67
QString GetThresholdName(); // get threshold name
68
bool SetFieldName(QString); // set field name
69
bool SetColorName(QString); // set color name
70
bool SetThresholdName(QString); // set threshold name
71
void SetLength(int); // set arrow length
72
void SetQuality(int); // set arrow quality
73
void SetEveryNth(int); // reduce arrows
74
void SetClipPlane(bool); // set clipping on/off
75
void ComputeNormals(bool); // draw better arrows
76
void SetRandomMode(bool); // randomly reduce data
77
void ScaleByMagnitude(bool); // scale arrows
78
void SetMinColorVal(double); // set color min
79
void SetMaxColorVal(double); // set color max
80
void KeepColorLimits(bool); // keep color limits
81
void SetMinThresholdVal(double); // set threshold min
82
void SetMaxThresholdVal(double); // set threshold max
83
void UseThreshold(bool); // use threshold
84
void KeepThresholdLimits(bool); // keep threshold limits
85
86
signals:
87
void drawVectorSignal();
88
void hideVectorSignal();
89
90
private slots:
91
void cancelButtonClicked();
92
void okButtonClicked();
93
void applyButtonClicked();
94
void colorSelectionChanged(int);
95
void thresholdSelectionChanged(int);
96
void keepLimitsSlot(int);
97
void keepThresholdLimitsSlot(int);
98
void nullColorButtonClicked();
99
100
private:
101
ScalarField *scalarField;
102
int scalarFields;
103
QColor nullColor;
104
void setNullColor(QColor);
105
};
106
107
#endif // VECTOR_H
108
109