Skip to content

Commit

Permalink
Merge branch 'master' of github.com:markummitchell/engauge-digitizer
Browse files Browse the repository at this point in the history
  • Loading branch information
markummitchell-tu committed Apr 6, 2016
2 parents deb7cd5 + 86a605e commit 3deea57
Show file tree
Hide file tree
Showing 43 changed files with 55,870 additions and 66 deletions.
13 changes: 8 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ before_install:
sudo apt-get install --yes --no-install-recommends qtbase5-dev qttools5-dev qt5-default qttools5-dev-tools qt5-qmake liblog4cpp5-dev libfftw3-dev libqt5sql5-sqlite xvfb;
elif [ `uname` = "Darwin" ]; then
brew update;
brew install qt5 fftw log4cpp;
export QT5BREWHOME=`brew --prefix qt5`;
brew install homebrew/versions/qt55 fftw log4cpp;
export QT5BREWHOME=`brew --prefix homebrew/versions/qt55`;
fi

script:
Expand All @@ -44,11 +44,14 @@ script:
sed -ibak2 's|-L/usr/local/Cellar|-F/usr/local/Cellar|g' Makefile;
fi
- make
#no tests on OSX
- cd help && ./build && cd ..;
- if [ `uname` = "Darwin" ]; then
cp engauge bin;
fi
- cd src && ./build_and_run_all_gui_tests && cd ..;
#no cli tests on OSX
- if [ `uname` = "Linux" ]; then
cd help && ./build && cd ..;
cd src && ./build_and_run_all_cli_tests && cd ..;
cd src && ./build_and_run_all_gui_tests && cd ..;
fi

after_success:
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ environment:
RESULTDIR: engauge-build-debug

install:
- set QTDIR=C:\Qt\5.5\msvc2013
- set QTDIR=C:\Qt\5.6\msvc2013
- set PATH=%PATH%;%QTDIR%\bin
- cd %APPVEYOR_BUILD_FOLDER%
- curl -fsSL %LOG4CPPDLLINK% -o log4cpp-1.1.1.zip
Expand Down
1 change: 1 addition & 0 deletions dev/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
a.out
*.png
.~*
engauge.pro.user.mmitchell.linux
Binary file modified dev/ProcessFlowchart.odp
Binary file not shown.
6 changes: 6 additions & 0 deletions dev/README_platforms.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
Mac OSX
-------
Option 1) OSX 10.X 64 bit distributions can execute the DMG file

Option 2) Engauge can be built from source code. This requires a lot of effort and is not recommended.

Debian Distributions
--------------------
Option 1) Debian-based distributions, such as Ubuntu and Kubuntu, do not currently offer the newest Engauge Digitizer as
Expand Down
2 changes: 1 addition & 1 deletion dev/engauge.pro.user.mmitchell.linux
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 3.0.1, 2016-03-22T01:40:44. -->
<!-- Written by QtCreator 3.0.1, 2016-04-05T22:02:48. -->
<qtcreator>
<data>
<variable>ProjectExplorer.Project.ActiveTarget</variable>
Expand Down
6 changes: 6 additions & 0 deletions dev/linux/build_installer
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ read -p 'If the version numbers are correct, press Enter to continue'
VERSION_NUMBER_CODE=`echo $VERSION_NUMBER_CODE | sed 's/\./_/g'`

export STAGINGDIR=engauge
export TRANSLATIONSDIR=engauge/translations
export DOCDIR=$STAGINGDIR/documentation
export IMAGEDIR=$STAGINGDIR/imageformats
export PLATFORMSDIR=$STAGINGDIR/platforms
Expand All @@ -28,6 +29,7 @@ export SQLDIR=$STAGINGDIR/sqldrivers
rm -rf $STAGINGDIR

mkdir -p $STAGINGDIR
mkdir -p $TRANSLATIONSDIR
mkdir -p $DOCDIR
mkdir -p $IMAGEDIR
mkdir -p $PLATFORMSDIR
Expand All @@ -43,6 +45,10 @@ cp $FROMQHC $STAGINGDIR/documentation
echo "***Copying icon file"
cp $FROMICO $STAGINGDIR

