Skip to content

Commit 091d58a

Browse files
committed
Merge remote-tracking branch 'origin/master' into pre-release
2 parents 47abfcf + 98818de commit 091d58a

File tree

232 files changed

+37609
-28912
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

232 files changed

+37609
-28912
lines changed

3rd-party/cove/app/colorseditform.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,9 @@ class ColorsEditingDelegate : public QItemDelegate
7878
QVariant v = model->data(model->index(index.row(), 0, index),
7979
Qt::BackgroundRole);
8080
QColor c = v.value<QBrush>().color();
81-
clr = QColorDialog::getRgba(c.rgb());
81+
auto chosen_color = QColorDialog::getColor(c);
82+
if (chosen_color.isValid())
83+
clr = chosen_color.rgba();
8284
setModelData(nullptr, model, index);
8385
event->accept();
8486
return true;
@@ -150,7 +152,7 @@ QVariant ColorsListModel::data(const QModelIndex& index, int role) const
150152
.arg(qBlue(colors[index.row()])));
151153
}
152154
else if (index.column() == 2 && role == Qt::DisplayRole &&
153-
index.row() < comments.size())
155+
index.row() < int(comments.size()))
154156
{
155157
return QVariant(comments[index.row()]);
156158
}

3rd-party/cove/app/mainform.cpp

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2005-2019 Libor Pecháček.
2+
* Copyright (c) 2005-2020 Libor Pecháček.
33
* Copyright 2020 Kai Pastor
44
*
55
* This file is part of CoVe
@@ -249,15 +249,6 @@ void mainForm::afterLoadImage()
249249
}
250250
}
251251

