Skip to content

Commit

Permalink
Merge branch 'openstreetmap:master' into fix_libdir
Browse files Browse the repository at this point in the history
  • Loading branch information
eclipseo authored May 26, 2024
2 parents 17394fa + 5bd9cf7 commit 73ca08c
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 24 deletions.
11 changes: 10 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,8 @@ src/Utils/PixmapWidget.cpp
src/Utils/TagSelector.cpp
src/Utils/SvgCache.h
src/Utils/RemoteControlServer.cpp
src/Utils/BoundaryIcon.cpp
src/Utils/BoundaryIcon.h
src/QToolBarDialog/qttoolbardialog.h
src/QToolBarDialog/qttoolbardialog.cpp
src/QToolBarDialog/qttoolbardialog.ui
Expand Down Expand Up @@ -475,6 +477,7 @@ set(PKGCONFIG_REQUIRED_LIBS gdal proj)
option(ZBAR "Enable ZBar usage in MWalkingPapersBackground and Geoimage." OFF)
option(GEOIMAGE "Enable Geoimage Dock (requires exiv2 library)." ON )
option(GPSD "Enable GPS Dock (requires gpsd library)." OFF)
option(LIBPROXY "Enable libproxy usage." OFF)
option(WEBENGINE "Enable the use of QtWeb engine (not supported on all platforms)" OFF)
option(PROTOBUF "Enable support for .osm.pbf format." ON)
option(EXTRA_TESTS "Enable extra tests that cannot be run automatically on CI build." ON )
Expand All @@ -483,6 +486,7 @@ message(STATUS "Build options (use -DOPT=ON/OFF to enable/disable):")
message(STATUS " * ZBAR ${ZBAR}")
message(STATUS " * GEOIMAGE ${GEOIMAGE}")
message(STATUS " * GPSD ${GPSD}")
message(STATUS " * LIBPROXY ${LIBPROXY}")
message(STATUS " * WEBENGINE ${WEBENGINE}")
message(STATUS " * PROTOBUF ${PROTOBUF}")
message(STATUS " * EXTRA_TESTS ${EXTRA_TESTS}")
Expand All @@ -499,10 +503,15 @@ if (GEOIMAGE)
endif()

if (GPSD)
list(APPEND PKGCONFIG_REQUIRED_LIBS gpsd)
list(APPEND PKGCONFIG_REQUIRED_LIBS libgps)
add_definitions(-DUSE_GPS=1)
endif()

if (LIBPROXY)
list(APPEND PKGCONFIG_REQUIRED_LIBS libproxy-1.0)
add_definitions(-DUSE_LIBPROXY=1)
endif()

if (WEBENGINE)
add_definitions(-DUSEWEBENGINE=1) # Actual macro is USE_WEBKIT
# add_definitions(-DTHREADED_BROWSERIMAGEMANAGER=1) # TODO: Check if that even does something/works
Expand Down
1 change: 1 addition & 0 deletions cmake/AppImageBuilder.yml.in
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,4 @@ AppImage:
update-information: None
sign-key: None
arch: x86_64
comp: xz
12 changes: 1 addition & 11 deletions src/PaintStyle/PaintStyleEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include "Painter.h"
#include "MainWindow.h"
#include "Document.h"
#include "BoundaryIcon.h"

#include "SelectionDialog.h"

Expand All @@ -16,17 +17,6 @@
#include <QPixmap>
#include <QToolButton>

static void makeBoundaryIcon(QToolButton* bt, QColor C)
{
QPixmap pm(36, 18);
pm.fill(QColor(255, 255, 255));
QPainter p(&pm);
p.setPen(C);
p.setBrush(C);
p.drawRect(0, 6, 36, 6);
bt->setIcon(pm);
}

PaintStyleEditor::PaintStyleEditor(QWidget *aParent, const GlobalPainter& aGlobalPainter, const QList<Painter>& aPainters)
: QDialog(aParent), theGlobalPainter(aGlobalPainter), thePainters(aPainters), FreezeUpdate(true)
{
Expand Down
13 changes: 1 addition & 12 deletions src/Preferences/PreferencesDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include "Document.h"
#include "Feature.h"
#include "PropertiesDock.h"
#include "BoundaryIcon.h"

#include <QFileDialog>
#include <QColorDialog>
Expand All @@ -24,18 +25,6 @@
#include <QStyleFactory>
#include <QNetworkProxy>


static void makeBoundaryIcon(QToolButton* bt, QColor C)
{
QPixmap pm(36, 18);
pm.fill(QColor(255, 255, 255));
QPainter p(&pm);
p.setPen(C);
p.setBrush(C);
p.drawRect(0, 6, 36, 6);
bt->setIcon(pm);
}

OsmServerWidget::OsmServerWidget(QWidget * parent, Qt::WindowFlags f)
: QWidget(parent, f)
{
Expand Down
19 changes: 19 additions & 0 deletions src/Utils/BoundaryIcon.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#ifndef BOUNDARYICON_H
#define BOUNDARYICON_H

#include "BoundaryIcon.h"

#include <QPainter>

void makeBoundaryIcon(QToolButton* bt, QColor C)
{
QPixmap pm(36, 18);
pm.fill(QColor(255, 255, 255));
QPainter p(&pm);
p.setPen(C);
p.setBrush(C);
p.drawRect(0, 6, 36, 6);
bt->setIcon(pm);
}

#endif // BOUNDARYICON_H
9 changes: 9 additions & 0 deletions src/Utils/BoundaryIcon.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#ifndef __BOUNDARYICON_H__
#define __BOUNDARYICON_H__

#include <QToolButton>
#include <QColor>

void makeBoundaryIcon(QToolButton* bt, QColor C);

#endif

0 comments on commit 73ca08c

Please sign in to comment.