Skip to content

Commit d415ded

Browse files
authored
Merge release 0.6.3
2 parents 07bef83 + 8fa464f commit d415ded

Some content is hidden

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

46 files changed

+15679
-963
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ set(Mapper_VERSION_MAJOR 0)
3535
set(Mapper_VERSION_MINOR 6)
3636
if(NOT Mapper_VERSION_PATCH)
3737
# This can be configured when running cmake
38-
set(Mapper_VERSION_PATCH 2)
38+
set(Mapper_VERSION_PATCH 3)
3939
endif()
4040

4141
set(MAPPER_VERSION_PRI "${PROJECT_SOURCE_DIR}/oo-mapper-version.pri")

INSTALL.md

Lines changed: 7 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ The standard g++ compiler from a recent distribution should work. The Ubuntu
7272
PROJ.4 library and of CUPS are installed. For a Ubuntu or Debian system, install
7373
`libproj-dev` and `libcups2-dev`.
7474

75-
To create a DEB package from CMake, fakeroot must be installed.
7675
For using the Qt libraries provided by the repositories, the following packages
7776
need to be installed:
7877
`qt5-default` (>= 5.2), `qttools5-dev`, `qttools5-dev-tools`, `libqt5sql5-sqlite`
@@ -91,14 +90,6 @@ Now you may start the build process by running
9190
make
9291
```
9392

94-
and generate a DEB package by
95-
96-
```
97-
make deb
98-
```
99-
100-
(The deb target works around some issues with CMake's DEB generator.)
101-
10293

10394
## Compiling on OS X
10495

@@ -142,7 +133,6 @@ and proceed with
142133

143134
```
144135
make
145-
make package
146136
```
147137

148138

@@ -214,23 +204,16 @@ cmake .. -DCMAKE_BUILD_TYPE=Release
214204
make
215205
```
216206

217-
The actual package maybe built by `make package`. However, this is used
207+
The actual package may be built by `make package`. However, this is used
218208
(i.e. tested) only for OS X at the moment.
209+
Android packages are built in Qt Creator using the provided `oo-mapper.pro` file.
219210
Windows and Linux packages are regularly build on
220-
https://build.opensuse.org/project/show/home:dg0yt, so package recipes for
221-
common distributions can be found there.
222-
223-
224-
#Speeding up with parallel build jobs
225-
226-
The build can make use of multiple processor cores. Add the option
227-
228-
```
229-
-jN
230-
```
211+
https://build.opensuse.org/project/show/home:dg0yt, so proper package recipes for
212+
common distributions and package managers can be found there.
231213

232-
to the call to make (or mingw32-make), where N is the number of cores
233-
to be used.
214+
Packaging with cmake is not enabled by default for Linux. Add `-DMapper_BUILD_PACKAGE=1`
215+
to change this. As already stated, this is untested, and you might need to look for
216+
additional tweaks.
234217

235218

236219
## Making a source package

android/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0"?>
2-
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="0.6.2" android:versionCode="2" package="org.openorienteering.mapper" android:installLocation="auto">
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="0.6.3" android:versionCode="3" package="org.openorienteering.mapper" android:installLocation="auto">
33
<application android:name="org.qtproject.qt5.android.bindings.QtApplication" android:label="@string/long_app_name" android:icon="@drawable/icon">
44
<activity android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|locale|fontScale|keyboard|keyboardHidden|navigation"
55
android:name="org.openorienteering.mapper.MapperActivity"
2.8 MB
Binary file not shown.
1.32 MB
Binary file not shown.

images/mapper-icon/README.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
There are two Photoshop files for the icons, one for large sized icons and one for small sizes.
2+
Due to having a few different effects on them the icons where made in PS. The main parts are vector and should be fine to scale up if needed (the large icon is 512px now).
3+
4+
The Photoshop files are licensed under Creative Commons Attribution 4.0 International Licenses.

oo-mapper-version.pri

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Generated in CMakeLists.txt, do not edit here.
22
Mapper_VERSION_MAJOR = 0
33
Mapper_VERSION_MINOR = 6
4-
Mapper_VERSION_PATCH = 2
4+
Mapper_VERSION_PATCH = 3

