Skip to content

Commit

Permalink
About & LICENSE update
Browse files Browse the repository at this point in the history
  • Loading branch information
hrobeers committed Mar 27, 2014
1 parent 51798eb commit 86b3dd4
Show file tree
Hide file tree
Showing 16 changed files with 63 additions and 90 deletions.
6 changes: 3 additions & 3 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
4 changes: 2 additions & 2 deletions src/app/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@

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();

try
{
QApplication a(argc, argv);

MainWindow w("finFoil v" + version.toString());
MainWindow w(version);
w.show();

return a.exec();
Expand Down
18 changes: 13 additions & 5 deletions src/app/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -124,7 +124,15 @@ void MainWindow::about()
{
QMessageBox::about(this, tr("About finFoil"),
tr("<h3>About finFoil</h3>"
"<p>finFoil is an easy to use surf fin design tool.</p>"));
"<p>finFoil v") +
_version.toString() + "</p>" +
tr("<p>finFoil is an easy to use fin or wing design tool.</p>"
"<p>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.</p>"
"<p>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.</p>"
"<p>Copyright 2011-2014 Hans Robeers (hrobeers). All rights reserved.</p>"));
}

bool MainWindow::maybeSave()
Expand All @@ -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)
Expand Down
5 changes: 3 additions & 2 deletions src/app/mainwindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include <memory>
#include <QFileInfo>
#include "foileditors.h"
#include "version.h"

namespace Ui {
class MainWindow;
Expand All @@ -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:
Expand All @@ -59,7 +60,7 @@ private slots:
void setClean();

private:
QString _title;
const hrlib::Version _version;
Ui::MainWindow *ui;

std::unique_ptr<foillogic::Foil> _fin;
Expand Down
2 changes: 1 addition & 1 deletion src/foileditors/outlineeditor/outlineeditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ OutlineEditor::OutlineEditor(Foil *foil, QWidget *parent) :
//
// PathEditors
//
QFlags<Features::e> features(Features::HorizontalAxis | Features::DropImageHereText);
QFlags<Features::e> features(Features::HorizontalAxis | Features::DragImageHereText);
_topPathEditor = new patheditor::PathEditorWidget();
_topPathEditor->enableFeatures(features);
_botPathEditor = new patheditor::PathEditorWidget();
Expand Down
2 changes: 1 addition & 1 deletion src/foileditors/profileeditor/profileeditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ ProfileEditor::ProfileEditor(Foil* foil, QWidget *parent) :
QWidget(parent)
{
_pathEditor = new patheditor::PathEditorWidget();
_pathEditor->enableFeatures(QFlags<Features::e>(Features::HorizontalAxis | Features::DropImageHereText));
_pathEditor->enableFeatures(QFlags<Features::e>(Features::HorizontalAxis | Features::DragImageHereText));

QComboBox* symmetryCombo = new QComboBox();
symmetryCombo->addItem(tr("Symmetric"));
Expand Down
2 changes: 1 addition & 1 deletion src/foileditors/thicknesseditor/thicknesseditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ ThicknessEditor::ThicknessEditor(Foil *foil, QWidget *parent) :
{
_pathEditor = new patheditor::PathEditorWidget();
_pathEditor->enableFeatures(QFlags<Features::e>(Features::HorizontalAxis | Features::VerticalAxis |
Features::DropImageHereText));
Features::DragImageHereText));

QGroupBox* gb = new QGroupBox(tr("Thickness"));
QVBoxLayout* gbLayout = new QVBoxLayout();
Expand Down
25 changes: 8 additions & 17 deletions src/foillogic/contourcalculator.cpp
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
25 changes: 8 additions & 17 deletions src/foillogic/contourcalculator.h
Original file line number Diff line number Diff line change
@@ -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
Expand Down
25 changes: 8 additions & 17 deletions src/foillogic/foilcalculator.cpp
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
19 changes: 5 additions & 14 deletions src/foillogic/foilcalculator.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
****************************************************************************/

Expand Down
4 changes: 2 additions & 2 deletions src/hrlib/version.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
4 changes: 2 additions & 2 deletions src/hrlib/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions src/patheditor/patheditorwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,13 @@ void PathEditorWidget::enableFeatures(QFlags<Features::e> 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;
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/patheditor/patheditorwidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ namespace patheditor
None = 0x0,
HorizontalAxis = 0x1,
VerticalAxis = 0x2,
DropImageHereText = 0x4
DragImageHereText = 0x4
};
};

Expand Down
4 changes: 2 additions & 2 deletions src/version_autogen.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 86b3dd4

Please sign in to comment.