SpaghettiVis
Implementation of 2009 Everts et al. Depth-Dependent Halos: Illustrative Rendering of Dense Line Data
mainwindow.h
1 #ifndef MAINWINDOW_H
2 #define MAINWINDOW_H
3 
4 #include <QMainWindow>
5 #include <QPushButton>
6 #include <QLabel>
7 #include <QProgressBar>
8 #include <QStatusBar>
9 #include <QVariant>
10 
11 #include "libtrkfileio/trkfileio.h"
12 
13 #include "glwidget.h"
14 #include "linevertex.h"
15 
16 namespace Ui {
17 class MainWindow;
18 }
19 
24 class MainWindow : public QMainWindow
25 {
26  Q_OBJECT
27 
28 public:
29  explicit MainWindow(QWidget *parent = 0);
30  ~MainWindow();
31 
32  inline GLWidget *getGLWidget()
33  {
34  return glWidget;
35  }
36 
37 signals:
38 
39 
40 public slots:
41 
42  void displayTotalGPUMemory(float size);
43  void displayUsedGPUMemory(float size);
44  void displayFPS(int fps);
45  void displayGraphicsDeviceInfo(QString string);
46 
47 protected slots:
48 
50  void openFileAction();
51  void closeAction();
52 
53  void renderModeChanged(int index);
54  void on_generateTestDataButton_clicked();
55  void on_spinBoxLineTriangleStripWidth_valueChanged(double value);
56  void on_spinBoxLineWidthPercentageBlack_valueChanged(double value);
57  void on_spinBoxLineWidthDepthCueingFactor_valueChanged(double value);
58  void on_spinBoxLineHaloMaxDepth_valueChanged(double value);
59  void on_pushButtonRestoreDefaults_clicked();
60 
61  void on_checkBoxEnableClipping_clicked(bool checked);
62  void on_pushButtonSetClipPlaneNormal_clicked();
63  void on_horizontalSliderClipPlaneDistance_valueChanged(int value);
64 
68  glm::vec3 randomPosInBoundingBox(glm::vec3 boundingBoxMin, glm::vec3 boundingBoxMax);
69 
78  void generateTestData(int numVertices, glm::vec3 boundingBoxMin, glm::vec3 boundingBoxMax);
79 
85  bool loadTRKData(QString &filename);
86 
97  void generateAdditionalLineVertexData(std::vector<glm::vec3> linePositions);
98 
99 private:
100 
101  Ui::MainWindow *ui;
102 
103  // DATA
104 
105  enum DataType
106  {
107  TRK
108  };
109 
110  struct FileType
111  {
112  QString filename;
113  DataType type;
114  } fileType;
115 
116  GLWidget *glWidget;
117  std::vector<std::vector<LineVertex> > datasetLines;
118 
119 };
120 
121 #endif // MAINWINDOW_H
Definition: mainwindow.h:16
The GLWidget class This is the main class containing the OpenGL context All interaction with OpenGL h...
Definition: glwidget.h:23
Definition: mainwindow.h:110
The MainWindow class.
Definition: mainwindow.h:24