Skip to content

Commit

Permalink
Revived globe, compatible with OsgEarth 2.7
Browse files Browse the repository at this point in the history
  • Loading branch information
manisandro committed May 28, 2016
1 parent ed1235d commit 90887f4
Show file tree
Hide file tree
Showing 124 changed files with 14,541 additions and 6,434 deletions.
3 changes: 3 additions & 0 deletions cmake/FindOSGEARTH.cmake
Expand Up @@ -96,6 +96,9 @@ FIND_OSGEARTH_LIBRARY( OSGEARTHSYMBOLOGY_LIBRARY_DEBUG osgEarthSymbologyd )
FIND_OSGEARTH_LIBRARY( OSGEARTHQT_LIBRARY osgEarthQt )
FIND_OSGEARTH_LIBRARY( OSGEARTHQT_LIBRARY_DEBUG osgEarthQtd )

FIND_OSGEARTH_LIBRARY( OSGEARTHANNOTATION_LIBRARY osgEarthAnnotation )
FIND_OSGEARTH_LIBRARY( OSGEARTHANNOTATION_LIBRARY_DEBUG osgEarthAnnotationd )


SET( OSGEARTH_FOUND "NO" )
IF( OSGEARTH_LIBRARY AND OSGEARTH_INCLUDE_DIR )
Expand Down
1 change: 1 addition & 0 deletions images/images.qrc
Expand Up @@ -522,6 +522,7 @@
<file>themes/default/symbologyRemove.svg</file>
<file>themes/default/symbologyUp.png</file>
<file>themes/default/symbologyUp.svg</file>
<file>themes/default/sync_views.svg</file>
<file>themes/default/text.png</file>
<file>themes/default/tracking.png</file>
<file>themes/default/transformed.png</file>
Expand Down
151 changes: 151 additions & 0 deletions images/themes/default/sync_views.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions python/core/core.sip
Expand Up @@ -103,6 +103,7 @@
%Include qgsowsconnection.sip
%Include qgspaintenginehack.sip
%Include qgspallabeling.sip
%Include qgsplugininterface.sip
%Include qgspluginlayer.sip
%Include qgspluginlayerregistry.sip
%Include qgspoint.sip
Expand Down
5 changes: 5 additions & 0 deletions python/core/qgsmapsettings.sip
Expand Up @@ -60,6 +60,11 @@ class QgsMapSettings
//! @note added in 2.8
void setLayerStyleOverrides( const QMap<QString, QString>& overrides );

//! Get custom rendering flags, separated by ';'. Layers might honour these to alter their rendering.
const QString& customRenderFlags() const;
//! Set custom rendering flags, separated by ';'. Layers might honour these to alter their rendering.
void setCustomRenderFlags( const QString& customRenderFlags );

//! sets whether to use projections for this layer set
void setCrsTransformEnabled( bool enabled );
//! returns true if projections are enabled for this layer set
Expand Down
25 changes: 25 additions & 0 deletions python/core/qgsplugininterface.sip
@@ -0,0 +1,25 @@
/***************************************************************************
qgsplugininterface.sip
--------------------------------------
Date : 21.8.2013
Copyright : (C) 2013 Matthias Kuhn
Email : matthias dot kuhn at gmx dot ch
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/

class QgsPluginInterface : QObject
{
%TypeHeaderCode
#include "qgsplugininterface.h"
%End

// Should only be instantiated from subclasses
private:
QgsPluginInterface( QObject* parent = 0 );
};
2 changes: 1 addition & 1 deletion python/core/qgsrectangle.sip
Expand Up @@ -74,7 +74,7 @@ class QgsRectangle
//! return true when rectangle contains a point
bool contains( const QgsPoint &p ) const;
//! expand the rectangle so that covers both the original rectangle and the given rectangle
void combineExtentWith( QgsRectangle *rect );
void combineExtentWith( const QgsRectangle *rect );
//! expand the rectangle so that covers both the original rectangle and the given point
void combineExtentWith( double x, double y );
//! test if rectangle is empty.
Expand Down
2 changes: 2 additions & 0 deletions python/gui/gui.sip
Expand Up @@ -102,6 +102,7 @@
%Include qgsmaplayeractionregistry.sip
%Include qgsmaplayercombobox.sip
%Include qgsmaplayermodel.sip
%Include qgsmaplayerpropertiesfactory.sip
%Include qgsmaplayerproxymodel.sip
%Include qgsmapmouseevent.sip
%Include qgsmapoverviewcanvas.sip
Expand Down Expand Up @@ -155,6 +156,7 @@
%Include qgsunitselectionwidget.sip
%Include qgsuserinputdockwidget.sip
%Include qgsvariableeditorwidget.sip
%Include qgsvectorlayerpropertiespage.sip
%Include qgsvectorlayertools.sip
%Include qgsvertexmarker.sip

Expand Down
6 changes: 6 additions & 0 deletions python/gui/qgisinterface.sip
Expand Up @@ -279,6 +279,12 @@ class QgisInterface : QObject
/** Unregister a previously registered action. (e.g. when plugin is going to be unloaded) */
virtual bool unregisterMainWindowAction( QAction* action ) = 0;

/** Register a new tab in the vector layer properties dialog */
virtual void registerMapLayerPropertiesFactory( QgsMapLayerPropertiesFactory* factory ) = 0;

/** Unregister a previously registered tab in the layer properties dialog */
virtual void unregisterMapLayerPropertiesFactory( QgsMapLayerPropertiesFactory* factory ) = 0;

