-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGUI4.h
More file actions
124 lines (108 loc) · 3.38 KB
/
GUI4.h
File metadata and controls
124 lines (108 loc) · 3.38 KB
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
/*=========================================================================
Copyright 2004 Sandia Corporation.
Under the terms of Contract DE-AC04-94AL85000, there is a non-exclusive
license for use of this work by or on behalf of the
U.S. Government. Redistribution and use in source and binary forms, with
or without modification, are permitted provided that this Notice and any
statement of authorship are reproduced on all copies.
=========================================================================*/
/*========================================================================
For general information about using VTK and Qt, see:
http://www.trolltech.com/products/3rdparty/vtksupport.html
=========================================================================*/
/*========================================================================
!!! WARNING for those who want to contribute code to this file.
!!! If you use a commercial edition of Qt, you can modify this code.
!!! If you use an open source version of Qt, you are free to modify
!!! and use this code within the guidelines of the GPL license.
!!! Unfortunately, you cannot contribute the changes back into this
!!! file. Doing so creates a conflict between the GPL and BSD-like VTK
!!! license.
=========================================================================*/
#ifndef _GUI_h
#define _GUI_h
#include <QMainWindow>
#include "ui_GUI4.h"
#include <qslider.h>
#include <qlabel.h>
#include <qcombobox.h>
#include <qpushbutton.h>
#include <qfiledialog.h>
#include "vtkChartXY.h"
#include "vtkChartLegend.h"
#include "vtkTooltipItem.h"
#include "cll.h"
class vtkRenderer;
class vtkEventQtSlotConnect;
class vtkObject;
class vtkCommand;
class vtkContourFilter;
class vtkActor;
class vtkUnstructuredGridReader;
class vtkUnstructuredGrid;
class vtkContextView;
class vtkPlot;
class vtkTextActor;
//class vtkChartXY;
class VTK_CHARTS_EXPORT vtkNewChart: public vtkChartXY
{
public:
vtkVector2f chartPos;
vtkTypeMacro(vtkNewChart, vtkChartXY);
static vtkNewChart* New();
void SetTooltipInfo(const vtkContextMouseEvent& mouse,
const vtkVector2f &plotPos,
vtkIdType seriesIndex, vtkPlot* plot, vtkIdType segmentIndex)
{
/* chartPos.X = plotPos.X(); */
/* chartPos.Y = plotPos.Y(); */
chartPos = vtkVector2f(plotPos.X(), plotPos.Y());
/* std::cout<<plotPos.X()<<" "<<plotPos.Y()<<std::endl; */
vtkChartXY::SetTooltipInfo(mouse, plotPos, seriesIndex, plot, segmentIndex);
}
protected:
vtkNewChart(){
}
};
class GUI4 : public QMainWindow, public Ui::GUI
{
Q_OBJECT
public:
GUI4();
~GUI4();
int BINS;
float *bins;
float *binst;
float *minmax;
float increment;
//CL example;
void WriteKappa(char*);
public slots:
void OpenFile();
void SetIsoValue();
void SetLineEdit(int);
void DisableButton(int);
void UpdateSlider(int);
void CalculateKappa();
void UpdateCoords();
void UpdateLineEdit();
protected:
vtkRenderer* Ren1;
vtkRenderer* Ren2;
vtkContourFilter* contours;
vtkTextActor* textActor;
vtkActor *contActor;
std::string fileName;
//load and build our CL program from the file
CL example;
vtkUnstructuredGridReader *ureader;
vtkUnstructuredGrid *uGrid;
vtkContextView *view;
vtkChartXY *chart;
// NewChart *chartNew;
vtkPlot *line;
vtkEventQtSlotConnect* Connections;
//name more sensible
/* CL* example; */
};
#endif // _GUI_h