Skip to content

Commit

Permalink
Add qgis_app.h with APP_EXPORT macro
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Jan 4, 2017
1 parent d006784 commit 38a8dda
Show file tree
Hide file tree
Showing 114 changed files with 119 additions and 4 deletions.
1 change: 0 additions & 1 deletion CMakeLists.txt
Expand Up @@ -581,7 +581,6 @@ ELSE (WIN32)

ENDIF(WIN32)

ADD_DEFINITIONS("-DAPP_EXPORT=${DLLIMPORT}")
ADD_DEFINITIONS("-DCUSTOMWIDGETS_EXPORT=${DLLIMPORT}")
ADD_DEFINITIONS("-DSERVER_EXPORT=${DLLIMPORT}")

Expand Down
10 changes: 7 additions & 3 deletions src/app/CMakeLists.txt
Expand Up @@ -528,6 +528,7 @@ INCLUDE_DIRECTORIES(
${CMAKE_BINARY_DIR}/src/gui
${CMAKE_BINARY_DIR}/src/python
${CMAKE_BINARY_DIR}/src/analysis
${CMAKE_BINARY_DIR}/src/app
)
INCLUDE_DIRECTORIES(SYSTEM
${QWT_INCLUDE_DIR}
Expand Down Expand Up @@ -591,9 +592,6 @@ ELSE (ANDROID)
ADD_EXECUTABLE(${QGIS_APP_NAME} MACOSX_BUNDLE WIN32 ${QGIS_APPMAIN_SRCS} ${IMAGE_RCC_SRCS} ${TEST_RCC_SRCS})
ENDIF (ANDROID)

REMOVE_DEFINITIONS("-DAPP_EXPORT=${DLLIMPORT}")
ADD_DEFINITIONS("\"-DAPP_EXPORT=${DLLEXPORT}\"")

# Putting IMAGE_RCC_SRCS into qgis_app lib is causing problems when the lib is
# loaded (by plugin for example) in test unit (qgis_composerpicturetest).
ADD_LIBRARY(qgis_app SHARED ${QGIS_APP_SRCS} ${QGIS_APP_MOC_SRCS} ${QGIS_APP_HDRS} ${QGIS_APP_MOC_HDRS})
Expand All @@ -613,6 +611,12 @@ TARGET_LINK_LIBRARIES(qgis_app
libdxfrw
)

GENERATE_EXPORT_HEADER(
qgis_app
BASE_NAME APP
EXPORT_FILE_NAME qgis_app.h
)

IF (NOT ANDROID)
SET_TARGET_PROPERTIES(qgis_app PROPERTIES
VERSION ${COMPLETE_VERSION}
Expand Down
1 change: 1 addition & 0 deletions src/app/main.cpp
Expand Up @@ -99,6 +99,7 @@ typedef SInt32 SRefCon;
#include "qgsdxfexport.h"
#include "qgsmapthemes.h"
#include "qgsvectorlayer.h"
#include "qgis_app.h"

/** Print usage text
*/
Expand Down
1 change: 1 addition & 0 deletions src/app/ogr/qgsvectorlayersaveasdialog.h
Expand Up @@ -23,6 +23,7 @@
#include "qgscontexthelp.h"
#include "qgsfields.h"
#include "qgsvectorfilewriter.h"
#include "qgis_app.h"

class QgsVectorLayer;

Expand Down
1 change: 1 addition & 0 deletions src/app/qgisapp.h
Expand Up @@ -128,6 +128,7 @@ class QgsDiagramProperties;
#include "qgsrasterminmaxorigin.h"

#include "ui_qgisapp.h"
#include "qgis_app.h"

#ifdef HAVE_TOUCH
#include <QGestureEvent>
Expand Down
1 change: 1 addition & 0 deletions src/app/qgisappinterface.h
Expand Up @@ -20,6 +20,7 @@

#include "qgisinterface.h"
#include "qgsapppluginmanagerinterface.h"
#include "qgis_app.h"

class QgisApp;

Expand Down
1 change: 1 addition & 0 deletions src/app/qgisappstylesheet.h
Expand Up @@ -21,6 +21,7 @@
#include <QObject>
#include <QFont>
#include <QMap>
#include "qgis_app.h"

/** @class QgisAppStyleSheet
* @brief Adjustable stylesheet for the Qgis application
Expand Down
1 change: 1 addition & 0 deletions src/app/qgsabout.h
Expand Up @@ -19,6 +19,7 @@

#include "ui_qgsabout.h"
#include "qgsoptionsdialogbase.h"
#include "qgis_app.h"

class APP_EXPORT QgsAbout : public QgsOptionsDialogBase, private Ui::QgsAbout
{
Expand Down
1 change: 1 addition & 0 deletions src/app/qgsaddattrdialog.h
Expand Up @@ -21,6 +21,7 @@
#include "ui_qgsaddattrdialogbase.h"
#include "qgisgui.h"
#include "qgsfields.h"
#include "qgis_app.h"

class QgsVectorLayer;

Expand Down
1 change: 1 addition & 0 deletions src/app/qgsaddtaborgroup.h
Expand Up @@ -21,6 +21,7 @@

#include "ui_qgsaddtaborgroupbase.h"
#include "qgisgui.h"
#include "qgis_app.h"

class QTreeWidgetItem;
class QgsVectorLayer;
Expand Down
1 change: 1 addition & 0 deletions src/app/qgsannotationwidget.h
Expand Up @@ -19,6 +19,7 @@
#define QGSANNOTATIONWIDGET_H

#include "ui_qgsannotationwidgetbase.h"
#include "qgis_app.h"

class QgsAnnotationItem;
class QgsMarkerSymbol;
Expand Down
1 change: 1 addition & 0 deletions src/app/qgsattributeactiondialog.h
Expand Up @@ -27,6 +27,7 @@ back to QgsVectorLayer.
#include "qgsattributetableconfig.h"
#include "qgsaction.h"
#include <QMap>
#include "qgis_app.h"

class QgsActionManager;
class QgsVectorLayer;
Expand Down
1 change: 1 addition & 0 deletions src/app/qgsattributetabledialog.h
Expand Up @@ -26,6 +26,7 @@
#include "ui_qgsattributetabledialog.h"
#include "qgssearchwidgetwrapper.h"
#include "qgsdockwidget.h"
#include "qgis_app.h"

class QDialogButtonBox;
class QPushButton;
Expand Down
1 change: 1 addition & 0 deletions src/app/qgsattributetypedialog.h
Expand Up @@ -22,6 +22,7 @@
#include "qgseditorconfigwidget.h"
#include "qgsfeature.h"
#include "qgsvectordataprovider.h"
#include "qgis_app.h"

class QDialog;

Expand Down
1 change: 1 addition & 0 deletions src/app/qgsbookmarks.h
Expand Up @@ -22,6 +22,7 @@

#include "ui_qgsbookmarksbase.h"
#include "qgsdockwidget.h"
#include "qgis_app.h"

/*
* Model for project bookmarks
Expand Down
1 change: 1 addition & 0 deletions src/app/qgsbrowserdockwidget.h
Expand Up @@ -24,6 +24,7 @@
#include "qgsbrowsertreeview.h"
#include "qgsdockwidget.h"
#include <QSortFilterProxyModel>
#include "qgis_app.h"

class QgsBrowserModel;
class QModelIndex;
Expand Down
1 change: 1 addition & 0 deletions src/app/qgsclipboard.h
Expand Up @@ -25,6 +25,7 @@
#include "qgsfields.h"
#include "qgsfeature.h"
#include "qgscoordinatereferencesystem.h"
#include "qgis_app.h"

/**
\brief QGIS internal clipboard for features.
Expand Down
1 change: 1 addition & 0 deletions src/app/qgscustomization.h
Expand Up @@ -25,6 +25,7 @@
#include <QMouseEvent>
#include <QSettings>
#include <QTreeWidgetItem>
#include "qgis_app.h"

class QString;
class QWidget;
Expand Down
1 change: 1 addition & 0 deletions src/app/qgscustomprojectiondialog.h
Expand Up @@ -21,6 +21,7 @@
#include "ui_qgscustomprojectiondialogbase.h"
#include "qgscontexthelp.h"
#include "qgscoordinatereferencesystem.h"
#include "qgis_app.h"

class QDir;

Expand Down
1 change: 1 addition & 0 deletions src/app/qgsdecorationcopyright.h
Expand Up @@ -24,6 +24,7 @@
#include <QColor>
#include <QFont>
#include <QObject>
#include "qgis_app.h"
class QAction;
class QPainter;

Expand Down
1 change: 1 addition & 0 deletions src/app/qgsdecorationcopyrightdialog.h
Expand Up @@ -13,6 +13,7 @@
#define QGSCOPYRIGHTLABELPLUGINGUI_H

#include "ui_qgsdecorationcopyrightdialog.h"
#include "qgis_app.h"

class QColor;
class QFont;
Expand Down
1 change: 1 addition & 0 deletions src/app/qgsdecorationgrid.h
Expand Up @@ -28,6 +28,7 @@ class QgsMarkerSymbol;
#include <QColor>
#include <QPen>
#include <QFont>
#include "qgis_app.h"

class APP_EXPORT QgsDecorationGrid: public QgsDecorationItem
{
Expand Down
1 change: 1 addition & 0 deletions src/app/qgsdecorationgriddialog.h
Expand Up @@ -20,6 +20,7 @@

#include "ui_qgsdecorationgriddialog.h"
#include <QDialog>
#include "qgis_app.h"

class QgsDecorationGrid;
class QgsLineSymbol;
Expand Down
1 change: 1 addition & 0 deletions src/app/qgsdecorationitem.h
Expand Up @@ -20,6 +20,7 @@

#include <QObject>
#include "qgsunittypes.h"
#include "qgis_app.h"

class QPainter;

Expand Down
1 change: 1 addition & 0 deletions src/app/qgsdecorationnortharrow.h
Expand Up @@ -22,6 +22,7 @@
#include "qgsdecorationitem.h"

#include <QStringList>
#include "qgis_app.h"

class QAction;
class QToolBar;
Expand Down
1 change: 1 addition & 0 deletions src/app/qgsdecorationnortharrowdialog.h
Expand Up @@ -13,6 +13,7 @@
#define QGSNORTHARROWPLUGINGUI_H

#include "ui_qgsdecorationnortharrowdialog.h"
#include "qgis_app.h"

class QgsDecorationNorthArrow;

Expand Down
1 change: 1 addition & 0 deletions src/app/qgsdecorationscalebar.h
Expand Up @@ -27,6 +27,7 @@ email : sbr00pwb@users.sourceforge.net
class QPainter;

#include <QColor>
#include "qgis_app.h"

class APP_EXPORT QgsDecorationScaleBar: public QgsDecorationItem
{
Expand Down
1 change: 1 addition & 0 deletions src/app/qgsdecorationscalebardialog.h
Expand Up @@ -14,6 +14,7 @@

#include "ui_qgsdecorationscalebardialog.h"
#include <QDialog>
#include "qgis_app.h"

class QgsDecorationScaleBar;

Expand Down
1 change: 1 addition & 0 deletions src/app/qgsdelattrdialog.h
Expand Up @@ -21,6 +21,7 @@
#include "ui_qgsdelattrdialogbase.h"
#include <QDialog>
#include <list>
#include "qgis_app.h"

class QgsVectorLayer;

Expand Down
1 change: 1 addition & 0 deletions src/app/qgsdiagramproperties.h
Expand Up @@ -21,6 +21,7 @@
#include <QDialog>
#include <ui_qgsdiagrampropertiesbase.h>
#include <QStyledItemDelegate>
#include "qgis_app.h"

class QgsVectorLayer;
class QgsMapCanvas;
Expand Down
1 change: 1 addition & 0 deletions src/app/qgsdiscoverrelationsdlg.h
Expand Up @@ -18,6 +18,7 @@
#include <QDialog>
#include "ui_qgsdiscoverrelationsdlgbase.h"
#include "qgsrelation.h"
#include "qgis_app.h"

class QgsRelationManager;
class QgsVectorLayer;
Expand Down
1 change: 1 addition & 0 deletions src/app/qgsdisplayangle.h
Expand Up @@ -17,6 +17,7 @@
#define QGSDISPLAYANGLE_H

#include "ui_qgsdisplayanglebase.h"
#include "qgis_app.h"

class QgsMapToolMeasureAngle;

Expand Down
1 change: 1 addition & 0 deletions src/app/qgsfeatureaction.h
Expand Up @@ -23,6 +23,7 @@
#include <QPair>
#include <QAction>
#include <QUuid>
#include "qgis_app.h"

class QgsIdentifyResultsDialog;
class QgsVectorLayer;
Expand Down
1 change: 1 addition & 0 deletions src/app/qgsfieldcalculator.h
Expand Up @@ -19,6 +19,7 @@
#include "ui_qgsfieldcalculatorbase.h"
#include "qgscontexthelp.h"
#include "qgsfields.h"
#include "qgis_app.h"

class QgsVectorLayer;

Expand Down
1 change: 1 addition & 0 deletions src/app/qgsfieldsproperties.h
Expand Up @@ -26,6 +26,7 @@

#include "qgsvectorlayer.h"
#include "ui_qgsfieldspropertiesbase.h"
#include "qgis_app.h"

class DesignerTree;
class DragList;
Expand Down
1 change: 1 addition & 0 deletions src/app/qgsformannotationdialog.h
Expand Up @@ -16,6 +16,7 @@
#define QGSFORMANNOTATIONDIALOG_H

#include "ui_qgsformannotationdialogbase.h"
#include "qgis_app.h"

class QgsAnnotationWidget;
class QgsFormAnnotationItem;
Expand Down
1 change: 1 addition & 0 deletions src/app/qgshandlebadlayers.h
Expand Up @@ -20,6 +20,7 @@
#include "ui_qgshandlebadlayersbase.h"
#include "qgsproject.h"
#include "qgsprojectbadlayerhandler.h"
#include "qgis_app.h"

class APP_EXPORT QgsHandleBadLayersHandler
: public QObject
Expand Down
1 change: 1 addition & 0 deletions src/app/qgshtmlannotationdialog.h
Expand Up @@ -16,6 +16,7 @@
#define QgsHTMLAnnotationDialog_H

#include "ui_qgsformannotationdialogbase.h"
#include "qgis_app.h"

class QgsAnnotationWidget;
class QgsHtmlAnnotationItem;
Expand Down
1 change: 1 addition & 0 deletions src/app/qgsidentifyresultsdialog.h
Expand Up @@ -31,6 +31,7 @@
#include <QNetworkRequest>
#include <QNetworkReply>
#include <QUrl>
#include "qgis_app.h"

class QCloseEvent;
class QTreeWidgetItem;
Expand Down
1 change: 1 addition & 0 deletions src/app/qgsjoindialog.h
Expand Up @@ -19,6 +19,7 @@
#define QgsJoinDIALOG_H

#include "ui_qgsjoindialogbase.h"
#include "qgis_app.h"

class QgsVectorLayer;
struct QgsVectorJoinInfo;
Expand Down
1 change: 1 addition & 0 deletions src/app/qgslabelengineconfigdialog.h
Expand Up @@ -18,6 +18,7 @@
#include <QDialog>

#include "ui_qgsengineconfigdialog.h"
#include "qgis_app.h"


class APP_EXPORT QgsLabelEngineConfigDialog : public QDialog, private Ui::QgsEngineConfigDialog
Expand Down
1 change: 1 addition & 0 deletions src/app/qgslabelinggui.h
Expand Up @@ -20,6 +20,7 @@

#include "qgspallabeling.h"
#include "qgstextformatwidget.h"
#include "qgis_app.h"

class APP_EXPORT QgsLabelingGui : public QgsTextFormatWidget, private QgsExpressionContextGenerator
{
Expand Down
1 change: 1 addition & 0 deletions src/app/qgslabelpropertydialog.h
Expand Up @@ -22,6 +22,7 @@
#include "qgsfeature.h"
#include "qgspallabeling.h"
#include <QDialog>
#include "qgis_app.h"


//! A dialog to enter data defined label attributes
Expand Down
1 change: 1 addition & 0 deletions src/app/qgslayerstylingwidget.h
Expand Up @@ -29,6 +29,7 @@

#include "ui_qgsmapstylingwidgetbase.h"
#include "qgsmaplayerconfigwidgetfactory.h"
#include "qgis_app.h"

class QgsLabelingWidget;
class QgsMapLayer;
Expand Down
1 change: 1 addition & 0 deletions src/app/qgsloadstylefromdbdialog.h
Expand Up @@ -18,6 +18,7 @@

#include "ui_qgsloadstylefromdbdialog.h"
#include "qgisgui.h"
#include "qgis_app.h"

class APP_EXPORT QgsLoadStyleFromDBDialog : public QDialog, private Ui::QgsLoadStyleFromDBDialogLayout
{
Expand Down
1 change: 1 addition & 0 deletions src/app/qgsmapthemes.h
Expand Up @@ -21,6 +21,7 @@
#include <QObject>
#include <QSet>
#include <QStringList>
#include "qgis_app.h"

class QAction;
class QDomDocument;
Expand Down
1 change: 1 addition & 0 deletions src/app/qgsmaptooladdfeature.h
Expand Up @@ -14,6 +14,7 @@
***************************************************************************/

#include "qgsmaptoolcapture.h"
#include "qgis_app.h"

//! This tool adds new point/line/polygon features to already existing vector layers
class APP_EXPORT QgsMapToolAddFeature : public QgsMapToolCapture
Expand Down

0 comments on commit 38a8dda

Please sign in to comment.