From 86b3dd442a191fc59537d566890021b23fa4bf25 Mon Sep 17 00:00:00 2001 From: hrobeers Date: Thu, 27 Mar 2014 08:53:50 +0100 Subject: [PATCH] About & LICENSE update --- README | 6 ++--- src/app/main.cpp | 4 +-- src/app/mainwindow.cpp | 18 +++++++++---- src/app/mainwindow.h | 5 ++-- .../outlineeditor/outlineeditor.cpp | 2 +- .../profileeditor/profileeditor.cpp | 2 +- .../thicknesseditor/thicknesseditor.cpp | 2 +- src/foillogic/contourcalculator.cpp | 25 ++++++------------- src/foillogic/contourcalculator.h | 25 ++++++------------- src/foillogic/foilcalculator.cpp | 25 ++++++------------- src/foillogic/foilcalculator.h | 19 ++++---------- src/hrlib/version.cpp | 4 +-- src/hrlib/version.h | 4 +-- src/patheditor/patheditorwidget.cpp | 6 ++--- src/patheditor/patheditorwidget.h | 2 +- src/version_autogen.h | 4 +-- 16 files changed, 63 insertions(+), 90 deletions(-) diff --git a/README b/README index 197b7af..b13b240 100644 --- a/README +++ b/README @@ -6,19 +6,19 @@ Compilation from source Make sure that the dependencies are installed (see below). Execute the follwing commands in a terminal in the finfoil directory: -$ qmake-qt4 finfoil.pro +$ qmake-qt5 finfoil.pro $ make Dependencies ============ g++ >= 4.7 -Qt >= 4.8 +Qt >= 5.0 Boost >= 1.54 LICENSE ======= The majority of the code is licensed under the 2-clause BSD license. -However, parts of the code are licensed under the LGPLv2. +However, parts of the code are licensed under the GNU LGPL version 2.1. Since Everything is statically linked, the total project inherits the LGPL license. It should be trivial for every Qt/C++ programmer to extract this code for dynamic linking so that a BSD licensed project is obtained with a dynamic dependency on a LGPL library. diff --git a/src/app/main.cpp b/src/app/main.cpp index 58fa070..f24b0f2 100644 --- a/src/app/main.cpp +++ b/src/app/main.cpp @@ -27,7 +27,7 @@ int main(int argc, char *argv[]) { - hrlib::Version version = finfoil::version(); + const hrlib::Version version = finfoil::version(); qDebug() << "Starting finFoil" << version.toString() << "git-hash" << version.commit(); @@ -35,7 +35,7 @@ int main(int argc, char *argv[]) { QApplication a(argc, argv); - MainWindow w("finFoil v" + version.toString()); + MainWindow w(version); w.show(); return a.exec(); diff --git a/src/app/mainwindow.cpp b/src/app/mainwindow.cpp index 6049bd3..51a7c94 100644 --- a/src/app/mainwindow.cpp +++ b/src/app/mainwindow.cpp @@ -35,10 +35,10 @@ using namespace foileditors; using namespace foillogic; -MainWindow::MainWindow(QString title, QWidget *parent) : +MainWindow::MainWindow(const hrlib::Version version, QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow), - _title(title), + _version(version), _dirty(false) { ui->setupUi(this); @@ -124,7 +124,15 @@ void MainWindow::about() { QMessageBox::about(this, tr("About finFoil"), tr("

About finFoil

" - "

finFoil is an easy to use surf fin design tool.

")); + "

finFoil v") + + _version.toString() + "

" + + tr("

finFoil is an easy to use fin or wing design tool.

" + "

finFoil is licensed under the GNU LGPL version 2.1. " + "In Short this means that you can use and distribute the finFoil binaries without restrictions.

" + "

The majority of the finFoil code is licensed under the 2-clause BSD license. " + "Meaning that you can reuse these parts of the code under the conditions of the 2-clause BSD license. " + "However, since some source files are licensed under the GNU LGPL version 2.1, the entire application inherits this license.

" + "

Copyright 2011-2014 Hans Robeers (hrobeers). All rights reserved.

")); } bool MainWindow::maybeSave() @@ -147,14 +155,14 @@ bool MainWindow::maybeSave() void MainWindow::setDirty() { _dirty = true; - this->setWindowTitle(_currentFile.fileName() + "*" + " -- " + _title); + this->setWindowTitle(_currentFile.fileName() + "*" + " -- finFoil v" + _version.toString()); } void MainWindow::setClean() { // TODO set clean not working properly (clean after painting) _dirty = false; - this->setWindowTitle(_currentFile.fileName() + " -- " + _title); + this->setWindowTitle(_currentFile.fileName() + " -- finFoil v" + _version.toString()); } void MainWindow::setFoilEditors(Foil *foil) diff --git a/src/app/mainwindow.h b/src/app/mainwindow.h index d9731e8..f18c564 100644 --- a/src/app/mainwindow.h +++ b/src/app/mainwindow.h @@ -29,6 +29,7 @@ #include #include #include "foileditors.h" +#include "version.h" namespace Ui { class MainWindow; @@ -39,7 +40,7 @@ class MainWindow : public QMainWindow Q_OBJECT public: - explicit MainWindow(QString title, QWidget *parent = 0); + explicit MainWindow(const hrlib::Version version, QWidget *parent = 0); ~MainWindow(); protected: @@ -59,7 +60,7 @@ private slots: void setClean(); private: - QString _title; + const hrlib::Version _version; Ui::MainWindow *ui; std::unique_ptr _fin; diff --git a/src/foileditors/outlineeditor/outlineeditor.cpp b/src/foileditors/outlineeditor/outlineeditor.cpp index 76610c9..f9f0733 100644 --- a/src/foileditors/outlineeditor/outlineeditor.cpp +++ b/src/foileditors/outlineeditor/outlineeditor.cpp @@ -41,7 +41,7 @@ OutlineEditor::OutlineEditor(Foil *foil, QWidget *parent) : // // PathEditors // - QFlags features(Features::HorizontalAxis | Features::DropImageHereText); + QFlags features(Features::HorizontalAxis | Features::DragImageHereText); _topPathEditor = new patheditor::PathEditorWidget(); _topPathEditor->enableFeatures(features); _botPathEditor = new patheditor::PathEditorWidget(); diff --git a/src/foileditors/profileeditor/profileeditor.cpp b/src/foileditors/profileeditor/profileeditor.cpp index d79f410..6884d6d 100644 --- a/src/foileditors/profileeditor/profileeditor.cpp +++ b/src/foileditors/profileeditor/profileeditor.cpp @@ -37,7 +37,7 @@ ProfileEditor::ProfileEditor(Foil* foil, QWidget *parent) : QWidget(parent) { _pathEditor = new patheditor::PathEditorWidget(); - _pathEditor->enableFeatures(QFlags(Features::HorizontalAxis | Features::DropImageHereText)); + _pathEditor->enableFeatures(QFlags(Features::HorizontalAxis | Features::DragImageHereText)); QComboBox* symmetryCombo = new QComboBox(); symmetryCombo->addItem(tr("Symmetric")); diff --git a/src/foileditors/thicknesseditor/thicknesseditor.cpp b/src/foileditors/thicknesseditor/thicknesseditor.cpp index a04ddeb..d92f4ad 100644 --- a/src/foileditors/thicknesseditor/thicknesseditor.cpp +++ b/src/foileditors/thicknesseditor/thicknesseditor.cpp @@ -37,7 +37,7 @@ ThicknessEditor::ThicknessEditor(Foil *foil, QWidget *parent) : { _pathEditor = new patheditor::PathEditorWidget(); _pathEditor->enableFeatures(QFlags(Features::HorizontalAxis | Features::VerticalAxis | - Features::DropImageHereText)); + Features::DragImageHereText)); QGroupBox* gb = new QGroupBox(tr("Thickness")); QVBoxLayout* gbLayout = new QVBoxLayout(); diff --git a/src/foillogic/contourcalculator.cpp b/src/foillogic/contourcalculator.cpp index d819127..adb7f29 100644 --- a/src/foillogic/contourcalculator.cpp +++ b/src/foillogic/contourcalculator.cpp @@ -1,23 +1,14 @@ /**************************************************************************** - + Copyright (c) 2013, Hans Robeers All rights reserved. - - BSD 2-Clause License - - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - + + This code is distributed under the GNU LGPL version 2.1. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + ****************************************************************************/ #include "contourcalculator.h" diff --git a/src/foillogic/contourcalculator.h b/src/foillogic/contourcalculator.h index 6d3dde3..b9d9432 100644 --- a/src/foillogic/contourcalculator.h +++ b/src/foillogic/contourcalculator.h @@ -1,23 +1,14 @@ /**************************************************************************** - + Copyright (c) 2013, Hans Robeers All rights reserved. - - BSD 2-Clause License - - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - + + This code is distributed under the GNU LGPL version 2.1. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + ****************************************************************************/ #ifndef CONTOURCALCULATOR_H diff --git a/src/foillogic/foilcalculator.cpp b/src/foillogic/foilcalculator.cpp index 3809a34..38a902d 100644 --- a/src/foillogic/foilcalculator.cpp +++ b/src/foillogic/foilcalculator.cpp @@ -1,23 +1,14 @@ /**************************************************************************** - + Copyright (c) 2013, Hans Robeers All rights reserved. - - BSD 2-Clause License - - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - + + This code is distributed under the GNU LGPL version 2.1. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + ****************************************************************************/ #include "foilcalculator.h" diff --git a/src/foillogic/foilcalculator.h b/src/foillogic/foilcalculator.h index 28dfbd8..79f9e98 100644 --- a/src/foillogic/foilcalculator.h +++ b/src/foillogic/foilcalculator.h @@ -3,20 +3,11 @@ Copyright (c) 2013, Hans Robeers All rights reserved. - BSD 2-Clause License - - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + This code is distributed under the GNU LGPL version 2.1. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ****************************************************************************/ diff --git a/src/hrlib/version.cpp b/src/hrlib/version.cpp index b5a40e0..c601af7 100644 --- a/src/hrlib/version.cpp +++ b/src/hrlib/version.cpp @@ -60,12 +60,12 @@ Version::Version(int major, int minor, int revision, int build, QString commit, } } -QString hrlib::Version::toString() +QString hrlib::Version::toString() const { return _string; } -QString Version::commit() +QString Version::commit() const { return _commit; } diff --git a/src/hrlib/version.h b/src/hrlib/version.h index bc368ba..10f59d5 100644 --- a/src/hrlib/version.h +++ b/src/hrlib/version.h @@ -37,8 +37,8 @@ namespace hrlib public: explicit Version(int major, int minor, int revision, int build, QString commit, ReleaseType::e releaseType); - QString toString(); - QString commit(); + QString toString() const; + QString commit() const; private: int _major; diff --git a/src/patheditor/patheditorwidget.cpp b/src/patheditor/patheditorwidget.cpp index e31742d..a349d7d 100644 --- a/src/patheditor/patheditorwidget.cpp +++ b/src/patheditor/patheditorwidget.cpp @@ -106,13 +106,13 @@ void PathEditorWidget::enableFeatures(QFlags features) _enabledFeatures |= Features::VerticalAxis; } - if (features.testFlag(Features::DropImageHereText) && !_enabledFeatures.testFlag(Features::DropImageHereText)) + if (features.testFlag(Features::DragImageHereText) && !_enabledFeatures.testFlag(Features::DragImageHereText)) { QFont font; font.setWeight(QFont::Light); - this->scene()->addText(tr("Drop Image Here"), font); + this->scene()->addText(tr("Drag an image here"), font); - _enabledFeatures |= Features::DropImageHereText; + _enabledFeatures |= Features::DragImageHereText; } } diff --git a/src/patheditor/patheditorwidget.h b/src/patheditor/patheditorwidget.h index 84ef08d..33a51e7 100644 --- a/src/patheditor/patheditorwidget.h +++ b/src/patheditor/patheditorwidget.h @@ -40,7 +40,7 @@ namespace patheditor None = 0x0, HorizontalAxis = 0x1, VerticalAxis = 0x2, - DropImageHereText = 0x4 + DragImageHereText = 0x4 }; }; diff --git a/src/version_autogen.h b/src/version_autogen.h index d40adbb..e1f7b4f 100644 --- a/src/version_autogen.h +++ b/src/version_autogen.h @@ -5,7 +5,7 @@ #ifndef VERSION_AUTOGEN_H #define VERSION_AUTOGEN_H -#define BUILD_NUMBER 353 -#define COMMIT_HASH "a45befc3866d18dbca7290023983495fdd65f5a9" +#define BUILD_NUMBER 354 +#define COMMIT_HASH "51798eb89b2a5ce5163d10c5f94aa9e292807f50" #endif // VERSION_AUTOGEN_H