Skip to content

Commit 90887f4

Browse files
committed
Revived globe, compatible with OsgEarth 2.7
1 parent ed1235d commit 90887f4

File tree

124 files changed

+14541
-6434
lines changed

Some content is hidden

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

124 files changed

+14541
-6434
lines changed

cmake/FindOSGEARTH.cmake

+3
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,9 @@ FIND_OSGEARTH_LIBRARY( OSGEARTHSYMBOLOGY_LIBRARY_DEBUG osgEarthSymbologyd )
9696
FIND_OSGEARTH_LIBRARY( OSGEARTHQT_LIBRARY osgEarthQt )
9797
FIND_OSGEARTH_LIBRARY( OSGEARTHQT_LIBRARY_DEBUG osgEarthQtd )
9898

99+
FIND_OSGEARTH_LIBRARY( OSGEARTHANNOTATION_LIBRARY osgEarthAnnotation )
100+
FIND_OSGEARTH_LIBRARY( OSGEARTHANNOTATION_LIBRARY_DEBUG osgEarthAnnotationd )
101+
99102

100103
SET( OSGEARTH_FOUND "NO" )
101104
IF( OSGEARTH_LIBRARY AND OSGEARTH_INCLUDE_DIR )

images/images.qrc

+1
Original file line numberDiff line numberDiff line change
@@ -522,6 +522,7 @@
522522
<file>themes/default/symbologyRemove.svg</file>
523523
<file>themes/default/symbologyUp.png</file>
524524
<file>themes/default/symbologyUp.svg</file>
525+
<file>themes/default/sync_views.svg</file>
525526
<file>themes/default/text.png</file>
526527
<file>themes/default/tracking.png</file>
527528
<file>themes/default/transformed.png</file>

images/themes/default/sync_views.svg

+151
Loading

python/core/core.sip

+1
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@
103103
%Include qgsowsconnection.sip
104104
%Include qgspaintenginehack.sip
105105
%Include qgspallabeling.sip
106+
%Include qgsplugininterface.sip
106107
%Include qgspluginlayer.sip
107108
%Include qgspluginlayerregistry.sip
108109
%Include qgspoint.sip

python/core/qgsmapsettings.sip

+5
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,11 @@ class QgsMapSettings
6060
//! @note added in 2.8
6161
void setLayerStyleOverrides( const QMap<QString, QString>& overrides );
6262

63+
//! Get custom rendering flags, separated by ';'. Layers might honour these to alter their rendering.
64+
const QString& customRenderFlags() const;
65+
//! Set custom rendering flags, separated by ';'. Layers might honour these to alter their rendering.
66+
void setCustomRenderFlags( const QString& customRenderFlags );
67+
6368
//! sets whether to use projections for this layer set
6469
void setCrsTransformEnabled( bool enabled );
6570
//! returns true if projections are enabled for this layer set

python/core/qgsplugininterface.sip

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/***************************************************************************
2+
qgsplugininterface.sip
3+
--------------------------------------
4+
Date : 21.8.2013
5+
Copyright : (C) 2013 Matthias Kuhn
6+
Email : matthias dot kuhn at gmx dot ch
7+
***************************************************************************
8+
* *
9+
* This program is free software; you can redistribute it and/or modify *
10+
* it under the terms of the GNU General Public License as published by *
11+
* the Free Software Foundation; either version 2 of the License, or *
12+
* (at your option) any later version. *
13+
* *
14+
***************************************************************************/
15+
16+
class QgsPluginInterface : QObject
17+
{
18+
%TypeHeaderCode
19+
#include "qgsplugininterface.h"
20+
%End
21+
22+
// Should only be instantiated from subclasses
23+
private:
24+
QgsPluginInterface( QObject* parent = 0 );
25+
};