echo "***Building translations"
lrelease ../../engauge.pro
mv ../../translations/*.qm $TRANSLATIONSDIR

echo "***Copying libraries"
cp /lib/ld-linux.so.2 $STAGINGDIR
cp /usr/lib/i386-linux-gnu/qt5/plugins/imageformats/libqgif.so $IMAGEDIR
Expand Down
Binary file removed dev/osx/engauge.dmg
Binary file not shown.
10 changes: 5 additions & 5 deletions dev/osx/macosx_setup
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Building $HOME/Qt/5.5/clang_64 puts installation into /usr/local/Qt-5.5.1
# Building with $HOME/Qt/5.5/clang_64 puts installation into /usr/local/Qt-5.5.1
# BUT THAT FAILED with include files not working
#export QT_DIR=/usr/local/Qt-5.5.1
#export PATH=$QT_DIR/bin:$PATH
#export QTDIR=/usr/local/Qt-5.5.1
#export PATH=$QTDIR/bin:$PATH

export QT_DIR=/usr/local/Cellar/qt5/5.5.1_2
export PATH=$QT_DIR/bin:$PATH
export QTDIR=/usr/local/Cellar/qt5/5.5.1_2
export PATH=$QTDIR/bin:$PATH
2 changes: 1 addition & 1 deletion dev/windows/engauge.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Id='3E24D032-1183-4CE1-A30A-F2E3A7D702B0'
UpgradeCode='00A6792B-65ED-4894-A48B-B95D63C62CC6'
Language='1033' Codepage='1252'
Version='7.0'>
Version='7.2'>
<Package Id='*' Keywords='Installer' Description="Engauge Digitizer Installer"
Comments='Engauge Digitizer is available from github.com' Manufacturer='Engauge Open Source Developers'
InstallerVersion='100' Languages='1033' Compressed='yes' SummaryCodepage='1252' />
Expand Down
Binary file modified doc/Engauge2SoftwareDevelopmentFile.odt
Binary file not shown.
52 changes: 44 additions & 8 deletions engauge.pro
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

# Comment out this CONFIG line in OSX to produce an OSX application bundle
CONFIG = qt warn_on thread debug
QT += core gui help network printsupport widgets xml

_ENGAUGE_RELEASE = $$(ENGAUGE_RELEASE)
isEmpty(_ENGAUGE_RELEASE) {
Expand Down Expand Up @@ -268,6 +269,7 @@ HEADERS += \
src/Transformation/TransformationStateContext.h \
src/Transformation/TransformationStateDefined.h \
src/Transformation/TransformationStateUndefined.h \
src/Translator/TranslatorContainer.h \
src/Tutorial/TutorialButton.h \
src/Tutorial/TutorialButtonRect.h \
src/Tutorial/TutorialButtonText.h \
Expand Down Expand Up @@ -518,6 +520,7 @@ SOURCES += \
src/Transformation/TransformationStateContext.cpp \
src/Transformation/TransformationStateDefined.cpp \
src/Transformation/TransformationStateUndefined.cpp \
src/Translator/TranslatorContainer.cpp \
src/Tutorial/TutorialButton.cpp \
src/Tutorial/TutorialButtonRect.cpp \
src/Tutorial/TutorialButtonText.cpp \
Expand Down Expand Up @@ -549,7 +552,6 @@ macx-* {
CONFIG += app_bundle
QMAKE_CXXFLAGS += "-stdlib=libc++"
QMAKE_LFLAGS += "-stdlib=libc++"
QT += core gui help network printsupport widgets xml
INCLUDEPATH += \
/usr/local/Cellar/fftw/3.3.4_1/include \
/usr/local/Cellar/log4cpp/1.1.1/include \
Expand All @@ -560,18 +562,12 @@ INCLUDEPATH += \
/usr/local/Cellar/qt5/5.5.1_2/lib/QtWidgets.framework/Versions/5/Headers \
/usr/local/Cellar/qt5/5.5.1_2/lib/QtXml.framework/Versions/5/Headers
LIBS += -L/$$(HOME)/fftw-3.3.4/lib -L$$(HOME)/log4cpp/lib -framework CoreFoundation
}

linux-* {
} else {
TEMPLATE = app
TARGET = bin/engauge
QT += core gui network printsupport widgets xml help
}

win32-* {
TEMPLATE = app
TARGET = bin/engauge
QT += core gui network printsupport widgets xml help
CONFIG += windows
}

Expand Down Expand Up @@ -624,6 +620,7 @@ INCLUDEPATH += src \
src/Spline \
src/StatusBar \
src/Transformation \
src/Translator \
src/Tutorial \
src/util \
src/View \
Expand Down Expand Up @@ -675,3 +672,42 @@ jpeg2000 {
message(Building release version without internal support for JPEG2000 files)
}
}

# People interested in translating a language can contact the developers for help.
#
# Translation file names are 'engauge_XX_YY' or 'engauge_XX' where:
# XX = two letter language codes in column '639-1' at https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
# YY = two letter country codes in column 'ISO 3166-2' at https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
# where XX and YY are:
# ar = Arabic Egypt=_eg
# de = German Germany=_de
# en = English USA=us
# es = Spanish Spain=_es
# fr = French France=_fr
# hi = Hindi India=_in
# it = Italian Italy=_it
# ja = Japanese Japan=_jp
# kk = Kazakh Kazakhstan=_kz
# ko = Korean SouthKorea=_kr
# pt = Portuguese Brazil=_br
# ru = Russian Federation=_ru
# zh = Chinese China=_cn
# When the user picks an (XX_YY) locale in Settings / Main Window and restarts Engauge, Engauge follows these steps to load:
# 1) 'engauge_XX_YY' is loaded if it exists and locale loading finishes
# 2) 'engauge_XX' is loaded if it exists and step 1 failed, and locale loading finishes
# 3) the default locale is loaded and steps 1 and 2 failed
# In other words, translations specific to a country are loaded if available, otherwise translations for a language
# (which often apply to multiple countries) are loaded.
TRANSLATIONS = translations/engauge_ar.ts \
translations/engauge_de.ts \
translations/engauge_en.ts \
translations/engauge_es.ts \
translations/engauge_fr.ts \
translations/engauge_hi.ts \
translations/engauge_it.ts \
translations/engauge_ja.ts \
translations/engauge_kk.ts \
translations/engauge_ko.ts \
translations/engauge_pt.ts \
translations/engauge_ru.ts \
translations/engauge_zh.ts
2 changes: 1 addition & 1 deletion src/CoordSystem/CoordSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ void CoordSystem::loadPreVersion6 (QDataStream &str,
m_modelExport.setPointsIntervalUnitsRelations((ExportPointsIntervalUnits) int32);
str >> int32;
m_modelExport.setHeader((ExportHeader) int32);
if (version >= 5.2) {
if (version >= 5.1) {
str >> st; // X label
if (m_modelCoords.coordsType() == COORDS_TYPE_CARTESIAN) {
m_modelExport.setXLabel(st);
Expand Down
3 changes: 2 additions & 1 deletion src/Curve/Curve.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ Curve::Curve (const Curve &curve) :

Curve::Curve (QDataStream &str)
{
const int CONVERT_ENUM_TO_RADIUS = 6;
MigrateToVersion6 migrate;

qint32 int32, xScreen, yScreen;
Expand All @@ -57,7 +58,7 @@ Curve::Curve (QDataStream &str)
str >> int32;
m_curveStyle.setPointShape(migrate.pointShape (int32));
str >> int32;
m_curveStyle.setPointRadius(int32);
m_curveStyle.setPointRadius(int32 + CONVERT_ENUM_TO_RADIUS);
str >> int32;
m_curveStyle.setPointLineWidth (int32);
str >> int32;
Expand Down
3 changes: 3 additions & 0 deletions src/Curve/CurvesGraphs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,9 @@ void CurvesGraphs::loadPreVersion6(QDataStream &str)

int i;

// Remove previous Curves. There is a DEFAULT_GRAPH_CURVE_NAME by default
m_curvesGraphs.clear();

qint32 numberCurvesGraphs;
str >> numberCurvesGraphs;
for (i = 0; i < numberCurvesGraphs; i++) {
Expand Down
4 changes: 2 additions & 2 deletions src/DigitizeState/DigitizeStateAxis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ void DigitizeStateAxis::handleMouseRelease (CmdMediator *cmdMediator,
if (context().mainWindow().transformIsDefined()) {

QMessageBox::warning (0,
QObject::tr ("Application"),
QObject::tr ("Engauge Digitizer"),
QObject::tr ("Three axis points have been defined, and no more are needed or allowed."));

} else {
Expand Down Expand Up @@ -151,7 +151,7 @@ void DigitizeStateAxis::handleMouseRelease (CmdMediator *cmdMediator,
if (isError) {

QMessageBox::warning (0,
QObject::tr ("Application"),
QObject::tr ("Engauge Digitizer"),
errorMessage);

} else {
Expand Down
4 changes: 2 additions & 2 deletions src/Dlg/DlgAbout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ DlgAbout::DlgAbout (MainWindow &mainWindow) :
setWindowTitle (tr ("About Engauge"));
setTextFormat (Qt::RichText);
setText (QString ("%1 %2 %3 %4")
.arg (tr ("<p>Engauge Digitizer</b>"))
.arg (tr ("<p>Engauge Digitizer</p>"))
.arg (tr ("Version"))
.arg (VERSION_NUMBER)
.arg (tr ("</p><p>&copy; 2014 Mark Mitchell</p>"
Expand All @@ -30,7 +30,7 @@ DlgAbout::DlgAbout (MainWindow &mainWindow) :
"<p>Engauge Digitizer Links<p>"
"<ul>"
"<li><a href='https://github.com/markummitchell/engauge-digitizer'>Project Home Page</a></li>"
"<li><a href='https://gitter.im/markummitchell/engauge-digitizer'>Gitter Forum<a></li>"
"<li><a href='https://gitter.im/markummitchell/engauge-digitizer'>Gitter Forum</a></li>"
"</ul>"
"<p>FFTW 3.X.X Links</p>"
"<ul>"
Expand Down
27 changes: 23 additions & 4 deletions src/Dlg/DlgSettingsExportFormat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -430,20 +430,38 @@ void DlgSettingsExportFormat::createXLabel (QGridLayout *layoutHeader,

bool DlgSettingsExportFormat::goodIntervalFunctions() const
{
// LOG4CPP_INFO_S is below

QString textFunctions = m_editFunctionsPointsEvenlySpacing->text();
int posFunctions;

bool isGood = (m_validatorFunctionsPointsEvenlySpacing->validate (textFunctions, posFunctions) == QValidator::Acceptable);

LOG4CPP_INFO_S ((*mainCat)) << "DlgSettingsExportFormat::goodIntervalFunctions"
<< " text=" << textFunctions.toLatin1().data()
<< " good=" << (isGood ? "true" : "false")
<< " bottom=" << m_validatorFunctionsPointsEvenlySpacing->bottom()
<< " top=" << m_validatorFunctionsPointsEvenlySpacing->top();

return isGood;
}

bool DlgSettingsExportFormat::goodIntervalRelations() const
{
// LOG4CPP_INFO_S is below

QString textRelations = m_editRelationsPointsEvenlySpacing->text();
int posRelations;

return (m_validatorRelationsPointsEvenlySpacing->validate (textRelations, posRelations) == QValidator::Acceptable);
bool isGood = (m_validatorRelationsPointsEvenlySpacing->validate (textRelations, posRelations) == QValidator::Acceptable);

LOG4CPP_INFO_S ((*mainCat)) << "DlgSettingsExportFormat::goodIntervalRelations"
<< " text=" << textRelations.toLatin1().data()
<< " good=" << (isGood ? "true" : "false")
<< " bottom=" << m_validatorRelationsPointsEvenlySpacing->bottom()
<< " top=" << m_validatorRelationsPointsEvenlySpacing->top();

return isGood;
}

void DlgSettingsExportFormat::handleOk ()
Expand All @@ -463,7 +481,7 @@ void DlgSettingsExportFormat::initializeIntervalConstraints ()
{
LOG4CPP_INFO_S ((*mainCat)) << "DlgSettingsExportFormat::initializeIntervalConstraints";

const int MAX_POINTS_ACROSS_RANGE = 1000;
const int MAX_POINTS_ACROSS_RANGE = 5000;

// Get min and max of graph and screen coordinates
CallbackBoundingRects ftor (mainWindow().transformation());
Expand Down Expand Up @@ -546,12 +564,13 @@ void DlgSettingsExportFormat::load (CmdMediator &cmdMediator)
m_btnHeaderGnuplot->setChecked (header == EXPORT_HEADER_GNUPLOT);

m_editXLabel->setText (m_modelExportAfter->xLabel());

m_editFunctionsPointsEvenlySpacing->setText (QString::number (m_modelExportAfter->pointsIntervalFunctions()));
m_editRelationsPointsEvenlySpacing->setText (QString::number (m_modelExportAfter->pointsIntervalRelations()));

ExportPointsIntervalUnits pointsIntervalUnitsFunctions = m_modelExportAfter->pointsIntervalUnitsRelations();
ExportPointsIntervalUnits pointsIntervalUnitsFunctions = m_modelExportAfter->pointsIntervalUnitsFunctions();
ExportPointsIntervalUnits pointsIntervalUnitsRelations = m_modelExportAfter->pointsIntervalUnitsRelations();
int indexFunctions = m_cmbRelationsPointsEvenlySpacingUnits->findData (QVariant (pointsIntervalUnitsFunctions));
int indexFunctions = m_cmbFunctionsPointsEvenlySpacingUnits->findData (QVariant (pointsIntervalUnitsFunctions));
int indexRelations = m_cmbRelationsPointsEvenlySpacingUnits->findData (QVariant (pointsIntervalUnitsRelations));
m_cmbFunctionsPointsEvenlySpacingUnits->setCurrentIndex (indexFunctions);
m_cmbRelationsPointsEvenlySpacingUnits->setCurrentIndex (indexRelations);
Expand Down
6 changes: 4 additions & 2 deletions src/Dlg/DlgSettingsMainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,10 @@ void DlgSettingsMainWindow::createControls (QGridLayout *layout,
// Initialization of combobox is liberated from Qt Calendar example
m_cmbLocale = new QComboBox;
m_cmbLocale->setWhatsThis(tr ("Locale\n\n"
"Select the locale that will be used when converting between numbers and strings. "
"This affects the use of commas or periods as group delimiters in each number entered "
"Select the locale that will be used in numbers (immediately), and the language in the user "
"interface (after restart).\n\n"
"The locale determines how numbers are formatted. Specifically, either commas or "
"periods will be used as group delimiters in each number entered "
"by the user, displayed in the user interface, or exported to a file."));
for (int indexLang = QLocale::C; indexLang <= QLocale::LastLanguage; indexLang++) {
QLocale::Language lang = static_cast<QLocale::Language> (indexLang);
Expand Down
2 changes: 2 additions & 0 deletions src/Mime/MimePoints.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
#define MIME_POINTS_H

#include <QMimeData>
#include <QString>
#include <QStringList>

/// Custom mime type for separate treatment of graph coordinates and, when there is no transform, points coordinates.
class MimePoints : public QMimeData
Expand Down
Loading

0 comments on commit 3deea57

Please sign in to comment.