Skip to content

Commit

Permalink
sipify gui part n
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids committed Jun 9, 2017
1 parent f677eaf commit 532b9a1
Show file tree
Hide file tree
Showing 41 changed files with 2,278 additions and 1,049 deletions.
26 changes: 0 additions & 26 deletions python/auto_sip.blacklist
Original file line number Diff line number Diff line change
Expand Up @@ -41,32 +41,6 @@ core/composer/qgspaperitem.sip
core/composer/qgsscalebarstyle.sip
core/composer/qgssingleboxscalebarstyle.sip
core/composer/qgsticksscalebarstyle.sip
gui/qgsprojectionselectiondialog.sip
gui/qgsprojectionselectiontreewidget.sip
gui/qgsprojectionselectionwidget.sip
gui/qgspropertyassistantwidget.sip
gui/qgsquerybuilder.sip
gui/qgsrasterformatsaveoptionswidget.sip
gui/qgsrasterlayersaveasdialog.sip
gui/qgsrasterpyramidsoptionswidget.sip
gui/qgsrubberband.sip
gui/qgsscrollarea.sip
gui/qgssearchquerybuilder.sip
gui/qgsshortcutsmanager.sip
gui/qgsslider.sip
gui/qgssourceselectdialog.sip
gui/qgssublayersdialog.sip
gui/qgssubstitutionlistwidget.sip
gui/qgstablewidgetbase.sip
gui/qgstabwidget.sip
gui/qgstablewidgetitem.sip
gui/qgstaskmanagerwidget.sip
gui/qgstextformatwidget.sip
gui/qgstextpreview.sip
gui/qgstreewidgetitem.sip
gui/qgsunitselectionwidget.sip
gui/qgsuserinputdockwidget.sip
gui/qgsvariableeditorwidget.sip
gui/attributetable/qgsattributetabledelegate.sip
gui/attributetable/qgsattributetablefiltermodel.sip
gui/attributetable/qgsattributetablemodel.sip
Expand Down
111 changes: 90 additions & 21 deletions python/gui/qgsprojectionselectiondialog.sip
Original file line number Diff line number Diff line change
@@ -1,43 +1,112 @@
class QgsProjectionSelectionDialog : QDialog //, private Ui::QgsGenericProjectionSelectorBase
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgsprojectionselectiondialog.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/





class QgsProjectionSelectionDialog : QDialog
{
%TypeHeaderCode
#include <qgsprojectionselectiondialog.h>
%Docstring
A generic dialog to prompt the user for a Coordinate Reference System.

Typically you will use this when you want to prompt the user for
a coordinate system identifier e.g. from a plugin you might do this
to get an epsg code:
\code
QgsProjectionSelectionDialog mySelector( mQGisIface->mainWindow() );
mySelector.setCrs( crs );
if ( mySelector.exec() )
{
mCrs = mySelector.crs();
}
\endcode

If you wish to embed the projection selector into an existing dialog
the you probably want to look at QgsProjectionSelectionWidget instead.
.. versionadded:: 3.0
%End

%TypeHeaderCode
#include "qgsprojectionselectiondialog.h"
%End
public:
/**
* Constructor
*/

QgsProjectionSelectionDialog( QWidget *parent /TransferThis/ = 0,
const Qt::WindowFlags &fl = QgsGuiUtils::ModalDialogFlags );
Qt::WindowFlags fl = QgsGuiUtils::ModalDialogFlags );
%Docstring
Constructor for QgsProjectionSelectionDialog.
%End


//! Destructor
~QgsProjectionSelectionDialog();

QgsCoordinateReferenceSystem crs() const;
%Docstring
Returns the CRS currently selected in the widget.
.. versionadded:: 3.0
.. seealso:: setCrs()
:rtype: QgsCoordinateReferenceSystem
%End

void setMessage( const QString &message );
%Docstring
Sets a ``message`` to show in the dialog. If an empty string is
passed, the message will be a generic
'define the CRS for this layer'.
%End

void setShowNoProjection( bool show );
%Docstring
Sets whether a "no/invalid" projection option should be shown. If this
option is selected, calling crs() will return an invalid QgsCoordinateReferenceSystem.
.. seealso:: showNoProjection()
.. versionadded:: 3.0
%End

bool showNoProjection() const;
%Docstring
Returns whether the "no/invalid" projection option is shown. If this
option is selected, calling crs() will return an invalid QgsCoordinateReferenceSystem.
.. versionadded:: 3.0
.. seealso:: setShowNoProjection()
:rtype: bool
%End

public slots:


void setCrs( const QgsCoordinateReferenceSystem &crs );
%Docstring
Sets the initial ``crs`` to show within the dialog.
.. versionadded:: 3.0
.. seealso:: crs()
%End