252-
//! Simple About dialog.
253-
void mainForm::aboutDialog()
254-
{
255-
QMessageBox::about(this, tr("About"),
256-
trUtf8("<h3>COntour VEctorizer</h3><br />"
257-
"Author: Libor Pecháček<br />"
258-
"License: GPL"));
259-
}
260-
261252
/*! Return color randomly created from image pixels. It takes 5 scanlines and
262253
* makes an average color of its pixels. */
263254
QRgb mainForm::getColorFromImage(const QImage& image)
@@ -633,7 +624,7 @@ void mainForm::on_classificationOptionsButton_clicked()
633624
void mainForm::on_initialColorsButton_clicked()
634625
{
635626
ColorsEditForm* optionsDialog = new ColorsEditForm(this);
636-
int settingsNColors = settings.getInt("nColors");
627+
auto settingsNColors = static_cast<std::size_t>(settings.getInt("nColors"));
637628
std::vector<QString> comments;
638629
auto colors = settings.getInitColors(comments);
639630
auto nColors = colors.size();
@@ -791,7 +782,7 @@ void mainForm::on_bwImageSaveButton_clicked()
791782

792783
QString selectedFilter("PNG (*.png)");
793784
QString newfilename = QFileDialog::getSaveFileName(
794-
this, QString::null, QFileInfo(imageFileName).dir().path(), filter,
785+
this, QString(), QFileInfo(imageFileName).dir().path(), filter,
795786
&selectedFilter);
796787

797788
if (!newfilename.isEmpty())

3rd-party/cove/app/mainform.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2005-2019 Libor Pecháček.
2+
* Copyright (c) 2005-2020 Libor Pecháček.
33
*
44
* This file is part of CoVe
55
*
@@ -97,7 +97,6 @@ class mainForm : public QDialog
9797
std::vector<bool> getSelectedColors();
9898

9999
public slots:
100-
void aboutDialog();
101100
void setInitialColors(bool on);
102101
void colorButtonToggled(bool on);
103102

3rd-party/cove/libvectorizer/Morphology.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,8 @@ bool Morphology::rosenfeld(ProgressObserver* progressObserver)
128128
{
129129
bool cancel = false; // whether the thinning was canceled
130130
unsigned int x, y; // Pixel coordinates
131-
unsigned int pc = 0; // Pass count
132131
unsigned int count; // Deleted pixel count
133132
unsigned int p, q; // Neighborhood maps of adjacent cells
134-
unsigned int m; // Deletion direction mask
135133

136134
thinnedImage = image;
137135
thinnedImage.detach();
@@ -144,7 +142,6 @@ bool Morphology::rosenfeld(ProgressObserver* progressObserver)
144142

145143
do
146144
{ // Thin image lines until there are no deletions
147-
pc++;
148145
count = 0;
149146

150147
for (auto const m : masks)

3rd-party/cove/libvectorizer/Vectorizer.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,13 +164,17 @@ namespace cove {
164164
/*! \var PatternStrategy Vectorizer::patternStrategy
165165
Selected pattern selection strategy. \sa setPatternStrategy */
166166

167+
// virtual
168+
Vectorizer::~Vectorizer() = default;
169+
167170
Vectorizer::Vectorizer()
168171
: mc(std::make_unique<MapColorRGB>(2.0))
169172
, E(100000)
170173
, initAlpha(0.1)
171174
, q(0.5)
172175
, minAlpha(1e-6)
173176
, p(2)
177+
, quality(0)
174178
, learnMethod(KOHONEN_CLASSIC)
175179
, colorSpace(COLSPC_RGB)
176180
, alphaStrategy(ALPHA_CLASSIC)

3rd-party/cove/libvectorizer/Vectorizer.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@
2727
#include <QImage>
2828
#include <QRgb>
2929

30-
#include "MapColor.h"
31-
3230
namespace cove {
31+
32+
class MapColor;
3333
class ProgressObserver;
3434

3535
class Vectorizer
@@ -81,8 +81,9 @@ class Vectorizer
8181
void deleteColorsTable();
8282

8383
public:
84+
virtual ~Vectorizer();
8485
Vectorizer();
85-
Vectorizer(QImage& im);
86+
explicit Vectorizer(QImage& im);
8687
virtual void setClassificationMethod(LearningMethod learnMethod);
8788
virtual void setColorSpace(ColorSpace colorSpace);
8889
virtual void setP(double p);

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ endif()
2929

3030
# Project declaration
3131

32-
project(Mapper VERSION 0.9.3 LANGUAGES CXX C)
32+
project(Mapper VERSION 0.9.4 LANGUAGES CXX C)
3333
set(Mapper_COPYRIGHT "(C) 2020 The OpenOrienteering developers")
3434

3535
math(EXPR Mapper_VERSION_CODE "${Mapper_VERSION_MAJOR} * 10000 + ${Mapper_VERSION_MINOR} * 100 + ${Mapper_VERSION_PATCH} * 2 + ${CMAKE_SIZEOF_VOID_P} / 4 - 1")

ci/build.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,13 @@ steps:
106106
#
107107
if [ -f build/default/openorienteering-mapper-ci/Testing/TAG ]; then
108108
# Test result exist, so executables are runnable
109+
OLD_PATH="$PATH"
110+
if [ -n "$(MINGW)" ]; then
111+
export PATH=`cygpath -u "$(SUPERBUILD_INSTALL_DIR)"`/$(MINGW)/superbuild/bin:${PATH}
112+
fi
109113
build/${TARGET:-default}/openorienteering-mapper-ci/src/gdal/mapper-gdal-info \
110114
| tee output/OpenOrienteering-Mapper-GDAL-info-$(IMAGE_NAME)$(OUTPUT_SUFFIX).md;
115+
export PATH="$OLD_PATH"
111116
else
112117
# No test results, probably cross-compiling
113118
set +x # https://github.com/microsoft/azure-pipelines-tasks/issues/10331

ci/filter-stderr.sed

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
11
# Cf. https://github.com/Microsoft/azure-pipelines-tasks/blob/master/docs/authoring/commands.md
2-
/^\/.*openorienteering.*[Ww]arning:/ {
3-
s,^\([a-zA-Z]:\)?/.*/build/source/openorienteering-mapper-ci/,,
2+
/:.*[0-9]: [Ww]arning:/ {
3+
/libocad/ b
4+
s,^\([a-zA-Z]:\)?/.*/1/s/,,
45
s,^\([a-zA-Z]:\)?/.*/build/,,
56
s,^,##vso[task.LogIssue type=warning;],
67
s,^\([^;]*\);\]\([^:]*\):\([0-9]*\):\([0-9]*\): *[Ww]arning: *,\1;sourcepath=\2;linenumber=\3;columnnumber=\4;],
78
}
89
/^\/.*[Ee]rror:/ {
9-
s,^\([a-zA-Z]:\)?/.*/build/source/openorienteering-mapper-ci/,,
10+
s,^\([a-zA-Z]:\)?/.*/1/s/,,
1011
s,^\([a-zA-Z]:\)?/.*/build/,,
1112
s,^,##vso[task.LogIssue type=error;],
1213
s,^\([^;]*\);\]\([^:]*\):\([0-9]*\):\([0-9]*\): *[Ee]rror: *,\1;sourcepath=\2;linenumber=\3;columnnumber=\4;],
1314
}
1415
# Include-what-you-use
1516
/ should add these lines:$/ {
1617
h
17-
s,^\([a-zA-Z]:\)?/.*/build/source/openorienteering-mapper-ci/,,
18+
s,^\([a-zA-Z]:\)?/.*/1/s/,,
1819
s,^\([a-zA-Z]:\)?/.*/build/,,
1920
s,^,##vso[task.LogIssue type=warning;],
2021
s,^\([^;]*\);\]\([^:]*\) should add these lines:,\1;sourcepath=\2;]include-what-you-use reported diagnostics,

code-check-wrapper.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ for I in \
6262
georeferencing.cpp \
6363
georeferencing_dialog.cpp \
6464
georeferencing_t.cpp \
65+
icon_engine \
6566
key_button_bar.cpp \
6667
line_symbol.cpp \
6768
main.cpp \
@@ -70,17 +71,22 @@ for I in \
7071
map_editor.cpp \
7172
map_find_feature.cpp \
7273
map_widget.cpp \
74+
mapper_proxystyle.cpp \
7375
/object.cpp \
7476
object_mover.cpp \
7577
object_query.cpp \
7678
ocd_file_format.cpp \
7779
ocd_t.cpp \
7880
overriding_shortcut.cpp \
81+
paint_on_template \
7982
point_symbol.cpp \
8083
print_widget.cpp \
8184
renderable.cpp \
8285
renderable_implementation.cpp \
86+
rotate_map_dialog.cpp \
8387
settings_dialog.cpp \
88+
stretch_map_dialog.cpp \
89+
style_t.cpp \
8490
/symbol.cpp \
8591
symbol_replacement.cpp \
8692
symbol_replacement_dialog.cpp \
@@ -94,8 +100,11 @@ for I in \
94100
template_list_widget.cpp \
95101
template_map.cpp \
96102
template_placeholder.cpp \
103+
template_table_model.cpp \
104+
template_t.cpp \
97105
template_tool \
98106
template_track.cpp \
107+
text_object_editor_helper.cpp \
99108
text_brwoser_dialog \
100109
toast.cpp \
101110
track_t.cpp \

0 commit comments

Comments
 (0)