// @todo is this deprecated in favour of QgsContextHelp?
/** Open a url in the users browser. By default the QGIS doc directory is used
* as the base for the URL. To open a URL that is not relative to the installed
Expand Down
15 changes: 15 additions & 0 deletions python/gui/qgsmaplayerpropertiesfactory.sip
@@ -0,0 +1,15 @@
/** \ingroup gui
* \note added in 2.1
*/
class QgsMapLayerPropertiesFactory
{
%TypeHeaderCode
#include <qgsmaplayerpropertiesfactory.h>
%End

public:
QgsMapLayerPropertiesFactory();

virtual QgsVectorLayerPropertiesPage* createVectorLayerPropertiesPage( QgsVectorLayer* layer, QWidget* parent ) = 0;
virtual QListWidgetItem* createVectorLayerPropertiesItem( QgsVectorLayer* layer, QListWidget* view ) = 0;
};
15 changes: 15 additions & 0 deletions python/gui/qgsvectorlayerpropertiespage.sip
@@ -0,0 +1,15 @@
/** \ingroup gui
* \note added in 2.1
*/
class QgsVectorLayerPropertiesPage : QWidget
{
%TypeHeaderCode
#include <qgsvectorlayerpropertiespage.h>
%End

public:
explicit QgsVectorLayerPropertiesPage( QWidget *parent = 0 );

public slots:
virtual void apply() = 0;
};
14 changes: 14 additions & 0 deletions src/app/qgisapp.cpp
Expand Up @@ -8841,6 +8841,16 @@ void QgisApp::openURL( QString url, bool useQgisDocDirectory )
#endif
}

void QgisApp::registerMapLayerPropertiesFactory( QgsMapLayerPropertiesFactory* factory )
{
mMapLayerPropertiesFactories << factory;
}

void QgisApp::unregisterMapLayerPropertiesFactory( QgsMapLayerPropertiesFactory* factory )
{
mMapLayerPropertiesFactories.removeAll( factory );
}

/** Get a pointer to the currently selected map layer */
QgsMapLayer *QgisApp::activeLayer()
{
Expand Down Expand Up @@ -11052,6 +11062,10 @@ void QgisApp::showLayerProperties( QgsMapLayer *ml )
#else
QgsVectorLayerProperties *vlp = new QgsVectorLayerProperties( vlayer, this );
#endif
foreach ( QgsMapLayerPropertiesFactory* factory, mMapLayerPropertiesFactories )
{
vlp->addPropertiesPageFactory( factory );
}

if ( vlp->exec() )
{
Expand Down
9 changes: 9 additions & 0 deletions src/app/qgisapp.h
Expand Up @@ -55,6 +55,7 @@ class QgsLayerTreeMapCanvasBridge;
class QgsLayerTreeView;
class QgsMapCanvas;
class QgsMapLayer;
class QgsMapLayerPropertiesFactory;
class QgsMapTip;
class QgsMapTool;
class QgsMapToolAdvancedDigitizing;
Expand Down Expand Up @@ -502,6 +503,12 @@ class APP_EXPORT QgisApp : public QMainWindow, private Ui::MainWindow

void parseVersionInfo( QNetworkReply* reply, int& latestVersion, QStringList& versionInfo );

/** Register a new tab in the layer properties dialog */
void registerMapLayerPropertiesFactory( QgsMapLayerPropertiesFactory* factory );

/** Unregister a previously registered tab in the layer properties dialog */
void unregisterMapLayerPropertiesFactory( QgsMapLayerPropertiesFactory* factory );

public slots:
void layerTreeViewDoubleClicked( const QModelIndex& index );
//! Make sure the insertion point for new layers is up-to-date with the current item in layer tree view
Expand Down Expand Up @@ -1753,6 +1760,8 @@ class APP_EXPORT QgisApp : public QMainWindow, private Ui::MainWindow

QgsSnappingUtils* mSnappingUtils;

QList<QgsMapLayerPropertiesFactory*> mMapLayerPropertiesFactories;

QDateTime mProjectLastModified;

QgsWelcomePage* mWelcomePage;
Expand Down
10 changes: 10 additions & 0 deletions src/app/qgisappinterface.cpp
Expand Up @@ -475,6 +475,16 @@ bool QgisAppInterface::unregisterMainWindowAction( QAction* action )
return QgsShortcutsManager::instance()->unregisterAction( action );
}

void QgisAppInterface::registerMapLayerPropertiesFactory( QgsMapLayerPropertiesFactory* factory )
{
qgis->registerMapLayerPropertiesFactory( factory );
}

void QgisAppInterface::unregisterMapLayerPropertiesFactory( QgsMapLayerPropertiesFactory* factory )
{
qgis->unregisterMapLayerPropertiesFactory( factory );
}

//! Menus
Q_DECL_DEPRECATED QMenu *QgisAppInterface::fileMenu() { return qgis->projectMenu(); }
QMenu *QgisAppInterface::projectMenu() { return qgis->projectMenu(); }
Expand Down
6 changes: 6 additions & 0 deletions src/app/qgisappinterface.h
Expand Up @@ -288,6 +288,12 @@ class APP_EXPORT QgisAppInterface : public QgisInterface
/** Unregister a previously registered action. (e.g. when plugin is going to be unloaded. */
virtual bool unregisterMainWindowAction( QAction* action ) override;

/** Register a new tab in the layer properties dialog */
virtual void registerMapLayerPropertiesFactory( QgsMapLayerPropertiesFactory* factory ) override;

/** Unregister a previously registered tab in the layer properties dialog */
virtual void unregisterMapLayerPropertiesFactory( QgsMapLayerPropertiesFactory* factory ) override;

/** Accessors for inserting items into menus and toolbars.
* An item can be inserted before any existing action.
*/
Expand Down

0 comments on commit 90887f4

Please sign in to comment.