hdt 3.2.0 → 3.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/deps/hdt-it/.cproject +42 -0
- package/deps/hdt-it/.project +27 -0
- package/deps/hdt-it/Camera.cpp +249 -0
- package/deps/hdt-it/Camera.h +77 -0
- package/deps/hdt-it/Color.cpp +157 -0
- package/deps/hdt-it/Color.h +49 -0
- package/deps/hdt-it/Info.plist +58 -0
- package/deps/hdt-it/LICENSE +280 -0
- package/deps/hdt-it/README.md +73 -0
- package/deps/hdt-it/StopWatch.cpp +170 -0
- package/deps/hdt-it/StopWatch.hpp +61 -0
- package/deps/hdt-it/abouthdt.cpp +14 -0
- package/deps/hdt-it/abouthdt.hpp +22 -0
- package/deps/hdt-it/abouthdt.ui +173 -0
- package/deps/hdt-it/colors.hpp +29 -0
- package/deps/hdt-it/constants.h +39 -0
- package/deps/hdt-it/createdmg.sh +72 -0
- package/deps/hdt-it/dictionarysuggestions.cpp +186 -0
- package/deps/hdt-it/dictionarysuggestions.hpp +39 -0
- package/deps/hdt-it/doc/hdtit.png +0 -0
- package/deps/hdt-it/doc/manual.html +88 -0
- package/deps/hdt-it/doc/matrix.png +0 -0
- package/deps/hdt-it/editreset.png +0 -0
- package/deps/hdt-it/hdt-it.pro +135 -0
- package/deps/hdt-it/hdt-it_es.qm +0 -0
- package/deps/hdt-it/hdt-it_es.ts +906 -0
- package/deps/hdt-it/hdtcachedinfo.cpp +155 -0
- package/deps/hdt-it/hdtcachedinfo.hpp +38 -0
- package/deps/hdt-it/hdtcontroller.cpp +369 -0
- package/deps/hdt-it/hdtcontroller.hpp +103 -0
- package/deps/hdt-it/hdtico.icns +0 -0
- package/deps/hdt-it/hdtico.rc +1 -0
- package/deps/hdt-it/hdtit.cpp +400 -0
- package/deps/hdt-it/hdtit.hpp +78 -0
- package/deps/hdt-it/hdtit.ui +875 -0
- package/deps/hdt-it/hdtoperation.cpp +284 -0
- package/deps/hdt-it/hdtoperation.hpp +71 -0
- package/deps/hdt-it/hdtresources.qrc +7 -0
- package/deps/hdt-it/hdtspecform.cpp +180 -0
- package/deps/hdt-it/hdtspecform.hpp +38 -0
- package/deps/hdt-it/hdtspecform.ui +361 -0
- package/deps/hdt-it/hdtsummarygenerator.cpp +109 -0
- package/deps/hdt-it/hdtsummarygenerator.hpp +15 -0
- package/deps/hdt-it/hdtwinico.ico +0 -0
- package/deps/hdt-it/hdtwinico2.ico +0 -0
- package/deps/hdt-it/headermodel.cpp +174 -0
- package/deps/hdt-it/headermodel.hpp +38 -0
- package/deps/hdt-it/loading.gif +0 -0
- package/deps/hdt-it/logo-hdt.png +0 -0
- package/deps/hdt-it/logo-hdt2.png +0 -0
- package/deps/hdt-it/main.cpp +39 -0
- package/deps/hdt-it/matrixviewwidget.cpp +501 -0
- package/deps/hdt-it/matrixviewwidget.hpp +81 -0
- package/deps/hdt-it/myapplication.cpp +45 -0
- package/deps/hdt-it/myapplication.hpp +24 -0
- package/deps/hdt-it/predicatestatus.cpp +97 -0
- package/deps/hdt-it/predicatestatus.hpp +39 -0
- package/deps/hdt-it/qclearlineedit.cpp +48 -0
- package/deps/hdt-it/qclearlineedit.hpp +30 -0
- package/deps/hdt-it/regexmodel.cpp +132 -0
- package/deps/hdt-it/regexmodel.hpp +37 -0
- package/deps/hdt-it/resultcounter.cpp +47 -0
- package/deps/hdt-it/resultcounter.hpp +30 -0
- package/deps/hdt-it/searchresultsmodel.cpp +179 -0
- package/deps/hdt-it/searchresultsmodel.hpp +39 -0
- package/deps/hdt-it/sparqlform.cpp +27 -0
- package/deps/hdt-it/sparqlform.hpp +28 -0
- package/deps/hdt-it/sparqlform.ui +112 -0
- package/deps/hdt-it/sparqlmodel.cpp +155 -0
- package/deps/hdt-it/sparqlmodel.hpp +32 -0
- package/deps/hdt-it/stringutils.cpp +48 -0
- package/deps/hdt-it/stringutils.hpp +18 -0
- package/deps/hdt-it/triplecomponentmodel.cpp +146 -0
- package/deps/hdt-it/triplecomponentmodel.hpp +33 -0
- package/deps/libcds/Doxyfile +307 -0
- package/deps/libcds/tutorial/tutorial.pdf +0 -0
- package/deps/libhdt/.cproject +304 -0
- package/deps/libhdt/Doxyfile +1630 -0
- package/package.json +7 -1
- package/.eslintrc +0 -178
- package/.github/workflows/ci.yml +0 -73
- package/.gitmodules +0 -4
- package/.idea/codeStyles/Project.xml +0 -38
- package/.idea/codeStyles/codeStyleConfig.xml +0 -5
- package/.idea/hdt.iml +0 -12
- package/.idea/inspectionProfiles/Project_Default.xml +0 -7
- package/.idea/jsLinters/jshint.xml +0 -16
- package/.idea/modules.xml +0 -8
- package/.idea/vcs.xml +0 -7
- package/.jshintignore +0 -1
- package/.jshintrc +0 -10
- package/perf/run.js +0 -43
- package/replace-in-file.json +0 -5
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
2
|
+
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
|
|
3
|
+
<storageModule moduleId="org.eclipse.cdt.core.settings">
|
|
4
|
+
<cconfiguration id="cdt.managedbuild.toolchain.gnu.macosx.base.1829563900">
|
|
5
|
+
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.toolchain.gnu.macosx.base.1829563900" moduleId="org.eclipse.cdt.core.settings" name="Default">
|
|
6
|
+
<externalSettings/>
|
|
7
|
+
<extensions>
|
|
8
|
+
<extension id="org.eclipse.cdt.core.MachO64" point="org.eclipse.cdt.core.BinaryParser"/>
|
|
9
|
+
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
|
10
|
+
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
|
11
|
+
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
|
12
|
+
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
|
|
13
|
+
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
|
14
|
+
</extensions>
|
|
15
|
+
</storageModule>
|
|
16
|
+
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
|
17
|
+
<configuration buildProperties="" id="cdt.managedbuild.toolchain.gnu.macosx.base.1829563900" name="Default" parent="org.eclipse.cdt.build.core.emptycfg">
|
|
18
|
+
<folderInfo id="cdt.managedbuild.toolchain.gnu.macosx.base.1829563900.292812586" name="/" resourcePath="">
|
|
19
|
+
<toolChain id="cdt.managedbuild.toolchain.gnu.macosx.base.112445185" name="cdt.managedbuild.toolchain.gnu.macosx.base" superClass="cdt.managedbuild.toolchain.gnu.macosx.base">
|
|
20
|
+
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.MachO64" id="cdt.managedbuild.target.gnu.platform.macosx.base.1371628002" name="Debug Platform" osList="macosx" superClass="cdt.managedbuild.target.gnu.platform.macosx.base"/>
|
|
21
|
+
<builder id="cdt.managedbuild.target.gnu.builder.macosx.base.37564538" managedBuildOn="false" name="Gnu Make Builder.Default" superClass="cdt.managedbuild.target.gnu.builder.macosx.base"/>
|
|
22
|
+
<tool id="cdt.managedbuild.tool.macosx.c.linker.macosx.base.43713671" name="MacOS X C Linker" superClass="cdt.managedbuild.tool.macosx.c.linker.macosx.base"/>
|
|
23
|
+
<tool id="cdt.managedbuild.tool.macosx.cpp.linker.macosx.base.1264239145" name="MacOS X C++ Linker" superClass="cdt.managedbuild.tool.macosx.cpp.linker.macosx.base"/>
|
|
24
|
+
<tool id="cdt.managedbuild.tool.gnu.assembler.macosx.base.1940083671" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.macosx.base"/>
|
|
25
|
+
<tool id="cdt.managedbuild.tool.gnu.archiver.macosx.base.468265155" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.macosx.base"/>
|
|
26
|
+
<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.macosx.base.756886775" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.macosx.base"/>
|
|
27
|
+
<tool id="cdt.managedbuild.tool.gnu.c.compiler.macosx.base.1766701405" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.macosx.base"/>
|
|
28
|
+
</toolChain>
|
|
29
|
+
</folderInfo>
|
|
30
|
+
</configuration>
|
|
31
|
+
</storageModule>
|
|
32
|
+
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
|
33
|
+
</cconfiguration>
|
|
34
|
+
</storageModule>
|
|
35
|
+
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
|
36
|
+
<project id="hdt-it.null.90390513" name="hdt-it"/>
|
|
37
|
+
</storageModule>
|
|
38
|
+
<storageModule moduleId="scannerConfiguration">
|
|
39
|
+
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
|
40
|
+
</storageModule>
|
|
41
|
+
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
|
|
42
|
+
</cproject>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<projectDescription>
|
|
3
|
+
<name>hdt-it</name>
|
|
4
|
+
<comment></comment>
|
|
5
|
+
<projects>
|
|
6
|
+
</projects>
|
|
7
|
+
<buildSpec>
|
|
8
|
+
<buildCommand>
|
|
9
|
+
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
|
|
10
|
+
<triggers>clean,full,incremental,</triggers>
|
|
11
|
+
<arguments>
|
|
12
|
+
</arguments>
|
|
13
|
+
</buildCommand>
|
|
14
|
+
<buildCommand>
|
|
15
|
+
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
|
|
16
|
+
<triggers>full,incremental,</triggers>
|
|
17
|
+
<arguments>
|
|
18
|
+
</arguments>
|
|
19
|
+
</buildCommand>
|
|
20
|
+
</buildSpec>
|
|
21
|
+
<natures>
|
|
22
|
+
<nature>org.eclipse.cdt.core.cnature</nature>
|
|
23
|
+
<nature>org.eclipse.cdt.core.ccnature</nature>
|
|
24
|
+
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
|
|
25
|
+
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
|
|
26
|
+
</natures>
|
|
27
|
+
</projectDescription>
|
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Camera.cpp
|
|
3
|
+
*
|
|
4
|
+
* Created on: 04/03/2011
|
|
5
|
+
* Author: mck
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
#include <iostream>
|
|
9
|
+
|
|
10
|
+
#include "Camera.h"
|
|
11
|
+
|
|
12
|
+
Camera::Camera() :
|
|
13
|
+
rotationAnimation(this, "camRotation")
|
|
14
|
+
{
|
|
15
|
+
widgetWidth = 800;
|
|
16
|
+
widgetHeight = 600;
|
|
17
|
+
toDefaultValues();
|
|
18
|
+
|
|
19
|
+
connect(this, SIGNAL(rotationChanged()), this, SIGNAL(cameraChanged()));
|
|
20
|
+
connect(this, SIGNAL(zoomChanged()), this, SIGNAL(cameraChanged()));
|
|
21
|
+
connect(this, SIGNAL(offsetChanged()), this, SIGNAL(cameraChanged()));
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
Camera::~Camera()
|
|
25
|
+
{
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
qreal Camera::getZoom()
|
|
29
|
+
{
|
|
30
|
+
return zoom;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
void Camera::setZoom(double newz)
|
|
34
|
+
{
|
|
35
|
+
zoom = newz;
|
|
36
|
+
zoom = zoom < 0.5 ? 0.5 : zoom;
|
|
37
|
+
emit zoomChanged();
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
void Camera::increaseZoom(int dif)
|
|
41
|
+
{
|
|
42
|
+
zoom += 0.001*dif*zoom;
|
|
43
|
+
zoom = zoom < 0.5 ? 0.5 : zoom;
|
|
44
|
+
emit zoomChanged();
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
void Camera::decreaseZoom(int dif){
|
|
48
|
+
zoom -= 0.001*dif*zoom;
|
|
49
|
+
zoom = zoom < 0.5 ? 0.5 : zoom;
|
|
50
|
+
emit zoomChanged();
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
void Camera::multiplyZoom(int mult)
|
|
54
|
+
{
|
|
55
|
+
zoom *= mult;
|
|
56
|
+
zoom = zoom < 0.5 ? 0.5 : zoom;
|
|
57
|
+
emit zoomChanged();
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
void Camera::setOffset(double x,double y){
|
|
62
|
+
offx = x;
|
|
63
|
+
offy = y;
|
|
64
|
+
if(offx<-1.0) offx=-1.0;
|
|
65
|
+
if(offx>0.0) offx=0.0;
|
|
66
|
+
if(offy<-1.0) offy=-1.0;
|
|
67
|
+
if(offy>0.0) offy=0.0;
|
|
68
|
+
emit offsetChanged();
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
void Camera::setOffset(QPointF &rect){
|
|
72
|
+
this->setOffset(rect.x(), rect.y());
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
QPointF Camera::getOffset() {
|
|
76
|
+
return QPointF(offx, offy);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
void Camera::moveOffset(double x,double y){
|
|
80
|
+
setOffset(offx + x / (zoom*widgetWidth), offy - y / (zoom*widgetHeight));
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
void Camera::setRotation(double x,double y){
|
|
84
|
+
rotx = x;
|
|
85
|
+
roty = y;
|
|
86
|
+
emit rotationChanged();
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
void Camera::setRotation(QPointF &rect){
|
|
90
|
+
this->setRotation(rect.x(), rect.y());
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
void Camera::animateRotation(double x, double y) {
|
|
94
|
+
rotationAnimation.stop();
|
|
95
|
+
rotationAnimation.setDuration(500);
|
|
96
|
+
rotationAnimation.setEasingCurve(QEasingCurve::InOutQuad);
|
|
97
|
+
rotationAnimation.setStartValue(QPointF(rotx, roty));
|
|
98
|
+
rotationAnimation.setEndValue(QPointF(x,y));
|
|
99
|
+
rotationAnimation.start();
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
QPointF Camera::getRotation() {
|
|
103
|
+
return QPointF(rotx, roty);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
void Camera::rotateCamera(double x,double y){
|
|
107
|
+
rotationAnimation.stop();
|
|
108
|
+
rotx += 0.5 * x;
|
|
109
|
+
roty += 0.5 * y;
|
|
110
|
+
emit rotationChanged();
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
void Camera::toDefaultValues(){
|
|
114
|
+
rotx = roty = 0;
|
|
115
|
+
zoom = 1;
|
|
116
|
+
offx = -0.5;
|
|
117
|
+
offy = -0.5;
|
|
118
|
+
emit rotationChanged();
|
|
119
|
+
emit zoomChanged();
|
|
120
|
+
emit offsetChanged();
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
void Camera::setScreenSize(int w, int h){
|
|
124
|
+
widgetWidth = w;
|
|
125
|
+
widgetHeight = h;
|
|
126
|
+
|
|
127
|
+
glViewport(0, 0, (GLsizei) w, (GLsizei) h);
|
|
128
|
+
|
|
129
|
+
GLdouble aspect, left, right, bottom, top;
|
|
130
|
+
|
|
131
|
+
aspect = (GLdouble) widgetWidth / (GLdouble) widgetHeight;
|
|
132
|
+
|
|
133
|
+
if ( aspect < 1.0 ) {
|
|
134
|
+
left = -0.75;
|
|
135
|
+
right = 0.75;
|
|
136
|
+
bottom = -1.0 * ( 1.0 / aspect );
|
|
137
|
+
top = 1.0 * ( 1.0 / aspect );
|
|
138
|
+
} else {
|
|
139
|
+
left = -0.75 * aspect;
|
|
140
|
+
right = 0.75 * aspect;
|
|
141
|
+
bottom = -1.0;
|
|
142
|
+
top = 1.0;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
glMatrixMode( GL_PROJECTION );
|
|
146
|
+
glLoadIdentity();
|
|
147
|
+
glOrtho( left*widgetWidth, right*widgetWidth, bottom*widgetHeight, top*widgetHeight, -10, 10 );
|
|
148
|
+
glMatrixMode( GL_MODELVIEW );
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
void Camera::applyTransform(){
|
|
152
|
+
glScaled(1.1*zoom, 1.1*zoom, 1.0);
|
|
153
|
+
|
|
154
|
+
glScalef(widgetWidth, widgetHeight, 1.0);
|
|
155
|
+
|
|
156
|
+
glTranslatef(offx, offy, 1);
|
|
157
|
+
|
|
158
|
+
glTranslatef(0.5, 0.5, 0.5);
|
|
159
|
+
glRotatef(roty, 1, 0, 0);
|
|
160
|
+
glRotatef(rotx, 0, 1, 0);
|
|
161
|
+
glTranslatef(-0.5, -0.5, -0.5);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
void Camera::setFrontView()
|
|
165
|
+
{
|
|
166
|
+
animateRotation(0, 0);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
void Camera::setLeftView()
|
|
170
|
+
{
|
|
171
|
+
animateRotation(90,0);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
void Camera::setTopView()
|
|
175
|
+
{
|
|
176
|
+
animateRotation(0,90);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
void Camera::set3DView()
|
|
180
|
+
{
|
|
181
|
+
animateRotation(-45,45);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
bool Camera::isFrontView()
|
|
185
|
+
{
|
|
186
|
+
return rotx==0 && roty==0;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
bool Camera::isLeftView()
|
|
190
|
+
{
|
|
191
|
+
return rotx==90 && roty==0;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
bool Camera::isTopView()
|
|
195
|
+
{
|
|
196
|
+
return rotx==0 && roty==90;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
bool Camera::is3DView()
|
|
200
|
+
{
|
|
201
|
+
return rotx==-45 && roty==45;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
void Camera::toDefaultValuesAnimated()
|
|
205
|
+
{
|
|
206
|
+
QPropertyAnimation *rotAnim = new QPropertyAnimation(this, "camRotation");
|
|
207
|
+
rotAnim->setEasingCurve(QEasingCurve::InOutQuad);
|
|
208
|
+
rotAnim->setDuration(400);
|
|
209
|
+
rotAnim->setStartValue(QPointF(rotx, roty));
|
|
210
|
+
rotAnim->setEndValue(QPointF(0,0));
|
|
211
|
+
|
|
212
|
+
QPropertyAnimation *zoomAnim = new QPropertyAnimation(this, "camZoom");
|
|
213
|
+
zoomAnim->setEasingCurve(QEasingCurve::InOutQuad);
|
|
214
|
+
zoomAnim->setDuration(400);
|
|
215
|
+
zoomAnim->setStartValue(zoom);
|
|
216
|
+
zoomAnim->setEndValue(1);
|
|
217
|
+
|
|
218
|
+
QPropertyAnimation *offAnim = new QPropertyAnimation(this, "camOffset");
|
|
219
|
+
offAnim->setEasingCurve(QEasingCurve::InOutQuad);
|
|
220
|
+
offAnim->setDuration(400);
|
|
221
|
+
offAnim->setStartValue(QPointF(offx, offy));
|
|
222
|
+
offAnim->setEndValue(QPointF(-0.5, -0.5));
|
|
223
|
+
|
|
224
|
+
QSequentialAnimationGroup *animationGroup = new QSequentialAnimationGroup();
|
|
225
|
+
|
|
226
|
+
if(offAnim->startValue()!=offAnim->endValue())
|
|
227
|
+
animationGroup->addAnimation(offAnim);
|
|
228
|
+
else
|
|
229
|
+
delete offAnim;
|
|
230
|
+
|
|
231
|
+
if(zoomAnim->startValue()!=zoomAnim->endValue())
|
|
232
|
+
animationGroup->addAnimation(zoomAnim);
|
|
233
|
+
else
|
|
234
|
+
delete zoomAnim;
|
|
235
|
+
|
|
236
|
+
if(rotAnim->startValue()!=rotAnim->endValue())
|
|
237
|
+
animationGroup->addAnimation(rotAnim);
|
|
238
|
+
else
|
|
239
|
+
delete rotAnim;
|
|
240
|
+
|
|
241
|
+
animationGroup->start(QAbstractAnimation::DeleteWhenStopped);
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
void Camera::stopAnimations()
|
|
245
|
+
{
|
|
246
|
+
rotationAnimation.stop();
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Camera.h
|
|
3
|
+
*
|
|
4
|
+
* Created on: 04/03/2011
|
|
5
|
+
* Author: mck
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
#ifndef CAMERA_H_
|
|
9
|
+
#define CAMERA_H_
|
|
10
|
+
|
|
11
|
+
#include <QPointF>
|
|
12
|
+
#include <QPropertyAnimation>
|
|
13
|
+
|
|
14
|
+
#include <QtOpenGL>
|
|
15
|
+
|
|
16
|
+
class Camera : public QObject {
|
|
17
|
+
Q_OBJECT
|
|
18
|
+
Q_PROPERTY(QPointF camRotation READ getRotation WRITE setRotation NOTIFY rotationChanged)
|
|
19
|
+
Q_PROPERTY(QPointF camOffset READ getOffset WRITE setOffset NOTIFY offsetChanged)
|
|
20
|
+
Q_PROPERTY(qreal camZoom READ getZoom WRITE setZoom NOTIFY zoomChanged)
|
|
21
|
+
|
|
22
|
+
private:
|
|
23
|
+
double zoom;
|
|
24
|
+
double rotx, roty;
|
|
25
|
+
double offx, offy;
|
|
26
|
+
int widgetWidth, widgetHeight;
|
|
27
|
+
QPropertyAnimation rotationAnimation;
|
|
28
|
+
|
|
29
|
+
void stopAnimations();
|
|
30
|
+
public:
|
|
31
|
+
explicit Camera();
|
|
32
|
+
~Camera();
|
|
33
|
+
|
|
34
|
+
public:
|
|
35
|
+
qreal getZoom();
|
|
36
|
+
void setZoom(double newz);
|
|
37
|
+
void increaseZoom(int dif);
|
|
38
|
+
void decreaseZoom(int dif);
|
|
39
|
+
void multiplyZoom(int mult);
|
|
40
|
+
|
|
41
|
+
void setOffset(double x,double y);
|
|
42
|
+
void setOffset(QPointF &rect);
|
|
43
|
+
QPointF getOffset();
|
|
44
|
+
|
|
45
|
+
void moveOffset(double x,double y);
|
|
46
|
+
|
|
47
|
+
QPointF getRotation();
|
|
48
|
+
void setRotation(QPointF &rect);
|
|
49
|
+
void setRotation(double x,double y);
|
|
50
|
+
void animateRotation(double x,double y);
|
|
51
|
+
void rotateCamera(double x,double y);
|
|
52
|
+
|
|
53
|
+
void toDefaultValues();
|
|
54
|
+
void toDefaultValuesAnimated();
|
|
55
|
+
|
|
56
|
+
void setScreenSize(int width, int height);
|
|
57
|
+
void applyTransform();
|
|
58
|
+
|
|
59
|
+
bool isFrontView();
|
|
60
|
+
bool isLeftView();
|
|
61
|
+
bool isTopView();
|
|
62
|
+
bool is3DView();
|
|
63
|
+
|
|
64
|
+
public slots:
|
|
65
|
+
void setFrontView();
|
|
66
|
+
void setLeftView();
|
|
67
|
+
void setTopView();
|
|
68
|
+
void set3DView();
|
|
69
|
+
|
|
70
|
+
signals:
|
|
71
|
+
void rotationChanged();
|
|
72
|
+
void zoomChanged();
|
|
73
|
+
void offsetChanged();
|
|
74
|
+
void cameraChanged();
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
#endif /* CAMERA_H_ */
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Color.cpp
|
|
3
|
+
*
|
|
4
|
+
* Created on: 04/03/2011
|
|
5
|
+
* Author: mck
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
#include <iostream>
|
|
9
|
+
#include <math.h>
|
|
10
|
+
|
|
11
|
+
#include "Color.h"
|
|
12
|
+
#include "constants.h"
|
|
13
|
+
|
|
14
|
+
Color::Color() {
|
|
15
|
+
setRGBA(1,1,1,1);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
Color::~Color() {
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
void Color::use() {
|
|
23
|
+
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/** Invert Color
|
|
27
|
+
* @param c Description of the param.
|
|
28
|
+
* @return void
|
|
29
|
+
*/
|
|
30
|
+
void Color::invert() {
|
|
31
|
+
r = 1 - r;
|
|
32
|
+
g = 1 - g;
|
|
33
|
+
b = 1 - b;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
void Color::setRGB(double r, double g, double b) {
|
|
37
|
+
this->r = r;
|
|
38
|
+
this->g = g;
|
|
39
|
+
this->b = b;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
void Color::setRGBA(double r, double g, double b, double a) {
|
|
43
|
+
this->r = r;
|
|
44
|
+
this->g = g;
|
|
45
|
+
this->b = b;
|
|
46
|
+
this->a = a;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/** HSV to RGB
|
|
50
|
+
* @param h Description of the param.
|
|
51
|
+
* @param s Description of the param.
|
|
52
|
+
* @param v Description of the param.
|
|
53
|
+
* @param c Description of the param.
|
|
54
|
+
* @return void
|
|
55
|
+
*/
|
|
56
|
+
void Color::setHSV(double h, double s, double v) {
|
|
57
|
+
// H is given on [0, 6]. S and V are given on [0, 1].
|
|
58
|
+
// RGB are each returned on [0, 1].
|
|
59
|
+
float m, n, f;
|
|
60
|
+
int i;
|
|
61
|
+
|
|
62
|
+
if (h == -1) {
|
|
63
|
+
setRGB(v, v, v);
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
i = floor(h);
|
|
68
|
+
f = h - i;
|
|
69
|
+
if (!(i & 1))
|
|
70
|
+
f = 1 - f; // if i is even
|
|
71
|
+
m = v * (1 - s);
|
|
72
|
+
n = v * (1 - s * f);
|
|
73
|
+
switch (i) {
|
|
74
|
+
case 6:
|
|
75
|
+
case 0:
|
|
76
|
+
setRGB(v, n, m);
|
|
77
|
+
break;
|
|
78
|
+
case 1:
|
|
79
|
+
setRGB(n, v, m);
|
|
80
|
+
break;
|
|
81
|
+
case 2:
|
|
82
|
+
setRGB(m, v, n);
|
|
83
|
+
break;
|
|
84
|
+
case 3:
|
|
85
|
+
setRGB(m, n, v);
|
|
86
|
+
break;
|
|
87
|
+
case 4:
|
|
88
|
+
setRGB(n, m, v);
|
|
89
|
+
break;
|
|
90
|
+
case 5:
|
|
91
|
+
setRGB(v, m, n);
|
|
92
|
+
break;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
QColor Color::asQColor()
|
|
97
|
+
{
|
|
98
|
+
QColor c(255*r, 255*g, 255*b, 255*a);
|
|
99
|
+
return c;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/**Get Color 2
|
|
103
|
+
* @param val Description of the param.
|
|
104
|
+
* @param vmin Description of the param.
|
|
105
|
+
* @param vmax Description of the param.
|
|
106
|
+
* @param c Description of the param.
|
|
107
|
+
* @return void
|
|
108
|
+
*/
|
|
109
|
+
void ColorRamp2::apply(Color *c, double val, double vmin, double vmax) {
|
|
110
|
+
double total = vmax - vmin;
|
|
111
|
+
double prop = (vmin + val / total);
|
|
112
|
+
|
|
113
|
+
if(vmax==0.0) {
|
|
114
|
+
c->setRGB(1.0, 0.0, 0.0);
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
//std::cout << "h: " << fmod(prop*100,6) << std::endl;
|
|
119
|
+
//std::cout << "\tmin: " << vmin << " val: "<< val << " max: " << vmax << " Prop: " << prop << " dv: " << total << std::endl;
|
|
120
|
+
#ifdef SCREEN
|
|
121
|
+
c->setHSV(fmod(prop*100,6), 1.0 , 0.5 + 0.5 * prop);
|
|
122
|
+
c->invert();
|
|
123
|
+
#else
|
|
124
|
+
c->setHSV(fmod(prop*100,6), 1.0, 0.3+0.7*prop);
|
|
125
|
+
//c->invert();
|
|
126
|
+
#endif
|
|
127
|
+
// printf("(%.1f, %.1f, %.1f) %.1f\n", val, vmin, vmax, prop);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/** Get Color
|
|
131
|
+
* @param v Description of the param.
|
|
132
|
+
* @param vmin Description of the param.
|
|
133
|
+
* @param vmax Description of the param.
|
|
134
|
+
* @param c Description of the param.
|
|
135
|
+
* @return void
|
|
136
|
+
*/
|
|
137
|
+
void ColorRamp1::apply(Color *c, double v, double vmin, double vmax) {
|
|
138
|
+
if (v < vmin)
|
|
139
|
+
v = vmin;
|
|
140
|
+
if (v > vmax)
|
|
141
|
+
v = vmax;
|
|
142
|
+
|
|
143
|
+
double dv = vmax - vmin;
|
|
144
|
+
|
|
145
|
+
if (v < (vmin + 0.25 * dv)) {
|
|
146
|
+
c->setRGB(0, 4 * (v - vmin) / dv, 1);
|
|
147
|
+
} else if (v < (vmin + 0.5 * dv)) {
|
|
148
|
+
c->setRGB(0, 1 + 4 * (vmin + 0.25 * dv - v) / dv, 1);
|
|
149
|
+
} else if (v < (vmin + 0.75 * dv)) {
|
|
150
|
+
c->setRGB(4 * (v - vmin - 0.5 * dv) / dv, 1, 0);
|
|
151
|
+
} else {
|
|
152
|
+
c->setRGB(1, 1 + 4 * (vmin + 0.75 * dv - v) / dv, 0);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Color.h
|
|
3
|
+
*
|
|
4
|
+
* Created on: 04/03/2011
|
|
5
|
+
* Author: mck
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
#ifndef COLOR_H_
|
|
9
|
+
#define COLOR_H_
|
|
10
|
+
|
|
11
|
+
#include <QColor>
|
|
12
|
+
|
|
13
|
+
class Color {
|
|
14
|
+
public:
|
|
15
|
+
double r,g,b,a;
|
|
16
|
+
|
|
17
|
+
public:
|
|
18
|
+
Color();
|
|
19
|
+
Color(double r, double g, double b);
|
|
20
|
+
Color(double r, double g, double b, double a);
|
|
21
|
+
virtual ~Color();
|
|
22
|
+
|
|
23
|
+
void use();
|
|
24
|
+
void invert();
|
|
25
|
+
|
|
26
|
+
void setRGB(double r, double g, double b);
|
|
27
|
+
void setRGBA(double r, double g, double b, double a);
|
|
28
|
+
void setHSV(double h, double s, double v);
|
|
29
|
+
QColor asQColor();
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
class ColorRamp {
|
|
33
|
+
public:
|
|
34
|
+
virtual void apply(Color *co, double v, double vmin, double vmax)=0;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
class ColorRamp1 : public ColorRamp {
|
|
39
|
+
public:
|
|
40
|
+
void apply(Color *co, double v, double vmin, double vmax);
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
class ColorRamp2 : public ColorRamp {
|
|
45
|
+
public:
|
|
46
|
+
void apply(Color *co, double v, double vmin, double vmax);
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
#endif /* COLOR_H_ */
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
|
|
3
|
+
<plist version="0.9">
|
|
4
|
+
<dict>
|
|
5
|
+
<key>CFBundleIconFile</key>
|
|
6
|
+
<string>hdtico.icns</string>
|
|
7
|
+
<key>CFBundlePackageType</key>
|
|
8
|
+
<string>APPL</string>
|
|
9
|
+
<key>CFBundleGetInfoString</key>
|
|
10
|
+
<string>Created by Qt/QMake</string>
|
|
11
|
+
<key>CFBundleSignature</key>
|
|
12
|
+
<string>????</string>
|
|
13
|
+
<key>CFBundleExecutable</key>
|
|
14
|
+
<string>HDT-it</string>
|
|
15
|
+
<key>CFBundleIdentifier</key>
|
|
16
|
+
<string>org.rdfhdt.HDT-it</string>
|
|
17
|
+
<key>CFBundleDocumentTypes</key>
|
|
18
|
+
<array>
|
|
19
|
+
<dict>
|
|
20
|
+
<key>CFBundleTypeExtensions</key>
|
|
21
|
+
<array>
|
|
22
|
+
<string>hdt</string>
|
|
23
|
+
</array>
|
|
24
|
+
<key>CFBundleTypeIconFile</key>
|
|
25
|
+
<string>hdtico.icns</string>
|
|
26
|
+
<key>CFBundleTypeMIMETypes</key>
|
|
27
|
+
<array>
|
|
28
|
+
<string>binary/rdf-hdt</string>
|
|
29
|
+
</array>
|
|
30
|
+
<key>CFBundleTypeName</key>
|
|
31
|
+
<string>HDT RDF File</string>
|
|
32
|
+
<key>CFBundleTypeRole</key>
|
|
33
|
+
<string>Editor</string>
|
|
34
|
+
<key>LSIsAppleDefaultForType</key>
|
|
35
|
+
<true/>
|
|
36
|
+
</dict>
|
|
37
|
+
<dict>
|
|
38
|
+
<key>CFBundleTypeExtensions</key>
|
|
39
|
+
<array>
|
|
40
|
+
<string>hdt.gz</string>
|
|
41
|
+
</array>
|
|
42
|
+
<key>CFBundleTypeIconFile</key>
|
|
43
|
+
<string>hdtico.icns</string>
|
|
44
|
+
<key>CFBundleTypeMIMETypes</key>
|
|
45
|
+
<array>
|
|
46
|
+
<string>binary/rdf-hdt</string>
|
|
47
|
+
</array>
|
|
48
|
+
<key>CFBundleTypeName</key>
|
|
49
|
+
<string>HDT RDF File</string>
|
|
50
|
+
<key>CFBundleTypeRole</key>
|
|
51
|
+
<string>Editor</string>
|
|
52
|
+
<key>LSIsAppleDefaultForType</key>
|
|
53
|
+
<true/>
|
|
54
|
+
</dict>
|
|
55
|
+
|
|
56
|
+
</array>
|
|
57
|
+
</dict>
|
|
58
|
+
</plist>
|