ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
license_widget.cc
Go to the documentation of this file.
1 // Copyright (c) 2018, ETH Zurich and UNC Chapel Hill.
2 // All rights reserved.
3 //
4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions are met:
6 //
7 // * Redistributions of source code must retain the above copyright
8 // notice, this list of conditions and the following disclaimer.
9 //
10 // * Redistributions in binary form must reproduce the above copyright
11 // notice, this list of conditions and the following disclaimer in the
12 // documentation and/or other materials provided with the distribution.
13 //
14 // * Neither the name of ETH Zurich and UNC Chapel Hill nor the names of
15 // its contributors may be used to endorse or promote products derived
16 // from this software without specific prior written permission.
17 //
18 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 // ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
22 // LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23 // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24 // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25 // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26 // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27 // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28 // POSSIBILITY OF SUCH DAMAGE.
29 //
30 // Author: Johannes L. Schoenberger (jsch-at-demuc-dot-de)
31 
32 #include "ui/license_widget.h"
33 
34 namespace colmap {
35 
36 LicenseWidget::LicenseWidget(QWidget* parent) : QTextEdit(parent) {
37  setReadOnly(true);
38  setWindowFlags(Qt::Dialog);
39  resize(parent->width() - 20, parent->height() - 20);
40  setWindowTitle("License");
41 
42  QString licenses;
43  licenses += "<h2>COLMAP</h2>";
44  licenses += GetCOLMAPLicense();
45  licenses += "<h2>External</h2>";
46  licenses += "<h3>FLANN</h3>";
47  licenses += GetFLANNLicense();
48  licenses += "<h3>Graclus</h3>";
49  licenses += GetGraclusLicense();
50  licenses += "<h3>LSD</h3>";
51  licenses += GetLSDLicense();
52 #ifdef PBA_ENABLED
53  licenses += "<h3>PBA</h3>";
54  licenses += GetPBALicense();
55 #endif
56  licenses += "<h3>PoissonRecon</h3>";
57  licenses += GetPoissonReconLicense();
58  licenses += "<h3>SiftGPU</h3>";
59  licenses += GetSiftGPULicense();
60  licenses += "<h3>SQLite</h3>";
61  licenses += GetSQLiteLicense();
62  licenses += "<h3>VLFeat</h3>";
63  licenses += GetVLFeatLicense();
64  setHtml(licenses);
65 }
66 
67 QString LicenseWidget::GetCOLMAPLicense() const {
68  const QString license =
69  "Copyright (c) 2018, ETH Zurich and UNC Chapel Hill.<br>"
70  "All rights reserved.<br>"
71  "<br>"
72  "Redistribution and use in source and binary forms, with or without<br>"
73  "modification, are permitted provided that the following conditions are "
74  "met:<br>"
75  "<br>"
76  " * Redistributions of source code must retain the above copyright<br>"
77  " notice, this list of conditions and the following disclaimer.<br>"
78  "<br>"
79  " * Redistributions in binary form must reproduce the above "
80  "copyright<br>"
81  " notice, this list of conditions and the following disclaimer in "
82  "the<br>"
83  " documentation and/or other materials provided with the "
84  "distribution.<br>"
85  "<br>"
86  " * Neither the name of ETH Zurich and UNC Chapel Hill nor the names "
87  "of<br>"
88  " its contributors may be used to endorse or promote products "
89  "derived<br>"
90  " from this software without specific prior written permission.<br>"
91  "<br>"
92  "THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "
93  "\"AS IS\"<br>"
94  "AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, "
95  "THE<br>"
96  "IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR "
97  "PURPOSE<br>"
98  "ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS "
99  "BE<br>"
100  "LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR<br>"
101  "CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF<br>"
102  "SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR "
103  "BUSINESS<br>"
104  "INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER "
105  "IN<br>"
106  "CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR "
107  "OTHERWISE)<br>"
108  "ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF "
109  "THE<br>"
110  "POSSIBILITY OF SUCH DAMAGE.<br>"
111  "<br>"
112  "Author: Johannes L. Schoenberger (jsch-at-demuc-dot-de)";
113  return license;
114 }
115 
116 QString LicenseWidget::GetFLANNLicense() const {
117  const QString license =
118  "The BSD License<br>"
119  "<br>"
120  "Copyright (c) 2008-2011 Marius Muja (mariusm@cs.ubc.ca). "
121  "All rights reserved.<br>"
122  "Copyright (c) 2008-2011 David G. Lowe (lowe@cs.ubc.ca). "
123  "All rights reserved.<br>"
124  "<br>"
125  "Redistribution and use in source and binary forms, with or without<br>"
126  "modification, are permitted provided that the following conditions<br>"
127  "are met:<br>"
128  "<br>"
129  " * Redistributions of source code must retain the above copyright<br>"
130  " notice, this list of conditions and the following disclaimer.<br>"
131  " * Redistributions in binary form must reproduce the above copyright<br>"
132  " notice, this list of conditions and the following disclaimer in<br>"
133  " the documentation and/or other materials provided with the<br>"
134  " distribution.<br>"
135  " * Neither the name of the \"University of British Columbia\" nor<br>"
136  " the names of its contributors may be used to endorse or promote<br>"
137  " products derived from this software without specific prior<br>"
138  " written permission.<br>"
139  "<br>"
140  "THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS<br>"
141  "\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT<br>"
142  "LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS<br>"
143  "FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE<br>"
144  "COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,<br>"
145  "INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES<br>"
146  "(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS<br>"
147  "OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS<br>"
148  "INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,<br>"
149  "WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE<br>"
150  "OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,<br>"
151  "EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.";
152  return license;
153 }
154 
155 QString LicenseWidget::GetGraclusLicense() const {
156  const QString license =
157  "Copyright(c) 2008 Brian Kulis, Yuqiang Guan (version 1.2)<br>"
158  "This program is free software: you can redistribute it and/or modify<br>"
159  "it under the terms of the GNU General Public License as published by<br>"
160  "the Free Software Foundation, either version 3 of the License, or<br>"
161  "(at your option) any later version.<br><br>"
162  "This program is distributed in the hope that it will be useful,<br>"
163  "but WITHOUT ANY WARRANTY; without even the implied warranty of<br>"
164  "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the<br>"
165  "GNU General Public License for more details.<br><br>"
166  "You should have received a copy of the GNU General Public License<br>"
167  "along with this program. If not, see http://www.gnu.org/licenses/.";
168  return license;
169 }
170 
171 QString LicenseWidget::GetLSDLicense() const {
172  const QString license =
173  "LSD - Line Segment Detector on digital images<br>"
174  "<br>"
175  "This code is part of the following publication and was subject<br>"
176  "to peer review:"
177  "<br>"
178  " \"LSD: a Line Segment Detector\" by Rafael Grompone von Gioi,<br>"
179  " Jeremie Jakubowicz, Jean-Michel Morel, and Gregory Randall,<br>"
180  " Image Processing On Line, 2012. DOI:10.5201/ipol.2012.gjmr-lsd<br>"
181  " http://dx.doi.org/10.5201/ipol.2012.gjmr-lsd<br>"
182  "<br>"
183  "Copyright(c) 2007-2011 rafael grompone von gioi <grompone@gmail.com><br>"
184  "<br>"
185  "This program is free software: you can redistribute it and/or<br>"
186  "modify it under the terms of the GNU Affero General Public License<br>"
187  "as published by the Free Software Foundation, either version 3 of<br>"
188  "the License, or (at your option) any later version.<br>"
189  "<br>"
190  "This program is distributed in the hope that it will be useful,<br>"
191  "but WITHOUT ANY WARRANTY; without even the implied warranty of<br>"
192  "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the<br>"
193  "GNU Affero General Public License for more details.<br>"
194  "<br>"
195  "You should have received a copy of the GNU Affero General Public<br>"
196  "License along with this program.<br>"
197  "If not, see http://www.gnu.org/licenses/.";
198  return license;
199 }
200 
201 #ifdef PBA_ENABLED
202 QString LicenseWidget::GetPBALicense() const {
203  const QString license =
204  "Copyright (c) 2011 Changchang Wu (ccwu@cs.washington.edu)<br>"
205  "and the University of Washington at Seattle<br>"
206  "<br>"
207  "This library is free software; you can redistribute it and/or<br>"
208  "modify it under the terms of the GNU General Public<br>"
209  "License as published by the Free Software Foundation; either<br>"
210  "Version 3 of the License, or (at your option) any later version.<br>"
211  "<br>"
212  "This library is distributed in the hope that it will be useful,<br>"
213  "but WITHOUT ANY WARRANTY; without even the implied warranty of<br>"
214  "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU<br>"
215  "General Public License for more details.";
216  return license;
217 }
218 #endif
219 
220 QString LicenseWidget::GetPoissonReconLicense() const {
221  const QString license =
222  "The MIT License (MIT)<br>"
223  "<br>"
224  "Copyright (c) 2015 mkazhdan<br>"
225  "<br>"
226  "Permission is hereby granted, free of charge, to any person<br>"
227  "obtaining a copy of this software and associated documentation<br>"
228  "files (the \"Software\"), to deal in the Software without<br>"
229  "restriction, including without limitation the rights to use, copy,<br>"
230  "modify, merge, publish, distribute, sublicense, and/or sell copies<br>"
231  "of the Software, and to permit persons to whom the Software is<br>"
232  "furnished to do so, subject to the following conditions:<br>"
233  "<br>"
234  "The above copyright notice and this permission notice shall be<br>"
235  "included in all copies or substantial portions of the Software.<br>"
236  "<br>"
237  "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,<br>"
238  "EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF<br>"
239  "MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND<br>"
240  "NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS<br>"
241  "BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN<br>"
242  "ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN<br>"
243  "CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE<br>"
244  "SOFTWARE.";
245  return license;
246 }
247 
248 QString LicenseWidget::GetSiftGPULicense() const {
249  const QString license =
250  "Copyright (c) 2007 University of North Carolina at Chapel Hill<br>"
251  "All Rights Reserved<br>"
252  "<br>"
253  "Permission to use, copy, modify and distribute this software and its<br>"
254  "documentation for educational, research and non-profit purposes,<br>"
255  "without fee, and without a written agreement is hereby granted,<br>"
256  "provided that the above copyright notice and the following paragraph<br>"
257  "appear in all copies.<br>"
258  "<br>"
259  "The University of North Carolina at Chapel Hill make no<br>"
260  "representations about the suitability of this software for any<br>"
261  "purpose. It is provided 'as is' without express or implied warranty.";
262  return license;
263 }
264 
265 QString LicenseWidget::GetSQLiteLicense() const {
266  const QString license =
267  "The author disclaims copyright to this source code. In place of<br>"
268  "a legal notice, here is a blessing:<br>"
269  "May you do good and not evil.<br>"
270  "May you find forgiveness for yourself and forgive others.<br>"
271  "May you share freely, never taking more than you give.";
272  return license;
273 }
274 
275 QString LicenseWidget::GetVLFeatLicense() const {
276  const QString license =
277  "Copyright (C) 2007-11, Andrea Vedaldi and Brian Fulkerson<br>"
278  "Copyright (C) 2012-13, The VLFeat Team<br>"
279  "All rights reserved.<br>"
280  "<br>"
281  "Redistribution and use in source and binary forms, with or without<br>"
282  "modification, are permitted provided that the following conditions <br>"
283  "are met:<br>"
284  "1. Redistributions of source code must retain the above copyright<br>"
285  " notice, this list of conditions and the following disclaimer.<br>"
286  "2. Redistributions in binary form must reproduce the above copyright<br>"
287  " notice, this list of conditions and the following disclaimer in<br>"
288  " the documentation and/or other materials provided with the<br>"
289  " distribution.<br>"
290  "<br>"
291  "THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS<br>"
292  "AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT<br>"
293  "LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS<br>"
294  "FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE<br>"
295  "COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,<br>"
296  "INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,<br>"
297  "BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;<br>"
298  "LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER<br>"
299  "CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT<br>"
300  "LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN<br>"
301  "ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE<br>"
302  "POSSIBILITY OF SUCH DAMAGE.";
303  return license;
304 }
305 
306 } // namespace colmap
LicenseWidget(QWidget *parent)