-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4819 from nyalldawson/layout_gui
Layout GUI work (pt 1/?)
- Loading branch information
Showing
63 changed files
with
5,827 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,11 @@ class QgsLayout : QGraphicsScene | |
%End | ||
public: | ||
|
||
enum ZValues | ||
{ | ||
ZMapTool, | ||
}; | ||
|
||
QgsLayout(); | ||
|
||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,154 @@ | ||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/gui/layout/qgslayoutitemguiregistry.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ | ||
|
||
|
||
|
||
|
||
class QgsLayoutItemAbstractGuiMetadata | ||
{ | ||
%Docstring | ||
Stores GUI metadata about one layout item class. | ||
|
||
This is a companion to QgsLayoutItemAbstractMetadata, storing only | ||
the components related to the GUI behavior of a layout item. | ||
|
||
.. note:: | ||
|
||
In C++ you can use QgsLayoutItemGuiMetadata convenience class. | ||
.. versionadded:: 3.0 | ||
%End | ||
|
||
%TypeHeaderCode | ||
#include "qgslayoutitemguiregistry.h" | ||
%End | ||
public: | ||
|
||
QgsLayoutItemAbstractGuiMetadata( int type ); | ||
%Docstring | ||
Constructor for QgsLayoutItemAbstractGuiMetadata with the specified class ``type``. | ||
%End | ||
|
||
virtual ~QgsLayoutItemAbstractGuiMetadata(); | ||
|
||
int type() const; | ||
%Docstring | ||
Returns the unique item type code for the layout item class. | ||
:rtype: int | ||
%End | ||
|
||
virtual QIcon creationIcon() const; | ||
%Docstring | ||
Returns an icon representing creation of the layout item type. | ||
:rtype: QIcon | ||
%End | ||
|
||
virtual QWidget *createItemWidget() /Factory/; | ||
%Docstring | ||
Creates a configuration widget for layout items of this type. Can return None if no configuration GUI is required. | ||
:rtype: QWidget | ||
%End | ||
|
||
virtual QgsLayoutViewRubberBand *createRubberBand( QgsLayoutView *view ) /Factory/; | ||
%Docstring | ||
Creates a rubber band for use when creating layout items of this type. Can return None if no rubber band | ||
should be created. The default behavior is to create a rectangular rubber band. | ||
:rtype: QgsLayoutViewRubberBand | ||
%End | ||
|
||
}; | ||
|
||
|
||
|
||
|
||
class QgsLayoutItemGuiRegistry : QObject | ||
{ | ||
%Docstring | ||
Registry of available layout item GUI behavior. | ||
|
||
QgsLayoutItemGuiRegistry is not usually directly created, but rather accessed through | ||
QgsGui.layoutItemGuiRegistry(). | ||
|
||
This acts as a companion to QgsLayoutItemRegistry, handling only | ||
the components related to the GUI behavior of layout items. | ||
|
||
.. versionadded:: 3.0 | ||
%End | ||
|
||
%TypeHeaderCode | ||
#include "qgslayoutitemguiregistry.h" | ||
%End | ||
public: | ||
|
||
QgsLayoutItemGuiRegistry( QObject *parent = 0 ); | ||
%Docstring | ||
Creates a new empty item GUI registry. | ||
|
||
QgsLayoutItemGuiRegistry is not usually directly created, but rather accessed through | ||
QgsGui.layoutItemGuiRegistry(). | ||
|
||
.. seealso:: populate() | ||
%End | ||
|
||
~QgsLayoutItemGuiRegistry(); | ||
|
||
bool populate(); | ||
%Docstring | ||
Populates the registry with standard item types. If called on a non-empty registry | ||
then this will have no effect and will return false. | ||
:rtype: bool | ||
%End | ||
|
||
|
||
QgsLayoutItemAbstractGuiMetadata *itemMetadata( int type ) const; | ||
%Docstring | ||
Returns the metadata for the specified item ``type``. Returns None if | ||
a corresponding type was not found in the registry. | ||
:rtype: QgsLayoutItemAbstractGuiMetadata | ||
%End | ||
|
||
bool addLayoutItemGuiMetadata( QgsLayoutItemAbstractGuiMetadata *metadata /Transfer/ ); | ||
%Docstring | ||
Registers the gui metadata for a new layout item type. Takes ownership of the metadata instance. | ||
:rtype: bool | ||
%End | ||
|
||
QWidget *createItemWidget( int type ) const /Factory/; | ||
%Docstring | ||
Creates a new instance of a layout item configuration widget for the specified item ``type``. | ||
:rtype: QWidget | ||
%End | ||
|
||
|
||
QList< int > itemTypes() const; | ||
%Docstring | ||
Returns a list of available item types handled by the registry. | ||
:rtype: list of int | ||
%End | ||
|
||
signals: | ||
|
||
void typeAdded( int type ); | ||
%Docstring | ||
Emitted whenever a new item type is added to the registry, with the specified | ||
``type``. | ||
%End | ||
|
||
private: | ||
QgsLayoutItemGuiRegistry( const QgsLayoutItemGuiRegistry &rh ); | ||
}; | ||
|
||
|
||
|
||
|
||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/gui/layout/qgslayoutitemguiregistry.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/gui/layout/qgslayoutitemregistryguiutils.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ | ||
|
||
|
||
|
||
|
||
class QgsLayoutItemRegistryGuiUtils | ||
{ | ||
%Docstring | ||
A group of static utilities for working with the gui based portions of | ||
QgsLayoutItemRegistry. | ||
|
||
This class is designed to allow Python item subclasses to override the | ||
default GUI based QgsLayoutItemAbstractMetadata methods, which | ||
cannot be directly overridden from Python subclasses. | ||
|
||
.. versionadded:: 3.0 | ||
%End | ||
|
||
%TypeHeaderCode | ||
#include "qgslayoutitemregistryguiutils.h" | ||
%End | ||
public: | ||
|
||
static void setItemRubberBandPrototype( int type, QgsLayoutViewRubberBand *prototype /Transfer/ ); | ||
%Docstring | ||
Sets a ``prototype`` for the rubber bands for the layout item with specified ``type``. | ||
Python subclasses of QgsLayoutItem must call this method to register their prototypes, | ||
as the usual c++ QgsLayoutItemAbstractMetadata are not accessible via the Python bindings. | ||
%End | ||
|
||
|
||
}; | ||
|
||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/gui/layout/qgslayoutitemregistryguiutils.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ |
Oops, something went wrong.