@@ -0,0 +1,19 | |||
|
1 | <?xml version="1.0" encoding="UTF-8"?> | |
|
2 | <!-- Copyright 2014 Alexis Jeandet <alexis.jeandet@member.fsf.org> --> | |
|
3 | <application> | |
|
4 | <id type="desktop">QLop.desktop</id> | |
|
5 | <metadata_license>CC0-1.0</metadata_license> | |
|
6 | <project_license>GPL-2.0+</project_license> | |
|
7 | <name>QLop</name> | |
|
8 | <summary>QLop is an interactive plotting software.</summary> | |
|
9 | <description> | |
|
10 | <p> | |
|
11 | QLop is an interactive plotting software. | |
|
12 | </p> | |
|
13 | </description> | |
|
14 | <screenshots> | |
|
15 | <screenshot type="default" width="800" height="600">https://hephaistos.lpp.polytechnique.fr/redmine/attachments/download/384/SocExplorer_ScreenShot1.png</screenshot> | |
|
16 | </screenshots> | |
|
17 | <url type="homepage">https://hephaistos.lpp.polytechnique.fr/redmine/projects/qlop</url> | |
|
18 | <updatecontact>alexis.jeandet@member.fsf.org</updatecontact> | |
|
19 | </application> |
@@ -0,0 +1,17 | |||
|
1 | [Desktop Entry] | |
|
2 | Version=1.0 | |
|
3 | Name=QLop | |
|
4 | Name[en_US]=QLop | |
|
5 | ||
|
6 | Type=Application | |
|
7 | GenericName=QLop | |
|
8 | ||
|
9 | Comment=QLop is an interactive plotting software. | |
|
10 | ||
|
11 | Exec=QLop -e %U | |
|
12 | Icon=/usr/share/QLop/QLop.png | |
|
13 | Terminal=false | |
|
14 | ||
|
15 | Categories=Qt;Education;Science; | |
|
16 | ||
|
17 | MimeType=text/x-python; |
@@ -0,0 +1,286 | |||
|
1 | %global upstream_name qlop-0.1-1 | |
|
2 | ||
|
3 | Name: qlop | |
|
4 | Version: 0.1 | |
|
5 | Release: 1%{?dist} | |
|
6 | Summary: QLop is an interactive plotting software, this is an early development preview of what this software will be. | |
|
7 | Group: Development/Tools | |
|
8 | License: GPLv2+ | |
|
9 | URL: https://hephaistos.lpp.polytechnique.fr/redmine/projects/qlop | |
|
10 | Source0: https://hephaistos.lpp.polytechnique.fr/redmine/attachments/download/376/%{upstream_name}.zip | |
|
11 | ||
|
12 | BuildRequires: python2-devel | |
|
13 | BuildRequires: qt5-qtbase-devel | |
|
14 | BuildRequires: qt5-qtwebkit-devel | |
|
15 | BuildRequires: qt5-qttools-static | |
|
16 | BuildRequires: qt5-qttools-devel | |
|
17 | BuildRequires: qt5-qtsvg-devel | |
|
18 | BuildRequires: qt5-qtxmlpatterns-devel | |
|
19 | BuildRequires: qt5-qtmultimedia-devel | |
|
20 | BuildRequires: qt5-pythonqt-devel | |
|
21 | BuildRequires: appdata-tools | |
|
22 | BuildRequires: desktop-file-utils | |
|
23 | BuildRequires: fftw-devel | |
|
24 | ||
|
25 | Requires(post): python2 | |
|
26 | Requires(post): qt5-qtbase | |
|
27 | Requires(post): qt5-qtwebkit | |
|
28 | Requires(post): qt5-qtsvg | |
|
29 | Requires(post): qt5-qtxmlpatterns | |
|
30 | Requires(post): qt5-pythonqt | |
|
31 | Requires(post): fftw | |
|
32 | ||
|
33 | Provides: qlop = 0.1-1 | |
|
34 | ||
|
35 | %description | |
|
36 | QLop is an interactive plotting software, this is an early development preview of what this software will be. | |
|
37 | ||
|
38 | %prep | |
|
39 | %setup -q -n %{upstream_name} | |
|
40 | ||
|
41 | ||
|
42 | ||
|
43 | %build | |
|
44 | %{_qt5_qmake} | |
|
45 | ||
|
46 | make %{?_smp_mflags} | |
|
47 | ||
|
48 | %install | |
|
49 | make install INSTALL_ROOT=%{buildroot} | |
|
50 | #appdata-validate --nonet %{buildroot}/%{_datadir}/appdata/QLop.appdata.xml | |
|
51 | #desktop-file-validate $RPM_BUILD_ROOT%{_datadir}/applications/QLop.desktop | |
|
52 | ||
|
53 | %post -p /sbin/ldconfig | |
|
54 | ||
|
55 | %postun -p /sbin/ldconfig | |
|
56 | ||
|
57 | %files | |
|
58 | /etc/QLop/python/PygmentsHighlighter.py | |
|
59 | /etc/QLop/python/PygmentsHighlighter.pyc | |
|
60 | /etc/QLop/python/PygmentsHighlighter.pyo | |
|
61 | /etc/QLop/python/PythonCompleter.py | |
|
62 | /etc/QLop/python/PythonCompleter.pyc | |
|
63 | /etc/QLop/python/PythonCompleter.pyo | |
|
64 | /etc/QLop/python/module_completion.py | |
|
65 | /etc/QLop/python/module_completion.pyc | |
|
66 | /etc/QLop/python/module_completion.pyo | |
|
67 | /etc/QLop/python/pygments/__init__.py | |
|
68 | /etc/QLop/python/pygments/__init__.pyc | |
|
69 | /etc/QLop/python/pygments/__init__.pyo | |
|
70 | /etc/QLop/python/pygments/cmdline.py | |
|
71 | /etc/QLop/python/pygments/cmdline.pyc | |
|
72 | /etc/QLop/python/pygments/cmdline.pyo | |
|
73 | /etc/QLop/python/pygments/console.py | |
|
74 | /etc/QLop/python/pygments/console.pyc | |
|
75 | /etc/QLop/python/pygments/console.pyo | |
|
76 | /etc/QLop/python/pygments/filter.py | |
|
77 | /etc/QLop/python/pygments/filter.pyc | |
|
78 | /etc/QLop/python/pygments/filter.pyo | |
|
79 | /etc/QLop/python/pygments/filters/__init__.py | |
|
80 | /etc/QLop/python/pygments/filters/__init__.pyc | |
|
81 | /etc/QLop/python/pygments/filters/__init__.pyo | |
|
82 | /etc/QLop/python/pygments/formatter.py | |
|
83 | /etc/QLop/python/pygments/formatter.pyc | |
|
84 | /etc/QLop/python/pygments/formatter.pyo | |
|
85 | /etc/QLop/python/pygments/formatters/__init__.py | |
|
86 | /etc/QLop/python/pygments/formatters/__init__.pyc | |
|
87 | /etc/QLop/python/pygments/formatters/__init__.pyo | |
|
88 | /etc/QLop/python/pygments/formatters/_mapping.py | |
|
89 | /etc/QLop/python/pygments/formatters/_mapping.pyc | |
|
90 | /etc/QLop/python/pygments/formatters/_mapping.pyo | |
|
91 | /etc/QLop/python/pygments/formatters/bbcode.py | |
|
92 | /etc/QLop/python/pygments/formatters/bbcode.pyc | |
|
93 | /etc/QLop/python/pygments/formatters/bbcode.pyo | |
|
94 | /etc/QLop/python/pygments/formatters/html.py | |
|
95 | /etc/QLop/python/pygments/formatters/html.pyc | |
|
96 | /etc/QLop/python/pygments/formatters/html.pyo | |
|
97 | /etc/QLop/python/pygments/formatters/img.py | |
|
98 | /etc/QLop/python/pygments/formatters/img.pyc | |
|
99 | /etc/QLop/python/pygments/formatters/img.pyo | |
|
100 | /etc/QLop/python/pygments/formatters/latex.py | |
|
101 | /etc/QLop/python/pygments/formatters/latex.pyc | |
|
102 | /etc/QLop/python/pygments/formatters/latex.pyo | |
|
103 | /etc/QLop/python/pygments/formatters/other.py | |
|
104 | /etc/QLop/python/pygments/formatters/other.pyc | |
|
105 | /etc/QLop/python/pygments/formatters/other.pyo | |
|
106 | /etc/QLop/python/pygments/formatters/rtf.py | |
|
107 | /etc/QLop/python/pygments/formatters/rtf.pyc | |
|
108 | /etc/QLop/python/pygments/formatters/rtf.pyo | |
|
109 | /etc/QLop/python/pygments/formatters/svg.py | |
|
110 | /etc/QLop/python/pygments/formatters/svg.pyc | |
|
111 | /etc/QLop/python/pygments/formatters/svg.pyo | |
|
112 | /etc/QLop/python/pygments/formatters/terminal.py | |
|
113 | /etc/QLop/python/pygments/formatters/terminal.pyc | |
|
114 | /etc/QLop/python/pygments/formatters/terminal.pyo | |
|
115 | /etc/QLop/python/pygments/formatters/terminal256.py | |
|
116 | /etc/QLop/python/pygments/formatters/terminal256.pyc | |
|
117 | /etc/QLop/python/pygments/formatters/terminal256.pyo | |
|
118 | /etc/QLop/python/pygments/lexer.py | |
|
119 | /etc/QLop/python/pygments/lexer.pyc | |
|
120 | /etc/QLop/python/pygments/lexer.pyo | |
|
121 | /etc/QLop/python/pygments/lexers/__init__.py | |
|
122 | /etc/QLop/python/pygments/lexers/__init__.pyc | |
|
123 | /etc/QLop/python/pygments/lexers/__init__.pyo | |
|
124 | /etc/QLop/python/pygments/lexers/_asybuiltins.py | |
|
125 | /etc/QLop/python/pygments/lexers/_asybuiltins.pyc | |
|
126 | /etc/QLop/python/pygments/lexers/_asybuiltins.pyo | |
|
127 | /etc/QLop/python/pygments/lexers/_clbuiltins.py | |
|
128 | /etc/QLop/python/pygments/lexers/_clbuiltins.pyc | |
|
129 | /etc/QLop/python/pygments/lexers/_clbuiltins.pyo | |
|
130 | /etc/QLop/python/pygments/lexers/_luabuiltins.py | |
|
131 | /etc/QLop/python/pygments/lexers/_luabuiltins.pyc | |
|
132 | /etc/QLop/python/pygments/lexers/_luabuiltins.pyo | |
|
133 | /etc/QLop/python/pygments/lexers/_mapping.py | |
|
134 | /etc/QLop/python/pygments/lexers/_mapping.pyc | |
|
135 | /etc/QLop/python/pygments/lexers/_mapping.pyo | |
|
136 | /etc/QLop/python/pygments/lexers/_phpbuiltins.py | |
|
137 | /etc/QLop/python/pygments/lexers/_phpbuiltins.pyc | |
|
138 | /etc/QLop/python/pygments/lexers/_phpbuiltins.pyo | |
|
139 | /etc/QLop/python/pygments/lexers/_postgres_builtins.py | |
|
140 | /etc/QLop/python/pygments/lexers/_postgres_builtins.pyc | |
|
141 | /etc/QLop/python/pygments/lexers/_postgres_builtins.pyo | |
|
142 | /etc/QLop/python/pygments/lexers/_scilab_builtins.py | |
|
143 | /etc/QLop/python/pygments/lexers/_scilab_builtins.pyc | |
|
144 | /etc/QLop/python/pygments/lexers/_scilab_builtins.pyo | |
|
145 | /etc/QLop/python/pygments/lexers/_vimbuiltins.py | |
|
146 | /etc/QLop/python/pygments/lexers/_vimbuiltins.pyc | |
|
147 | /etc/QLop/python/pygments/lexers/_vimbuiltins.pyo | |
|
148 | /etc/QLop/python/pygments/lexers/agile.py | |
|
149 | /etc/QLop/python/pygments/lexers/agile.pyc | |
|
150 | /etc/QLop/python/pygments/lexers/agile.pyo | |
|
151 | /etc/QLop/python/pygments/lexers/asm.py | |
|
152 | /etc/QLop/python/pygments/lexers/asm.pyc | |
|
153 | /etc/QLop/python/pygments/lexers/asm.pyo | |
|
154 | /etc/QLop/python/pygments/lexers/compiled.py | |
|
155 | /etc/QLop/python/pygments/lexers/compiled.pyc | |
|
156 | /etc/QLop/python/pygments/lexers/compiled.pyo | |
|
157 | /etc/QLop/python/pygments/lexers/dotnet.py | |
|
158 | /etc/QLop/python/pygments/lexers/dotnet.pyc | |
|
159 | /etc/QLop/python/pygments/lexers/dotnet.pyo | |
|
160 | /etc/QLop/python/pygments/lexers/functional.py | |
|
161 | /etc/QLop/python/pygments/lexers/functional.pyc | |
|
162 | /etc/QLop/python/pygments/lexers/functional.pyo | |
|
163 | /etc/QLop/python/pygments/lexers/hdl.py | |
|
164 | /etc/QLop/python/pygments/lexers/hdl.pyc | |
|
165 | /etc/QLop/python/pygments/lexers/hdl.pyo | |
|
166 | /etc/QLop/python/pygments/lexers/jvm.py | |
|
167 | /etc/QLop/python/pygments/lexers/jvm.pyc | |
|
168 | /etc/QLop/python/pygments/lexers/jvm.pyo | |
|
169 | /etc/QLop/python/pygments/lexers/math.py | |
|
170 | /etc/QLop/python/pygments/lexers/math.pyc | |
|
171 | /etc/QLop/python/pygments/lexers/math.pyo | |
|
172 | /etc/QLop/python/pygments/lexers/other.py | |
|
173 | /etc/QLop/python/pygments/lexers/other.pyc | |
|
174 | /etc/QLop/python/pygments/lexers/other.pyo | |
|
175 | /etc/QLop/python/pygments/lexers/parsers.py | |
|
176 | /etc/QLop/python/pygments/lexers/parsers.pyc | |
|
177 | /etc/QLop/python/pygments/lexers/parsers.pyo | |
|
178 | /etc/QLop/python/pygments/lexers/shell.py | |
|
179 | /etc/QLop/python/pygments/lexers/shell.pyc | |
|
180 | /etc/QLop/python/pygments/lexers/shell.pyo | |
|
181 | /etc/QLop/python/pygments/lexers/special.py | |
|
182 | /etc/QLop/python/pygments/lexers/special.pyc | |
|
183 | /etc/QLop/python/pygments/lexers/special.pyo | |
|
184 | /etc/QLop/python/pygments/lexers/sql.py | |
|
185 | /etc/QLop/python/pygments/lexers/sql.pyc | |
|
186 | /etc/QLop/python/pygments/lexers/sql.pyo | |
|
187 | /etc/QLop/python/pygments/lexers/templates.py | |
|
188 | /etc/QLop/python/pygments/lexers/templates.pyc | |
|
189 | /etc/QLop/python/pygments/lexers/templates.pyo | |
|
190 | /etc/QLop/python/pygments/lexers/text.py | |
|
191 | /etc/QLop/python/pygments/lexers/text.pyc | |
|
192 | /etc/QLop/python/pygments/lexers/text.pyo | |
|
193 | /etc/QLop/python/pygments/lexers/web.py | |
|
194 | /etc/QLop/python/pygments/lexers/web.pyc | |
|
195 | /etc/QLop/python/pygments/lexers/web.pyo | |
|
196 | /etc/QLop/python/pygments/plugin.py | |
|
197 | /etc/QLop/python/pygments/plugin.pyc | |
|
198 | /etc/QLop/python/pygments/plugin.pyo | |
|
199 | /etc/QLop/python/pygments/scanner.py | |
|
200 | /etc/QLop/python/pygments/scanner.pyc | |
|
201 | /etc/QLop/python/pygments/scanner.pyo | |
|
202 | /etc/QLop/python/pygments/style.py | |
|
203 | /etc/QLop/python/pygments/style.pyc | |
|
204 | /etc/QLop/python/pygments/style.pyo | |
|
205 | /etc/QLop/python/pygments/styles/__init__.py | |
|
206 | /etc/QLop/python/pygments/styles/__init__.pyc | |
|
207 | /etc/QLop/python/pygments/styles/__init__.pyo | |
|
208 | /etc/QLop/python/pygments/styles/autumn.py | |
|
209 | /etc/QLop/python/pygments/styles/autumn.pyc | |
|
210 | /etc/QLop/python/pygments/styles/autumn.pyo | |
|
211 | /etc/QLop/python/pygments/styles/borland.py | |
|
212 | /etc/QLop/python/pygments/styles/borland.pyc | |
|
213 | /etc/QLop/python/pygments/styles/borland.pyo | |
|
214 | /etc/QLop/python/pygments/styles/bw.py | |
|
215 | /etc/QLop/python/pygments/styles/bw.pyc | |
|
216 | /etc/QLop/python/pygments/styles/bw.pyo | |
|
217 | /etc/QLop/python/pygments/styles/colorful.py | |
|
218 | /etc/QLop/python/pygments/styles/colorful.pyc | |
|
219 | /etc/QLop/python/pygments/styles/colorful.pyo | |
|
220 | /etc/QLop/python/pygments/styles/default.py | |
|
221 | /etc/QLop/python/pygments/styles/default.pyc | |
|
222 | /etc/QLop/python/pygments/styles/default.pyo | |
|
223 | /etc/QLop/python/pygments/styles/emacs.py | |
|
224 | /etc/QLop/python/pygments/styles/emacs.pyc | |
|
225 | /etc/QLop/python/pygments/styles/emacs.pyo | |
|
226 | /etc/QLop/python/pygments/styles/friendly.py | |
|
227 | /etc/QLop/python/pygments/styles/friendly.pyc | |
|
228 | /etc/QLop/python/pygments/styles/friendly.pyo | |
|
229 | /etc/QLop/python/pygments/styles/fruity.py | |
|
230 | /etc/QLop/python/pygments/styles/fruity.pyc | |
|
231 | /etc/QLop/python/pygments/styles/fruity.pyo | |
|
232 | /etc/QLop/python/pygments/styles/manni.py | |
|
233 | /etc/QLop/python/pygments/styles/manni.pyc | |
|
234 | /etc/QLop/python/pygments/styles/manni.pyo | |
|
235 | /etc/QLop/python/pygments/styles/monokai.py | |
|
236 | /etc/QLop/python/pygments/styles/monokai.pyc | |
|
237 | /etc/QLop/python/pygments/styles/monokai.pyo | |
|
238 | /etc/QLop/python/pygments/styles/murphy.py | |
|
239 | /etc/QLop/python/pygments/styles/murphy.pyc | |
|
240 | /etc/QLop/python/pygments/styles/murphy.pyo | |
|
241 | /etc/QLop/python/pygments/styles/native.py | |
|
242 | /etc/QLop/python/pygments/styles/native.pyc | |
|
243 | /etc/QLop/python/pygments/styles/native.pyo | |
|
244 | /etc/QLop/python/pygments/styles/pastie.py | |
|
245 | /etc/QLop/python/pygments/styles/pastie.pyc | |
|
246 | /etc/QLop/python/pygments/styles/pastie.pyo | |
|
247 | /etc/QLop/python/pygments/styles/perldoc.py | |
|
248 | /etc/QLop/python/pygments/styles/perldoc.pyc | |
|
249 | /etc/QLop/python/pygments/styles/perldoc.pyo | |
|
250 | /etc/QLop/python/pygments/styles/rrt.py | |
|
251 | /etc/QLop/python/pygments/styles/rrt.pyc | |
|
252 | /etc/QLop/python/pygments/styles/rrt.pyo | |
|
253 | /etc/QLop/python/pygments/styles/tango.py | |
|
254 | /etc/QLop/python/pygments/styles/tango.pyc | |
|
255 | /etc/QLop/python/pygments/styles/tango.pyo | |
|
256 | /etc/QLop/python/pygments/styles/trac.py | |
|
257 | /etc/QLop/python/pygments/styles/trac.pyc | |
|
258 | /etc/QLop/python/pygments/styles/trac.pyo | |
|
259 | /etc/QLop/python/pygments/styles/vim.py | |
|
260 | /etc/QLop/python/pygments/styles/vim.pyc | |
|
261 | /etc/QLop/python/pygments/styles/vim.pyo | |
|
262 | /etc/QLop/python/pygments/styles/vs.py | |
|
263 | /etc/QLop/python/pygments/styles/vs.pyc | |
|
264 | /etc/QLop/python/pygments/styles/vs.pyo | |
|
265 | /etc/QLop/python/pygments/token.py | |
|
266 | /etc/QLop/python/pygments/token.pyc | |
|
267 | /etc/QLop/python/pygments/token.pyo | |
|
268 | /etc/QLop/python/pygments/unistring.py | |
|
269 | /etc/QLop/python/pygments/unistring.pyc | |
|
270 | /etc/QLop/python/pygments/unistring.pyo | |
|
271 | /etc/QLop/python/pygments/util.py | |
|
272 | /etc/QLop/python/pygments/util.pyc | |
|
273 | /etc/QLop/python/pygments/util.pyo | |
|
274 | /usr/bin/QLop | |
|
275 | /usr/share/QLop/QLop.png | |
|
276 | /usr/share/QLop/QLop.svg | |
|
277 | /usr/share/appdata/QLop.appdata.xml | |
|
278 | /usr/share/applications/QLop.desktop | |
|
279 | ||
|
280 | ||
|
281 | %changelog | |
|
282 | * Wed Apr 8 2015 Alexis Jeandet <alexis.jeandet@member.fsf.org> - 0.1 | |
|
283 | - Initial Fedora packaging | |
|
284 | ||
|
285 | * Fri Apr 3 2015 Alexis Jeandet <alexis.jeandet@member.fsf.org> - 0.1 | |
|
286 | - Initial Fedora packaging |
|
1 | NO CONTENT: new file 100644, binary diff hidden |
@@ -0,0 +1,488 | |||
|
1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
|
2 | <!-- Created with Inkscape (http://www.inkscape.org/) --> | |
|
3 | ||
|
4 | <svg | |
|
5 | xmlns:osb="http://www.openswatchbook.org/uri/2009/osb" | |
|
6 | xmlns:dc="http://purl.org/dc/elements/1.1/" | |
|
7 | xmlns:cc="http://creativecommons.org/ns#" | |
|
8 | xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" | |
|
9 | xmlns:svg="http://www.w3.org/2000/svg" | |
|
10 | xmlns="http://www.w3.org/2000/svg" | |
|
11 | xmlns:xlink="http://www.w3.org/1999/xlink" | |
|
12 | xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" | |
|
13 | xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" | |
|
14 | width="100mm" | |
|
15 | height="100mm" | |
|
16 | viewBox="0 0 35.433071 35.433071" | |
|
17 | id="svg2" | |
|
18 | version="1.1" | |
|
19 | inkscape:version="0.91 r13725" | |
|
20 | sodipodi:docname="Qlop.svg"> | |
|
21 | <defs | |
|
22 | id="defs4"> | |
|
23 | <linearGradient | |
|
24 | inkscape:collect="always" | |
|
25 | id="linearGradient4236"> | |
|
26 | <stop | |
|
27 | style="stop-color:#ffffff;stop-opacity:1;" | |
|
28 | offset="0" | |
|
29 | id="stop4238" /> | |
|
30 | <stop | |
|
31 | style="stop-color:#ffffff;stop-opacity:0;" | |
|
32 | offset="1" | |
|
33 | id="stop4240" /> | |
|
34 | </linearGradient> | |
|
35 | <linearGradient | |
|
36 | inkscape:collect="always" | |
|
37 | id="linearGradient4198"> | |
|
38 | <stop | |
|
39 | style="stop-color:#6e3175;stop-opacity:1;" | |
|
40 | offset="0" | |
|
41 | id="stop4200" /> | |
|
42 | <stop | |
|
43 | style="stop-color:#6e3175;stop-opacity:0;" | |
|
44 | offset="1" | |
|
45 | id="stop4202" /> | |
|
46 | </linearGradient> | |
|
47 | <linearGradient | |
|
48 | inkscape:collect="always" | |
|
49 | id="linearGradient4190"> | |
|
50 | <stop | |
|
51 | style="stop-color:#6e3175;stop-opacity:1;" | |
|
52 | offset="0" | |
|
53 | id="stop4192" /> | |
|
54 | <stop | |
|
55 | style="stop-color:#6e3175;stop-opacity:0;" | |
|
56 | offset="1" | |
|
57 | id="stop4194" /> | |
|
58 | </linearGradient> | |
|
59 | <linearGradient | |
|
60 | inkscape:collect="always" | |
|
61 | id="linearGradient4182"> | |
|
62 | <stop | |
|
63 | style="stop-color:#307679;stop-opacity:1;" | |
|
64 | offset="0" | |
|
65 | id="stop4184" /> | |
|
66 | <stop | |
|
67 | style="stop-color:#307679;stop-opacity:0;" | |
|
68 | offset="1" | |
|
69 | id="stop4186" /> | |
|
70 | </linearGradient> | |
|
71 | <linearGradient | |
|
72 | inkscape:collect="always" | |
|
73 | id="linearGradient5826"> | |
|
74 | <stop | |
|
75 | style="stop-color:#000000;stop-opacity:1;" | |
|
76 | offset="0" | |
|
77 | id="stop5828" /> | |
|
78 | <stop | |
|
79 | id="stop5834" | |
|
80 | offset="0.35667446" | |
|
81 | style="stop-color:#000000;stop-opacity:0.67058824;" /> | |
|
82 | <stop | |
|
83 | style="stop-color:#000000;stop-opacity:0;" | |
|
84 | offset="1" | |
|
85 | id="stop5830" /> | |
|
86 | </linearGradient> | |
|
87 | <linearGradient | |
|
88 | id="linearGradient4348" | |
|
89 | osb:paint="gradient"> | |
|
90 | <stop | |
|
91 | style="stop-color:#000000;stop-opacity:1;" | |
|
92 | offset="0" | |
|
93 | id="stop4350" /> | |
|
94 | <stop | |
|
95 | style="stop-color:#000000;stop-opacity:0;" | |
|
96 | offset="1" | |
|
97 | id="stop4352" /> | |
|
98 | </linearGradient> | |
|
99 | <linearGradient | |
|
100 | inkscape:collect="always" | |
|
101 | id="linearGradient4298"> | |
|
102 | <stop | |
|
103 | style="stop-color:#000000;stop-opacity:1;" | |
|
104 | offset="0" | |
|
105 | id="stop4300" /> | |
|
106 | <stop | |
|
107 | style="stop-color:#000000;stop-opacity:0;" | |
|
108 | offset="1" | |
|
109 | id="stop4302" /> | |
|
110 | </linearGradient> | |
|
111 | <linearGradient | |
|
112 | inkscape:collect="always" | |
|
113 | id="linearGradient4280"> | |
|
114 | <stop | |
|
115 | style="stop-color:#000000;stop-opacity:1;" | |
|
116 | offset="0" | |
|
117 | id="stop4282" /> | |
|
118 | <stop | |
|
119 | style="stop-color:#000000;stop-opacity:0;" | |
|
120 | offset="1" | |
|
121 | id="stop4284" /> | |
|
122 | </linearGradient> | |
|
123 | <linearGradient | |
|
124 | inkscape:collect="always" | |
|
125 | id="linearGradient4272"> | |
|
126 | <stop | |
|
127 | style="stop-color:#000000;stop-opacity:1;" | |
|
128 | offset="0" | |
|
129 | id="stop4274" /> | |
|
130 | <stop | |
|
131 | style="stop-color:#000000;stop-opacity:0;" | |
|
132 | offset="1" | |
|
133 | id="stop4276" /> | |
|
134 | </linearGradient> | |
|
135 | <linearGradient | |
|
136 | inkscape:collect="always" | |
|
137 | xlink:href="#linearGradient4272" | |
|
138 | id="linearGradient4278" | |
|
139 | x1="22.353247" | |
|
140 | y1="1037.531" | |
|
141 | x2="34.886586" | |
|
142 | y2="1034.4952" | |
|
143 | gradientUnits="userSpaceOnUse" | |
|
144 | gradientTransform="translate(0,0.9375)" /> | |
|
145 | <linearGradient | |
|
146 | inkscape:collect="always" | |
|
147 | xlink:href="#linearGradient4280" | |
|
148 | id="linearGradient4286" | |
|
149 | x1="26.537989" | |
|
150 | y1="1042.91" | |
|
151 | x2="35.785434" | |
|
152 | y2="1040.0529" | |
|
153 | gradientUnits="userSpaceOnUse" | |
|
154 | gradientTransform="translate(0,0.9375)" /> | |
|
155 | <linearGradient | |
|
156 | inkscape:collect="always" | |
|
157 | xlink:href="#linearGradient4298" | |
|
158 | id="linearGradient4304" | |
|
159 | x1="27.908695" | |
|
160 | y1="1029.3839" | |
|
161 | x2="33.044159" | |
|
162 | y2="1029.093" | |
|
163 | gradientUnits="userSpaceOnUse" | |
|
164 | gradientTransform="matrix(1.0510345,0,0,1.0510345,-384.49904,-74.783744)" /> | |
|
165 | <linearGradient | |
|
166 | inkscape:collect="always" | |
|
167 | xlink:href="#linearGradient5826" | |
|
168 | id="linearGradient5832" | |
|
169 | x1="-347.26422" | |
|
170 | y1="1005.4009" | |
|
171 | x2="-349.13544" | |
|
172 | y2="1005.644" | |
|
173 | gradientUnits="userSpaceOnUse" | |
|
174 | gradientTransform="translate(-0.6330508,1.184499)" /> | |
|
175 | <linearGradient | |
|
176 | inkscape:collect="always" | |
|
177 | xlink:href="#linearGradient4182" | |
|
178 | id="linearGradient4188" | |
|
179 | x1="64.876755" | |
|
180 | y1="-23.721519" | |
|
181 | x2="-0.00012969971" | |
|
182 | y2="34.778481" | |
|
183 | gradientUnits="userSpaceOnUse" /> | |
|
184 | <linearGradient | |
|
185 | inkscape:collect="always" | |
|
186 | xlink:href="#linearGradient4190" | |
|
187 | id="linearGradient4196" | |
|
188 | x1="2.5877485" | |
|
189 | y1="1050.8972" | |
|
190 | x2="2.6099038" | |
|
191 | y2="1017.0847" | |
|
192 | gradientUnits="userSpaceOnUse" | |
|
193 | gradientTransform="translate(-0.18782523,0.04419417)" /> | |
|
194 | <linearGradient | |
|
195 | inkscape:collect="always" | |
|
196 | xlink:href="#linearGradient4198" | |
|
197 | id="linearGradient4204" | |
|
198 | x1="0.0043595922" | |
|
199 | y1="1049.7626" | |
|
200 | x2="35.45358" | |
|
201 | y2="1049.7626" | |
|
202 | gradientUnits="userSpaceOnUse" /> | |
|
203 | <linearGradient | |
|
204 | inkscape:collect="always" | |
|
205 | xlink:href="#linearGradient4236" | |
|
206 | id="linearGradient4242" | |
|
207 | x1="-0.032693833" | |
|
208 | y1="1049.7988" | |
|
209 | x2="35.631543" | |
|
210 | y2="1049.7988" | |
|
211 | gradientUnits="userSpaceOnUse" /> | |
|
212 | <linearGradient | |
|
213 | inkscape:collect="always" | |
|
214 | xlink:href="#linearGradient4298" | |
|
215 | id="linearGradient4304-3" | |
|
216 | x1="27.908695" | |
|
217 | y1="1029.3839" | |
|
218 | x2="33.044159" | |
|
219 | y2="1029.093" | |
|
220 | gradientUnits="userSpaceOnUse" | |
|
221 | gradientTransform="matrix(1.0510345,0,0,1.0510345,-383.20759,-77.023195)" /> | |
|
222 | <linearGradient | |
|
223 | gradientTransform="translate(0.65840122,-1.0549257)" | |
|
224 | inkscape:collect="always" | |
|
225 | xlink:href="#linearGradient5826" | |
|
226 | id="linearGradient5832-4" | |
|
227 | x1="-347.26422" | |
|
228 | y1="1005.4009" | |
|
229 | x2="-349.13544" | |
|
230 | y2="1005.644" | |
|
231 | gradientUnits="userSpaceOnUse" /> | |
|
232 | <linearGradient | |
|
233 | inkscape:collect="always" | |
|
234 | xlink:href="#linearGradient4298" | |
|
235 | id="linearGradient4287" | |
|
236 | x1="27.908695" | |
|
237 | y1="1029.3839" | |
|
238 | x2="33.044159" | |
|
239 | y2="1029.093" | |
|
240 | gradientUnits="userSpaceOnUse" | |
|
241 | gradientTransform="matrix(1.0510345,0,0,1.0510345,-383.86599,-75.968243)" /> | |
|
242 | <linearGradient | |
|
243 | inkscape:collect="always" | |
|
244 | xlink:href="#linearGradient5826" | |
|
245 | id="linearGradient4295" | |
|
246 | x1="-347.26422" | |
|
247 | y1="1005.4009" | |
|
248 | x2="-349.13544" | |
|
249 | y2="1005.644" | |
|
250 | gradientUnits="userSpaceOnUse" /> | |
|
251 | <linearGradient | |
|
252 | inkscape:collect="always" | |
|
253 | xlink:href="#linearGradient4298" | |
|
254 | id="linearGradient4305" | |
|
255 | x1="27.908695" | |
|
256 | y1="1029.3839" | |
|
257 | x2="33.044159" | |
|
258 | y2="1029.093" | |
|
259 | gradientUnits="userSpaceOnUse" | |
|
260 | gradientTransform="matrix(1.0510345,0,0,1.0510345,-383.86599,-75.968243)" /> | |
|
261 | <linearGradient | |
|
262 | inkscape:collect="always" | |
|
263 | xlink:href="#linearGradient5826" | |
|
264 | id="linearGradient4313" | |
|
265 | x1="-347.26422" | |
|
266 | y1="1005.4009" | |
|
267 | x2="-349.13544" | |
|
268 | y2="1005.644" | |
|
269 | gradientUnits="userSpaceOnUse" /> | |
|
270 | </defs> | |
|
271 | <sodipodi:namedview | |
|
272 | id="base" | |
|
273 | pagecolor="#ffffff" | |
|
274 | bordercolor="#666666" | |
|
275 | borderopacity="1.0" | |
|
276 | inkscape:pageopacity="0.0" | |
|
277 | inkscape:pageshadow="2" | |
|
278 | inkscape:zoom="16" | |
|
279 | inkscape:cx="25.523417" | |
|
280 | inkscape:cy="5.6500742" | |
|
281 | inkscape:document-units="px" | |
|
282 | inkscape:current-layer="layer1" | |
|
283 | showgrid="false" | |
|
284 | inkscape:window-width="1920" | |
|
285 | inkscape:window-height="1014" | |
|
286 | inkscape:window-x="0" | |
|
287 | inkscape:window-y="27" | |
|
288 | inkscape:window-maximized="1" /> | |
|
289 | <metadata | |
|
290 | id="metadata7"> | |
|
291 | <rdf:RDF> | |
|
292 | <cc:Work | |
|
293 | rdf:about=""> | |
|
294 | <dc:format>image/svg+xml</dc:format> | |
|
295 | <dc:type | |
|
296 | rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> | |
|
297 | <dc:title /> | |
|
298 | </cc:Work> | |
|
299 | </rdf:RDF> | |
|
300 | </metadata> | |
|
301 | <g | |
|
302 | inkscape:groupmode="layer" | |
|
303 | id="layer2" | |
|
304 | inkscape:label="Calque 2"> | |
|
305 | <rect | |
|
306 | style="opacity:1;fill:url(#linearGradient4188);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-opacity:1;stroke-width:1.7;stroke-miterlimit:4;stroke-dasharray:none;stroke-linejoin:round;stroke-linecap:square" | |
|
307 | id="rect5808" | |
|
308 | width="35.435619" | |
|
309 | height="35.425091" | |
|
310 | x="0.0017505998" | |
|
311 | y="0.0034367263" /> | |
|
312 | <path | |
|
313 | transform="translate(0,-1016.9291)" | |
|
314 | style="fill:none;fill-rule:evenodd;stroke:url(#linearGradient4242);stroke-width:1.29320383px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" | |
|
315 | d="m 35.63063,1049.8238 -23.363888,-0.033 -12.29854205,-0.017" | |
|
316 | id="path4158-2" | |
|
317 | inkscape:connector-curvature="0" | |
|
318 | sodipodi:nodetypes="ccc" /> | |
|
319 | <path | |
|
320 | style="fill:#d0324b;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:1.29999995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" | |
|
321 | d="m 2.3216919,35.605827 0,-36.42406793" | |
|
322 | id="path4158-1-8" | |
|
323 | inkscape:connector-curvature="0" /> | |
|
324 | <path | |
|
325 | style="fill:none;fill-rule:evenodd;stroke:#ffffff;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" | |
|
326 | d="m 4.0322624,25.141553 5.3033009,-1.6415 1.3889597,-3.3461 5.113897,-1.5784 4.545686,1.1364 4.16688,-3.9143 4.293148,1.4521 6.250319,-4.5457 0,0 0,0 0,0" | |
|
327 | id="path4177-8" | |
|
328 | inkscape:connector-curvature="0" /> | |
|
329 | <ellipse | |
|
330 | style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:3.62710381;stroke-opacity:1" | |
|
331 | id="path4296-37" | |
|
332 | cx="9.0443869" | |
|
333 | cy="23.053011" | |
|
334 | rx="1.3857708" | |
|
335 | ry="1.3627762" /> | |
|
336 | <ellipse | |
|
337 | style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:3.62710381;stroke-opacity:1" | |
|
338 | id="path4296-37-7" | |
|
339 | cx="10.640625" | |
|
340 | cy="20.089321" | |
|
341 | rx="1.3857708" | |
|
342 | ry="1.3627762" /> | |
|
343 | <ellipse | |
|
344 | style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:3.62710381;stroke-opacity:1" | |
|
345 | id="path4296-37-0" | |
|
346 | cx="15.46875" | |
|
347 | cy="18.596579" | |
|
348 | rx="1.3857708" | |
|
349 | ry="1.3627762" /> | |
|
350 | <ellipse | |
|
351 | style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:3.62710381;stroke-opacity:1" | |
|
352 | id="path4296-37-6" | |
|
353 | cx="20.004902" | |
|
354 | cy="19.189219" | |
|
355 | rx="1.3857708" | |
|
356 | ry="1.3627762" /> | |
|
357 | <ellipse | |
|
358 | style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:3.62710381;stroke-opacity:1" | |
|
359 | id="path4296-37-5" | |
|
360 | cx="24.195082" | |
|
361 | cy="15.688758" | |
|
362 | rx="1.3857708" | |
|
363 | ry="1.3627762" /> | |
|
364 | <ellipse | |
|
365 | style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:3.62710381;stroke-opacity:1" | |
|
366 | id="path4296-37-51" | |
|
367 | cx="28.640625" | |
|
368 | cy="16.874823" | |
|
369 | rx="1.3857708" | |
|
370 | ry="1.3627762" /> | |
|
371 | <path | |
|
372 | style="display:inline;fill:none;fill-rule:evenodd;stroke:#ffffff;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" | |
|
373 | d="m 4.0063416,31.954086 7.3867404,-7.1973 6.439723,2.2728 5.050762,-5.0507 3.788072,2.5253 8.460028,-7.3867 0,0 -0.06313,-0.1263" | |
|
374 | id="path4175-4" | |
|
375 | inkscape:connector-curvature="0" /> | |
|
376 | </g> | |
|
377 | <g | |
|
378 | inkscape:label="Calque 1" | |
|
379 | inkscape:groupmode="layer" | |
|
380 | id="layer1" | |
|
381 | transform="translate(0,-1016.9291)" | |
|
382 | style="display:inline"> | |
|
383 | <text | |
|
384 | xml:space="preserve" | |
|
385 | style="font-style:normal;font-weight:normal;font-size:10px;line-height:125%;font-family:Sans;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" | |
|
386 | x="10.101525" | |
|
387 | y="1028.8761" | |
|
388 | id="text4154" | |
|
389 | sodipodi:linespacing="125%"><tspan | |
|
390 | sodipodi:role="line" | |
|
391 | id="tspan4156" | |
|
392 | x="10.101525" | |
|
393 | y="1028.8761" /></text> | |
|
394 | <path | |
|
395 | style="fill:none;fill-rule:evenodd;stroke:url(#linearGradient4204);stroke-width:1.08187723px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" | |
|
396 | d="m 35.453044,1049.7801 -23.223507,-0.023 -12.22464641,-0.012" | |
|
397 | id="path4158" | |
|
398 | inkscape:connector-curvature="0" | |
|
399 | sodipodi:nodetypes="ccc" /> | |
|
400 | <path | |
|
401 | style="fill:#d0324b;fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient4196);stroke-width:1.08465528px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" | |
|
402 | d="m 2.3172511,1052.4063 0,-35.4297" | |
|
403 | id="path4158-1" | |
|
404 | inkscape:connector-curvature="0" /> | |
|
405 | <path | |
|
406 | style="fill:none;fill-rule:evenodd;stroke:url(#linearGradient4286);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" | |
|
407 | d="m 3.8512066,1048.418 7.3867404,-7.1973 6.439723,2.2728 5.050762,-5.0507 3.788072,2.5253 8.460028,-7.3867 0,0 -0.06313,-0.1263" | |
|
408 | id="path4175" | |
|
409 | inkscape:connector-curvature="0" /> | |
|
410 | <path | |
|
411 | style="fill:none;fill-rule:evenodd;stroke:url(#linearGradient4278);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" | |
|
412 | d="m 3.661803,1041.6626 5.3033009,-1.6415 1.3889601,-3.3461 5.113897,-1.5784 4.545686,1.1364 4.16688,-3.9143 4.293148,1.4521 6.250319,-4.5457 0,0 0,0 0,0" | |
|
413 | id="path4177" | |
|
414 | inkscape:connector-curvature="0" /> | |
|
415 | <text | |
|
416 | xml:space="preserve" | |
|
417 | style="font-style:normal;font-weight:normal;font-size:12.85732651px;line-height:125%;font-family:Sans;letter-spacing:0px;word-spacing:0px;fill:url(#linearGradient4304);fill-opacity:1;stroke:url(#linearGradient5832);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" | |
|
418 | x="-379.69321" | |
|
419 | y="1010.6995" | |
|
420 | id="text4179" | |
|
421 | sodipodi:linespacing="125%" | |
|
422 | transform="matrix(0.97283834,-0.41451777,0.37068785,0.86997321,0,0)"><tspan | |
|
423 | sodipodi:role="line" | |
|
424 | id="tspan4181" | |
|
425 | x="-379.69321" | |
|
426 | y="1010.6995" | |
|
427 | style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:14.28591824px;font-family:Meera;-inkscape-font-specification:Meera;fill:url(#linearGradient4304);fill-opacity:1;stroke:url(#linearGradient5832)"><tspan | |
|
428 | style="font-size:16.25px;fill:url(#linearGradient4304);stroke:url(#linearGradient5832)" | |
|
429 | id="tspan5836">Q</tspan>Lop</tspan></text> | |
|
430 | <ellipse | |
|
431 | style="opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:3.62710381;stroke-opacity:1" | |
|
432 | id="path4296" | |
|
433 | cx="8.8203297" | |
|
434 | cy="1039.785" | |
|
435 | rx="1.2310911" | |
|
436 | ry="1.1418053" /> | |
|
437 | <ellipse | |
|
438 | style="opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:3.62710381;stroke-opacity:1" | |
|
439 | id="path4296-3" | |
|
440 | cx="10.354064" | |
|
441 | cy="1036.8215" | |
|
442 | rx="1.2310911" | |
|
443 | ry="1.1418053" /> | |
|
444 | <ellipse | |
|
445 | style="opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:3.62710381;stroke-opacity:1" | |
|
446 | id="path4296-7" | |
|
447 | cx="15.341692" | |
|
448 | cy="1035.3063" | |
|
449 | rx="1.2310911" | |
|
450 | ry="1.1418053" /> | |
|
451 | <ellipse | |
|
452 | style="opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:3.62710381;stroke-opacity:1" | |
|
453 | id="path4296-9" | |
|
454 | cx="19.887379" | |
|
455 | cy="1035.9692" | |
|
456 | rx="1.2310911" | |
|
457 | ry="1.1418053" /> | |
|
458 | <ellipse | |
|
459 | style="opacity:1;fill:#000000;fill-opacity:0.65490196;stroke:none;stroke-width:3.62710381;stroke-opacity:1" | |
|
460 | id="path4296-1" | |
|
461 | cx="24.180525" | |
|
462 | cy="1032.5284" | |
|
463 | rx="1.2310911" | |
|
464 | ry="1.1418053" /> | |
|
465 | <ellipse | |
|
466 | style="opacity:1;fill:#000000;fill-opacity:0.32941176;stroke:none;stroke-width:3.62710381;stroke-opacity:1" | |
|
467 | id="path4296-8" | |
|
468 | cx="28.566154" | |
|
469 | cy="1033.647" | |
|
470 | rx="1.2310911" | |
|
471 | ry="1.1418053" /> | |
|
472 | <text | |
|
473 | xml:space="preserve" | |
|
474 | style="font-style:normal;font-weight:normal;font-size:12.85732651px;line-height:125%;font-family:Sans;letter-spacing:0px;word-spacing:0px;fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" | |
|
475 | x="-379.03479" | |
|
476 | y="1009.6447" | |
|
477 | id="text4179-7" | |
|
478 | sodipodi:linespacing="125%" | |
|
479 | transform="matrix(0.97283834,-0.41451777,0.37068785,0.86997321,0,0)"><tspan | |
|
480 | sodipodi:role="line" | |
|
481 | id="tspan4181-2" | |
|
482 | x="-379.03479" | |
|
483 | y="1009.6447" | |
|
484 | style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:14.28591824px;font-family:Meera;-inkscape-font-specification:Meera;fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-opacity:1"><tspan | |
|
485 | style="font-size:16.25px;fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-opacity:1" | |
|
486 | id="tspan5836-9">Q</tspan>Lop</tspan></text> | |
|
487 | </g> | |
|
488 | </svg> |
@@ -0,0 +1,29 | |||
|
1 | #include "qlopdatabaseviewer.h" | |
|
2 | #include "ui_qlopdatabaseviewer.h" | |
|
3 | ||
|
4 | QLopDataBaseViewer::QLopDataBaseViewer(QWidget *parent) : | |
|
5 | QDockWidget(parent), | |
|
6 | ui(new Ui::QLopDataBaseViewer) | |
|
7 | { | |
|
8 | ui->setupUi(this); | |
|
9 | this->model = new QLopDataBaseViewerModel(); | |
|
10 | this->ui->dataBaseTbleView->setModel(model); | |
|
11 | } | |
|
12 | ||
|
13 | QLopDataBaseViewer::~QLopDataBaseViewer() | |
|
14 | { | |
|
15 | delete ui; | |
|
16 | delete model; | |
|
17 | } | |
|
18 | ||
|
19 | void QLopDataBaseViewer::changeEvent(QEvent *e) | |
|
20 | { | |
|
21 | QDockWidget::changeEvent(e); | |
|
22 | switch (e->type()) { | |
|
23 | case QEvent::LanguageChange: | |
|
24 | ui->retranslateUi(this); | |
|
25 | break; | |
|
26 | default: | |
|
27 | break; | |
|
28 | } | |
|
29 | } |
@@ -0,0 +1,27 | |||
|
1 | #ifndef QLOPDATABASEVIEWER_H | |
|
2 | #define QLOPDATABASEVIEWER_H | |
|
3 | ||
|
4 | #include <QDockWidget> | |
|
5 | #include <qlopdatabaseviewermodel.h> | |
|
6 | ||
|
7 | namespace Ui { | |
|
8 | class QLopDataBaseViewer; | |
|
9 | } | |
|
10 | ||
|
11 | class QLopDataBaseViewer : public QDockWidget | |
|
12 | { | |
|
13 | Q_OBJECT | |
|
14 | ||
|
15 | public: | |
|
16 | explicit QLopDataBaseViewer(QWidget *parent = 0); | |
|
17 | ~QLopDataBaseViewer(); | |
|
18 | ||
|
19 | protected: | |
|
20 | void changeEvent(QEvent *e); | |
|
21 | ||
|
22 | private: | |
|
23 | Ui::QLopDataBaseViewer *ui; | |
|
24 | QLopDataBaseViewerModel* model; | |
|
25 | }; | |
|
26 | ||
|
27 | #endif // QLOPDATABASEVIEWER_H |
@@ -0,0 +1,26 | |||
|
1 | <?xml version="1.0" encoding="UTF-8"?> | |
|
2 | <ui version="4.0"> | |
|
3 | <class>QLopDataBaseViewer</class> | |
|
4 | <widget class="QDockWidget" name="QLopDataBaseViewer"> | |
|
5 | <property name="geometry"> | |
|
6 | <rect> | |
|
7 | <x>0</x> | |
|
8 | <y>0</y> | |
|
9 | <width>825</width> | |
|
10 | <height>427</height> | |
|
11 | </rect> | |
|
12 | </property> | |
|
13 | <property name="windowTitle"> | |
|
14 | <string>DockWidget</string> | |
|
15 | </property> | |
|
16 | <widget class="QWidget" name="dockWidgetContents"> | |
|
17 | <layout class="QGridLayout" name="gridLayout"> | |
|
18 | <item row="0" column="0"> | |
|
19 | <widget class="QTableView" name="dataBaseTbleView"/> | |
|
20 | </item> | |
|
21 | </layout> | |
|
22 | </widget> | |
|
23 | </widget> | |
|
24 | <resources/> | |
|
25 | <connections/> | |
|
26 | </ui> |
@@ -0,0 +1,41 | |||
|
1 | #include "qlopdatabaseviewermodel.h" | |
|
2 | ||
|
3 | QLopDataBaseViewerModel::QLopDataBaseViewerModel(QObject *parent) | |
|
4 | : QAbstractTableModel(parent) | |
|
5 | { | |
|
6 | beginResetModel(); | |
|
7 | endResetModel(); | |
|
8 | } | |
|
9 | ||
|
10 | QLopDataBaseViewerModel::~QLopDataBaseViewerModel() | |
|
11 | { | |
|
12 | ||
|
13 | } | |
|
14 | ||
|
15 | int QLopDataBaseViewerModel::rowCount(const QModelIndex &parent) const | |
|
16 | { | |
|
17 | return QLopDataBase::count(); | |
|
18 | } | |
|
19 | ||
|
20 | int QLopDataBaseViewerModel::columnCount(const QModelIndex &parent) const | |
|
21 | { | |
|
22 | return 3; | |
|
23 | } | |
|
24 | ||
|
25 | QVariant QLopDataBaseViewerModel::data(const QModelIndex &index, int role) const | |
|
26 | { | |
|
27 | if (!index.isValid() || role != Qt::DisplayRole) | |
|
28 | return QVariant(); | |
|
29 | QLopData* data=QLopDataBase::self()->getDataFromIdex(index.row()); | |
|
30 | if(data) | |
|
31 | return data->name; | |
|
32 | else QVariant(); | |
|
33 | } | |
|
34 | ||
|
35 | QVariant QLopDataBaseViewerModel::headerData(int section, Qt::Orientation orientation, int role) const | |
|
36 | { | |
|
37 | if (role == Qt::SizeHintRole) | |
|
38 | return QSize(1, 1); | |
|
39 | return QVariant(); | |
|
40 | } | |
|
41 |
@@ -0,0 +1,24 | |||
|
1 | #ifndef QLOPDATABASEVIEWERMODEL_H | |
|
2 | #define QLOPDATABASEVIEWERMODEL_H | |
|
3 | ||
|
4 | #include <QObject> | |
|
5 | #include <QAbstractTableModel> | |
|
6 | #include <qlopdatabase.h> | |
|
7 | ||
|
8 | class QLopDataBaseViewerModel : public QAbstractTableModel | |
|
9 | { | |
|
10 | public: | |
|
11 | QLopDataBaseViewerModel(QObject *parent=0); | |
|
12 | ~QLopDataBaseViewerModel(); | |
|
13 | ||
|
14 | int rowCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE; | |
|
15 | int columnCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE; | |
|
16 | ||
|
17 | QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE; | |
|
18 | QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE; | |
|
19 | ||
|
20 | private: | |
|
21 | ||
|
22 | }; | |
|
23 | ||
|
24 | #endif // QLOPDATABASEVIEWERMODEL_H |
@@ -1,112 +1,139 | |||
|
1 | 1 | #------------------------------------------------- |
|
2 | 2 | # |
|
3 | 3 | # Project created by QtCreator 2015-01-07T02:41:29 |
|
4 | 4 | # |
|
5 | 5 | #------------------------------------------------- |
|
6 | 6 | |
|
7 | 7 | QT += core gui network xml svg |
|
8 | 8 | CONFIG += pythonqt |
|
9 | 9 | |
|
10 | 10 | greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport |
|
11 | 11 | |
|
12 | MOC_DIR = moc | |
|
13 | UI_DIR = ui | |
|
14 | OBJECTS_DIR = obj | |
|
15 | ||
|
12 | 16 | DESTDIR =./bin |
|
13 | 17 | |
|
14 | 18 | TARGET = QLop |
|
15 | 19 | TEMPLATE = app |
|
16 | 20 | |
|
17 | 21 | LIBS+=-lfftw3_threads -lfftw3 |
|
18 | 22 | |
|
19 | 23 | INCLUDEPATH += src/QCustomPlot \ |
|
20 | 24 | src src/Cassini \ |
|
21 | 25 | src/Core src/Core/Widgets \ |
|
22 | 26 | src/Core/Widgets/PyWdgt |
|
23 | 27 | |
|
24 | QMAKE_CXXFLAGS_RELEASE += -O5 -fopenmp -march=corei7-avx -mtune=corei7-avx -mavx | |
|
25 | QMAKE_LFLAGS_RELEASE += -O5 -fopenmp -march=corei7-avx -mtune=corei7-avx -mavx | |
|
26 | ||
|
27 | QMAKE_CXXFLAGS_DEBUG += -O0 -fopenmp -march=corei7-avx -mtune=corei7-avx -mavx | |
|
28 | QMAKE_LFLAGS_DEBUG += -O0 -fopenmp -march=corei7-avx -mtune=corei7-avx -mavx | |
|
29 | ||
|
28 | QMAKE_CXXFLAGS += -O5 -fopenmp | |
|
29 | QMAKE_LFLAGS += -O5 -fopenmp | |
|
30 | 30 | |
|
31 | 31 | SOURCES += src/main.cpp\ |
|
32 | 32 | src/mainwindow.cpp \ |
|
33 | 33 | src/SocExplorerPlot.cpp \ |
|
34 | 34 | src/QCustomPlot/qcustomplot.cpp \ |
|
35 | 35 | src/toolbarcontainer.cpp \ |
|
36 | 36 | src/Core/abstractfileloader.cpp \ |
|
37 | 37 | src/Core/filedownloader.cpp \ |
|
38 | 38 | src/Core/filedownloadertask.cpp \ |
|
39 | 39 | src/Core/Widgets/downloadhistory.cpp \ |
|
40 | 40 | src/Core/Widgets/downloadhistoryelement.cpp \ |
|
41 | 41 | src/Core/qlopservice.cpp \ |
|
42 | 42 | src/Cassini/expxmldownloader.cpp \ |
|
43 | 43 | src/Cassini/cassinidatadownloader.cpp \ |
|
44 | 44 | src/Cassini/cassinidatafile.cpp \ |
|
45 | 45 | src/Cassini/cassiniindexfile.cpp \ |
|
46 | 46 | src/Cassini/cassiniindexfileviewer.cpp \ |
|
47 | 47 | src/Cassini/cassinitools.cpp \ |
|
48 | 48 | src/Cassini/cassinitoolsgui.cpp \ |
|
49 | 49 | src/Core/Widgets/qlopplots.cpp \ |
|
50 | 50 | src/Core/qlopdata.cpp \ |
|
51 | 51 | src/Core/Widgets/PyWdgt/pythonconsole.cpp \ |
|
52 | 52 | src/Core/Widgets/PyWdgt/pythonqtscriptingconsoledandd.cpp \ |
|
53 | 53 | src/QCustomPlot/qcpdocumentobject.cpp \ |
|
54 | 54 | src/Core/Widgets/filebrowser.cpp \ |
|
55 | 55 | src/Core/Widgets/filesystemmodel.cpp \ |
|
56 | 56 | src/Core/Widgets/qcustomplotvect.cpp \ |
|
57 | src/Core/qlopdatabase.cpp | |
|
57 | src/Core/qlopdatabase.cpp \ | |
|
58 | src/Core/Widgets/qlopdatabaseviewer.cpp \ | |
|
59 | src/Core/Widgets/qlopdatabaseviewermodel.cpp | |
|
58 | 60 | |
|
59 | 61 | HEADERS += src/mainwindow.h \ |
|
60 | 62 | src/SocExplorerPlot.h \ |
|
61 | 63 | src/QCustomPlot/qcustomplot.h \ |
|
62 | 64 | src/toolbarcontainer.h \ |
|
63 | 65 | src/Core/abstractfileloader.h \ |
|
64 | 66 | src/Core/filedownloader.h \ |
|
65 | 67 | src/Core/filedownloadertask.h \ |
|
66 | 68 | src/Core/Widgets/downloadhistory.h \ |
|
67 | 69 | src/Core/Widgets/downloadhistoryelement.h \ |
|
68 | 70 | src/Core/qlopservice.h \ |
|
69 | 71 | src/Cassini/expxmldownloader.h \ |
|
70 | 72 | src/Cassini/cassinidatadownloader.h \ |
|
71 | 73 | src/Cassini/cassinidatafile.h \ |
|
72 | 74 | src/Cassini/cassiniindexfile.h \ |
|
73 | 75 | src/Cassini/cassiniindexfileviewer.h \ |
|
74 | 76 | src/Cassini/cassinitools.h \ |
|
75 | 77 | src/Cassini/cassinitoolsgui.h \ |
|
76 | 78 | src/Core/Widgets/qlopplots.h \ |
|
77 | 79 | src/Core/qlopdata.h \ |
|
78 | 80 | src/Core/Widgets/PyWdgt/pythonconsole.h \ |
|
79 | 81 | src/Core/Widgets/PyWdgt/pythonqtscriptingconsoledandd.h \ |
|
80 | 82 | src/Core/qlop.h \ |
|
81 | 83 | src/Core/pyqlop.h \ |
|
82 | 84 | src/QCustomPlot/qcpdocumentobject.h \ |
|
83 | 85 | src/Core/Widgets/filebrowser.h \ |
|
84 | 86 | src/Core/Widgets/filesystemmodel.h \ |
|
85 | 87 | src/Core/Widgets/qcustomplotvect.h \ |
|
86 | src/Core/qlopdatabase.h | |
|
88 | src/Core/qlopdatabase.h \ | |
|
89 | src/Core/Widgets/qlopdatabaseviewer.h \ | |
|
90 | src/Core/Widgets/qlopdatabaseviewermodel.h | |
|
87 | 91 | |
|
88 | 92 | FORMS += src/mainwindow.ui \ |
|
89 | 93 | src/Core/Widgets/downloadhistory.ui \ |
|
90 | 94 | src/Core/Widgets/downloadhistoryelement.ui \ |
|
91 | 95 | src/Cassini/cassinidatadownloader.ui \ |
|
92 | 96 | src/Cassini/cassiniindexfileviewer.ui \ |
|
93 | 97 | src/Cassini/cassinitoolsgui.ui \ |
|
94 | src/Core/Widgets/filebrowser.ui | |
|
98 | src/Core/Widgets/filebrowser.ui \ | |
|
99 | src/Core/Widgets/qlopdatabaseviewer.ui | |
|
95 | 100 | |
|
96 | 101 | RESOURCES += \ |
|
97 | 102 | resources/qlop.qrc |
|
98 | 103 | |
|
99 | 104 | include(src/Core/Widgets/NicePyConsole/NicePyConsole.pri) |
|
100 | 105 | include(src/Core/pythonQtOut/generated_cpp/PyQLop/PyQLop.pri) |
|
101 | 106 | |
|
102 | 107 | win32 { |
|
103 | 108 | DEFINES += WIN32 |
|
104 | 109 | } |
|
105 | 110 | |
|
106 | 111 | unix { |
|
107 | 112 | DEFINES += UNIX |
|
108 | 113 | } |
|
109 | 114 | |
|
115 | unix{ | |
|
116 | target.path = /usr/bin | |
|
117 | INSTALLS += target | |
|
118 | } | |
|
119 | ||
|
120 | ||
|
121 | unix{ | |
|
122 | QLopLauncher.path = /usr/share/applications/ | |
|
123 | QLopLauncher.files = linux/QLop.desktop | |
|
124 | QLopAppData.path = /usr/share/appdata/ | |
|
125 | QLopAppData.files = linux/QLop.appdata.xml | |
|
126 | share.path = /usr/share/QLop | |
|
127 | share.files = resources/QLop.svg \ | |
|
128 | resources/QLop.png | |
|
129 | ||
|
130 | INSTALLS+= QLopLauncher share QLopAppData | |
|
131 | } | |
|
132 | ||
|
110 | 133 | DISTFILES += \ |
|
111 | 134 | src/Core/pythongenerator.sh \ |
|
112 | src/Core/pythonQtgeneratorCfg.txt | |
|
135 | src/Core/pythonQtgeneratorCfg.txt \ | |
|
136 | linux/QLop.spec \ | |
|
137 | linux/QLop.desktop \ | |
|
138 | linux/QLop.appdata.xml | |
|
139 |
@@ -1,9 +1,13 | |||
|
1 | 1 | <RCC> |
|
2 | 2 | <qresource prefix="/img"> |
|
3 | 3 | <file>Gnome-view-refresh.svg</file> |
|
4 | 4 | <file>Gnome-list-add.svg</file> |
|
5 | 5 | <file>ListView.svg</file> |
|
6 | 6 | <file>TreeView.svg</file> |
|
7 | 7 | <file>Gnome-go-up.svg</file> |
|
8 | <file>QLop.svg</file> | |
|
9 | </qresource> | |
|
10 | <qresource prefix="/"> | |
|
11 | <file>QLop.png</file> | |
|
8 | 12 | </qresource> |
|
9 | 13 | </RCC> |
@@ -1,306 +1,306 | |||
|
1 | 1 | /*------------------------------------------------------------------------------ |
|
2 | 2 | -- This file is a part of the QLop Software |
|
3 | 3 | -- Copyright (C) 2015, Plasma Physics Laboratory - CNRS |
|
4 | 4 | -- |
|
5 | 5 | -- This program is free software; you can redistribute it and/or modify |
|
6 | 6 | -- it under the terms of the GNU General Public License as published by |
|
7 | 7 | -- the Free Software Foundation; either version 2 of the License, or |
|
8 | 8 | -- (at your option) any later version. |
|
9 | 9 | -- |
|
10 | 10 | -- This program is distributed in the hope that it will be useful, |
|
11 | 11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 | 12 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 | 13 | -- GNU General Public License for more details. |
|
14 | 14 | -- |
|
15 | 15 | -- You should have received a copy of the GNU General Public License |
|
16 | 16 | -- along with this program; if not, write to the Free Software |
|
17 | 17 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
18 | 18 | -------------------------------------------------------------------------------*/ |
|
19 | 19 | /*-- Author : Alexis Jeandet |
|
20 | 20 | -- Mail : alexis.jeandet@member.fsf.org |
|
21 | 21 | ----------------------------------------------------------------------------*/ |
|
22 | 22 | #include "cassinidatafile.h" |
|
23 | 23 | #include <QFile> |
|
24 | 24 | #include <stdio.h> |
|
25 | 25 | #include <QDateTime> |
|
26 | 26 | #include <QVector> |
|
27 | 27 | #include <QProgressDialog> |
|
28 | 28 | #include <omp.h> |
|
29 | 29 | #include <QTimer> |
|
30 | 30 | #include <QElapsedTimer> |
|
31 | 31 | #include <sys/time.h> |
|
32 | 32 | |
|
33 | 33 | CassiniDataFile::CassiniDataFile(QObject *parent) : AbstractFileLoader(parent) |
|
34 | 34 | { |
|
35 | 35 | |
|
36 | 36 | } |
|
37 | 37 | |
|
38 | 38 | CassiniDataFile::~CassiniDataFile() |
|
39 | 39 | { |
|
40 | 40 | |
|
41 | 41 | } |
|
42 | 42 | |
|
43 | 43 | void CassiniDataFile::parseFile(const QString &fileName) |
|
44 | 44 | { |
|
45 | 45 | this->fileName = fileName; |
|
46 | 46 | m_Write = false; |
|
47 | 47 | this->start(); |
|
48 | 48 | } |
|
49 | 49 | |
|
50 | 50 | void CassiniDataFile::saveFile(const QString &fileName, QLopDataList data) |
|
51 | 51 | { |
|
52 | 52 | this->fileName = fileName; |
|
53 | 53 | m_Write = true; |
|
54 | 54 | m_data = data; |
|
55 | 55 | this->start(); |
|
56 | 56 | } |
|
57 | 57 | |
|
58 | 58 | inline double __decodeVal(int ofset,unsigned char* data) |
|
59 | 59 | { |
|
60 | 60 | if(data[ofset]=='-') |
|
61 | 61 | return -0.001 * (double)( |
|
62 | 62 | (10000 * (int)(data[ofset+1] & 0x0F)) |
|
63 | 63 | + (1000 * (int)(data[ofset+2] & 0x0F)) |
|
64 | 64 | + (100 * (int)(data[ofset+4] & 0x0F)) |
|
65 | 65 | + (10 * (int)(data[ofset+5] & 0x0F)) |
|
66 | 66 | + ( (int)(data[ofset+6] & 0x0F)) |
|
67 | 67 | ); |
|
68 | 68 | else |
|
69 | 69 | { |
|
70 | 70 | if(data[ofset+1]=='-') |
|
71 | 71 | { |
|
72 | 72 | return -0.001 * (double)( |
|
73 | 73 | (1000 * (int)(data[ofset+2] & 0x0F)) |
|
74 | 74 | + (100 * (int)(data[ofset+4] & 0x0F)) |
|
75 | 75 | + (10 * (int)(data[ofset+5] & 0x0F)) |
|
76 | 76 | + ( (int)(data[ofset+6] & 0x0F)) |
|
77 | 77 | ); |
|
78 | 78 | } |
|
79 | 79 | else |
|
80 | 80 | { |
|
81 | 81 | return 0.001 * (double)( |
|
82 | 82 | (10000 * (int)(data[ofset+1] & 0x0F)) |
|
83 | 83 | + (1000 * (int)(data[ofset+2] & 0x0F)) |
|
84 | 84 | + (100 * (int)(data[ofset+4] & 0x0F)) |
|
85 | 85 | + (10 * (int)(data[ofset+5] & 0x0F)) |
|
86 | 86 | + ( (int)(data[ofset+6] & 0x0F)) |
|
87 | 87 | ); |
|
88 | 88 | } |
|
89 | 89 | } |
|
90 | 90 | } |
|
91 | 91 | |
|
92 | 92 | inline QDate __decodeDate(int ofset,unsigned char* data) |
|
93 | 93 | { |
|
94 | 94 | int y=(1000*(data[ofset] & 0x0F)) + (100*(data[ofset+1] & 0x0F)) + (10*(data[ofset+2] & 0x0F)) + (1*(data[ofset+3] & 0x0F)); |
|
95 | 95 | int m=(10*(data[ofset+5] & 0x0F)) + (1*(data[ofset+6] & 0x0F)); |
|
96 | 96 | int d=(10*(data[ofset+8] & 0x0F)) + (1*(data[ofset+9] & 0x0F)); |
|
97 | 97 | return QDate(y,m,d); |
|
98 | 98 | } |
|
99 | 99 | |
|
100 | 100 | inline QTime __decodeTime(int ofset,unsigned char* data) |
|
101 | 101 | { |
|
102 | 102 | int h=(10*(data[ofset] & 0x0F)) + (1*(data[ofset+1] & 0x0F)); |
|
103 | 103 | int m=(10*(data[ofset+3] & 0x0F)) + (1*(data[ofset+4] & 0x0F)); |
|
104 | 104 | int s=(10*(data[ofset+6] & 0x0F)) + (1*(data[ofset+7] & 0x0F)); |
|
105 | 105 | int ms=(100*(data[ofset+9] & 0x0F)) + (10*(data[ofset+10] & 0x0F)) + (1*(data[ofset+11] & 0x0F)); |
|
106 | 106 | return QTime(h,m,s,ms); |
|
107 | 107 | } |
|
108 | 108 | |
|
109 | 109 | double __decodeTimeFromEpochMs(int ofset,unsigned char* data) |
|
110 | 110 | { |
|
111 | 111 | struct tm t; |
|
112 | 112 | time_t t_of_day; |
|
113 | 113 | t.tm_year=(1000*(data[ofset] & 0x0F)) + (100*(data[ofset+1] & 0x0F)) + (10*(data[ofset+2] & 0x0F)) + ((data[ofset+3] & 0x0F)) -1900; |
|
114 | 114 | t.tm_mon=(10*(data[ofset+5] & 0x0F)) + ((data[ofset+6] & 0x0F)); |
|
115 | 115 | t.tm_mday=(10*(data[ofset+8] & 0x0F)) + ((data[ofset+9] & 0x0F)); |
|
116 | 116 | t.tm_hour=(10*(data[ofset+11] & 0x0F)) + ((data[ofset+12] & 0x0F)); |
|
117 | 117 | t.tm_min=(10*(data[ofset+14] & 0x0F)) + ((data[ofset+15] & 0x0F)); |
|
118 | 118 | t.tm_sec=(10*(data[ofset+17] & 0x0F)) + ((data[ofset+18] & 0x0F)); |
|
119 | 119 | int ms=(100*(data[ofset+20] & 0x0F)) + (10*(data[ofset+21] & 0x0F)) + ((data[ofset+22] & 0x0F)); |
|
120 | 120 | t_of_day = mktime(&t); |
|
121 | 121 | return (t_of_day*1000.0)+ms; |
|
122 | 122 | } |
|
123 | 123 | |
|
124 | 124 | double __decodeTimeFromEpoch(int ofset,unsigned char* data) |
|
125 | 125 | { |
|
126 | 126 | struct tm t; |
|
127 | 127 | time_t t_of_day; |
|
128 | 128 | t.tm_year=(1000*(data[ofset] & 0x0F)) + (100*(data[ofset+1] & 0x0F)) + (10*(data[ofset+2] & 0x0F)) + ((data[ofset+3] & 0x0F)) -1900; |
|
129 | 129 | t.tm_mon=(10*(data[ofset+5] & 0x0F)) + ((data[ofset+6] & 0x0F)); |
|
130 | 130 | t.tm_mday=(10*(data[ofset+8] & 0x0F)) + ((data[ofset+9] & 0x0F)); |
|
131 | 131 | t.tm_hour=(10*(data[ofset+11] & 0x0F)) + ((data[ofset+12] & 0x0F)); |
|
132 | 132 | t.tm_min=(10*(data[ofset+14] & 0x0F)) + ((data[ofset+15] & 0x0F)); |
|
133 | 133 | t.tm_sec=(10*(data[ofset+17] & 0x0F)) + ((data[ofset+18] & 0x0F)); |
|
134 | 134 | double ms=(100*(data[ofset+20] & 0x0F)) + (10*(data[ofset+21] & 0x0F)) + ((data[ofset+22] & 0x0F)); |
|
135 | 135 | t_of_day = mktime(&t); |
|
136 | 136 | return (double)t_of_day+((double)ms*(double)0.001); |
|
137 | 137 | } |
|
138 | 138 | |
|
139 | 139 | double __decodeTimeHMSmS(int ofset,unsigned char* data) |
|
140 | 140 | { |
|
141 | 141 | int h,m,s; |
|
142 | 142 | h=(10*(data[ofset+11] & 0x0F)) + ((data[ofset+12] & 0x0F)); |
|
143 | 143 | m=(10*(data[ofset+14] & 0x0F)) + ((data[ofset+15] & 0x0F)); |
|
144 | 144 | s=(10*(data[ofset+17] & 0x0F)) + ((data[ofset+18] & 0x0F)); |
|
145 | 145 | double ms=(100*(data[ofset+20] & 0x0F)) + (10*(data[ofset+21] & 0x0F)) + ((data[ofset+22] & 0x0F)); |
|
146 | 146 | return (double)((h*3600)+(m*60)+s) + (ms*0.001); |
|
147 | 147 | } |
|
148 | 148 | |
|
149 | 149 | double __decodeTimeDHMSmS(int ofset,unsigned char* data) |
|
150 | 150 | { |
|
151 | 151 | int d,h,m,s; |
|
152 | 152 | d=(10*(data[ofset+8] & 0x0F)) + ((data[ofset+9] & 0x0F)); |
|
153 | 153 | h=(10*(data[ofset+11] & 0x0F)) + ((data[ofset+12] & 0x0F)); |
|
154 | 154 | m=(10*(data[ofset+14] & 0x0F)) + ((data[ofset+15] & 0x0F)); |
|
155 | 155 | s=(10*(data[ofset+17] & 0x0F)) + ((data[ofset+18] & 0x0F)); |
|
156 | 156 | double ms=(100*(data[ofset+20] & 0x0F)) + (10*(data[ofset+21] & 0x0F)) + ((data[ofset+22] & 0x0F)); |
|
157 | 157 | return (double)((d*3600*24)+(h*3600)+(m*60)+s) + (ms*0.001); |
|
158 | 158 | } |
|
159 | 159 | |
|
160 | 160 | double __decodeTimeFromEpochDayOnly(int ofset,unsigned char* data) |
|
161 | 161 | { |
|
162 | 162 | struct tm t; |
|
163 | 163 | time_t t_of_day; |
|
164 | 164 | // t.tm_year=(1000*(data[ofset] & 0x0F)) + (100*(data[ofset+1] & 0x0F)) + (10*(data[ofset+2] & 0x0F)) + ((data[ofset+3] & 0x0F)) -1900; |
|
165 | 165 | t.tm_year=(1000*(data[ofset] & 0x0F)) + (100*(data[ofset+1] & 0x0F)) + (10*(data[ofset+2] & 0x0F)) + ((data[ofset+3] & 0x0F)); |
|
166 | 166 | t.tm_mon=(10*(data[ofset+5] & 0x0F)) + ((data[ofset+6] & 0x0F)); |
|
167 | 167 | t.tm_mday=(10*(data[ofset+8] & 0x0F)) + ((data[ofset+9] & 0x0F)); |
|
168 | 168 | t.tm_hour=0; |
|
169 | 169 | t.tm_min=0; |
|
170 | 170 | t.tm_sec=0; |
|
171 | 171 | // t_of_day = mktime(&t); |
|
172 | 172 | // return (double)t_of_day; |
|
173 | 173 | QDateTime date(QDate(t.tm_year,t.tm_mon,1),QTime(0,0)); |
|
174 | 174 | // date.setDate(); |
|
175 | 175 | return (double)((date.toMSecsSinceEpoch()/1000.0)-(24*3600)); |
|
176 | 176 | } |
|
177 | 177 | |
|
178 | 178 | void CassiniDataFile::run() |
|
179 | 179 | { |
|
180 | 180 | if(!m_Write) |
|
181 | 181 | { |
|
182 | 182 | readFile(); |
|
183 | 183 | } |
|
184 | 184 | else |
|
185 | 185 | { |
|
186 | 186 | writeFile(); |
|
187 | 187 | } |
|
188 | 188 | } |
|
189 | 189 | |
|
190 | 190 | void CassiniDataFile::readFile() |
|
191 | 191 | { |
|
192 | 192 | FILE* dataFile; |
|
193 | 193 | dataFile = fopen(fileName.toStdString().c_str(),"r"); |
|
194 | 194 | |
|
195 | 195 | if(dataFile != NULL) |
|
196 | 196 | { |
|
197 | 197 | fseek(dataFile, 0L, SEEK_END); |
|
198 | 198 | int FileSize=ftell(dataFile); |
|
199 | 199 | int lineCnt = FileSize/58; |
|
200 | 200 | int curLine=0; |
|
201 | 201 | int lastLineUpdate=0; |
|
202 | 202 | QVector<QCPData> *ch1=new QVector<QCPData>(lineCnt); |
|
203 | 203 | QVector<QCPData> *ch2=new QVector<QCPData>(lineCnt); |
|
204 | 204 | QVector<QCPData> *ch3=new QVector<QCPData>(lineCnt); |
|
205 | 205 | QLopDataList data; |
|
206 | QLopDataVector* ch1V=new QLopDataVector(); | |
|
207 | QLopDataVector* ch2V=new QLopDataVector(); | |
|
208 | QLopDataVector* ch3V=new QLopDataVector(); | |
|
206 | QLopQCPDataVector* ch1V=new QLopQCPDataVector(); | |
|
207 | QLopQCPDataVector* ch2V=new QLopQCPDataVector(); | |
|
208 | QLopQCPDataVector* ch3V=new QLopQCPDataVector(); | |
|
209 | 209 | ch1V->data=ch1; |
|
210 | 210 | ch2V->data=ch2; |
|
211 | 211 | ch3V->data=ch3; |
|
212 | 212 | ch1V->name="r"; |
|
213 | 213 | ch2V->name="theta"; |
|
214 | 214 | ch3V->name="phi"; |
|
215 | 215 | ch1V->unit="nT"; |
|
216 | 216 | ch2V->unit="nT"; |
|
217 | 217 | ch3V->unit="nT"; |
|
218 | 218 | data.append(ch1V); |
|
219 | 219 | data.append(ch2V); |
|
220 | 220 | data.append(ch3V); |
|
221 | 221 | QElapsedTimer timr; |
|
222 | 222 | |
|
223 | 223 | double _x=0.0,day=0.0; |
|
224 | 224 | char* line; |
|
225 | 225 | QCPData data1,data2,data3; |
|
226 | 226 | char* fileContent=(char*)malloc(FileSize); |
|
227 | 227 | if(Q_UNLIKELY(fileContent==NULL))return; |
|
228 | 228 | int threadIndex,numThreads=omp_get_num_threads(); |
|
229 | 229 | int updateTriger=(lineCnt/100)/numThreads; |
|
230 | 230 | fseek(dataFile, 0L, SEEK_SET); |
|
231 | 231 | char* svglocale=NULL; |
|
232 | 232 | setlocale(LC_NUMERIC,svglocale); |
|
233 | 233 | setlocale(LC_NUMERIC, "en_US"); |
|
234 | 234 | if(fread(fileContent,1,FileSize,dataFile)) |
|
235 | 235 | { |
|
236 | 236 | line = fileContent; |
|
237 | 237 | QDateTime date; |
|
238 | 238 | timr.start(); |
|
239 | 239 | day=__decodeTimeFromEpochDayOnly(0,(unsigned char*)line); |
|
240 | 240 | //#pragma omp parallel if ((FileSize > 10000000)) private(date,data1,data2,data3,_x,threadIndex,lastLineUpdate) shared(ch1,ch2,ch3,lineCnt) |
|
241 | 241 | // { |
|
242 | 242 | #pragma omp parallel for if ((FileSize > 1024*1024*10)) private(date,data1,data2,data3,_x,threadIndex,lastLineUpdate,curLine) shared(ch1,ch2,ch3,lineCnt,updateTriger) |
|
243 | 243 | for(int i=0;i<lineCnt;i++) |
|
244 | 244 | { |
|
245 | 245 | // _x= i; |
|
246 | 246 | _x= day + __decodeTimeDHMSmS((i*58),(unsigned char*)line); |
|
247 | 247 | // _x=__decodeTimeFromEpoch((i*58),(unsigned char*)line); |
|
248 | 248 | data1.key=_x; |
|
249 | 249 | data2.key=_x; |
|
250 | 250 | data3.key=_x; |
|
251 | 251 | data1.value=__decodeVal(((i*58)+27),(unsigned char*)line); |
|
252 | 252 | data2.value=__decodeVal(((i*58)+38),(unsigned char*)line); |
|
253 | 253 | data3.value=__decodeVal(((i*58)+49),(unsigned char*)line); |
|
254 | 254 | (*ch1)[i]=data1; |
|
255 | 255 | (*ch2)[i]=data2; |
|
256 | 256 | (*ch3)[i]=data3; |
|
257 | 257 | curLine++; |
|
258 | 258 | if(Q_UNLIKELY(lastLineUpdate++>updateTriger)) |
|
259 | 259 | { |
|
260 | 260 | lastLineUpdate=0; |
|
261 | 261 | int test=((curLine*numThreads *100)/ (lineCnt)); |
|
262 | 262 | emit updateProgress(omp_get_thread_num(),test); |
|
263 | 263 | } |
|
264 | 264 | } |
|
265 | 265 | } |
|
266 | 266 | //#pragma omp barrier |
|
267 | 267 | free(fileContent); |
|
268 | 268 | // } |
|
269 | 269 | qDebug()<< lineCnt <<" Points loaded in "<< timr.elapsed()<<"ms"; |
|
270 | 270 | setlocale(LC_NUMERIC,svglocale); |
|
271 | 271 | emit dataReady(data); |
|
272 | 272 | } |
|
273 | 273 | } |
|
274 | 274 | |
|
275 | 275 | void CassiniDataFile::writeFile() |
|
276 | 276 | { |
|
277 | 277 | QFile dataFile(fileName); |
|
278 | 278 | dataFile.open(QIODevice::WriteOnly); |
|
279 | 279 | QTextStream out(&dataFile); |
|
280 | 280 | if(dataFile.isOpen()) |
|
281 | 281 | { |
|
282 | 282 | if(m_data.count()==3) |
|
283 | 283 | { |
|
284 | QLopDataVector* ch1V=(QLopDataVector*)m_data.at(0); | |
|
285 | QLopDataVector* ch2V=(QLopDataVector*)m_data.at(1); | |
|
286 | QLopDataVector* ch3V=(QLopDataVector*)m_data.at(2); | |
|
284 | QLopQCPDataVector* ch1V=(QLopQCPDataVector*)m_data.at(0); | |
|
285 | QLopQCPDataVector* ch2V=(QLopQCPDataVector*)m_data.at(1); | |
|
286 | QLopQCPDataVector* ch3V=(QLopQCPDataVector*)m_data.at(2); | |
|
287 | 287 | if(ch1V->data->count()==ch2V->data->count() && ch1V->data->count()==ch3V->data->count()) |
|
288 | 288 | { |
|
289 | 289 | for(int i=0;i<ch1V->data->count();i++) |
|
290 | 290 | { |
|
291 | 291 | double key = ch1V->data->at(i).key; |
|
292 | 292 | QDateTime date = QDateTime::fromMSecsSinceEpoch(key*1000); |
|
293 | 293 | out << date.toString(Qt::ISODate)+QString(".%1").arg(date.time().msec(),3); |
|
294 | 294 | out << QString("%1%2%3").arg(ch1V->data->at(i).value, 11, 'f', 3).arg(ch2V->data->at(i).value, 11, 'f', 3).arg(ch3V->data->at(i).value, 11, 'f', 3); |
|
295 | 295 | out << "\r\n"; |
|
296 | 296 | } |
|
297 | 297 | } |
|
298 | 298 | dataFile.flush(); |
|
299 | 299 | m_data.clear(); |
|
300 | 300 | delete ch1V; |
|
301 | 301 | delete ch2V; |
|
302 | 302 | delete ch3V; |
|
303 | 303 | } |
|
304 | 304 | } |
|
305 | 305 | } |
|
306 | 306 |
@@ -1,306 +1,322 | |||
|
1 | 1 | /*------------------------------------------------------------------------------ |
|
2 | 2 | -- This file is a part of the QLop Software |
|
3 | 3 | -- Copyright (C) 2015, Plasma Physics Laboratory - CNRS |
|
4 | 4 | -- |
|
5 | 5 | -- This program is free software; you can redistribute it and/or modify |
|
6 | 6 | -- it under the terms of the GNU General Public License as published by |
|
7 | 7 | -- the Free Software Foundation; either version 2 of the License, or |
|
8 | 8 | -- (at your option) any later version. |
|
9 | 9 | -- |
|
10 | 10 | -- This program is distributed in the hope that it will be useful, |
|
11 | 11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 | 12 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 | 13 | -- GNU General Public License for more details. |
|
14 | 14 | -- |
|
15 | 15 | -- You should have received a copy of the GNU General Public License |
|
16 | 16 | -- along with this program; if not, write to the Free Software |
|
17 | 17 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
18 | 18 | -------------------------------------------------------------------------------*/ |
|
19 | 19 | /*-- Author : Alexis Jeandet |
|
20 | 20 | -- Mail : alexis.jeandet@member.fsf.org |
|
21 | 21 | ----------------------------------------------------------------------------*/ |
|
22 | 22 | |
|
23 | 23 | #include "cassinitools.h" |
|
24 | 24 | #include <qlopplots.h> |
|
25 | 25 | #include <QPen> |
|
26 | 26 | #include <QAction> |
|
27 | 27 | #include <fftw3.h> |
|
28 | 28 | #include <omp.h> |
|
29 | 29 | |
|
30 | 30 | CassiniTools* CassiniTools::_self=NULL; |
|
31 | 31 | QDockWidget* CassiniTools::m_gui=NULL; |
|
32 | 32 | CassiniToolsGUI* CassiniTools::m_CassiniToolsGUI=NULL; |
|
33 | 33 | CassiniDataFile* CassiniTools::m_dataFile=NULL; |
|
34 | 34 | int CassiniTools::m_defaultPlot=-1; |
|
35 | 35 | int CassiniTools::m_fftPlot=-1; |
|
36 | 36 | SocExplorerPlotActions* CassiniTools::ExportAction=NULL; |
|
37 | 37 | |
|
38 | 38 | Qt::GlobalColor QLopColours[]= {Qt::black, |
|
39 | 39 | Qt::red, |
|
40 | 40 | Qt::blue, |
|
41 | 41 | Qt::green, |
|
42 | 42 | Qt::darkGreen, |
|
43 | 43 | Qt::cyan, |
|
44 | 44 | Qt::darkRed, |
|
45 | 45 | Qt::gray, |
|
46 | 46 | Qt::yellow, |
|
47 | 47 | Qt::darkBlue, |
|
48 | 48 | Qt::darkCyan, |
|
49 | 49 | Qt::magenta, |
|
50 | 50 | Qt::darkMagenta, |
|
51 | 51 | Qt::darkYellow, |
|
52 | 52 | Qt::darkGray, |
|
53 | 53 | Qt::lightGray}; |
|
54 | 54 | |
|
55 | 55 | int QLopColoursCount=16; |
|
56 | 56 | |
|
57 | 57 | #define _INIT() if(Q_UNLIKELY(_self==NULL)){init();} |
|
58 | 58 | |
|
59 | 59 | CassiniTools::CassiniTools(bool noGUI,QObject *parent) : QLopService(parent) |
|
60 | 60 | { |
|
61 | 61 | m_dataFile = new CassiniDataFile(); |
|
62 | 62 | connect(m_dataFile,SIGNAL(dataReady(QLopDataList)),this,SLOT(dataReady(QLopDataList))); |
|
63 | 63 | m_serviceName="CassiniTools"; |
|
64 | 64 | m_noGui=noGUI; |
|
65 | 65 | fftw_init_threads(); |
|
66 | 66 | } |
|
67 | 67 | |
|
68 | 68 | CassiniTools::~CassiniTools() |
|
69 | 69 | { |
|
70 | 70 | delete m_dataFile; |
|
71 | 71 | delete m_CassiniToolsGUI; |
|
72 | 72 | delete m_gui; |
|
73 | 73 | } |
|
74 | 74 | |
|
75 | 75 | void CassiniTools::makePlot() |
|
76 | 76 | { |
|
77 | 77 | m_defaultPlot = QLopPlots::addPlot(); |
|
78 | 78 | m_fftPlot = QLopPlots::addPlot(); |
|
79 | 79 | SocExplorerPlot* plot=QLopPlots::getPlot(m_defaultPlot); |
|
80 | 80 | if(plot) |
|
81 | 81 | { |
|
82 | 82 | plot->setTitle(_self->m_serviceName + " plot"); |
|
83 | 83 | plot->setXaxisTickLabelType(QCPAxis::ltDateTime); |
|
84 | 84 | plot->setXaxisDateTimeFormat("hh:mm:ss.zzz"); |
|
85 | 85 | plot->setContextMenuPolicy(Qt::ActionsContextMenu); |
|
86 | 86 | SocExplorerPlotActions* action=new SocExplorerPlotActions("export view",plot->PID(),_self); |
|
87 | 87 | plot->addAction(action); |
|
88 | 88 | QObject::connect(action,SIGNAL(triggered(int)),_self,SLOT(export_view(int))); |
|
89 | ExportAction=new SocExplorerPlotActions("export view to "+QString(plot->title()).replace(".TAB","-part.TAB"),plot->PID(),_self); | |
|
89 | QString fileName = QString(plot->title()).replace(".TAB",""); | |
|
90 | fileName = generateFileName(fileName,".TAB"); | |
|
91 | ExportAction=new SocExplorerPlotActions("export view to "+fileName,plot->PID(),_self); | |
|
90 | 92 | plot->addAction(ExportAction); |
|
91 | 93 | QObject::connect(ExportAction,SIGNAL(triggered(int)),_self,SLOT(export_view_Predefined_FileName(int))); |
|
92 | 94 | action=new SocExplorerPlotActions("FFT of the current view",plot->PID(),_self); |
|
93 | 95 | plot->addAction(action); |
|
94 | 96 | QObject::connect(action,SIGNAL(triggered(int)),_self,SLOT(compute_fft_on_view(int))); |
|
95 | 97 | } |
|
96 | 98 | } |
|
97 | 99 | |
|
98 | 100 | void CassiniTools::init(bool noGUI, QObject *parent) |
|
99 | 101 | { |
|
100 | 102 | if(Q_UNLIKELY(_self==NULL)) |
|
101 | 103 | { |
|
102 | 104 | _self=new CassiniTools(noGUI,parent); |
|
103 | 105 | } |
|
104 | 106 | } |
|
105 | 107 | |
|
106 | 108 | CassiniTools *CassiniTools::self() |
|
107 | 109 | { |
|
108 | 110 | _INIT(); |
|
109 | 111 | return _self; |
|
110 | 112 | } |
|
111 | 113 | |
|
112 | 114 | void CassiniTools::decodeFGMData(const QString &file) |
|
113 | 115 | { |
|
114 | 116 | _INIT(); |
|
115 | 117 | m_dataFile->parseFile(file); |
|
116 | 118 | } |
|
117 | 119 | |
|
118 | 120 | void CassiniTools::plotFile(const QString &File) |
|
119 | 121 | { |
|
120 | 122 | if(!m_dataFile->isRunning()) |
|
121 | 123 | { |
|
122 | 124 | m_dataFile->parseFile(File); |
|
123 | 125 | // TODO fixme |
|
124 | 126 | SocExplorerPlot* plot = QLopPlots::getPlot(m_defaultPlot); |
|
125 | 127 | if(plot==NULL) |
|
126 | 128 | { |
|
127 | 129 | makePlot(); |
|
128 | 130 | plot = QLopPlots::getPlot(m_defaultPlot); |
|
129 | 131 | } |
|
130 | 132 | if(plot) |
|
131 | 133 | { |
|
132 | 134 | plot->setTitle(File); |
|
133 |
|
|
|
135 | QString fileName = QString(File).replace(".TAB","-part"); | |
|
136 | fileName = generateFileName(fileName,".TAB"); | |
|
137 | ExportAction->setText("export view to "+fileName); | |
|
134 | 138 | } |
|
135 | 139 | } |
|
136 | 140 | } |
|
137 | 141 | |
|
138 | 142 | void CassiniTools::plot_TAB_File(const QString &fileName) |
|
139 | 143 | { |
|
140 | 144 | //TODO fix: accent not accepted |
|
141 | 145 | plotFile(fileName); |
|
142 | 146 | } |
|
143 | 147 | |
|
144 | 148 | void CassiniTools::export_view(int PID) |
|
145 | 149 | { |
|
146 | 150 | SocExplorerPlot* plot = QLopPlots::getPlot(PID); |
|
147 | 151 | if(plot==NULL) |
|
148 | 152 | return; |
|
149 | 153 | { |
|
150 | 154 | QString fileName = plot->title(); |
|
151 | 155 | fileName = QFileDialog::getSaveFileName(0,tr("Set filename"),fileName.replace(".TAB","-part.TAB")); |
|
152 | 156 | if(fileName!="") |
|
153 | 157 | { |
|
154 | 158 | QLopDataList vectors; |
|
155 | 159 | for(int i=0;i<plot->graphCount();i++) |
|
156 | 160 | { |
|
157 | QLopDataVector* vect = new QLopDataVector(); | |
|
161 | QLopQCPDataVector* vect = new QLopQCPDataVector(); | |
|
158 | 162 | vect->data = plot->getVisibleData(i); |
|
159 | 163 | vectors.append(vect); |
|
160 | 164 | } |
|
161 | 165 | m_dataFile->saveFile(fileName,vectors); |
|
162 | 166 | } |
|
163 | 167 | } |
|
164 | 168 | } |
|
165 | 169 | |
|
166 | 170 | void CassiniTools::export_view_Predefined_FileName(int PID) |
|
167 | 171 | { |
|
168 | 172 | SocExplorerPlot* plot = QLopPlots::getPlot(PID); |
|
169 | 173 | if(plot==NULL) |
|
170 | 174 | return; |
|
171 | 175 | { |
|
172 |
QString fileName = QString(plot->title()).replace(".TAB","-part |
|
|
176 | QString fileName = QString(plot->title()).replace(".TAB","-part"); | |
|
177 | fileName = generateFileName(fileName,".TAB"); | |
|
173 | 178 | if(fileName!="") |
|
174 | 179 | { |
|
175 | 180 | QLopDataList vectors; |
|
176 | 181 | for(int i=0;i<plot->graphCount();i++) |
|
177 | 182 | { |
|
178 | QLopDataVector* vect = new QLopDataVector(); | |
|
183 | QLopQCPDataVector* vect = new QLopQCPDataVector(); | |
|
179 | 184 | vect->data = plot->getVisibleData(i); |
|
180 | 185 | vectors.append(vect); |
|
181 | 186 | } |
|
182 | 187 | m_dataFile->saveFile(fileName,vectors); |
|
183 | 188 | } |
|
184 | 189 | } |
|
185 | 190 | } |
|
186 | 191 | |
|
187 | 192 | void CassiniTools::compute_fft_on_view(int PID) |
|
188 | 193 | { |
|
189 | 194 | |
|
190 | 195 | QElapsedTimer timr; |
|
191 | 196 | SocExplorerPlot* plot = QLopPlots::getPlot(PID); |
|
192 | 197 | if(plot==NULL) |
|
193 | 198 | return; |
|
194 | 199 | { |
|
195 | 200 | timr.start(); |
|
196 | 201 | QLopDataList vectors; |
|
197 | 202 | for(int i=0;i<plot->graphCount();i++) |
|
198 | 203 | { |
|
199 | QLopDataVector* vect = new QLopDataVector(); | |
|
204 | QLopQCPDataVector* vect = new QLopQCPDataVector(); | |
|
200 | 205 | vect->data = plot->getVisibleData(i); |
|
201 | 206 | vectors.append(vect); |
|
202 | 207 | } |
|
203 | 208 | if(vectors.count()==3) |
|
204 | 209 | { |
|
205 | QLopDataVector* ch1V=(QLopDataVector*)vectors.at(0); | |
|
206 | QLopDataVector* ch2V=(QLopDataVector*)vectors.at(1); | |
|
207 | QLopDataVector* ch3V=(QLopDataVector*)vectors.at(2); | |
|
208 | QLopDataVector* FFTout=new QLopDataVector(); | |
|
210 | QLopQCPDataVector* ch1V=(QLopQCPDataVector*)vectors.at(0); | |
|
211 | QLopQCPDataVector* ch2V=(QLopQCPDataVector*)vectors.at(1); | |
|
212 | QLopQCPDataVector* ch3V=(QLopQCPDataVector*)vectors.at(2); | |
|
213 | QLopQCPDataVector* FFTout=new QLopQCPDataVector(); | |
|
209 | 214 | if(ch1V->data->count()==ch2V->data->count() && ch1V->data->count()==ch3V->data->count()) |
|
210 | 215 | { |
|
211 | 216 | |
|
212 | 217 | double* in; |
|
213 | 218 | fftw_complex *out; |
|
214 | 219 | fftw_plan p; |
|
215 | 220 | FFTout->data = new QVector<QCPData>(ch1V->data->count()/2); |
|
216 | 221 | in = (double*) fftw_malloc(sizeof(double) * ch1V->data->count()); |
|
217 | 222 | out = (fftw_complex*) fftw_malloc(sizeof(fftw_complex) * ch1V->data->count()); |
|
218 | 223 | double av=0; |
|
219 | 224 | for(int i=0;i<ch1V->data->count();i++) |
|
220 | 225 | { |
|
221 | 226 | in[i]=sqrt((ch1V->data->at(i).value*ch1V->data->at(i).value) + (ch2V->data->at(i).value*ch2V->data->at(i).value) + (ch3V->data->at(i).value*ch3V->data->at(i).value)); |
|
222 | 227 | av = av+in[i]; |
|
223 | 228 | } |
|
224 | 229 | av/=ch1V->data->count(); |
|
225 | 230 | for(int i=0;i<ch1V->data->count();i++) |
|
226 | 231 | { |
|
227 | 232 | in[i]=in[i]-av; |
|
228 | 233 | } |
|
229 | 234 | fftw_plan_with_nthreads(4); |
|
230 | 235 | p = fftw_plan_dft_r2c_1d(ch1V->data->count(),in, out,FFTW_ESTIMATE); |
|
231 | 236 | fftw_execute(p); /* repeat as needed */ |
|
232 | 237 | fftw_destroy_plan(p); |
|
233 | 238 | fftw_free(in); |
|
234 | 239 | for(int i=0;i<ch1V->data->count()/2;i++) |
|
235 | 240 | { |
|
236 | 241 | // (*FFTout->data)[i].value=sqrt((out[i][0] * out[i][0]) + (out[i][1] * out[i][1]))/ch1V->data->count(); |
|
237 | 242 | (*FFTout->data)[i].value=((out[i][0] * out[i][0]) + (out[i][1] * out[i][1]))/(ch1V->data->count()); |
|
238 | 243 | (*FFTout->data)[i].key = i; |
|
239 | 244 | } |
|
240 | 245 | fftw_free(out); |
|
241 | 246 | SocExplorerPlot* plot = QLopPlots::getPlot(m_fftPlot); |
|
242 | 247 | if(plot==NULL) |
|
243 | 248 | return; |
|
244 | 249 | plot->removeAllGraphs(); |
|
245 | 250 | plot->addGraph(); |
|
246 | 251 | plot->setXaxisLog(); |
|
247 | 252 | plot->setYaxisLog(); |
|
248 | 253 | plot->setAdaptativeSampling(0,true); |
|
249 | 254 | QPen pen = plot->getGraphPen(0); |
|
250 | 255 | pen.setColor(QLopColours[0%QLopColoursCount]); |
|
251 | 256 | plot->setGraphPen(0,pen); |
|
252 | 257 | plot->setGraphData(0,FFTout->data,false); |
|
253 | 258 | plot->rescaleAxis(); |
|
254 | 259 | plot->replot(); |
|
255 | 260 | |
|
256 | 261 | qDebug()<< ch1V->data->count() <<" Points loaded in "<< timr.elapsed()<<"ms"; |
|
257 | 262 | } |
|
258 | 263 | } |
|
259 | 264 | } |
|
260 | 265 | } |
|
261 | 266 | |
|
267 | QString CassiniTools::generateFileName(const QString &baseName, const QString &extension) | |
|
268 | { | |
|
269 | QString fileName = baseName+extension; | |
|
270 | int i=0; | |
|
271 | while(QFile::exists(fileName)) | |
|
272 | { | |
|
273 | fileName = baseName+QString::number(i++)+extension; | |
|
274 | } | |
|
275 | return fileName; | |
|
276 | } | |
|
277 | ||
|
262 | 278 | QDockWidget *CassiniTools::getGUI() |
|
263 | 279 | { |
|
264 | 280 | if(!m_noGui && (m_gui==NULL)) |
|
265 | 281 | { |
|
266 | 282 | m_gui=new QDockWidget("Cassini Tools"); |
|
267 | 283 | m_CassiniToolsGUI = new CassiniToolsGUI(); |
|
268 | 284 | m_gui->setWidget(m_CassiniToolsGUI); |
|
269 | 285 | m_gui->setFeatures(QDockWidget::DockWidgetMovable|QDockWidget::DockWidgetFloatable); |
|
270 | 286 | } |
|
271 | 287 | return m_gui; |
|
272 | 288 | } |
|
273 | 289 | |
|
274 | 290 | const QString &CassiniTools::serviceName() |
|
275 | 291 | { |
|
276 | 292 | _INIT(); |
|
277 | 293 | return m_serviceName; |
|
278 | 294 | } |
|
279 | 295 | |
|
280 | 296 | void CassiniTools::dataReady(QLopDataList data) |
|
281 | 297 | { |
|
282 | 298 | SocExplorerPlot* plot = QLopPlots::getPlot(m_defaultPlot); |
|
283 | 299 | if(plot==NULL) |
|
284 | 300 | { |
|
285 | 301 | makePlot(); |
|
286 | 302 | plot = QLopPlots::getPlot(m_defaultPlot); |
|
287 | 303 | } |
|
288 | 304 | if(plot) |
|
289 | 305 | { |
|
290 | 306 | plot->removeAllGraphs(); |
|
291 | 307 | for(int i=0;i<data.count();i++) |
|
292 | 308 | { |
|
293 | 309 | plot->addGraph(); |
|
294 | 310 | plot->setAdaptativeSampling(i,true); |
|
295 | 311 | plot->setUseFastVector(i,true); |
|
296 | 312 | QPen pen = plot->getGraphPen(i); |
|
297 | 313 | pen.setColor(QLopColours[i%QLopColoursCount]); |
|
298 | 314 | plot->setGraphPen(i,pen); |
|
299 | 315 | plot->setGraphName(i,data.at(i)->name+"("+data.at(i)->unit+")"); |
|
300 | plot->setGraphData(i,((QLopDataVector*)data.at(i))->data,false); | |
|
316 | plot->setGraphData(i,((QLopQCPDataVector*)data.at(i))->data,false); | |
|
301 | 317 | } |
|
302 | 318 | plot->rescaleAxis(); |
|
303 | 319 | plot->replot(); |
|
304 | 320 | } |
|
305 | 321 | } |
|
306 | 322 |
@@ -1,64 +1,65 | |||
|
1 | 1 | /*------------------------------------------------------------------------------ |
|
2 | 2 | -- This file is a part of the QLop Software |
|
3 | 3 | -- Copyright (C) 2015, Plasma Physics Laboratory - CNRS |
|
4 | 4 | -- |
|
5 | 5 | -- This program is free software; you can redistribute it and/or modify |
|
6 | 6 | -- it under the terms of the GNU General Public License as published by |
|
7 | 7 | -- the Free Software Foundation; either version 2 of the License, or |
|
8 | 8 | -- (at your option) any later version. |
|
9 | 9 | -- |
|
10 | 10 | -- This program is distributed in the hope that it will be useful, |
|
11 | 11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 | 12 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 | 13 | -- GNU General Public License for more details. |
|
14 | 14 | -- |
|
15 | 15 | -- You should have received a copy of the GNU General Public License |
|
16 | 16 | -- along with this program; if not, write to the Free Software |
|
17 | 17 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
18 | 18 | -------------------------------------------------------------------------------*/ |
|
19 | 19 | /*-- Author : Alexis Jeandet |
|
20 | 20 | -- Mail : alexis.jeandet@member.fsf.org |
|
21 | 21 | ----------------------------------------------------------------------------*/ |
|
22 | 22 | #ifndef CASSINITOOLS_H |
|
23 | 23 | #define CASSINITOOLS_H |
|
24 | 24 | |
|
25 | 25 | #include <QObject> |
|
26 | 26 | #include <QWidget> |
|
27 | 27 | #include <qlopservice.h> |
|
28 | 28 | #include <cassinitoolsgui.h> |
|
29 | 29 | #include <cassinidatafile.h> |
|
30 | 30 | #include <qlopdata.h> |
|
31 | 31 | #include <SocExplorerPlot.h> |
|
32 | 32 | |
|
33 | 33 | class CassiniTools: public QLopService |
|
34 | 34 | { |
|
35 | 35 | Q_OBJECT |
|
36 | 36 | private: |
|
37 | 37 | static CassiniTools* _self; |
|
38 | 38 | static QDockWidget* m_gui; |
|
39 | 39 | static CassiniToolsGUI* m_CassiniToolsGUI; |
|
40 | 40 | static CassiniDataFile* m_dataFile; |
|
41 | 41 | static int m_defaultPlot,m_fftPlot; |
|
42 | 42 | static SocExplorerPlotActions* ExportAction; |
|
43 | 43 | CassiniTools(bool noGUI=false, QObject *parent=0); |
|
44 | 44 | ~CassiniTools(); |
|
45 | 45 | static void makePlot(); |
|
46 | 46 | public: |
|
47 | 47 | static void init(bool noGUI=false,QObject *parent = 0); |
|
48 | 48 | static CassiniTools *self(); |
|
49 | 49 | static void decodeFGMData(const QString& file); |
|
50 | 50 | // QLopService methodes |
|
51 | 51 | QDockWidget* getGUI(); |
|
52 | 52 | const QString& serviceName(); |
|
53 | 53 | static void plotFile(const QString &File); |
|
54 | 54 | public slots: |
|
55 | 55 | void plot_TAB_File(const QString& fileName); |
|
56 | 56 | void export_view(int PID); |
|
57 | 57 | void export_view_Predefined_FileName(int PID); |
|
58 | 58 | void compute_fft_on_view(int PID); |
|
59 | 59 | private slots: |
|
60 | static QString generateFileName(const QString& baseName,const QString& extension); | |
|
60 | 61 | void dataReady(QLopDataList data); |
|
61 | 62 | }; |
|
62 | 63 | |
|
63 | 64 | #endif // CASSINITOOLS_H |
|
64 | 65 |
@@ -1,119 +1,119 | |||
|
1 | 1 | |
|
2 | 2 | HEADERS += \ |
|
3 | 3 | $${PWD}/SimpleConsole.h \ |
|
4 | 4 | $${PWD}/NicePyConsole.h \ |
|
5 | 5 | $${PWD}/PygmentsHighlighter.h \ |
|
6 | 6 | $${PWD}/PythonCompleter.h \ |
|
7 | 7 | $${PWD}/PythonCompleterPopup.h |
|
8 | 8 | |
|
9 | 9 | SOURCES += \ |
|
10 | 10 | $${PWD}/SimpleConsole.cpp \ |
|
11 | 11 | $${PWD}/NicePyConsole.cpp \ |
|
12 | 12 | $${PWD}/PygmentsHighlighter.cpp \ |
|
13 | 13 | $${PWD}/PythonCompleter.cpp \ |
|
14 | 14 | $${PWD}/PythonCompleterPopup.cpp |
|
15 | 15 | |
|
16 | 16 | |
|
17 | 17 | |
|
18 | 18 | OTHER_FILES += \ |
|
19 | 19 | $${PWD}/PygmentsHighlighter.py \ |
|
20 | 20 | $${PWD}/PythonCompleter.py \ |
|
21 | 21 | $${PWD}/module_completion.py \ |
|
22 | 22 | $${PWD}/pygments/formatters/latex.py \ |
|
23 | 23 | $${PWD}/pygments/formatters/terminal256.py \ |
|
24 | 24 | $${PWD}/pygments/formatters/_mapping.py \ |
|
25 | 25 | $${PWD}/pygments/formatters/svg.py \ |
|
26 | 26 | $${PWD}/pygments/formatters/html.py \ |
|
27 | 27 | $${PWD}/pygments/formatters/terminal.py \ |
|
28 | 28 | $${PWD}/pygments/formatters/bbcode.py \ |
|
29 | 29 | $${PWD}/pygments/formatters/rtf.py \ |
|
30 | 30 | $${PWD}/pygments/formatters/__init__.py \ |
|
31 | 31 | $${PWD}/pygments/formatters/other.py \ |
|
32 | 32 | $${PWD}/pygments/formatters/img.py \ |
|
33 | 33 | $${PWD}/pygments/console.py \ |
|
34 | 34 | $${PWD}/pygments/lexer.py \ |
|
35 | 35 | $${PWD}/pygments/style.py \ |
|
36 | 36 | $${PWD}/pygments/styles/colorful.py \ |
|
37 | 37 | $${PWD}/pygments/styles/autumn.py \ |
|
38 | 38 | $${PWD}/pygments/styles/monokai.py \ |
|
39 | 39 | $${PWD}/pygments/styles/vim.py \ |
|
40 | 40 | $${PWD}/pygments/styles/manni.py \ |
|
41 | 41 | $${PWD}/pygments/styles/fruity.py \ |
|
42 | 42 | $${PWD}/pygments/styles/pastie.py \ |
|
43 | 43 | $${PWD}/pygments/styles/vs.py \ |
|
44 | 44 | $${PWD}/pygments/styles/murphy.py \ |
|
45 | 45 | $${PWD}/pygments/styles/rrt.py \ |
|
46 | 46 | $${PWD}/pygments/styles/tango.py \ |
|
47 | 47 | $${PWD}/pygments/styles/trac.py \ |
|
48 | 48 | $${PWD}/pygments/styles/default.py \ |
|
49 | 49 | $${PWD}/pygments/styles/__init__.py \ |
|
50 | 50 | $${PWD}/pygments/styles/emacs.py \ |
|
51 | 51 | $${PWD}/pygments/styles/bw.py \ |
|
52 | 52 | $${PWD}/pygments/styles/friendly.py \ |
|
53 | 53 | $${PWD}/pygments/styles/borland.py \ |
|
54 | 54 | $${PWD}/pygments/styles/perldoc.py \ |
|
55 | 55 | $${PWD}/pygments/styles/native.py \ |
|
56 | 56 | $${PWD}/pygments/filters/__init__.py \ |
|
57 | 57 | $${PWD}/pygments/filter.py \ |
|
58 | 58 | $${PWD}/pygments/token.py \ |
|
59 | 59 | $${PWD}/pygments/unistring.py \ |
|
60 | 60 | $${PWD}/pygments/scanner.py \ |
|
61 | 61 | $${PWD}/pygments/formatter.py \ |
|
62 | 62 | $${PWD}/pygments/util.py \ |
|
63 | 63 | $${PWD}/pygments/lexers/_mapping.py \ |
|
64 | 64 | $${PWD}/pygments/lexers/parsers.py \ |
|
65 | 65 | $${PWD}/pygments/lexers/web.py \ |
|
66 | 66 | $${PWD}/pygments/lexers/compiled.py \ |
|
67 | 67 | $${PWD}/pygments/lexers/special.py \ |
|
68 | 68 | $${PWD}/pygments/lexers/dotnet.py \ |
|
69 | 69 | $${PWD}/pygments/lexers/_luabuiltins.py \ |
|
70 | 70 | $${PWD}/pygments/lexers/sql.py \ |
|
71 | 71 | $${PWD}/pygments/lexers/templates.py \ |
|
72 | 72 | $${PWD}/pygments/lexers/text.py \ |
|
73 | 73 | $${PWD}/pygments/lexers/math.py \ |
|
74 | 74 | $${PWD}/pygments/lexers/jvm.py \ |
|
75 | 75 | $${PWD}/pygments/lexers/asm.py \ |
|
76 | 76 | $${PWD}/pygments/lexers/__init__.py \ |
|
77 | 77 | $${PWD}/pygments/lexers/_asybuiltins.py \ |
|
78 | 78 | $${PWD}/pygments/lexers/other.py \ |
|
79 | 79 | $${PWD}/pygments/lexers/shell.py \ |
|
80 | 80 | $${PWD}/pygments/lexers/agile.py \ |
|
81 | 81 | $${PWD}/pygments/lexers/_phpbuiltins.py \ |
|
82 | 82 | $${PWD}/pygments/lexers/_scilab_builtins.py \ |
|
83 | 83 | $${PWD}/pygments/lexers/_vimbuiltins.py \ |
|
84 | 84 | $${PWD}/pygments/lexers/_clbuiltins.py \ |
|
85 | 85 | $${PWD}/pygments/lexers/functional.py \ |
|
86 | 86 | $${PWD}/pygments/lexers/_postgres_builtins.py \ |
|
87 | 87 | $${PWD}/pygments/lexers/hdl.py \ |
|
88 | 88 | $${PWD}/pygments/__init__.py \ |
|
89 | 89 | $${PWD}/pygments/cmdline.py \ |
|
90 | 90 | $${PWD}/pygments/plugin.py |
|
91 | 91 | |
|
92 | 92 | NicePyConsoleFiles.files = $${PWD}/PygmentsHighlighter.py \ |
|
93 | 93 | $${PWD}/PythonCompleter.py \ |
|
94 | 94 | $${PWD}/module_completion.py |
|
95 | 95 | |
|
96 | 96 | NicePyConsolePygmentsFiles.files = $${PWD}/pygments |
|
97 | 97 | |
|
98 | 98 | |
|
99 | 99 | |
|
100 | 100 | unix{ |
|
101 | 101 | |
|
102 |
NicePyConsoleFiles.path = /etc/ |
|
|
103 |
NicePyConsolePygmentsFiles.path = /etc/ |
|
|
102 | NicePyConsoleFiles.path = /etc/QLop/python | |
|
103 | NicePyConsolePygmentsFiles.path = /etc/QLop/python | |
|
104 | 104 | INSTALLS += NicePyConsoleFiles NicePyConsolePygmentsFiles |
|
105 | 105 | QMAKE_POST_LINK = $${QMAKE_MKDIR} $${DESTDIR}/python && $${QMAKE_COPY} $${NicePyConsoleFiles.files} $${DESTDIR}/python && $${QMAKE_COPY} -R $${NicePyConsolePygmentsFiles.files} $${DESTDIR}/python |
|
106 | 106 | } |
|
107 | 107 | |
|
108 | 108 | win32{ |
|
109 | 109 | |
|
110 | 110 | EXTRA_PYTHONFILES_WIN = $${NicePyConsoleFiles.files} |
|
111 | 111 | EXTRA_PYTHONFILES_WIN ~= s,/,\\,g |
|
112 | 112 | DESTDIR_WIN = $${DESTDIR} |
|
113 | 113 | DESTDIR_WIN ~= s,/,\\,g |
|
114 | 114 | for(FILE,EXTRA_BINFILES_WIN){ |
|
115 | 115 | QMAKE_POST_LINK +=$$quote(cmd /c copy /y $${FILE} $${DESTDIR_WIN}$$escape_expand(\n\t)) |
|
116 | 116 | } |
|
117 | 117 | } |
|
118 | 118 | |
|
119 | 119 |
@@ -1,47 +1,58 | |||
|
1 | 1 | /*------------------------------------------------------------------------------ |
|
2 | 2 | -- This file is a part of the QLop Software |
|
3 | 3 | -- Copyright (C) 2015, Plasma Physics Laboratory - CNRS |
|
4 | 4 | -- |
|
5 | 5 | -- This program is free software; you can redistribute it and/or modify |
|
6 | 6 | -- it under the terms of the GNU General Public License as published by |
|
7 | 7 | -- the Free Software Foundation; either version 2 of the License, or |
|
8 | 8 | -- (at your option) any later version. |
|
9 | 9 | -- |
|
10 | 10 | -- This program is distributed in the hope that it will be useful, |
|
11 | 11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 | 12 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 | 13 | -- GNU General Public License for more details. |
|
14 | 14 | -- |
|
15 | 15 | -- You should have received a copy of the GNU General Public License |
|
16 | 16 | -- along with this program; if not, write to the Free Software |
|
17 | 17 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
18 | 18 | -------------------------------------------------------------------------------*/ |
|
19 | 19 | /*-- Author : Alexis Jeandet |
|
20 | 20 | -- Mail : alexis.jeandet@member.fsf.org |
|
21 | 21 | ----------------------------------------------------------------------------*/ |
|
22 | 22 | |
|
23 | 23 | #include "qlopdata.h" |
|
24 | 24 | |
|
25 | 25 | QLopData::QLopData(QObject *parent) : QObject(parent) |
|
26 | 26 | { |
|
27 | 27 | this->unit = ""; |
|
28 | 28 | this->source = "Not set"; |
|
29 | 29 | this->type = QLopData::None; |
|
30 | 30 | } |
|
31 | 31 | |
|
32 | 32 | QLopData::~QLopData() |
|
33 | 33 | { |
|
34 | 34 | // delete data; |
|
35 | 35 | } |
|
36 | 36 | |
|
37 | 37 | |
|
38 | 38 | |
|
39 | QLopDataVector::QLopDataVector(QObject *parent) | |
|
39 | QLopQCPDataVector::QLopQCPDataVector(QObject *parent) | |
|
40 | { | |
|
41 | this->type = QLopData::QCPDataVector; | |
|
42 | } | |
|
43 | ||
|
44 | QLopQCPDataVector::~QLopQCPDataVector() | |
|
45 | { | |
|
46 | delete data; | |
|
47 | } | |
|
48 | ||
|
49 | ||
|
50 | QLopQVector::QLopQVector(QObject *parent) | |
|
40 | 51 | { |
|
41 | 52 | this->type = QLopData::Vector; |
|
42 | 53 | } |
|
43 | 54 | |
|
44 |
QLop |
|
|
55 | QLopQVector::~QLopQVector() | |
|
45 | 56 | { |
|
46 | 57 | delete data; |
|
47 | 58 | } |
@@ -1,78 +1,91 | |||
|
1 | 1 | /*------------------------------------------------------------------------------ |
|
2 | 2 | -- This file is a part of the QLop Software |
|
3 | 3 | -- Copyright (C) 2015, Plasma Physics Laboratory - CNRS |
|
4 | 4 | -- |
|
5 | 5 | -- This program is free software; you can redistribute it and/or modify |
|
6 | 6 | -- it under the terms of the GNU General Public License as published by |
|
7 | 7 | -- the Free Software Foundation; either version 2 of the License, or |
|
8 | 8 | -- (at your option) any later version. |
|
9 | 9 | -- |
|
10 | 10 | -- This program is distributed in the hope that it will be useful, |
|
11 | 11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 | 12 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 | 13 | -- GNU General Public License for more details. |
|
14 | 14 | -- |
|
15 | 15 | -- You should have received a copy of the GNU General Public License |
|
16 | 16 | -- along with this program; if not, write to the Free Software |
|
17 | 17 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
18 | 18 | -------------------------------------------------------------------------------*/ |
|
19 | 19 | /*-- Author : Alexis Jeandet |
|
20 | 20 | -- Mail : alexis.jeandet@member.fsf.org |
|
21 | 21 | ----------------------------------------------------------------------------*/ |
|
22 | 22 | |
|
23 | 23 | #ifndef QLOPDATA_H |
|
24 | 24 | #define QLOPDATA_H |
|
25 | 25 | |
|
26 | 26 | #include <QObject> |
|
27 | 27 | #include <qcustomplot.h> |
|
28 | 28 | |
|
29 | 29 | typedef struct dataVector |
|
30 | 30 | { |
|
31 | 31 | QString name; |
|
32 | 32 | QString unit; |
|
33 | 33 | QVector<QCPData>* data; |
|
34 | 34 | }dataVector; |
|
35 | 35 | |
|
36 | 36 | typedef QList<dataVector> QListOfDataVector; |
|
37 | 37 | |
|
38 | 38 | |
|
39 | 39 | |
|
40 | 40 | class QLopData : public QObject |
|
41 | 41 | { |
|
42 | 42 | Q_OBJECT |
|
43 | 43 | public: |
|
44 | 44 | typedef enum QLopDataType |
|
45 | 45 | { |
|
46 | 46 | Scalar=0, |
|
47 | 47 | Vector=1, |
|
48 | 48 | Matrix=2, |
|
49 | QCPDataVector=3, | |
|
49 | 50 | None=-1, |
|
50 | 51 | } |
|
51 | 52 | QLopDataType; |
|
52 | 53 | explicit QLopData(QObject *parent = 0); |
|
53 | 54 | ~QLopData(); |
|
54 | 55 | QString name; |
|
55 | 56 | QString source; |
|
56 | 57 | QString unit; |
|
57 | 58 | QLopDataType type; |
|
58 | 59 | int ID; |
|
59 | 60 | signals: |
|
60 | 61 | void dataChanged(); |
|
61 | 62 | public slots: |
|
62 | 63 | private: |
|
63 | 64 | }; |
|
64 | 65 | |
|
65 | class QLopDataVector : public QLopData | |
|
66 | class QLopQCPDataVector : public QLopData | |
|
66 | 67 | { |
|
67 | 68 | Q_OBJECT |
|
68 | 69 | public: |
|
69 | explicit QLopDataVector(QObject *parent = 0); | |
|
70 | ~QLopDataVector(); | |
|
70 | explicit QLopQCPDataVector(QObject *parent = 0); | |
|
71 | ~QLopQCPDataVector(); | |
|
71 | 72 | QVector<QCPData>* data; |
|
72 | 73 | signals: |
|
73 | 74 | public slots: |
|
74 | 75 | private: |
|
75 | 76 | }; |
|
77 | ||
|
78 | class QLopQVector : public QLopData | |
|
79 | { | |
|
80 | Q_OBJECT | |
|
81 | public: | |
|
82 | explicit QLopQVector(QObject *parent = 0); | |
|
83 | ~QLopQVector(); | |
|
84 | QVector<double>* data; | |
|
85 | signals: | |
|
86 | public slots: | |
|
87 | private: | |
|
88 | }; | |
|
76 | 89 | typedef QList<QLopData*> QLopDataList; |
|
77 | 90 | |
|
78 | 91 | #endif // QLOPDATA_H |
@@ -1,83 +1,91 | |||
|
1 | 1 | #include "qlopdatabase.h" |
|
2 | 2 | |
|
3 | 3 | QList<QLopData*>* QLopDataBase::m_dataBase=NULL; |
|
4 | 4 | QLopDataBase* QLopDataBase::_self=NULL; |
|
5 | 5 | |
|
6 | 6 | #define INIT() \ |
|
7 | 7 | if(Q_UNLIKELY(_self==NULL))\ |
|
8 | 8 | {\ |
|
9 | 9 | init();\ |
|
10 | 10 | } |
|
11 | 11 | |
|
12 | 12 | QLopDataBase::QLopDataBase(QObject *parent) : QObject(parent) |
|
13 | 13 | { |
|
14 | 14 | this->m_dataBase = new QList<QLopData*>(); |
|
15 | 15 | } |
|
16 | 16 | |
|
17 | 17 | QLopDataBase::~QLopDataBase() |
|
18 | 18 | { |
|
19 | 19 | |
|
20 | 20 | } |
|
21 | 21 | |
|
22 | 22 | void QLopDataBase::init() |
|
23 | 23 | { |
|
24 | 24 | _self=new QLopDataBase(); |
|
25 | 25 | } |
|
26 | 26 | |
|
27 | 27 | int QLopDataBase::addData(QLopData *data) |
|
28 | 28 | { |
|
29 | 29 | INIT(); |
|
30 | 30 | if(!m_dataBase->contains(data)) |
|
31 | 31 | { |
|
32 | 32 | m_dataBase->append(data); |
|
33 | 33 | return 1; |
|
34 | 34 | } |
|
35 | 35 | return 0; |
|
36 | 36 | } |
|
37 | 37 | |
|
38 | 38 | int QLopDataBase::addData(const QLopDataList& data) |
|
39 | 39 | { |
|
40 | 40 | INIT(); |
|
41 | 41 | int addedData=0; |
|
42 | 42 | for (int i = 0; i < data.count(); i++) |
|
43 | 43 | { |
|
44 | 44 | addedData += addData(data.at(i)); |
|
45 | 45 | } |
|
46 | 46 | return addedData; |
|
47 | 47 | } |
|
48 | 48 | |
|
49 | 49 | QLopDataBase *QLopDataBase::self() |
|
50 | 50 | { |
|
51 | 51 | INIT(); |
|
52 | 52 | return _self; |
|
53 | 53 | } |
|
54 | 54 | |
|
55 | 55 | int QLopDataBase::count() |
|
56 | 56 | { |
|
57 | 57 | return m_dataBase->count(); |
|
58 | 58 | } |
|
59 | 59 | |
|
60 | 60 | QLopData *QLopDataBase::getData(const QString &name) |
|
61 | 61 | { |
|
62 | 62 | for (int i = 0; i < m_dataBase->count(); i++) |
|
63 | 63 | { |
|
64 | 64 | if(Q_UNLIKELY(m_dataBase->at(i)->name==name)) |
|
65 | 65 | { |
|
66 | 66 | return m_dataBase->at(i); |
|
67 | 67 | } |
|
68 | 68 | } |
|
69 | 69 | return NULL; |
|
70 | 70 | } |
|
71 | 71 | |
|
72 | 72 | QLopData *QLopDataBase::getData(int ID) |
|
73 | 73 | { |
|
74 | 74 | for (int i = 0; i < m_dataBase->count(); i++) |
|
75 | 75 | { |
|
76 | 76 | if(Q_UNLIKELY(m_dataBase->at(i)->ID==ID)) |
|
77 | 77 | { |
|
78 | 78 | return m_dataBase->at(i); |
|
79 | 79 | } |
|
80 | 80 | } |
|
81 | 81 | return NULL; |
|
82 | 82 | } |
|
83 | 83 | |
|
84 | QLopData *QLopDataBase::getDataFromIdex(int index) | |
|
85 | { | |
|
86 | if((index>=0)&&(index<m_dataBase->count())) | |
|
87 | return m_dataBase->at(index); | |
|
88 | else | |
|
89 | return NULL; | |
|
90 | } | |
|
91 |
@@ -1,29 +1,30 | |||
|
1 | 1 | #ifndef QLOPDATABASE_H |
|
2 | 2 | #define QLOPDATABASE_H |
|
3 | 3 | |
|
4 | 4 | #include <QObject> |
|
5 | 5 | #include <qlopdata.h> |
|
6 | 6 | #include <QList> |
|
7 | 7 | |
|
8 | 8 | class QLopDataBase : public QObject |
|
9 | 9 | { |
|
10 | 10 | Q_OBJECT |
|
11 | 11 | explicit QLopDataBase(QObject *parent = 0); |
|
12 | 12 | ~QLopDataBase(); |
|
13 | 13 | static QLopDataBase* _self; |
|
14 | 14 | public: |
|
15 | 15 | static void init(); |
|
16 | 16 | static int addData(QLopData* data); |
|
17 | 17 | static int addData(const QLopDataList &data); |
|
18 | 18 | static QLopDataBase* self(); |
|
19 | 19 | static int count(); |
|
20 | 20 | static QLopData* getData(const QString& name); |
|
21 | 21 | static QLopData* getData(int ID); |
|
22 | QLopData* getDataFromIdex(int index); | |
|
22 | 23 | signals: |
|
23 | 24 | |
|
24 | 25 | public slots: |
|
25 | 26 | private: |
|
26 | 27 | static QList<QLopData*>* m_dataBase; |
|
27 | 28 | }; |
|
28 | 29 | |
|
29 | 30 | #endif // QLOPDATABASE_H |
@@ -1,146 +1,146 | |||
|
1 | 1 | /*------------------------------------------------------------------------------ |
|
2 | 2 | -- This file is a part of the QLop Software |
|
3 | 3 | -- Copyright (C) 2015, Plasma Physics Laboratory - CNRS |
|
4 | 4 | -- |
|
5 | 5 | -- This program is free software; you can redistribute it and/or modify |
|
6 | 6 | -- it under the terms of the GNU General Public License as published by |
|
7 | 7 | -- the Free Software Foundation; either version 2 of the License, or |
|
8 | 8 | -- (at your option) any later version. |
|
9 | 9 | -- |
|
10 | 10 | -- This program is distributed in the hope that it will be useful, |
|
11 | 11 | -- but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 | 12 | -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 | 13 | -- GNU General Public License for more details. |
|
14 | 14 | -- |
|
15 | 15 | -- You should have received a copy of the GNU General Public License |
|
16 | 16 | -- along with this program; if not, write to the Free Software |
|
17 | 17 | -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
18 | 18 | -------------------------------------------------------------------------------*/ |
|
19 | 19 | /*-- Author : Alexis Jeandet |
|
20 | 20 | -- Mail : alexis.jeandet@member.fsf.org |
|
21 | 21 | ----------------------------------------------------------------------------*/ |
|
22 | 22 | #include "mainwindow.h" |
|
23 | 23 | #include "ui_mainwindow.h" |
|
24 | 24 | #include <QFileDialog> |
|
25 | 25 | #include <QDir> |
|
26 | 26 | #include "qcustomplot.h" |
|
27 | 27 | #include <omp.h> |
|
28 | 28 | #include <QAction> |
|
29 | 29 | #include <downloadhistory.h> |
|
30 | 30 | #include <QDateTime> |
|
31 | 31 | #include <QDate> |
|
32 | 32 | #include <filedownloader.h> |
|
33 | 33 | #include <cassinitools.h> |
|
34 | 34 | #include <qlopplots.h> |
|
35 | 35 | |
|
36 | 36 | const QList<QLopService*>ServicesToLoad=QList<QLopService*>() |
|
37 | 37 | <<FileDownloader::self() |
|
38 | 38 | <<CassiniTools::self() |
|
39 | 39 | << QLopPlots::self(); |
|
40 | 40 | |
|
41 | 41 | MainWindow::MainWindow(int OMP_THREADS, QWidget *parent) : |
|
42 | 42 | QMainWindow(parent), |
|
43 | 43 | ui(new Ui::MainWindow) |
|
44 | 44 | { |
|
45 | 45 | this->OMP_THREADS = OMP_THREADS; |
|
46 | 46 | ui->setupUi(this); |
|
47 | this->setWindowIcon(QIcon(":img/QLop.svg")); | |
|
47 | 48 | |
|
48 | 49 | // QLopPlots::getPlot()->setXaxisTickLabelType(QCPAxis::ltDateTime); |
|
49 | 50 | // QLopPlots::getPlot()->setXaxisDateTimeFormat("hh:mm:ss.zzz"); |
|
50 | 51 | this->progressWidget = new QWidget(); |
|
51 | 52 | this->progressLayout = new QVBoxLayout(this->progressWidget); |
|
52 | 53 | this->progressWidget->setLayout(this->progressLayout); |
|
53 | 54 | this->progressWidget->setWindowModality(Qt::WindowModal); |
|
54 | 55 | progressThreadIds = (int*) malloc(OMP_THREADS*sizeof(int)); |
|
55 | 56 | for(int i=0;i<OMP_THREADS;i++) |
|
56 | 57 | { |
|
57 | 58 | this->progress.append(new QProgressBar(this->progressWidget)); |
|
58 | 59 | this->progress.last()->setMinimum(0); |
|
59 | 60 | this->progress.last()->setMaximum(100); |
|
60 | // connect(&this->fileReader,SIGNAL(updateProgress(int,int)),this,SLOT(updateProgress(int,int))); | |
|
61 | 61 | this->progressLayout->addWidget(this->progress.last()); |
|
62 | 62 | this->progressWidget->hide(); |
|
63 | 63 | this->progressThreadIds[i] = -1; |
|
64 | 64 | } |
|
65 | 65 | this->progressWidget->setWindowTitle("Loading File"); |
|
66 | 66 | for(int i=0;i<ServicesToLoad.count();i++) |
|
67 | 67 | { |
|
68 | 68 | qDebug()<<ServicesToLoad.at(i)->serviceName(); |
|
69 | 69 | QDockWidget* wdgt=ServicesToLoad.at(i)->getGUI(); |
|
70 | 70 | wdgt->setAllowedAreas(Qt::AllDockWidgetAreas); |
|
71 | 71 | this->addDockWidget(Qt::TopDockWidgetArea,wdgt); |
|
72 | 72 | PythonQt::self()->getMainModule().addObject(ServicesToLoad.at(i)->serviceName(),(QObject*)ServicesToLoad.at(i)); |
|
73 | 73 | } |
|
74 | 74 | } |
|
75 | 75 | |
|
76 | 76 | MainWindow::~MainWindow() |
|
77 | 77 | { |
|
78 | 78 | delete ui; |
|
79 | 79 | } |
|
80 | 80 | |
|
81 | 81 | //QString MainWindow::getFilePath(const QString &name) |
|
82 | 82 | //{ |
|
83 | 83 | //// for(int i=0;i<this->folderViews.count();i++) |
|
84 | 84 | //// { |
|
85 | 85 | //// if(folderViews.at(i)->isDraging(name)) |
|
86 | 86 | //// return folderViews.at(i)->currentFolder(); |
|
87 | 87 | //// } |
|
88 | 88 | // return ""; |
|
89 | 89 | //} |
|
90 | 90 | |
|
91 | 91 | |
|
92 | 92 | |
|
93 | 93 | |
|
94 | 94 | void MainWindow::updateProgress(int threadId, int percentProgress) |
|
95 | 95 | { |
|
96 | 96 | bool updated=false; |
|
97 | 97 | for(int i=0;i<OMP_THREADS;i++) |
|
98 | 98 | { |
|
99 | 99 | if(progressThreadIds[i]==threadId) |
|
100 | 100 | { |
|
101 | 101 | if(threadId<this->progress.count()) |
|
102 | 102 | { |
|
103 | 103 | this->progress.at(i)->setValue(percentProgress); |
|
104 | 104 | updated=true; |
|
105 | 105 | } |
|
106 | 106 | } |
|
107 | 107 | } |
|
108 | 108 | if(Q_UNLIKELY(updated==false)) |
|
109 | 109 | { |
|
110 | 110 | for(int i=0;i<OMP_THREADS;i++) |
|
111 | 111 | { |
|
112 | 112 | if(progressThreadIds[i]==-1) |
|
113 | 113 | { |
|
114 | 114 | progressThreadIds[i] = threadId; |
|
115 | 115 | updateProgress(threadId,percentProgress); |
|
116 | 116 | return; |
|
117 | 117 | } |
|
118 | 118 | } |
|
119 | 119 | } |
|
120 | 120 | } |
|
121 | 121 | |
|
122 | 122 | |
|
123 | 123 | void MainWindow::askGlobalRescan() |
|
124 | 124 | { |
|
125 | 125 | // for(int i=0;i<this->folderViews.count();i++) |
|
126 | 126 | // { |
|
127 | 127 | // this->folderViews.at(i)->refreshFolder(); |
|
128 | 128 | // } |
|
129 | 129 | } |
|
130 | 130 | |
|
131 | 131 | void MainWindow::showThemisIndexViewer() |
|
132 | 132 | { |
|
133 | 133 | |
|
134 | 134 | } |
|
135 | 135 | |
|
136 | 136 | void MainWindow::changeEvent(QEvent *e) |
|
137 | 137 | { |
|
138 | 138 | QMainWindow::changeEvent(e); |
|
139 | 139 | switch (e->type()) { |
|
140 | 140 | case QEvent::LanguageChange: |
|
141 | 141 | ui->retranslateUi(this); |
|
142 | 142 | break; |
|
143 | 143 | default: |
|
144 | 144 | break; |
|
145 | 145 | } |
|
146 | 146 | } |
General Comments 0
You need to be logged in to leave comments.
Login now