python/core/qgsrectangle.sip

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ class QgsRectangle
7474
//! return true when rectangle contains a point
7575
bool contains( const QgsPoint &p ) const;
7676
//! expand the rectangle so that covers both the original rectangle and the given rectangle
77-
void combineExtentWith( QgsRectangle *rect );
77+
void combineExtentWith( const QgsRectangle *rect );
7878
//! expand the rectangle so that covers both the original rectangle and the given point
7979
void combineExtentWith( double x, double y );
8080
//! test if rectangle is empty.

python/gui/gui.sip

+2
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@
102102
%Include qgsmaplayeractionregistry.sip
103103
%Include qgsmaplayercombobox.sip
104104
%Include qgsmaplayermodel.sip
105+
%Include qgsmaplayerpropertiesfactory.sip
105106
%Include qgsmaplayerproxymodel.sip
106107
%Include qgsmapmouseevent.sip
107108
%Include qgsmapoverviewcanvas.sip
@@ -155,6 +156,7 @@
155156
%Include qgsunitselectionwidget.sip
156157
%Include qgsuserinputdockwidget.sip
157158
%Include qgsvariableeditorwidget.sip
159+
%Include qgsvectorlayerpropertiespage.sip
158160
%Include qgsvectorlayertools.sip
159161
%Include qgsvertexmarker.sip
160162

python/gui/qgisinterface.sip

+6
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,12 @@ class QgisInterface : QObject
279279
/** Unregister a previously registered action. (e.g. when plugin is going to be unloaded) */
280280
virtual bool unregisterMainWindowAction( QAction* action ) = 0;
281281

282+
/** Register a new tab in the vector layer properties dialog */
283+
virtual void registerMapLayerPropertiesFactory( QgsMapLayerPropertiesFactory* factory ) = 0;
284+
285+
/** Unregister a previously registered tab in the layer properties dialog */
286+
virtual void unregisterMapLayerPropertiesFactory( QgsMapLayerPropertiesFactory* factory ) = 0;
287+
282288
// @todo is this deprecated in favour of QgsContextHelp?
283289
/** Open a url in the users browser. By default the QGIS doc directory is used
284290
* as the base for the URL. To open a URL that is not relative to the installed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/** \ingroup gui
2+
* \note added in 2.1
3+
*/
4+
class QgsMapLayerPropertiesFactory
5+
{
6+
%TypeHeaderCode
7+
#include <qgsmaplayerpropertiesfactory.h>
8+
%End
9+
10+
public:
11+
QgsMapLayerPropertiesFactory();
12+
13+
virtual QgsVectorLayerPropertiesPage* createVectorLayerPropertiesPage( QgsVectorLayer* layer, QWidget* parent ) = 0;
14+
virtual QListWidgetItem* createVectorLayerPropertiesItem( QgsVectorLayer* layer, QListWidget* view ) = 0;
15+
};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/** \ingroup gui
2+
* \note added in 2.1
3+
*/
4+
class QgsVectorLayerPropertiesPage : QWidget
5+
{
6+
%TypeHeaderCode
7+
#include <qgsvectorlayerpropertiespage.h>
8+
%End
9+
10+
public:
11+
explicit QgsVectorLayerPropertiesPage( QWidget *parent = 0 );
12+
13+
public slots:
14+
virtual void apply() = 0;
15+
};

src/app/qgisapp.cpp

+14
Original file line numberDiff line numberDiff line change
@@ -8841,6 +8841,16 @@ void QgisApp::openURL( QString url, bool useQgisDocDirectory )
88418841
#endif
88428842
}
88438843

