-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmainwindow.h
176 lines (134 loc) · 3.13 KB
/
mainwindow.h
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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QTableWidgetItem>
#include <QPointF>
#include <QClipboard>
#include <QDirModel>
namespace Ui {
class MainWindow;
}
class DicomItem;
/**
* @page MainWindow Class MainWindow.
* Main class which controls everything in the project.
*/
class MainWindow : public QMainWindow {
Q_OBJECT
public:
MainWindow(QWidget *parent = 0);
~MainWindow();
public:
/**
* SetTableRow.
* @param int
* @param QTableWidgetItem
* @param QString
* @param QString
* @param QString
* @return void
*/
void SetTableRow(int row_nr, QTableWidgetItem row[], QString name, QString value, QString group);
/**
* Method which puts a new row of DICOM Tag and displays its name, value and group in the table.
*/
bool dragVal;
bool windowVal;
QDirModel *model;
public slots:
/**
* Method which displays the Help Box.
* @param void
* @return void
*/
void Help();
/**
* Method which displays the About Box.
* @param void
* @return void
*/
void About();
/**
* Method that opens the choosen DICOM file and displays the picture and Tags using methods from DicomItem Class.
* @param void
* @return void
*/
void Open();
/**
* Sets the default min and max window levels.
*/
void PresDef();
/**
* Sets the min and max window levels best for skull diplaying.
*/
void PresSkull();
/**
* Sets the min and max window levels best for lung diplaying.
*/
void PresLung();
/**
* Sets the min and max window levels best for abdomen diplaying.
*/
void PresAbdomen();
/**
* Sets the min and max window levels best for bone diplaying.
*/
void PresBone();
/**
* Sets the min and max window levels best for spine diplaying.
*/
void PresSpine();
/**
* Zoom in the picture by 25%.
*/
void zoomChanged_p25();
/**
* Zoom out the picture by 25%.
*/
void zoomChanged_m25();
/**
* Zoom 100%.
*/
void zoomChanged_100();
/**
* Rotate right the picture by 90 degres.
*/
void rotateRight();
/**
* Rotate left the picture by 90 degres.
*/
void rotateLeft();
/**
* Enables mouse drag.
*/
void setDrag();
/**
* Enables manual windowing using the mouse move
*/
void setWindowing();
/**
* Copies the picture to clipboard
*/
void copyClip();
protected:
void changeEvent(QEvent *e);
virtual void mousePressEvent(QMouseEvent* event);
virtual void mouseReleaseEvent(QMouseEvent* event);
/**
* mouseMoveEvent.
* @param const QMouseEvent*
* @return void
*/
virtual void mouseMoveEvent(QMouseEvent* event);
/**
* Method which takes over the mouse event from MyGraphicsView and does the manual windowing or dragging depending on the
* choosen option.
*/
private:
Ui::MainWindow *ui;
DicomItem *dicom_file;
private slots:
void on_treeView_clicked(QModelIndex index);
void on_actionOpen_Folder_triggered();
};
#endif // MAINWINDOW_H