src/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -440,6 +440,8 @@ install(TARGETS Mapper
440440

441441
if(Mapper_BUILD_QT)
442442
write_qt_conf()
443+
elseif(EXISTS "${CMAKE_CURRENT_BINARY_DIR}/qt.conf")
444+
file(REMOVE "${CMAKE_CURRENT_BINARY_DIR}/qt.conf")
443445
endif()
444446

445447

src/color_dock_widget.cpp

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -370,12 +370,12 @@ void ColorWidget::addRow(int row)
370370
item->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsEditable);
371371
item->setToolTip(tr("Click to select the name and click again to edit."));
372372

373-
react_to_changes = true;
374-
375373
// Opacity
376374
item = color_table->item(row, 6);
377375
item->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsEditable);
378376

377+
react_to_changes = true;
378+
379379
updateRow(row);
380380
}
381381

@@ -384,10 +384,11 @@ void ColorWidget::updateRow(int row)
384384
react_to_changes = false;
385385

386386
const MapColor* color = map->getColor(row);
387+
auto color_with_opacity = colorWithOpacity(*color);
387388

388389
// Color preview
389390
QTableWidgetItem* item = color_table->item(row, 0);
390-
item->setBackground((const QColor&) *color);
391+
item->setBackground(color_with_opacity);
391392

392393
// Name
393394
item = color_table->item(row, 1);
@@ -399,7 +400,7 @@ void ColorWidget::updateRow(int row)
399400
switch (color->getSpotColorMethod())
400401
{
401402
case MapColor::SpotColor:
402-
item->setData(Qt::DecorationRole, (const QColor&)*color);
403+
item->setData(Qt::DecorationRole, color_with_opacity);
403404
break;
404405
default:
405406
item->setData(Qt::DecorationRole, QColor(Qt::transparent));
@@ -422,7 +423,7 @@ void ColorWidget::updateRow(int row)
422423
break;
423424
default:
424425
item->setForeground(palette().color(QPalette::Active, QPalette::Text));
425-
item->setData(Qt::DecorationRole, (QColor)(color->getCmyk()));
426+
item->setData(Qt::DecorationRole, colorWithOpacity(color->getCmyk(), color->getOpacity()));
426427
}
427428

428429
// RGB
@@ -438,7 +439,7 @@ void ColorWidget::updateRow(int row)
438439
break;
439440
default:
440441
item->setForeground(palette().color(QPalette::Active, QPalette::Text));
441-
item->setData(Qt::DecorationRole, (const QColor&)(color->getRgb()));
442+
item->setData(Qt::DecorationRole, colorWithOpacity(color->getRgb(), color->getOpacity()));
442443
}
443444

444445
// Knockout

src/core/map_color.h

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -498,6 +498,21 @@ class MapColorMap
498498
};
499499

500500

501+
/**
502+
* Constructs a QColor with the alpha given by opacity from the prototype c.
503+
*
504+
* A QColor object must be constructible from c.
505+
*/
506+
template <class T>
507+
QColor colorWithOpacity(T c, float opacity);
508+
509+
/**
510+
* Constructs a QColor with opacity from the given MapColor.
511+
*/
512+
QColor colorWithOpacity(const MapColor& c);
513+
514+
515+
501516
// ### MapColorCmyk inline code ###
502517

503518
inline
@@ -851,5 +866,19 @@ const MapColor* & MapColorMap::operator[](const MapColor* key)
851866
return mapping[key];
852867
}
853868

869+
template <class T>
870+
QColor colorWithOpacity(T c, float opacity)
871+
{
872+
auto color = static_cast<QColor>(c);
873+
color.setAlphaF(opacity);
874+
return color;
875+
}
876+
877+
inline
878+
QColor colorWithOpacity(const MapColor& c)
879+
{
880+
return colorWithOpacity(static_cast<const QColor&>(c), c.getOpacity());
881+
}
882+
854883

855884
#endif

0 commit comments

Comments
 (0)