8844+
void QgisApp::registerMapLayerPropertiesFactory( QgsMapLayerPropertiesFactory* factory )
8845+
{
8846+
mMapLayerPropertiesFactories << factory;
8847+
}
8848+
8849+
void QgisApp::unregisterMapLayerPropertiesFactory( QgsMapLayerPropertiesFactory* factory )
8850+
{
8851+
mMapLayerPropertiesFactories.removeAll( factory );
8852+
}
8853+
88448854
/** Get a pointer to the currently selected map layer */
88458855
QgsMapLayer *QgisApp::activeLayer()
88468856
{
@@ -11052,6 +11062,10 @@ void QgisApp::showLayerProperties( QgsMapLayer *ml )
1105211062
#else
1105311063
QgsVectorLayerProperties *vlp = new QgsVectorLayerProperties( vlayer, this );
1105411064
#endif
11065+
foreach ( QgsMapLayerPropertiesFactory* factory, mMapLayerPropertiesFactories )
11066+
{
11067+
vlp->addPropertiesPageFactory( factory );
11068+
}
1105511069

1105611070
if ( vlp->exec() )
1105711071
{

src/app/qgisapp.h

+9
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ class QgsLayerTreeMapCanvasBridge;
5555
class QgsLayerTreeView;
5656
class QgsMapCanvas;
5757
class QgsMapLayer;
58+
class QgsMapLayerPropertiesFactory;
5859
class QgsMapTip;
5960
class QgsMapTool;
6061
class QgsMapToolAdvancedDigitizing;
@@ -502,6 +503,12 @@ class APP_EXPORT QgisApp : public QMainWindow, private Ui::MainWindow
502503

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

506+
/** Register a new tab in the layer properties dialog */
507+
void registerMapLayerPropertiesFactory( QgsMapLayerPropertiesFactory* factory );
508+
509+
/** Unregister a previously registered tab in the layer properties dialog */
510+
void unregisterMapLayerPropertiesFactory( QgsMapLayerPropertiesFactory* factory );
511+
505512
public slots:
506513
void layerTreeViewDoubleClicked( const QModelIndex& index );
507514
//! Make sure the insertion point for new layers is up-to-date with the current item in layer tree view
@@ -1753,6 +1760,8 @@ class APP_EXPORT QgisApp : public QMainWindow, private Ui::MainWindow
17531760

17541761
QgsSnappingUtils* mSnappingUtils;
17551762

1763+
QList<QgsMapLayerPropertiesFactory*> mMapLayerPropertiesFactories;
1764+
17561765
QDateTime mProjectLastModified;
17571766

17581767
QgsWelcomePage* mWelcomePage;

src/app/qgisappinterface.cpp

+10
Original file line numberDiff line numberDiff line change
@@ -475,6 +475,16 @@ bool QgisAppInterface::unregisterMainWindowAction( QAction* action )
475475
return QgsShortcutsManager::instance()->unregisterAction( action );
476476
}
477477

478+
void QgisAppInterface::registerMapLayerPropertiesFactory( QgsMapLayerPropertiesFactory* factory )
479+
{
480+
qgis->registerMapLayerPropertiesFactory( factory );
481+
}
482+
483+
void QgisAppInterface::unregisterMapLayerPropertiesFactory( QgsMapLayerPropertiesFactory* factory )
484+
{
485+
qgis->unregisterMapLayerPropertiesFactory( factory );
486+
}
487+
478488
//! Menus
479489
Q_DECL_DEPRECATED QMenu *QgisAppInterface::fileMenu() { return qgis->projectMenu(); }
480490
QMenu *QgisAppInterface::projectMenu() { return qgis->projectMenu(); }

src/app/qgisappinterface.h

+6
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,12 @@ class APP_EXPORT QgisAppInterface : public QgisInterface
288288
/** Unregister a previously registered action. (e.g. when plugin is going to be unloaded. */
289289
virtual bool unregisterMainWindowAction( QAction* action ) override;
290290

291+
/** Register a new tab in the layer properties dialog */
292+
virtual void registerMapLayerPropertiesFactory( QgsMapLayerPropertiesFactory* factory ) override;
293+
294+
/** Unregister a previously registered tab in the layer properties dialog */
295+
virtual void unregisterMapLayerPropertiesFactory( QgsMapLayerPropertiesFactory* factory ) override;
296+
291297
/** Accessors for inserting items into menus and toolbars.
292298
* An item can be inserted before any existing action.
293299
*/

0 commit comments

Comments
 (0)