diff --git a/python/auto_sip.blacklist b/python/auto_sip.blacklist index ac1515b5810..93404e74a9b 100644 --- a/python/auto_sip.blacklist +++ b/python/auto_sip.blacklist @@ -134,18 +134,6 @@ core/symbology-ng/qgssymbollayerutils.sip core/symbology-ng/qgsvectorfieldsymbollayer.sip core/symbology-ng/qgsarrowsymbollayer.sip core/dxf/qgsdxfexport.sip -gui/qgsblendmodecombobox.sip -gui/qgisinterface.sip -gui/qgsactionmenu.sip -gui/qgsadvanceddigitizingcanvasitem.sip -gui/qgsattributedialog.sip -gui/qgsattributeeditorcontext.sip -gui/qgsattributeform.sip -gui/qgsattributeformeditorwidget.sip -gui/qgsattributeforminterface.sip -gui/qgsattributetypeloaddialog.sip -gui/qgsbrowsertreeview.sip -gui/qgsbusyindicatordialog.sip gui/qgscodeeditor.sip gui/qgscodeeditorpython.sip gui/qgscodeeditorsql.sip diff --git a/python/gui/qgisinterface.sip b/python/gui/qgisinterface.sip index 3ff23cd2798..e1dae7d9b84 100644 --- a/python/gui/qgisinterface.sip +++ b/python/gui/qgisinterface.sip @@ -1,565 +1,1221 @@ -/** \ingroup gui - * QgisInterface - * Abstract base class defining interfaces exposed by QgisApp and - * made available to plugins. - * - * Only functionality exposed by QgisInterface can be used in plugins. - * This interface has to be implemented with application specific details. - * - * QGIS implements it in QgisAppInterface class, 3rd party applications - * could provide their own implementation to be able to use plugins. - */ +/************************************************************************ + * This file has been generated automatically from * + * * + * src/gui/qgisinterface.h * + * * + * Do not edit manually ! Edit header and run scripts/sipify.pl again * + ************************************************************************/ + + + + + + + class QgisInterface : QObject { -%TypeHeaderCode -#include +%Docstring + QgisInterface + Abstract base class defining interfaces exposed by QgisApp and + made available to plugins. + + Only functionality exposed by QgisInterface can be used in plugins. + This interface has to be implemented with application specific details. + + QGIS implements it in QgisAppInterface class, 3rd party applications + could provide their own implementation to be able to use plugins. %End +%TypeHeaderCode +#include "qgisinterface.h" +%End public: - /** Constructor */ QgisInterface(); - - /** Virtual destructor */ - virtual ~QgisInterface(); +%Docstring +Constructor +%End virtual QgsPluginManagerInterface *pluginManagerInterface() = 0; +%Docstring + :rtype: QgsPluginManagerInterface +%End virtual QgsLayerTreeView *layerTreeView() = 0; +%Docstring + :rtype: QgsLayerTreeView +%End - /** Add action to context menu for layers in the layer tree. - * If allLayers is true, then the action will be available for all layers of given type, - * otherwise the action will be available only for specific layers added with addCustomActionForLayer() - * after this call. - * - * If menu argument is not empty, the action will be also added to a menu within the main window, - * creating menu with the given name if it does not exist yet. - * - * @see removeCustomActionForLayerType() - * @see addCustomActionForLayer() - */ - virtual void addCustomActionForLayerType( QAction* action, QString menu, - QgsMapLayer::LayerType type, bool allLayers ) = 0; + virtual void addCustomActionForLayerType( QAction *action, QString menu, + QgsMapLayer::LayerType type, bool allLayers ) = 0; +%Docstring + Add action to context menu for layers in the layer tree. + If allLayers is true, then the action will be available for all layers of given type, + otherwise the action will be available only for specific layers added with addCustomActionForLayer() + after this call. + + If menu argument is not empty, the action will be also added to a menu within the main window, + creating menu with the given name if it does not exist yet. + +.. seealso:: removeCustomActionForLayerType() +.. seealso:: addCustomActionForLayer() +%End - /** Add action to context menu for a specific layer in the layer tree. - * It is necessary to first call addCustomActionForLayerType() with allLayers=false - * in order for this method to have any effect. - * @see addCustomActionForLayerType() - */ virtual void addCustomActionForLayer( QAction *action, QgsMapLayer *layer ) = 0; +%Docstring + Add action to context menu for a specific layer in the layer tree. + It is necessary to first call addCustomActionForLayerType() with allLayers=false + in order for this method to have any effect. +.. seealso:: addCustomActionForLayerType() +%End - /** Remove action for layers in the layer tree previously added with addCustomActionForLayerType() - * @see addCustomActionForLayerType() - */ virtual bool removeCustomActionForLayerType( QAction *action ) = 0; +%Docstring + Remove action for layers in the layer tree previously added with addCustomActionForLayerType() +.. seealso:: addCustomActionForLayerType() + :rtype: bool +%End + + virtual QList< QgsMapCanvas * > mapCanvases() = 0; +%Docstring + Returns a list of all map canvases open in the app. +.. versionadded:: 3.0 + :rtype: list of QgsMapCanvas +%End + + virtual QgsMapCanvas *createNewMapCanvas( const QString &name ) = 0; +%Docstring + Create a new map canvas with the specified unique ``name``. +.. versionadded:: 3.0 +.. seealso:: closeMapCanvas() + :rtype: QgsMapCanvas +%End + + virtual void closeMapCanvas( const QString &name ) = 0; +%Docstring + Closes the additional map canvas with matching ``name``. +.. versionadded:: 3.0 +.. seealso:: createNewMapCanvas() +%End public slots: // TODO: do these functions really need to be slots? - /* Exposed functions */ - - virtual QList< QgsMapCanvas* > mapCanvases() = 0; - - virtual QgsMapCanvas *createNewMapCanvas( const QString &name ) = 0; - - virtual void closeMapCanvas( const QString &name ) = 0; - - public slots: - - - virtual void zoomFull() = 0; +%Docstring +Zoom to full extent of map layers +%End - //! Zoom to previous view extent virtual void zoomToPrevious() = 0; +%Docstring +Zoom to previous view extent +%End - //! Zoom to next view extent virtual void zoomToNext() = 0; +%Docstring +Zoom to next view extent +%End - //! Zoom to extent of the active layer virtual void zoomToActiveLayer() = 0; +%Docstring +Zoom to extent of the active layer +%End - //! Add a vector layer virtual QgsVectorLayer *addVectorLayer( const QString &vectorLayerPath, const QString &baseName, const QString &providerKey ) = 0; +%Docstring +Add a vector layer + :rtype: QgsVectorLayer +%End - //! Add a raster layer given a raster layer file name virtual QgsRasterLayer *addRasterLayer( const QString &rasterLayerPath, const QString &baseName = QString() ) = 0; +%Docstring +Add a raster layer given a raster layer file name + :rtype: QgsRasterLayer +%End - //! Add a WMS layer virtual QgsRasterLayer *addRasterLayer( const QString &url, const QString &layerName, const QString &providerKey ) = 0; +%Docstring +Add a WMS layer + :rtype: QgsRasterLayer +%End - //! Add a project virtual bool addProject( const QString &project ) = 0; - //! Start a blank project +%Docstring +Add a project + :rtype: bool +%End virtual void newProject( bool promptToSaveFlag = false ) = 0; +%Docstring +Start a blank project +%End - //! Get pointer to the active layer (layer selected in the legend) virtual QgsMapLayer *activeLayer() = 0; +%Docstring +Get pointer to the active layer (layer selected in the legend) + :rtype: QgsMapLayer +%End - //! Set the active layer (layer gets selected in the legend) - //! returns true if the layer exists, false otherwise virtual bool setActiveLayer( QgsMapLayer * ) = 0; +%Docstring +returns true if the layer exists, false otherwise + :rtype: bool +%End - //! Add an icon to the plugins toolbar virtual int addToolBarIcon( QAction *qAction ) = 0; +%Docstring +Add an icon to the plugins toolbar + :rtype: int +%End - /** - * Add a widget to the plugins toolbar. - * To remove this widget again, call {@link removeToolBarIcon} - * with the returned QAction. - * - * @param widget widget to add. The toolbar will take ownership of this widget - * @return the QAction you can use to remove this widget from the toolbar - */ virtual QAction *addToolBarWidget( QWidget *widget /Transfer/ ) = 0; +%Docstring + Add a widget to the plugins toolbar. + To remove this widget again, call removeToolBarIcon() + with the returned QAction. + + \param widget widget to add. The toolbar will take ownership of this widget + :return: the QAction you can use to remove this widget from the toolbar + :rtype: QAction +%End - //! Remove an action (icon) from the plugin toolbar virtual void removeToolBarIcon( QAction *qAction ) = 0; +%Docstring +Remove an action (icon) from the plugin toolbar +%End - /** - * Add a widget to the raster toolbar. - * To remove this widget again, call {@link removeRasterToolBarIcon} - * with the returned QAction. - * - * @param widget widget to add. The toolbar will take ownership of this widget - * @return the QAction you can use to remove this widget from the toolbar - */ virtual QAction *addRasterToolBarWidget( QWidget *widget /Transfer/ ) = 0; +%Docstring + Add a widget to the raster toolbar. + To remove this widget again, call removeRasterToolBarIcon() + with the returned QAction. + + \param widget widget to add. The toolbar will take ownership of this widget + :return: the QAction you can use to remove this widget from the toolbar + :rtype: QAction +%End - //! Add an icon to the Raster toolbar virtual int addRasterToolBarIcon( QAction *qAction ) = 0; +%Docstring +Add an icon to the Raster toolbar + :rtype: int +%End - //! Remove an action (icon) from the Raster toolbar virtual void removeRasterToolBarIcon( QAction *qAction ) = 0; +%Docstring +Remove an action (icon) from the Raster toolbar +%End - //! Add an icon to the Vector toolbar virtual int addVectorToolBarIcon( QAction *qAction ) = 0; +%Docstring +Add an icon to the Vector toolbar + :rtype: int +%End - /** - * Add a widget to the vector toolbar. - * To remove this widget again, call {@link removeVectorToolBarIcon} - * with the returned QAction. - * - * @param widget widget to add. The toolbar will take ownership of this widget - * @return the QAction you can use to remove this widget from the toolbar - */ virtual QAction *addVectorToolBarWidget( QWidget *widget /Transfer/ ) = 0; +%Docstring + Add a widget to the vector toolbar. + To remove this widget again, call removeVectorToolBarIcon() + with the returned QAction. + + \param widget widget to add. The toolbar will take ownership of this widget + :return: the QAction you can use to remove this widget from the toolbar + :rtype: QAction +%End - //! Remove an action (icon) from the Vector toolbar virtual void removeVectorToolBarIcon( QAction *qAction ) = 0; +%Docstring +Remove an action (icon) from the Vector toolbar +%End - //! Add an icon to the Database toolbar virtual int addDatabaseToolBarIcon( QAction *qAction ) = 0; +%Docstring +Add an icon to the Database toolbar + :rtype: int +%End - /** - * Add a widget to the database toolbar. - * To remove this widget again, call {@link removeDatabaseToolBarIcon} - * with the returned QAction. - * - * @param widget widget to add. The toolbar will take ownership of this widget - * @return the QAction you can use to remove this widget from the toolbar - */ virtual QAction *addDatabaseToolBarWidget( QWidget *widget /Transfer/ ) = 0; +%Docstring + Add a widget to the database toolbar. + To remove this widget again, call removeDatabaseToolBarIcon() + with the returned QAction. + + \param widget widget to add. The toolbar will take ownership of this widget + :return: the QAction you can use to remove this widget from the toolbar + :rtype: QAction +%End - //! Remove an action (icon) from the Database toolbar virtual void removeDatabaseToolBarIcon( QAction *qAction ) = 0; +%Docstring +Remove an action (icon) from the Database toolbar +%End - //! Add an icon to the Web toolbar virtual int addWebToolBarIcon( QAction *qAction ) = 0; +%Docstring +Add an icon to the Web toolbar + :rtype: int +%End - /** - * Add a widget to the web toolbar. - * To remove this widget again, call {@link removeWebToolBarIcon} - * with the returned QAction. - * - * @param widget widget to add. The toolbar will take ownership of this widget - * @return the QAction you can use to remove this widget from the toolbar - */ virtual QAction *addWebToolBarWidget( QWidget *widget /Transfer/ ) = 0; +%Docstring + Add a widget to the web toolbar. + To remove this widget again, call removeWebToolBarIcon() + with the returned QAction. + + \param widget widget to add. The toolbar will take ownership of this widget + :return: the QAction you can use to remove this widget from the toolbar + :rtype: QAction +%End - //! Remove an action (icon) from the Web toolbar virtual void removeWebToolBarIcon( QAction *qAction ) = 0; +%Docstring +Remove an action (icon) from the Web toolbar +%End - //! Add toolbar with specified name virtual QToolBar *addToolBar( const QString &name ) = 0 /Factory/; +%Docstring +Add toolbar with specified name + :rtype: QToolBar +%End - //! Add a toolbar - //! @note added in 2.3 virtual void addToolBar( QToolBar *toolbar /Transfer/, Qt::ToolBarArea area = Qt::TopToolBarArea ) = 0; +%Docstring +.. versionadded:: 2.3 +%End - /** Return a pointer to the map canvas */ virtual QgsMapCanvas *mapCanvas() = 0; +%Docstring +Return a pointer to the map canvas + :rtype: QgsMapCanvas +%End - /** - * Returns a pointer to the layer tree canvas bridge - * - * @note added in 2.12 - */ virtual QgsLayerTreeMapCanvasBridge *layerTreeCanvasBridge() = 0; +%Docstring + Returns a pointer to the layer tree canvas bridge + +.. versionadded:: 2.12 + :rtype: QgsLayerTreeMapCanvasBridge +%End - /** Return a pointer to the main window (instance of QgisApp in case of QGIS) */ virtual QWidget *mainWindow() = 0; +%Docstring +Return a pointer to the main window (instance of QgisApp in case of QGIS) + :rtype: QWidget +%End - /** Return the message bar of the main app */ virtual QgsMessageBar *messageBar() = 0; +%Docstring +Return the message bar of the main app + :rtype: QgsMessageBar +%End - /** Open the message log dock widget **/ virtual void openMessageLog() = 0; +%Docstring +Open the message log dock widget * +%End - /** Adds a widget to the user input tool bar.*/ virtual void addUserInputWidget( QWidget *widget ) = 0; +%Docstring +Adds a widget to the user input tool bar. +%End virtual QList openComposers() = 0; +%Docstring + Returns all currently open composer windows. +.. versionadded:: 3.0 + :rtype: list of QgsComposerInterface +%End + virtual QgsComposerInterface *openComposer( QgsComposition *composition ) = 0; +%Docstring + Opens a new composer window for the specified ``composition``, or + brings an already open composer window to the foreground if one + is already created for the composition. +.. versionadded:: 3.0 +.. seealso:: closeComposer() + :rtype: QgsComposerInterface +%End + virtual void closeComposer( QgsComposition *composition ) = 0; +%Docstring + Closes an open composer window showing the specified ``composition``. + The composition remains unaffected. +.. versionadded:: 3.0 +.. seealso:: openComposer() +%End + virtual void showOptionsDialog( QWidget *parent = 0, const QString ¤tPage = QString() ) = 0; +%Docstring + Opens the options dialog. The ``currentPage`` argument can be used to force + the dialog to open at a specific page. +.. versionadded:: 3.0 +%End virtual QMap defaultStyleSheetOptions() = 0; +%Docstring +Return changeable options built from settings and/or defaults + :rtype: QMap +%End - /** Generate stylesheet - * @param opts generated default option values, or a changed copy of them - */ virtual void buildStyleSheet( const QMap &opts ) = 0; +%Docstring + Generate stylesheet + \param opts generated default option values, or a changed copy of them +%End - /** Save changed default option keys/values to user settings */ virtual void saveStyleSheetOptions( const QMap &opts ) = 0; +%Docstring +Save changed default option keys/values to user settings +%End - /** Get reference font for initial qApp (may not be same as QgisApp) */ virtual QFont defaultStyleSheetFont() = 0; +%Docstring +Get reference font for initial qApp (may not be same as QgisApp) + :rtype: QFont +%End - /** Add action to the plugins menu */ virtual void addPluginToMenu( const QString &name, QAction *action ) = 0; +%Docstring +Add action to the plugins menu +%End - /** Remove action from the plugins menu */ virtual void removePluginMenu( const QString &name, QAction *action ) = 0; +%Docstring +Remove action from the plugins menu +%End - /** Add "add layer" action to layer menu */ virtual void insertAddLayerAction( QAction *action ) = 0; +%Docstring +Add "add layer" action to layer menu +%End - /** Remove "add layer" action from layer menu */ virtual void removeAddLayerAction( QAction *action ) = 0; +%Docstring +Remove "add layer" action from layer menu +%End - /** Add action to the Database menu */ virtual void addPluginToDatabaseMenu( const QString &name, QAction *action ) = 0; +%Docstring +Add action to the Database menu +%End - /** Remove action from the Database menu */ virtual void removePluginDatabaseMenu( const QString &name, QAction *action ) = 0; +%Docstring +Remove action from the Database menu +%End - /** Add action to the Raster menu */ virtual void addPluginToRasterMenu( const QString &name, QAction *action ) = 0; +%Docstring +Add action to the Raster menu +%End - /** Remove action from the Raster menu */ virtual void removePluginRasterMenu( const QString &name, QAction *action ) = 0; +%Docstring +Remove action from the Raster menu +%End - /** Add action to the Vector menu */ virtual void addPluginToVectorMenu( const QString &name, QAction *action ) = 0; +%Docstring +Add action to the Vector menu +%End - /** Remove action from the Vector menu */ virtual void removePluginVectorMenu( const QString &name, QAction *action ) = 0; +%Docstring +Remove action from the Vector menu +%End - /** Add action to the Web menu */ virtual void addPluginToWebMenu( const QString &name, QAction *action ) = 0; +%Docstring +Add action to the Web menu +%End - /** Remove action from the Web menu */ virtual void removePluginWebMenu( const QString &name, QAction *action ) = 0; +%Docstring +Remove action from the Web menu +%End - /** Add a dock widget to the main window */ virtual void addDockWidget( Qt::DockWidgetArea area, QDockWidget *dockwidget ) = 0; +%Docstring +Add a dock widget to the main window +%End - /** Remove specified dock widget from main window (doesn't delete it). */ virtual void removeDockWidget( QDockWidget *dockwidget ) = 0; +%Docstring +Remove specified dock widget from main window (doesn't delete it). +%End - /** Advanced digitizing dock widget - * @note Added in 2.12 - */ virtual QgsAdvancedDigitizingDockWidget *cadDockWidget() = 0; +%Docstring + Advanced digitizing dock widget +.. versionadded:: 2.12 + :rtype: QgsAdvancedDigitizingDockWidget +%End - /** Open layer properties dialog */ virtual void showLayerProperties( QgsMapLayer *l ) = 0; +%Docstring +Open layer properties dialog +%End - /** Open attribute table dialog */ virtual QDialog *showAttributeTable( QgsVectorLayer *l, const QString &filterExpression = QString() ) = 0; +%Docstring +Open attribute table dialog + :rtype: QDialog +%End - /** Add window to Window menu. The action title is the window title - * and the action should raise, unminimize and activate the window. */ virtual void addWindow( QAction *action ) = 0; +%Docstring + Add window to Window menu. The action title is the window title + and the action should raise, unminimize and activate the window. * +%End - /** Remove window from Window menu. Calling this is necessary only for - * windows which are hidden rather than deleted when closed. */ virtual void removeWindow( QAction *action ) = 0; +%Docstring + Remove window from Window menu. Calling this is necessary only for + windows which are hidden rather than deleted when closed. * +%End virtual bool registerMainWindowAction( QAction *action, const QString &defaultShortcut ) = 0; +%Docstring +Register action to the shortcuts manager so its shortcut can be changed in GUI + :rtype: bool +%End + virtual bool unregisterMainWindowAction( QAction *action ) = 0; +%Docstring +Unregister a previously registered action. (e.g. when plugin is going to be unloaded) + :rtype: bool +%End + virtual void registerMapLayerConfigWidgetFactory( QgsMapLayerConfigWidgetFactory *factory ) = 0; +%Docstring + Register a new tab in the vector layer properties dialog. +.. versionadded:: 2.16 +.. note:: + + Ownership of the factory is not transferred, and the factory must + be unregistered when plugin is unloaded. +.. seealso:: unregisterMapLayerPropertiesFactory() * +%End + virtual void unregisterMapLayerConfigWidgetFactory( QgsMapLayerConfigWidgetFactory *factory ) = 0; +%Docstring + Unregister a previously registered tab in the vector layer properties dialog. +.. versionadded:: 2.16 +.. seealso:: registerMapLayerPropertiesFactory() +%End + virtual void registerOptionsWidgetFactory( QgsOptionsWidgetFactory *factory ) = 0; +%Docstring + Register a new tab in the options dialog. +.. versionadded:: 3.0 +.. note:: + + Ownership of the factory is not transferred, and the factory must + be unregistered when plugin is unloaded. +.. seealso:: unregisterOptionsWidgetFactory() * +%End + virtual void unregisterOptionsWidgetFactory( QgsOptionsWidgetFactory *factory ) = 0; +%Docstring + Unregister a previously registered tab in the options dialog. +.. versionadded:: 3.0 +.. seealso:: registerOptionsWidgetFactory() +%End + virtual void registerCustomDropHandler( QgsCustomDropHandler *handler ) = 0; +%Docstring + Register a new custom drop handler. +.. versionadded:: 3.0 +.. note:: + + Ownership of the factory is not transferred, and the factory must + be unregistered when plugin is unloaded. +.. seealso:: unregisterCustomDropHandler() * +%End + virtual void unregisterCustomDropHandler( QgsCustomDropHandler *handler ) = 0; - virtual void openURL( const QString &url, bool useQgisDocDirectory = true ) = 0 /Deprecated/; +%Docstring + Unregister a previously registered custom drop handler. +.. versionadded:: 3.0 +.. seealso:: registerCustomDropHandler() * +%End + + + virtual void openURL( const QString &url, bool useQgisDocDirectory = true ) = 0; +%Docstring + 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 + QGIS documentation, set useQgisDocDirectory to false. + \param url URL to open + \param useQgisDocDirectory If true, the URL will be formed by concatenating + url to the QGIS documentation directory path (prefix/share/doc) + \deprecated +%End + + + virtual QMenu *projectMenu() = 0; +%Docstring + :rtype: QMenu +%End virtual QMenu *editMenu() = 0; +%Docstring + :rtype: QMenu +%End virtual QMenu *viewMenu() = 0; +%Docstring + :rtype: QMenu +%End virtual QMenu *layerMenu() = 0; +%Docstring + :rtype: QMenu +%End virtual QMenu *newLayerMenu() = 0; - /** @note added in 2.5 */ +%Docstring + :rtype: QMenu +%End virtual QMenu *addLayerMenu() = 0; +%Docstring +.. versionadded:: 2.5 + :rtype: QMenu +%End virtual QMenu *settingsMenu() = 0; +%Docstring + :rtype: QMenu +%End virtual QMenu *pluginMenu() = 0; +%Docstring + :rtype: QMenu +%End virtual QMenu *rasterMenu() = 0; +%Docstring + :rtype: QMenu +%End virtual QMenu *databaseMenu() = 0; +%Docstring + :rtype: QMenu +%End virtual QMenu *vectorMenu() = 0; +%Docstring + :rtype: QMenu +%End virtual QMenu *webMenu() = 0; +%Docstring + :rtype: QMenu +%End virtual QMenu *firstRightStandardMenu() = 0; +%Docstring + :rtype: QMenu +%End virtual QMenu *windowMenu() = 0; +%Docstring + :rtype: QMenu +%End virtual QMenu *helpMenu() = 0; +%Docstring + :rtype: QMenu +%End - // ToolBars virtual QToolBar *fileToolBar() = 0; +%Docstring + :rtype: QToolBar +%End virtual QToolBar *layerToolBar() = 0; +%Docstring + :rtype: QToolBar +%End virtual QToolBar *mapNavToolToolBar() = 0; +%Docstring + :rtype: QToolBar +%End virtual QToolBar *digitizeToolBar() = 0; +%Docstring + :rtype: QToolBar +%End virtual QToolBar *advancedDigitizeToolBar() = 0; +%Docstring + :rtype: QToolBar +%End virtual QToolBar *attributesToolBar() = 0; +%Docstring + :rtype: QToolBar +%End virtual QToolBar *pluginToolBar() = 0; +%Docstring + :rtype: QToolBar +%End virtual QToolBar *helpToolBar() = 0; +%Docstring + :rtype: QToolBar +%End virtual QToolBar *rasterToolBar() = 0; +%Docstring + :rtype: QToolBar +%End virtual QToolBar *vectorToolBar() = 0; +%Docstring + :rtype: QToolBar +%End virtual QToolBar *databaseToolBar() = 0; +%Docstring + :rtype: QToolBar +%End virtual QToolBar *webToolBar() = 0; +%Docstring + :rtype: QToolBar +%End - // Project menu actions virtual QAction *actionNewProject() = 0; +%Docstring + :rtype: QAction +%End virtual QAction *actionOpenProject() = 0; +%Docstring + :rtype: QAction +%End virtual QAction *actionSaveProject() = 0; +%Docstring + :rtype: QAction +%End virtual QAction *actionSaveProjectAs() = 0; +%Docstring + :rtype: QAction +%End virtual QAction *actionSaveMapAsImage() = 0; +%Docstring + :rtype: QAction +%End virtual QAction *actionProjectProperties() = 0; +%Docstring + :rtype: QAction +%End virtual QAction *actionPrintComposer() = 0; +%Docstring + :rtype: QAction +%End virtual QAction *actionShowComposerManager() = 0; +%Docstring + :rtype: QAction +%End virtual QAction *actionExit() = 0; +%Docstring + :rtype: QAction +%End - // Edit menu actions virtual QAction *actionCutFeatures() = 0; +%Docstring + :rtype: QAction +%End virtual QAction *actionCopyFeatures() = 0; +%Docstring + :rtype: QAction +%End virtual QAction *actionPasteFeatures() = 0; +%Docstring + :rtype: QAction +%End virtual QAction *actionAddFeature() = 0; +%Docstring + :rtype: QAction +%End virtual QAction *actionDeleteSelected() = 0; +%Docstring + :rtype: QAction +%End virtual QAction *actionMoveFeature() = 0; +%Docstring + :rtype: QAction +%End virtual QAction *actionSplitFeatures() = 0; +%Docstring + :rtype: QAction +%End virtual QAction *actionSplitParts() = 0; +%Docstring + :rtype: QAction +%End virtual QAction *actionAddRing() = 0; +%Docstring + :rtype: QAction +%End virtual QAction *actionAddPart() = 0; +%Docstring + :rtype: QAction +%End virtual QAction *actionSimplifyFeature() = 0; +%Docstring + :rtype: QAction +%End virtual QAction *actionDeleteRing() = 0; +%Docstring + :rtype: QAction +%End virtual QAction *actionDeletePart() = 0; +%Docstring + :rtype: QAction +%End virtual QAction *actionNodeTool() = 0; +%Docstring + :rtype: QAction +%End - // View menu actions - //! Get access to the native pan action. Call trigger() on it to set the default pan map tool. virtual QAction *actionPan() = 0; - //! Get access to the native pan to selected action. Call trigger() on it to pan the map canvas to the selection. +%Docstring +Get access to the native pan action. Call trigger() on it to set the default pan map tool. + :rtype: QAction +%End virtual QAction *actionPanToSelected() = 0; - //! Get access to the native zoom in action. Call trigger() on it to set the default zoom in map tool. +%Docstring +Get access to the native pan to selected action. Call trigger() on it to pan the map canvas to the selection. + :rtype: QAction +%End virtual QAction *actionZoomIn() = 0; - //! Get access to the native zoom out action. Call trigger() on it to set the default zoom out map tool. +%Docstring +Get access to the native zoom in action. Call trigger() on it to set the default zoom in map tool. + :rtype: QAction +%End virtual QAction *actionZoomOut() = 0; - //! Get access to the native select action. Call trigger() on it to set the default select map tool. +%Docstring +Get access to the native zoom out action. Call trigger() on it to set the default zoom out map tool. + :rtype: QAction +%End virtual QAction *actionSelect() = 0; - //! Get access to the native select rectangle action. Call trigger() on it to set the default select rectangle map tool. +%Docstring +Get access to the native select action. Call trigger() on it to set the default select map tool. + :rtype: QAction +%End virtual QAction *actionSelectRectangle() = 0; - //! Get access to the native select polygon action. Call trigger() on it to set the default select polygon map tool. +%Docstring +Get access to the native select rectangle action. Call trigger() on it to set the default select rectangle map tool. + :rtype: QAction +%End virtual QAction *actionSelectPolygon() = 0; - //! Get access to the native select freehand action. Call trigger() on it to set the default select freehand map tool. +%Docstring +Get access to the native select polygon action. Call trigger() on it to set the default select polygon map tool. + :rtype: QAction +%End virtual QAction *actionSelectFreehand() = 0; - //! Get access to the native select radius action. Call trigger() on it to set the default select radius map tool. +%Docstring +Get access to the native select freehand action. Call trigger() on it to set the default select freehand map tool. + :rtype: QAction +%End virtual QAction *actionSelectRadius() = 0; - //! Get access to the native identify action. Call trigger() on it to set the default identify map tool. +%Docstring +Get access to the native select radius action. Call trigger() on it to set the default select radius map tool. + :rtype: QAction +%End virtual QAction *actionIdentify() = 0; - //! Get access to the native run action feature action. Call trigger() on it to set the default run feature action map tool. +%Docstring +Get access to the native identify action. Call trigger() on it to set the default identify map tool. + :rtype: QAction +%End virtual QAction *actionFeatureAction() = 0; - //! Get access to the native measure action. Call trigger() on it to set the default measure map tool. +%Docstring +Get access to the native run action feature action. Call trigger() on it to set the default run feature action map tool. + :rtype: QAction +%End virtual QAction *actionMeasure() = 0; - //! Get access to the native measure area action. Call trigger() on it to set the default measure area map tool. +%Docstring +Get access to the native measure action. Call trigger() on it to set the default measure map tool. + :rtype: QAction +%End virtual QAction *actionMeasureArea() = 0; - //! Get access to the native zoom full extent action. Call trigger() on it to zoom to the full extent. +%Docstring +Get access to the native measure area action. Call trigger() on it to set the default measure area map tool. + :rtype: QAction +%End virtual QAction *actionZoomFullExtent() = 0; - //! Get access to the native zoom to layer action. Call trigger() on it to zoom to the active layer. +%Docstring +Get access to the native zoom full extent action. Call trigger() on it to zoom to the full extent. + :rtype: QAction +%End virtual QAction *actionZoomToLayer() = 0; - //! Get access to the native zoom to selected action. Call trigger() on it to zoom to the current selection. +%Docstring +Get access to the native zoom to layer action. Call trigger() on it to zoom to the active layer. + :rtype: QAction +%End virtual QAction *actionZoomToSelected() = 0; - //! Get access to the native zoom last action. Call trigger() on it to zoom to last. +%Docstring +Get access to the native zoom to selected action. Call trigger() on it to zoom to the current selection. + :rtype: QAction +%End virtual QAction *actionZoomLast() = 0; - //! Get access to the native zoom next action. Call trigger() on it to zoom to next. +%Docstring +Get access to the native zoom last action. Call trigger() on it to zoom to last. + :rtype: QAction +%End virtual QAction *actionZoomNext() = 0; - //! Get access to the native zoom resolution (100%) action. Call trigger() on it to zoom to actual size. +%Docstring +Get access to the native zoom next action. Call trigger() on it to zoom to next. + :rtype: QAction +%End virtual QAction *actionZoomActualSize() = 0; - //! Get access to the native map tips action. Call trigger() on it to toggle map tips. +%Docstring +Get access to the native zoom resolution (100%) action. Call trigger() on it to zoom to actual size. + :rtype: QAction +%End virtual QAction *actionMapTips() = 0; - //! Get access to the native new bookmark action. Call trigger() on it to open the new bookmark dialog. +%Docstring +Get access to the native map tips action. Call trigger() on it to toggle map tips. + :rtype: QAction +%End virtual QAction *actionNewBookmark() = 0; - //! Get access to the native show bookmarks action. Call trigger() on it to open the bookmarks dialog. +%Docstring +Get access to the native new bookmark action. Call trigger() on it to open the new bookmark dialog. + :rtype: QAction +%End virtual QAction *actionShowBookmarks() = 0; - //! Get access to the native draw action. +%Docstring +Get access to the native show bookmarks action. Call trigger() on it to open the bookmarks dialog. + :rtype: QAction +%End virtual QAction *actionDraw() = 0; +%Docstring +Get access to the native draw action. + :rtype: QAction +%End - // Layer menu actions virtual QAction *actionNewVectorLayer() = 0; +%Docstring + :rtype: QAction +%End virtual QAction *actionAddOgrLayer() = 0; +%Docstring + :rtype: QAction +%End virtual QAction *actionAddRasterLayer() = 0; +%Docstring + :rtype: QAction +%End virtual QAction *actionAddPgLayer() = 0; +%Docstring + :rtype: QAction +%End virtual QAction *actionAddWmsLayer() = 0; - /** Get access to the native Add ArcGIS FeatureServer action. */ +%Docstring + :rtype: QAction +%End virtual QAction *actionAddAfsLayer() = 0; - /** Get access to the native Add ArcGIS MapServer action. */ +%Docstring +Get access to the native Add ArcGIS FeatureServer action. + :rtype: QAction +%End virtual QAction *actionAddAmsLayer() = 0; +%Docstring +Get access to the native Add ArcGIS MapServer action. + :rtype: QAction +%End virtual QAction *actionCopyLayerStyle() = 0; +%Docstring + :rtype: QAction +%End virtual QAction *actionPasteLayerStyle() = 0; +%Docstring + :rtype: QAction +%End virtual QAction *actionOpenTable() = 0; +%Docstring + :rtype: QAction +%End virtual QAction *actionOpenFieldCalculator() = 0; +%Docstring + :rtype: QAction +%End virtual QAction *actionToggleEditing() = 0; +%Docstring + :rtype: QAction +%End virtual QAction *actionSaveActiveLayerEdits() = 0; +%Docstring + :rtype: QAction +%End virtual QAction *actionAllEdits() = 0; +%Docstring + :rtype: QAction +%End virtual QAction *actionSaveEdits() = 0; +%Docstring + :rtype: QAction +%End virtual QAction *actionSaveAllEdits() = 0; +%Docstring + :rtype: QAction +%End virtual QAction *actionRollbackEdits() = 0; +%Docstring + :rtype: QAction +%End virtual QAction *actionRollbackAllEdits() = 0; +%Docstring + :rtype: QAction +%End virtual QAction *actionCancelEdits() = 0; +%Docstring + :rtype: QAction +%End virtual QAction *actionCancelAllEdits() = 0; +%Docstring + :rtype: QAction +%End virtual QAction *actionLayerSaveAs() = 0; +%Docstring + :rtype: QAction +%End virtual QAction *actionDuplicateLayer() = 0; +%Docstring + :rtype: QAction +%End virtual QAction *actionLayerProperties() = 0; +%Docstring + :rtype: QAction +%End virtual QAction *actionAddToOverview() = 0; +%Docstring + :rtype: QAction +%End virtual QAction *actionAddAllToOverview() = 0; +%Docstring + :rtype: QAction +%End virtual QAction *actionRemoveAllFromOverview() = 0; +%Docstring + :rtype: QAction +%End virtual QAction *actionHideAllLayers() = 0; +%Docstring + :rtype: QAction +%End virtual QAction *actionShowAllLayers() = 0; +%Docstring + :rtype: QAction +%End virtual QAction *actionHideSelectedLayers() = 0; - /** - * Returns the Hide Deselected Layers action. - * @note added in QGIS 3.0 - */ +%Docstring + :rtype: QAction +%End + virtual QAction *actionHideDeselectedLayers() = 0; +%Docstring + Returns the Hide Deselected Layers action. +.. versionadded:: 3.0 + :rtype: QAction +%End virtual QAction *actionShowSelectedLayers() = 0; +%Docstring + :rtype: QAction +%End - // Plugin menu actions virtual QAction *actionManagePlugins() = 0; +%Docstring + :rtype: QAction +%End virtual QAction *actionPluginListSeparator() = 0; +%Docstring + :rtype: QAction +%End virtual QAction *actionShowPythonDialog() = 0; +%Docstring + :rtype: QAction +%End - // Settings menu actions virtual QAction *actionToggleFullScreen() = 0; +%Docstring + :rtype: QAction +%End virtual QAction *actionOptions() = 0; +%Docstring + :rtype: QAction +%End virtual QAction *actionCustomProjection() = 0; +%Docstring + :rtype: QAction +%End - // Help menu actions virtual QAction *actionHelpContents() = 0; +%Docstring + :rtype: QAction +%End virtual QAction *actionQgisHomePage() = 0; +%Docstring + :rtype: QAction +%End virtual QAction *actionCheckQgisVersion() = 0; +%Docstring + :rtype: QAction +%End virtual QAction *actionAbout() = 0; +%Docstring + :rtype: QAction +%End - /** - * Open feature form - * @param l vector layer - * @param f feature to show/modify - * @param updateFeatureOnly only update the feature update (don't change any attributes of the layer) [UNUSED] - * @param showModal if true, will wait for the dialog to be executed (only shown otherwise) - */ virtual bool openFeatureForm( QgsVectorLayer *l, QgsFeature &f, bool updateFeatureOnly = false, bool showModal = true ) = 0; +%Docstring + Open feature form + \param l vector layer + \param f feature to show/modify + \param updateFeatureOnly only update the feature update (don't change any attributes of the layer) [UNUSED] + \param showModal if true, will wait for the dialog to be executed (only shown otherwise) + :rtype: bool +%End - /** - * Returns a feature form for a given feature - * - * @param l The layer for which the dialog will be created - * @param f The feature for which the dialog will be created - * - * @return A feature form - */ virtual QgsAttributeDialog *getFeatureForm( QgsVectorLayer *l, QgsFeature &f ) = 0; +%Docstring + Returns a feature form for a given feature + + \param l The layer for which the dialog will be created + \param f The feature for which the dialog will be created + + :return: A feature form + :rtype: QgsAttributeDialog +%End - /** - * Access the vector layer tools instance. - * With the help of this you can access methods like addFeature, startEditing - * or stopEditing while giving the user the appropriate dialogs. - * - * @return An instance of the vector layer tools - */ virtual QgsVectorLayerTools *vectorLayerTools() = 0; +%Docstring + Access the vector layer tools instance. + With the help of this you can access methods like addFeature, startEditing + or stopEditing while giving the user the appropriate dialogs. + + :return: An instance of the vector layer tools + :rtype: QgsVectorLayerTools +%End - /** This method is only needed when using a UI form with a custom widget plugin and calling - * openFeatureForm or getFeatureForm from Python (PyQt4) and you haven't used the info tool first. - * Python will crash bringing QGIS with it - * if the custom form is not loaded from a C++ method call. - * - * This method uses a QTimer to call QUiLoader in order to load the form via C++ - * you only need to call this once after that you can call openFeatureForm/getFeatureForm - * like normal - * - * More information here: http://qt-project.org/forums/viewthread/27098/ - */ virtual void preloadForm( const QString &uifile ) = 0; +%Docstring + This method is only needed when using a UI form with a custom widget plugin and calling + openFeatureForm or getFeatureForm from Python (PyQt4) and you haven't used the info tool first. + Python will crash bringing QGIS with it + if the custom form is not loaded from a C++ method call. + + This method uses a QTimer to call QUiLoader in order to load the form via C++ + you only need to call this once after that you can call openFeatureForm/getFeatureForm + like normal + + More information here: http://qt-project.org/forums/viewthread/27098 +%End - /** Return vector layers in edit mode - * @param modified whether to return only layers that have been modified - * @returns list of layers in legend order, or empty list */ virtual QList editableLayers( bool modified = false ) const = 0; +%Docstring + Return vector layers in edit mode + \param modified whether to return only layers that have been modified + :return: list of layers in legend order, or empty list * + :rtype: list of QgsMapLayer +%End - /** Get timeout for timed messages: default of 5 seconds */ virtual int messageTimeout() = 0; +%Docstring +Get timeout for timed messages: default of 5 seconds + :rtype: int +%End - virtual QgsStatusBar *statusBarIface() = 0; + virtual QgsStatusBar *statusBarIface() = 0; +%Docstring + Returns a pointer to the app's status bar interface. This should be + used for interacting and adding widgets and messages to the app's + status bar (do not use the native Qt statusBar() method). +.. versionadded:: 3.0 + :rtype: QgsStatusBar +%End - /** - * Registers a locator \a filter for the app's locator bar. Ownership of the filter is transferred to the - * locator. - * \warning Plugins which register filters to the locator bar must take care to correctly call - * deregisterLocatorFilter() and deregister their filters upon plugin unload to avoid crashes. - * \see deregisterLocatorFilter() - * \since QGIS 3.0 - */ virtual void registerLocatorFilter( QgsLocatorFilter *filter /Transfer/ ) = 0; +%Docstring + Registers a locator ``filter`` for the app's locator bar. Ownership of the filter is transferred to the + locator. + \warning Plugins which register filters to the locator bar must take care to correctly call + deregisterLocatorFilter() and deregister their filters upon plugin unload to avoid crashes. +.. seealso:: deregisterLocatorFilter() +.. versionadded:: 3.0 +%End - /** - * Deregisters a locator \a filter from the app's locator bar and deletes it. Calling this will block whilst - * any currently running query is terminated. - * - * Plugins which register filters to the locator bar must take care to correctly call - * deregisterLocatorFilter() to deregister their filters upon plugin unload to avoid crashes. - * - * \see registerLocatorFilter() - * \since QGIS 3.0 - */ virtual void deregisterLocatorFilter( QgsLocatorFilter *filter ) = 0; +%Docstring + Deregisters a locator ``filter`` from the app's locator bar and deletes it. Calling this will block whilst + any currently running query is terminated. + + Plugins which register filters to the locator bar must take care to correctly call + deregisterLocatorFilter() to deregister their filters upon plugin unload to avoid crashes. + +.. seealso:: registerLocatorFilter() +.. versionadded:: 3.0 +%End + signals: - void currentLayerChanged( QgsMapLayer *layer ); - void currentThemeChanged( const QString &theme ); - void composerOpened( QgsComposerInterface *composer ); - void composerWillBeClosed( QgsComposerInterface *composer ); - void composerClosed( QgsComposerInterface *composer ); - void initializationCompleted(); - /** Emitted when a project file is successfully read - * @note - * This is useful for plug-ins that store properties with project files. A - * plug-in can connect to this signal. When it is emitted, the plug-in - * knows to then check the project properties for any relevant state. - */ - void projectRead(); - /** Emitted when starting an entirely new project - * @note - * This is similar to projectRead(); plug-ins might want to be notified - * that they're in a new project. Yes, projectRead() could have been - * overloaded to be used in the case of new projects instead. However, - * it's probably more semantically correct to have an entirely separate - * signal for when this happens. - */ - void newProjectCreated(); - /** This signal is emitted when a layer has been saved using save as - * @note - * added in version 2.7 - */ + void currentLayerChanged( QgsMapLayer *layer ); +%Docstring + Emitted whenever current (selected) layer changes. + The pointer to layer can be null if no layer is selected +%End + + void currentThemeChanged( const QString &theme ); +%Docstring + Signal emitted when the current ``theme`` is changed so plugins + can change their tool button icons. +.. versionadded:: 3.0 +%End + + void composerOpened( QgsComposerInterface *composer ); +%Docstring + This signal is emitted when a new composer window has been opened. +.. versionadded:: 3.0 +.. seealso:: composerWillBeClosed() +%End + + void composerWillBeClosed( QgsComposerInterface *composer ); +%Docstring + This signal is emitted before a composer window is going to be closed + and deleted. +.. versionadded:: 3.0 +.. seealso:: composerClosed() +.. seealso:: composerOpened() +%End + + void composerClosed( QgsComposerInterface *composer ); +%Docstring + This signal is emitted after a composer window is closed. +.. versionadded:: 3.0 +.. seealso:: composerWillBeClosed() +.. seealso:: composerOpened() +%End + + void initializationCompleted(); +%Docstring + This signal is emitted when the initialization is complete +%End + + void projectRead(); +%Docstring + Emitted when a project file is successfully read + \note + This is useful for plug-ins that store properties with project files. A + plug-in can connect to this signal. When it is emitted, the plug-in + knows to then check the project properties for any relevant state. +%End + + void newProjectCreated(); +%Docstring + Emitted when starting an entirely new project + \note + This is similar to projectRead(); plug-ins might want to be notified + that they're in a new project. Yes, projectRead() could have been + overloaded to be used in the case of new projects instead. However, + it's probably more semantically correct to have an entirely separate + signal for when this happens. +%End + void layerSavedAs( QgsMapLayer *l, const QString &path ); +%Docstring + This signal is emitted when a layer has been saved using save as + \note + added in version 2.7 +%End }; + +/************************************************************************ + * This file has been generated automatically from * + * * + * src/gui/qgisinterface.h * + * * + * Do not edit manually ! Edit header and run scripts/sipify.pl again * + ************************************************************************/ diff --git a/python/gui/qgsactionmenu.sip b/python/gui/qgsactionmenu.sip index efa70b0833b..e011d4874df 100644 --- a/python/gui/qgsactionmenu.sip +++ b/python/gui/qgsactionmenu.sip @@ -1,19 +1,31 @@ -/** - * This class is a menu that is populated automatically with the actions defined for a given layer. - */ +/************************************************************************ + * This file has been generated automatically from * + * * + * src/gui/qgsactionmenu.h * + * * + * Do not edit manually ! Edit header and run scripts/sipify.pl again * + ************************************************************************/ + + + + + class QgsActionMenu : QMenu { -%TypeHeaderCode -#include +%Docstring + This class is a menu that is populated automatically with the actions defined for a given layer. %End +%TypeHeaderCode +#include "qgsactionmenu.h" +%End public: enum ActionType { - Invalid, //!< Invalid - MapLayerAction, //!< Standard actions (defined by core or plugins) - AttributeAction //!< Custom actions (manually defined in layer properties) + Invalid, + MapLayerAction, + AttributeAction }; struct ActionData @@ -22,47 +34,52 @@ class QgsActionMenu : QMenu ActionData( const QgsAction &action, QgsFeatureId featureId, QgsMapLayer *mapLayer ); ActionData( QgsMapLayerAction *action, QgsFeatureId featureId, QgsMapLayer *mapLayer ); - QgsActionMenu::ActionType actionType; + ActionType actionType; QVariant actionData; QgsFeatureId featureId; QgsMapLayer *mapLayer; }; - /** - * Constructs a new QgsActionMenu - * - * @param layer The layer that this action will be run upon. - * @param feature The feature that this action will be run upon. Make sure that this feature is available - * for the lifetime of this object. - * @param parent The usual QWidget parent. - * @param actionScope The action scope this menu will run in - */ explicit QgsActionMenu( QgsVectorLayer *layer, const QgsFeature &feature, const QString &actionScope, QWidget *parent /TransferThis/ = 0 ); +%Docstring + Constructs a new QgsActionMenu + + \param layer The layer that this action will be run upon. + \param feature The feature that this action will be run upon. Make sure that this feature is available + for the lifetime of this object. + \param parent The usual QWidget parent. + \param actionScope The action scope this menu will run in +%End - /** - * Constructs a new QgsActionMenu - * - * @param layer The layer that this action will be run upon. - * @param fid The feature id of the feature for which this action will be run. - * @param parent The usual QWidget parent. - * @param actionScope The action scope this menu will run in - */ explicit QgsActionMenu( QgsVectorLayer *layer, const QgsFeatureId fid, const QString &actionScope, QWidget *parent /TransferThis/ = 0 ); +%Docstring + Constructs a new QgsActionMenu - /** - * Destructor - */ - ~QgsActionMenu(); + \param layer The layer that this action will be run upon. + \param fid The feature id of the feature for which this action will be run. + \param parent The usual QWidget parent. + \param actionScope The action scope this menu will run in +%End - /** - * Change the feature on which actions are performed - * - * @param feature A feature. Will not take ownership. It's the callers responsibility to keep the feature - * as long as the menu is displayed and the action is running. - */ void setFeature( const QgsFeature &feature ); +%Docstring + Change the feature on which actions are performed + + \param feature A feature. Will not take ownership. It's the callers responsibility to keep the feature + as long as the menu is displayed and the action is running. +%End signals: void reinit(); }; + + + +/************************************************************************ + * This file has been generated automatically from * + * * + * src/gui/qgsactionmenu.h * + * * + * Do not edit manually ! Edit header and run scripts/sipify.pl again * + ************************************************************************/ diff --git a/python/gui/qgsadvanceddigitizingcanvasitem.sip b/python/gui/qgsadvanceddigitizingcanvasitem.sip index ff8d1053844..e413bcb0c3a 100644 --- a/python/gui/qgsadvanceddigitizingcanvasitem.sip +++ b/python/gui/qgsadvanceddigitizingcanvasitem.sip @@ -1,16 +1,38 @@ -/** - * @brief The QgsAdvancedDigitizingCanvasItem class draws the graphical elements of the CAD tools (@see QgsAdvancedDigitizingDockWidget) on the map canvas. - */ +/************************************************************************ + * This file has been generated automatically from * + * * + * src/gui/qgsadvanceddigitizingcanvasitem.h * + * * + * Do not edit manually ! Edit header and run scripts/sipify.pl again * + ************************************************************************/ + + + + class QgsAdvancedDigitizingCanvasItem : QgsMapCanvasItem { +%Docstring +.. seealso:: QgsAdvancedDigitizingDockWidget) on the map canvas. +%End + %TypeHeaderCode -#include +#include "qgsadvanceddigitizingcanvasitem.h" %End public: - explicit QgsAdvancedDigitizingCanvasItem( QgsMapCanvas *canvas, QgsAdvancedDigitizingDockWidget *cadDockWidget ); - ~QgsAdvancedDigitizingCanvasItem(); - void paint( QPainter *painter ); + virtual void paint( QPainter *painter ); + + + protected: + }; + +/************************************************************************ + * This file has been generated automatically from * + * * + * src/gui/qgsadvanceddigitizingcanvasitem.h * + * * + * Do not edit manually ! Edit header and run scripts/sipify.pl again * + ************************************************************************/ diff --git a/python/gui/qgsattributedialog.sip b/python/gui/qgsattributedialog.sip index 5697ed03df4..4911060b48e 100644 --- a/python/gui/qgsattributedialog.sip +++ b/python/gui/qgsattributedialog.sip @@ -1,83 +1,114 @@ +/************************************************************************ + * This file has been generated automatically from * + * * + * src/gui/qgsattributedialog.h * + * * + * Do not edit manually ! Edit header and run scripts/sipify.pl again * + ************************************************************************/ + + + + + class QgsAttributeDialog : QDialog { -%TypeHeaderCode -#include -%End +%TypeHeaderCode +#include "qgsattributedialog.h" +%End public: - /** - * Create an attribute dialog for a given layer and feature - * - * @param vl The layer for which the dialog will be generated - * @param thepFeature A feature for which the dialog will be generated - * @param featureOwner Set to true, if the dialog should take ownership of the feature - * @param parent A parent widget for the dialog - * @param showDialogButtons True: Show the dialog buttons accept/cancel - * @param context The context in which this dialog is created - * - */ QgsAttributeDialog( QgsVectorLayer *vl, QgsFeature *thepFeature, bool featureOwner, QWidget *parent /TransferThis/ = 0, bool showDialogButtons = true, const QgsAttributeEditorContext &context = QgsAttributeEditorContext() ); +%Docstring + Create an attribute dialog for a given layer and feature + + \param vl The layer for which the dialog will be generated + \param thepFeature A feature for which the dialog will be generated + \param featureOwner Set to true, if the dialog should take ownership of the feature + \param parent A parent widget for the dialog + \param showDialogButtons True: Show the dialog buttons accept/cancel + \param context The context in which this dialog is created +%End + + ~QgsAttributeDialog(); - /** Saves the size and position for the next time - * this dialog box will be used. - */ void saveGeometry(); +%Docstring + Saves the size and position for the next time + this dialog box will be used. +%End - /** Restores the size and position from the last time - * this dialog box was used. - */ void restoreGeometry(); +%Docstring + Restores the size and position from the last time + this dialog box was used. +%End - /** - * @brief setHighlight - * @param h The highlight. Ownership is taken. - */ void setHighlight( QgsHighlight *h ); +%Docstring + setHighlight + \param h The highlight. Ownership is taken. +%End QgsAttributeForm *attributeForm(); +%Docstring + :rtype: QgsAttributeForm +%End const QgsFeature *feature(); +%Docstring + :rtype: QgsFeature +%End - /** - * Is this dialog editable? - * - * @return returns true, if this dialog was created in an editable manner. - */ bool editable(); +%Docstring + Is this dialog editable? + + :return: returns true, if this dialog was created in an editable manner. + :rtype: bool +%End - /** - * Toggles the form mode. - * @param mode form mode. For example, if set to QgsAttributeForm::AddFeatureMode, the dialog will be editable even with an invalid feature and - * will add a new feature when the form is accepted. - */ void setMode( QgsAttributeForm::Mode mode ); +%Docstring + Toggles the form mode. + \param mode form mode. For example, if set to QgsAttributeForm.AddFeatureMode, the dialog will be editable even with an invalid feature and + will add a new feature when the form is accepted. +%End - /** - * Sets the edit command message (Undo) that will be used when the dialog is accepted - * - * @param message The message - */ void setEditCommandMessage( const QString &message ); +%Docstring + Sets the edit command message (Undo) that will be used when the dialog is accepted + + \param message The message +%End - /** - * Intercept window activate/deactive events to show/hide the highlighted feature. - * - * @param e The event - * - * @return The same as the parent QDialog - */ virtual bool event( QEvent *e ); +%Docstring + Intercept window activate/deactive events to show/hide the highlighted feature. + + \param e The event + + :return: The same as the parent QDialog + :rtype: bool +%End public slots: - void accept(); + virtual void accept(); + + virtual void reject(); + - //! Show the dialog non-blocking. Reparents this dialog to be a child of the dialog form and is deleted when - //! closed. void show(); +%Docstring +Show the dialog non-blocking. Reparents this dialog to be a child of the dialog form +%End - int exec(); - - protected: - bool eventFilter( QObject *obj, QEvent *e ); }; + +/************************************************************************ + * This file has been generated automatically from * + * * + * src/gui/qgsattributedialog.h * + * * + * Do not edit manually ! Edit header and run scripts/sipify.pl again * + ************************************************************************/ diff --git a/python/gui/qgsattributeeditorcontext.sip b/python/gui/qgsattributeeditorcontext.sip index b89474ebf73..461ca78c778 100644 --- a/python/gui/qgsattributeeditorcontext.sip +++ b/python/gui/qgsattributeeditorcontext.sip @@ -1,23 +1,34 @@ -/** - * This class contains context information for attribute editor widgets. - * It will be passed to embedded widgets whenever this occurs (e.g. when - * showing an embedded form due to relations) - */ +/************************************************************************ + * This file has been generated automatically from * + * * + * src/gui/qgsattributeeditorcontext.h * + * * + * Do not edit manually ! Edit header and run scripts/sipify.pl again * + ************************************************************************/ + + + + + class QgsAttributeEditorContext { +%Docstring + This class contains context information for attribute editor widgets. + It will be passed to embedded widgets whenever this occurs (e.g. when + showing an embedded form due to relations) +%End + %TypeHeaderCode #include "qgsattributeeditorcontext.h" %End public: - /** - * Determines in which direction a relation was resolved. - */ + enum RelationMode { - Undefined, //!< This context is not defined by a relation - Multiple, //!< When showing a list of features (e.g. houses as an embedded form in a district form) - Single //!< When showing a single feature (e.g. district information when looking at the form of a house) + Undefined, + Multiple, + Single }; enum FormMode @@ -28,45 +39,77 @@ class QgsAttributeEditorContext }; QgsAttributeEditorContext(); - QgsAttributeEditorContext( const QgsAttributeEditorContext &parentContext, FormMode formMode ); - QgsAttributeEditorContext( const QgsAttributeEditorContext &parentContext, const QgsRelation &relation, RelationMode relationMode, FormMode formMode ); + QgsAttributeEditorContext( const QgsAttributeEditorContext &parentContext, FormMode formMode ); + + QgsAttributeEditorContext( const QgsAttributeEditorContext &parentContext, const QgsRelation &relation, RelationMode relationMode, FormMode widgetMode ); void setDistanceArea( const QgsDistanceArea &distanceArea ); + const QgsDistanceArea &distanceArea() const; +%Docstring + :rtype: QgsDistanceArea +%End void setVectorLayerTools( QgsVectorLayerTools *vlTools ); const QgsVectorLayerTools *vectorLayerTools() const; +%Docstring + :rtype: QgsVectorLayerTools +%End void setRelation( const QgsRelation &relation, RelationMode mode ); const QgsRelation &relation() const; +%Docstring + :rtype: QgsRelation +%End RelationMode relationMode() const; +%Docstring + :rtype: RelationMode +%End - /** Returns the form mode. - * @see setFormMode() - */ FormMode formMode() const; +%Docstring + Returns the form mode. +.. seealso:: setFormMode() + :rtype: FormMode +%End - /** Sets the form mode. - * @param mode form mode - * @see formMode() - * @note added in QGIS 2.16 - */ void setFormMode( FormMode mode ); +%Docstring + Sets the form mode. + \param mode form mode +.. seealso:: formMode() +.. versionadded:: 2.16 +%End - /** Returns true if the attribute editor should permit use of custom UI forms. - * @see setAllowCustomUi() - * @note added in QGIS 2.16 - */ bool allowCustomUi() const; +%Docstring + Returns true if the attribute editor should permit use of custom UI forms. +.. seealso:: setAllowCustomUi() +.. versionadded:: 2.16 + :rtype: bool +%End - /** Sets whether the attribute editor should permit use of custom UI forms. - * @param allow set to true to allow custom UI forms, or false to disable them and use default generated - * QGIS forms - * @see allowCustomUi() - * @note added in QGIS 2.16 - */ void setAllowCustomUi( bool allow ); +%Docstring + Sets whether the attribute editor should permit use of custom UI forms. + \param allow set to true to allow custom UI forms, or false to disable them and use default generated + QGIS forms +.. seealso:: allowCustomUi() +.. versionadded:: 2.16 +%End const QgsAttributeEditorContext *parentContext() const; +%Docstring + :rtype: QgsAttributeEditorContext +%End + }; + +/************************************************************************ + * This file has been generated automatically from * + * * + * src/gui/qgsattributeeditorcontext.h * + * * + * Do not edit manually ! Edit header and run scripts/sipify.pl again * + ************************************************************************/ diff --git a/python/gui/qgsattributeform.sip b/python/gui/qgsattributeform.sip index 2278e1045a9..fe511fed6f1 100644 --- a/python/gui/qgsattributeform.sip +++ b/python/gui/qgsattributeform.sip @@ -1,210 +1,227 @@ -/*************************************************************************** - qgsattributeform.h - -------------------------------------- - Date : 3.5.2014 - Copyright : (C) 2014 Matthias Kuhn - Email : matthias at opengis 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. * - * * - ***************************************************************************/ +/************************************************************************ + * This file has been generated automatically from * + * * + * src/gui/qgsattributeform.h * + * * + * Do not edit manually ! Edit header and run scripts/sipify.pl again * + ************************************************************************/ + + + + + class QgsAttributeForm : QWidget { -%TypeHeaderCode -#include -%End +%TypeHeaderCode +#include "qgsattributeform.h" +%End public: - //! Form modes enum Mode { - SingleEditMode, /*!< Single edit mode, for editing a single feature */ - AddFeatureMode, /*!< Add feature mode, for setting attributes for a new feature. In this mode the dialog will be editable even with an invalid feature and - will add a new feature when the form is accepted. */ - MultiEditMode, /*!< Multi edit mode, for editing fields of multiple features at once */ - SearchMode, /*!< Form values are used for searching/filtering the layer */ + SingleEditMode, + AddFeatureMode, + MultiEditMode, + SearchMode, }; - //! Filter types enum FilterType { - ReplaceFilter, /*!< Filter should replace any existing filter */ - FilterAnd, /*!< Filter should be combined using "AND" */ - FilterOr, /*!< Filter should be combined using "OR" */ + ReplaceFilter, + FilterAnd, + FilterOr, }; - explicit QgsAttributeForm( QgsVectorLayer *vl, const QgsFeature &feature = QgsFeature(), const QgsAttributeEditorContext &context = QgsAttributeEditorContext(), QWidget *parent /TransferThis/ = 0 ); + explicit QgsAttributeForm( QgsVectorLayer *vl, const QgsFeature &feature = QgsFeature(), + const QgsAttributeEditorContext &context = QgsAttributeEditorContext(), QWidget *parent = 0 ); ~QgsAttributeForm(); const QgsFeature &feature(); +%Docstring + :rtype: QgsFeature +%End - /** - * Hides the button box (Ok/Cancel) and enables auto-commit - */ void hideButtonBox(); - /** - * Shows the button box (Ok/Cancel) and disables auto-commit - */ void showButtonBox(); - /** - * Disconnects the button box (Ok/Cancel) from the accept/resetValues slots - * If this method is called, you have to create these connections from outside - */ void disconnectButtonBox(); - /** - * Takes ownership - * @param iface - */ void addInterface( QgsAttributeFormInterface *iface /Transfer/ ); +%Docstring + Takes ownership + \param iface +%End - /** - * Returns the layer for which this form is shown - * - * @return Layer - */ QgsVectorLayer *layer(); +%Docstring + Returns the layer for which this form is shown + + :return: Layer + :rtype: QgsVectorLayer +%End - /** - * Returns if the form is currently in editable mode. - * - * @return Editable mode of this form - */ bool editable(); +%Docstring + Returns if the form is currently in editable mode. + + :return: Editable mode of this form + :rtype: bool +%End - /** Returns the current mode of the form. - * @note added in QGIS 2.16 - * @see setMode() - */ Mode mode() const; +%Docstring + Returns the current mode of the form. +.. versionadded:: 2.16 +.. seealso:: setMode() + :rtype: Mode +%End - /** Sets the current mode of the form. - * @param mode form mode - * @note added in QGIS 2.16 - * @see mode() - */ void setMode( Mode mode ); +%Docstring + Sets the current mode of the form. + \param mode form mode +.. versionadded:: 2.16 +.. seealso:: mode() +%End - /** - * Sets the edit command message (Undo) that will be used when the dialog is accepted - * - * @param message The message - */ void setEditCommandMessage( const QString &message ); +%Docstring + Sets the edit command message (Undo) that will be used when the dialog is accepted - /** - * Intercepts keypress on custom form (escape should not close it) - * - * @param object The object for which the event has been sent - * @param event The event which is being filtered - * - * @return true if the event has been handled (key was ESC) - */ - bool eventFilter( QObject *object, QEvent *event ); + \param message The message +%End + + virtual bool eventFilter( QObject *object, QEvent *event ); + +%Docstring + Intercepts keypress on custom form (escape should not close it) + + \param object The object for which the event has been sent + \param event The event which is being filtered + + :return: true if the event has been handled (key was ESC) + :rtype: bool +%End - /** Sets all feature IDs which are to be edited if the form is in multiedit mode - * @param fids feature ID list - * @note added in QGIS 2.16 - */ void setMultiEditFeatureIds( const QgsFeatureIds &fids ); +%Docstring + Sets all feature IDs which are to be edited if the form is in multiedit mode + \param fids feature ID list +.. versionadded:: 2.16 +%End - /** Sets the message bar to display feedback from the form in. This is used in the search/filter - * mode to display the count of selected features. - * @param messageBar target message bar - * @note added in QGIS 2.16 - */ void setMessageBar( QgsMessageBar *messageBar ); +%Docstring + Sets the message bar to display feedback from the form in. This is used in the search/filter + mode to display the count of selected features. + \param messageBar target message bar +.. versionadded:: 2.16 +%End signals: - /** - * Notifies about changes of attributes - * - * @param attribute The name of the attribute that changed. - * @param value The new value of the attribute. - */ + void attributeChanged( const QString &attribute, const QVariant &value ); +%Docstring + Notifies about changes of attributes - /** - * Will be emitted before the feature is saved. Use this signal to perform sanity checks. - * You can set the parameter ok to false to notify the form that you don't want it to be saved. - * If you want the form to be saved, leave the parameter untouched. - * - * @param ok Set this parameter to false if you don't want the form to be saved - * @note not available in python bindings - */ - // void beforeSave( bool &ok ); + \param attribute The name of the attribute that changed. + \param value The new value of the attribute. +%End + + void beforeSave( bool &ok ); +%Docstring + Will be emitted before the feature is saved. Use this signal to perform sanity checks. + You can set the parameter ok to false to notify the form that you don't want it to be saved. + If you want the form to be saved, leave the parameter untouched. + + \param ok Set this parameter to false if you don't want the form to be saved +.. note:: + + not available in Python bindings +%End - /** - * Is emitted, when a feature is changed or added - */ void featureSaved( const QgsFeature &feature ); +%Docstring + Is emitted, when a feature is changed or added +%End - /** Is emitted when a filter expression is set using the form. - * @param expression filter expression - * @param type filter type - * @note added in QGIS 2.16 - */ void filterExpressionSet( const QString &expression, QgsAttributeForm::FilterType type ); +%Docstring + Is emitted when a filter expression is set using the form. + \param expression filter expression + \param type filter type +.. versionadded:: 2.16 +%End - /** Emitted when the form changes mode. - * @param mode new mode - */ void modeChanged( QgsAttributeForm::Mode mode ); +%Docstring + Emitted when the form changes mode. + \param mode new mode +%End - /** Emitted when the user selects the close option from the form's button bar. - * @note added in QGIS 2.16 - */ void closed(); +%Docstring + Emitted when the user selects the close option from the form's button bar. +.. versionadded:: 2.16 +%End - /** - * Emitted when the user chooses to zoom to a filtered set of features. - * @note added in QGIS 3.0 - */ void zoomToFeatures( const QString &filter ); +%Docstring + Emitted when the user chooses to zoom to a filtered set of features. +.. versionadded:: 3.0 +%End public slots: - /** - * Call this to change the content of a given attribute. Will update the editor(s) related to this field. - * - * @param field The field to change - * @param value The new value - */ + void changeAttribute( const QString &field, const QVariant &value ); +%Docstring + Call this to change the content of a given attribute. Will update the editor(s) related to this field. + + \param field The field to change + \param value The new value +%End - /** - * Update all editors to correspond to a different feature. - * - * @param feature The feature which will be represented by the form - */ void setFeature( const QgsFeature &feature ); +%Docstring + Update all editors to correspond to a different feature. + + \param feature The feature which will be represented by the form +%End - /** - * Save all the values from the editors to the layer. - * - * @return True if successful - */ bool save(); +%Docstring + Save all the values from the editors to the layer. + + :return: True if successful + :rtype: bool +%End - /** - * Sets all values to the values of the current feature - */ void resetValues(); +%Docstring + Sets all values to the values of the current feature +%End - /** Resets the search/filter form values. - * @note added in QGIS 2.16 - */ void resetSearch(); +%Docstring + Resets the search/filter form values. +.. versionadded:: 2.16 +%End - /** - * reload current feature - */ void refreshFeature(); +%Docstring + reload current feature +%End + }; + + +/************************************************************************ + * This file has been generated automatically from * + * * + * src/gui/qgsattributeform.h * + * * + * Do not edit manually ! Edit header and run scripts/sipify.pl again * + ************************************************************************/ diff --git a/python/gui/qgsattributeformeditorwidget.sip b/python/gui/qgsattributeformeditorwidget.sip index 1cffcaec8f2..d1fe62a901d 100644 --- a/python/gui/qgsattributeformeditorwidget.sip +++ b/python/gui/qgsattributeformeditorwidget.sip @@ -1,130 +1,170 @@ -/** \ingroup gui - * \class QgsAttributeFormEditorWidget - * A widget consisting of both an editor widget and additional widgets for controlling the behavior - * of the editor widget depending on a number of possible modes. For instance, if the parent attribute - * form is in the multi edit mode, this widget will show both the editor widget and a tool button for - * controlling the multi edit results. - * \note Added in version 2.16 - */ +/************************************************************************ + * This file has been generated automatically from * + * * + * src/gui/qgsattributeformeditorwidget.h * + * * + * Do not edit manually ! Edit header and run scripts/sipify.pl again * + ************************************************************************/ + + + + class QgsAttributeFormEditorWidget : QWidget { -%TypeHeaderCode -#include +%Docstring + A widget consisting of both an editor widget and additional widgets for controlling the behavior + of the editor widget depending on a number of possible modes. For instance, if the parent attribute + form is in the multi edit mode, this widget will show both the editor widget and a tool button for + controlling the multi edit results. +.. versionadded:: 2.16 %End +%TypeHeaderCode +#include "qgsattributeformeditorwidget.h" +%End public: - //! Widget modes enum Mode { - DefaultMode, /*!< Default mode, only the editor widget is shown */ - MultiEditMode, /*!< Multi edit mode, both the editor widget and a QgsMultiEditToolButton is shown */ - SearchMode, /*!< Layer search/filter mode */ + DefaultMode, + MultiEditMode, + SearchMode, }; - /** Constructor for QgsAttributeFormEditorWidget. - * @param editorWidget associated editor widget wrapper (for default/edit modes) - * @param form parent attribute form - */ - explicit QgsAttributeFormEditorWidget( QgsEditorWidgetWrapper* editorWidget, + explicit QgsAttributeFormEditorWidget( QgsEditorWidgetWrapper *editorWidget, QgsAttributeForm *form /TransferThis/ ); +%Docstring + Constructor for QgsAttributeFormEditorWidget. + \param editorWidget associated editor widget wrapper (for default/edit modes) + \param form parent attribute form +%End + ~QgsAttributeFormEditorWidget(); - /** Creates the search widget wrappers for the widget used when the form is in - * search mode. - * @param widgetId id of the widget type to create a search wrapper for - * @param fieldIdx index of field associated with widget - * @param config configuration which should be used for the widget creation - * @param context editor context (not available in python bindings) - */ - void createSearchWidgetWrappers( const QString& widgetId, int fieldIdx, - const QVariantMap& config, - const QgsAttributeEditorContext &context = QgsAttributeEditorContext() ); - /** Sets the current mode for the widget. The widget will adapt its state and visible widgets to - * reflect the updated mode. For example, showing multi edit tool buttons if the mode is set to MultiEditMode. - * @param mode widget mode - * @see mode() - */ void setMode( Mode mode ); +%Docstring + Sets the current mode for the widget. The widget will adapt its state and visible widgets to + reflect the updated mode. For example, showing multi edit tool buttons if the mode is set to MultiEditMode. + \param mode widget mode +.. seealso:: mode() +%End - /** Returns the current mode for the widget. - * @see setMode() - */ Mode mode() const; +%Docstring + Returns the current mode for the widget. +.. seealso:: setMode() + :rtype: Mode +%End - /** Resets the widget to an initial value. - * @param initialValue initial value to show in widget - * @param mixedValues set to true to initially show the mixed values state - */ void initialize( const QVariant &initialValue, bool mixedValues = false ); +%Docstring + Resets the widget to an initial value. + \param initialValue initial value to show in widget + \param mixedValues set to true to initially show the mixed values state +%End - /** Returns true if the widget's value has been changed since it was initialized. - * @see initialize() - */ bool hasChanged() const; +%Docstring + Returns true if the widget's value has been changed since it was initialized. +.. seealso:: initialize() + :rtype: bool +%End - /** Returns the current value of the attached editor widget. - */ QVariant currentValue() const; +%Docstring + Returns the current value of the attached editor widget. + :rtype: QVariant +%End - /** Creates an expression matching the current search filter value and - * search properties represented in the widget. - * @note added in QGIS 2.16 - */ QString currentFilterExpression() const; +%Docstring + Creates an expression matching the current search filter value and + search properties represented in the widget. +.. versionadded:: 2.16 + :rtype: str +%End public slots: - /** Sets whether the widget should be displayed in a "mixed values" mode. - * @param mixed set to true to show in a mixed values state - */ void setIsMixed( bool mixed ); +%Docstring + Sets whether the widget should be displayed in a "mixed values" mode. + \param mixed set to true to show in a mixed values state +%End - /* *Called when field values have been committed; - */ void changesCommitted(); +%Docstring + Called when field values have been committed; +%End - /** Resets the search/filter value of the widget. - */ void resetSearch(); +%Docstring + Resets the search/filter value of the widget. +%End signals: - //! Emitted when the widget's value changes - //! @param value new widget value void valueChanged( const QVariant &value ); +%Docstring +\param value new widget value +%End protected: - /** Returns a pointer to the search widget tool button in the widget. - * @note this method is in place for unit testing only, and is not considered - * stable API - */ QgsSearchWidgetToolButton *searchWidgetToolButton(); +%Docstring + Returns a pointer to the search widget tool button in the widget. +.. note:: + + this method is in place for unit testing only, and is not considered + stable API + :rtype: QgsSearchWidgetToolButton +%End - /** Sets the search widget wrapper for the widget used when the form is in - * search mode. - * @param wrapper search widget wrapper. - * @note the search widget wrapper should be created using searchWidgetFrame() - * as its parent - * @note this method is in place for unit testing only, and is not considered - * stable AP - */ void setSearchWidgetWrapper( QgsSearchWidgetWrapper *wrapper ); +%Docstring + Sets the search widget wrapper for the widget used when the form is in + search mode. + \param wrapper search widget wrapper. +.. note:: + + the search widget wrapper should be created using searchWidgetFrame() + as its parent +.. note:: + + this method is in place for unit testing only, and is not considered + stable AP +%End - /** Returns the widget which should be used as a parent during construction - * of the search widget wrapper. - * @note this method is in place for unit testing only, and is not considered - * stable AP - */ QWidget *searchWidgetFrame(); +%Docstring + Returns the widget which should be used as a parent during construction + of the search widget wrapper. +.. note:: - /** Returns the search widget wrapper used in this widget. The wrapper must - * first be created using createSearchWidgetWrapper() - * @note this method is in place for unit testing only, and is not considered - * stable AP - */ - QList< QgsSearchWidgetWrapper* > searchWidgetWrappers(); + this method is in place for unit testing only, and is not considered + stable AP + :rtype: QWidget +%End + + QList< QgsSearchWidgetWrapper * > searchWidgetWrappers(); +%Docstring + Returns the search widget wrapper used in this widget. The wrapper must + first be created using createSearchWidgetWrapper() +.. note:: + + this method is in place for unit testing only, and is not considered + stable AP + :rtype: list of QgsSearchWidgetWrapper +%End }; + +/************************************************************************ + * This file has been generated automatically from * + * * + * src/gui/qgsattributeformeditorwidget.h * + * * + * Do not edit manually ! Edit header and run scripts/sipify.pl again * + ************************************************************************/ diff --git a/python/gui/qgsattributeforminterface.sip b/python/gui/qgsattributeforminterface.sip index affa2831a1d..55d5520b133 100644 --- a/python/gui/qgsattributeforminterface.sip +++ b/python/gui/qgsattributeforminterface.sip @@ -1,33 +1,50 @@ -/*************************************************************************** - qgsattributeforminterface.sip - -------------------------------------- - Date : 12.5.2014 - Copyright : (C) 2014 Matthias Kuhn - Email : matthias at opengis 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. * - * * - ***************************************************************************/ +/************************************************************************ + * This file has been generated automatically from * + * * + * src/gui/qgsattributeforminterface.h * + * * + * Do not edit manually ! Edit header and run scripts/sipify.pl again * + ************************************************************************/ + + + class QgsAttributeFormInterface { + %TypeHeaderCode -#include +#include "qgsattributeforminterface.h" %End public: explicit QgsAttributeFormInterface( QgsAttributeForm *form ); + virtual ~QgsAttributeFormInterface(); + virtual bool acceptChanges( const QgsFeature &feature ); +%Docstring + :rtype: bool +%End virtual void initForm(); virtual void featureChanged(); QgsAttributeForm *form(); +%Docstring + :rtype: QgsAttributeForm +%End const QgsFeature &feature(); +%Docstring + :rtype: QgsFeature +%End + }; + +/************************************************************************ + * This file has been generated automatically from * + * * + * src/gui/qgsattributeforminterface.h * + * * + * Do not edit manually ! Edit header and run scripts/sipify.pl again * + ************************************************************************/ diff --git a/python/gui/qgsattributetypeloaddialog.sip b/python/gui/qgsattributetypeloaddialog.sip index a92d4f287ad..50cfbc16f16 100644 --- a/python/gui/qgsattributetypeloaddialog.sip +++ b/python/gui/qgsattributetypeloaddialog.sip @@ -1,35 +1,58 @@ -class QgsAttributeTypeLoadDialog : QDialog +/************************************************************************ + * This file has been generated automatically from * + * * + * src/gui/qgsattributetypeloaddialog.h * + * * + * Do not edit manually ! Edit header and run scripts/sipify.pl again * + ************************************************************************/ + + + + + +class QgsAttributeTypeLoadDialog: QDialog { + %TypeHeaderCode -#include +#include "qgsattributetypeloaddialog.h" %End public: QgsAttributeTypeLoadDialog( QgsVectorLayer *vl ); - ~QgsAttributeTypeLoadDialog(); - /** - * Overloaded accept method which will write the feature field - * values, then delegate to QDialog::accept() - */ - void accept(); + virtual void accept(); + +%Docstring + Overloaded accept method which will write the feature field + values, then delegate to QDialog.accept() +%End - /** - * Sets predefined vector layer for selection of data - * @param layer Vector layer which is to be set as predefined one - */ void setVectorLayer( QgsVectorLayer *layer ); +%Docstring + Sets predefined vector layer for selection of data + \param layer Vector layer which is to be set as predefined one +%End - /** - * Getter to value map which is currently active - * @return value map of vlues selected from layer - */ QMap &valueMap(); +%Docstring + Getter to value map which is currently active + :return: value map of vlues selected from layer + :rtype: QMap +%End - /** - * Returns true if the "Add NULL value" checkbox has been checked. - * - * @return true if the "Add NULL value" checkbox has been checked. - */ bool insertNull(); +%Docstring + Returns true if the "Add NULL value" checkbox has been checked. + + :return: true if the "Add NULL value" checkbox has been checked. + :rtype: bool +%End }; + +/************************************************************************ + * This file has been generated automatically from * + * * + * src/gui/qgsattributetypeloaddialog.h * + * * + * Do not edit manually ! Edit header and run scripts/sipify.pl again * + ************************************************************************/ diff --git a/python/gui/qgsblendmodecombobox.sip b/python/gui/qgsblendmodecombobox.sip index 57620d1a7ca..ae1725847aa 100644 --- a/python/gui/qgsblendmodecombobox.sip +++ b/python/gui/qgsblendmodecombobox.sip @@ -1,21 +1,50 @@ -/** \ingroup gui - * A combobox which lets the user select blend modes from a predefined list - **/ +/************************************************************************ + * This file has been generated automatically from * + * * + * src/gui/qgsblendmodecombobox.h * + * * + * Do not edit manually ! Edit header and run scripts/sipify.pl again * + ************************************************************************/ + + + + class QgsBlendModeComboBox : QComboBox { +%Docstring + A combobox which lets the user select blend modes from a predefined list +* +%End + %TypeHeaderCode -#include +#include "qgsblendmodecombobox.h" %End public: QgsBlendModeComboBox( QWidget *parent /TransferThis/ = 0 ); - virtual ~QgsBlendModeComboBox(); - //! Function to read the selected blend mode as QPainter::CompositionMode QPainter::CompositionMode blendMode(); - //! Function to set the selected blend mode from QPainter::CompositionMode +%Docstring +Function to read the selected blend mode as QPainter.CompositionMode + :rtype: QPainter.CompositionMode +%End void setBlendMode( QPainter::CompositionMode blendMode ); - +%Docstring +Function to set the selected blend mode from QPainter.CompositionMode +%End public slots: + void updateModes(); +%Docstring + Populates the blend mode combo box, and sets up mapping for + blend modes to combo box indexes +%End }; + +/************************************************************************ + * This file has been generated automatically from * + * * + * src/gui/qgsblendmodecombobox.h * + * * + * Do not edit manually ! Edit header and run scripts/sipify.pl again * + ************************************************************************/ diff --git a/python/gui/qgsbrowsertreeview.sip b/python/gui/qgsbrowsertreeview.sip index fe2662521e1..facdb055f09 100644 --- a/python/gui/qgsbrowsertreeview.sip +++ b/python/gui/qgsbrowsertreeview.sip @@ -1,29 +1,49 @@ -/** - * The QgsBrowserTreeView class extends QTreeView with save/restore tree state functionality. - * - * @see QgsBrowserModel - * @note added in 2.8 - */ -class QgsBrowserTreeView: QTreeView +/************************************************************************ + * This file has been generated automatically from * + * * + * src/gui/qgsbrowsertreeview.h * + * * + * Do not edit manually ! Edit header and run scripts/sipify.pl again * + ************************************************************************/ + + + + +class QgsBrowserTreeView : QTreeView { -%TypeHeaderCode -#include +%Docstring + The QgsBrowserTreeView class extends QTreeView with save/restore tree state functionality. + +.. seealso:: QgsBrowserModel +.. versionadded:: 2.8 %End +%TypeHeaderCode +#include "qgsbrowsertreeview.h" +%End public: QgsBrowserTreeView( QWidget *parent /TransferThis/ = 0 ); - ~QgsBrowserTreeView(); virtual void setModel( QAbstractItemModel *model ); virtual void showEvent( QShowEvent *e ); virtual void hideEvent( QHideEvent *e ); - // returns true if at least one descendat is expanded, used in refresh bool hasExpandedDescendant( const QModelIndex &index ) const; +%Docstring + :rtype: bool +%End - // Set section where to store settings (because we have 2 browser dock widgets) void setSettingsSection( const QString §ion ); protected slots: virtual void rowsInserted( const QModelIndex &parentIndex, int start, int end ); + }; + +/************************************************************************ + * This file has been generated automatically from * + * * + * src/gui/qgsbrowsertreeview.h * + * * + * Do not edit manually ! Edit header and run scripts/sipify.pl again * + ************************************************************************/ diff --git a/python/gui/qgsbusyindicatordialog.sip b/python/gui/qgsbusyindicatordialog.sip index 358fde3f5e5..1c00d9494bd 100644 --- a/python/gui/qgsbusyindicatordialog.sip +++ b/python/gui/qgsbusyindicatordialog.sip @@ -1,23 +1,48 @@ +/************************************************************************ + * This file has been generated automatically from * + * * + * src/gui/qgsbusyindicatordialog.h * + * * + * Do not edit manually ! Edit header and run scripts/sipify.pl again * + ************************************************************************/ + + + + + -/** \ingroup gui - * \class QgsBusyIndicatorDialog - * A simple dialog to show an indeterminate busy progress indicator. - */ class QgsBusyIndicatorDialog : QDialog { +%Docstring + A simple dialog to show an indeterminate busy progress indicator. +%End + %TypeHeaderCode -#include +#include "qgsbusyindicatordialog.h" %End public: - /** Constructor - * Modal busy indicator dialog with no buttons. - * @param message Text to show above busy progress indicator. - * @param parent parent object (owner) - * @param fl widget flags - */ - QgsBusyIndicatorDialog( const QString &message = "", QWidget *parent /TransferThis/ = 0, const Qt::WindowFlags &fl = QgsGuiUtils::ModalDialogFlags ); - ~QgsBusyIndicatorDialog(); + + QgsBusyIndicatorDialog( const QString &message = "", QWidget *parent = 0, Qt::WindowFlags fl = QgsGuiUtils::ModalDialogFlags ); +%Docstring + Constructor + Modal busy indicator dialog with no buttons. + \param message Text to show above busy progress indicator. + \param parent parent object (owner) + \param fl widget flags +%End QString message() const; +%Docstring + :rtype: str +%End void setMessage( const QString &message ); + }; + +/************************************************************************ + * This file has been generated automatically from * + * * + * src/gui/qgsbusyindicatordialog.h * + * * + * Do not edit manually ! Edit header and run scripts/sipify.pl again * + ************************************************************************/ diff --git a/scripts/sipify.pl b/scripts/sipify.pl index 7c1ed425002..4793532f457 100755 --- a/scripts/sipify.pl +++ b/scripts/sipify.pl @@ -360,7 +360,7 @@ while ($line_idx < $line_count){ next; } # Skip Q_OBJECT, Q_PROPERTY, Q_ENUM, Q_GADGET - if ($line =~ m/^\s*Q_(OBJECT|ENUMS|PROPERTY|GADGET|DECLARE_METATYPE|DECLARE_TYPEINFO).*?$/){ + if ($line =~ m/^\s*Q_(OBJECT|ENUMS|PROPERTY|GADGET|DECLARE_METATYPE|DECLARE_TYPEINFO|DECL_DEPRECATED).*?$/){ next; }