/**
* \brief filters this dialog by the given CRSs
*
* Sets this dialog to filter the available projections to those listed
* by the given Coordinate Reference Systems.
*
* \param crsFilter a list of OGC Coordinate Reference Systems to filter the
* list of projections by. This is useful in (e.g.) WMS situations
* where you just want to offer what the WMS server can support.
*
* \warning This function's behavior is undefined if it is called after the dialog is shown.
*/
void setOgcWmsCrsFilter( const QSet<QString> &crsFilter );
%Docstring
filters this dialog by the given CRSs

Sets this dialog to filter the available projections to those listed
by the given Coordinate Reference Systems.

\param crsFilter a list of OGC Coordinate Reference Systems to filter the
list of projections by. This is useful in (e.g.) WMS situations
where you just want to offer what the WMS server can support.

\warning This function's behavior is undefined if it is called after the dialog is shown.
%End

};

/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgsprojectionselectiondialog.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
107 changes: 103 additions & 4 deletions python/gui/qgsprojectionselectiontreewidget.sip
Original file line number Diff line number Diff line change
@@ -1,37 +1,136 @@
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgsprojectionselectiontreewidget.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/






class QgsProjectionSelectionTreeWidget : QWidget
{
%TypeHeaderCode
#include <qgsprojectionselectiontreewidget.h>
%Docstring
A widget for selecting a coordinate reference system from a tree.

This widget implements a tree view of projections, as seen in the
QgsProjectionSelectionDialog dialog. In most cases it is more
suitable to use the compact QgsProjectionSelectionWidget widget.

.. seealso:: QgsProjectionSelectionDialog.
.. seealso:: QgsProjectionSelectionWidget
.. versionadded:: 3.0
%End

%TypeHeaderCode
#include "qgsprojectionselectiontreewidget.h"
%End
public:

QgsProjectionSelectionTreeWidget( QWidget *parent /TransferThis/ = 0 );
%Docstring
Constructor for QgsProjectionSelectionTreeWidget.
%End

~QgsProjectionSelectionTreeWidget();

QgsCoordinateReferenceSystem crs() const;
%Docstring
Returns the CRS currently selected in the widget.
.. versionadded:: 3.0
.. seealso:: setCrs()
:rtype: QgsCoordinateReferenceSystem
%End

void setShowNoProjection( bool show );
%Docstring
Sets whether a "no/invalid" projection option should be shown. If this
option is selected, calling crs() will return an invalid QgsCoordinateReferenceSystem.
.. seealso:: showNoProjection()
.. versionadded:: 3.0
%End

bool showNoProjection() const;
%Docstring
Returns whether the "no/invalid" projection option is shown. If this
option is selected, calling crs() will return an invalid QgsCoordinateReferenceSystem.
.. versionadded:: 3.0
.. seealso:: setShowNoProjection()
:rtype: bool
%End

bool hasValidSelection() const;
%Docstring
Returns true if the current selection in the widget is a valid choice. Valid
selections include any projection and also the "no/invalid projection" option
(if setShowNoProjection() was called). Invalid selections are the group
headers (such as "Geographic Coordinate Systems"
:rtype: bool
%End

public slots:

void setCrs( const QgsCoordinateReferenceSystem &crs );
%Docstring
Sets the initial ``crs`` to show within the dialog.
.. versionadded:: 3.0
.. seealso:: crs()
%End

void setOgcWmsCrsFilter( const QSet<QString> &crsFilter );
%Docstring
filters this widget by the given CRSs

Sets this widget to filter the available projections to those listed
by the given Coordinate Reference Systems.

\param crsFilter a list of OGC Coordinate Reference Systems to filter the
list of projections by. This is useful in (e.g.) WMS situations
where you just want to offer what the WMS server can support.

\warning This function's behavior is undefined if it is called after the widget is shown.
%End

void pushProjectionToFront();
%Docstring
Marks the current selected projection for push to front of recent projections list.
%End

signals:

void crsSelected();
%Docstring
Emitted when a projection is selected in the widget.
%End

void initialized();
%Docstring
Notifies others that the widget is now fully initialized, including deferred selection of projection.
.. versionadded:: 2.4
%End

void projectionDoubleClicked();
%Docstring
Emitted when a projection is double clicked in the list.
.. versionadded:: 2.14
%End

protected:
void showEvent( QShowEvent *event );
virtual void showEvent( QShowEvent *event );


virtual void resizeEvent( QResizeEvent *event );


void resizeEvent( QResizeEvent *event );
};

/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgsprojectionselectiontreewidget.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
Loading

0 comments on commit 532b9a1

Please sign in to comment.