Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Move QgsMapLayerProxyModel and QgsMapLayerProxyModel to core
Because it's also useful for non-widget applications
  • Loading branch information
m-kuhn committed Aug 29, 2016
1 parent bbafbf4 commit b144823
Show file tree
Hide file tree
Showing 11 changed files with 19 additions and 12 deletions.
9 changes: 9 additions & 0 deletions doc/api_break.dox
Expand Up @@ -18,6 +18,15 @@ This page tries to maintain a list with incompatible changes that happened in pr

\section qgis_api_break_3_0 QGIS 3.0

\subsection qgis_api_break_3_0_moved_classes Moved Classes

<table>
<caption id="renamed_classes">Renamed classes</caption>
<tr><th>class<th>Module 2.X<th>Module 3.x
<tr><td>QgsMapLayerModel<td>gui<td>core
<tr><td>QgsMapLayerProxyModel<td>gui<td>core
</table>

\subsection qgis_api_break_3_0_renamed_classes Renamed Classes

<table>
Expand Down
2 changes: 2 additions & 0 deletions python/core/core.sip
Expand Up @@ -81,6 +81,8 @@
%Include qgsmaphittest.sip
%Include qgsmaplayer.sip
%Include qgsmaplayerlegend.sip
%Include qgsmaplayermodel.sip
%Include qgsmaplayerproxymodel.sip
%Include qgsmaplayerregistry.sip
%Include qgsmaplayerrenderer.sip
%Include qgsmaplayerstylemanager.sip
Expand Down
File renamed without changes.
Expand Up @@ -61,4 +61,3 @@ class QgsMapLayerProxyModel : QSortFilterProxyModel
};

QFlags<QgsMapLayerProxyModel::Filter> operator|(QgsMapLayerProxyModel::Filter f1, QFlags<QgsMapLayerProxyModel::Filter> f2);

2 changes: 0 additions & 2 deletions python/gui/gui.sip
Expand Up @@ -108,10 +108,8 @@
%Include qgsmapcanvastracer.sip
%Include qgsmaplayeractionregistry.sip
%Include qgsmaplayercombobox.sip
%Include qgsmaplayermodel.sip
%Include qgsmaplayerconfigwidget.sip
%Include qgsmaplayerconfigwidgetfactory.sip
%Include qgsmaplayerproxymodel.sip
%Include qgsmapmouseevent.sip
%Include qgsmapoverviewcanvas.sip
%Include qgsmaptip.sip
Expand Down
4 changes: 4 additions & 0 deletions src/core/CMakeLists.txt
Expand Up @@ -138,6 +138,8 @@ SET(QGIS_CORE_SRCS
qgsmaphittest.cpp
qgsmaplayer.cpp
qgsmaplayerlegend.cpp
qgsmaplayermodel.cpp
qgsmaplayerproxymodel.cpp
qgsmaplayerregistry.cpp
qgsmaplayerstylemanager.cpp
qgsmaprenderercache.cpp
Expand Down Expand Up @@ -459,6 +461,8 @@ SET(QGIS_CORE_MOC_HDRS
qgsgmlschema.h
qgsmaplayer.h
qgsmaplayerlegend.h
qgsmaplayermodel.h
qgsmaplayerproxymodel.h
qgsmaplayerregistry.h
qgsmaplayerstylemanager.h
qgsmaprenderercache.h
Expand Down
File renamed without changes.
5 changes: 2 additions & 3 deletions src/gui/qgsmaplayermodel.h → src/core/qgsmaplayermodel.h
Expand Up @@ -23,14 +23,13 @@
class QgsMapLayer;


/** \ingroup gui
/** \ingroup core
* @brief The QgsMapLayerModel class is a model to display layers in widgets.
* @see QgsMapLayerProxyModel to sort and/filter the layers
* @see QgsFieldModel to combine in with a field selector.
* @note added in 2.3
*/
// TODO QGIS3: move to core
class GUI_EXPORT QgsMapLayerModel : public QAbstractItemModel
class CORE_EXPORT QgsMapLayerModel : public QAbstractItemModel
{
Q_OBJECT
public:
Expand Down
File renamed without changes.
Expand Up @@ -22,11 +22,11 @@
class QgsMapLayerModel;
class QgsMapLayer;

/** \ingroup gui
/** \ingroup core
* @brief The QgsMapLayerProxyModel class provides an easy to use model to display the list of layers in widgets.
* @note added in 2.3
*/
class GUI_EXPORT QgsMapLayerProxyModel : public QSortFilterProxyModel
class CORE_EXPORT QgsMapLayerProxyModel : public QSortFilterProxyModel
{
Q_OBJECT
Q_FLAGS( Filters )
Expand Down
4 changes: 0 additions & 4 deletions src/gui/CMakeLists.txt
Expand Up @@ -244,9 +244,7 @@ SET(QGIS_GUI_SRCS
qgsmapcanvastracer.cpp
qgsmaplayeractionregistry.cpp
qgsmaplayercombobox.cpp
qgsmaplayermodel.cpp
qgsmaplayerconfigwidgetfactory.cpp
qgsmaplayerproxymodel.cpp
qgsmaplayerstylemanagerwidget.cpp
qgsmapmouseevent.cpp
qgsmapoverviewcanvas.cpp
Expand Down Expand Up @@ -401,8 +399,6 @@ SET(QGIS_GUI_MOC_HDRS
qgsmapcanvastracer.h
qgsmaplayeractionregistry.h
qgsmaplayercombobox.h
qgsmaplayermodel.h
qgsmaplayerproxymodel.h
qgsmaplayerstylemanagerwidget.h
qgsmapoverviewcanvas.h
qgsmaptip.h
Expand Down

0 comments on commit b144823

Please sign in to comment.