mirror of
				https://github.com/qgis/QGIS.git
				synced 2025-10-29 00:07:54 -04:00 
			
		
		
		
	
		
			
				
	
	
		
			180 lines
		
	
	
		
			4.9 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			180 lines
		
	
	
		
			4.9 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| /************************************************************************
 | |
|  * This file has been generated automatically from                      *
 | |
|  *                                                                      *
 | |
|  * src/gui/qgsoptionswidgetfactory.h                                    *
 | |
|  *                                                                      *
 | |
|  * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 | |
|  ************************************************************************/
 | |
| 
 | |
| 
 | |
| 
 | |
| class QgsOptionsPageWidget : QWidget
 | |
| {
 | |
| %Docstring(signature="appended")
 | |
| Base class for widgets for pages included in the options dialog.
 | |
| %End
 | |
| 
 | |
| %TypeHeaderCode
 | |
| #include "qgsoptionswidgetfactory.h"
 | |
| %End
 | |
|   public:
 | |
| 
 | |
|     QgsOptionsPageWidget( QWidget *parent /TransferThis/ = 0 );
 | |
| %Docstring
 | |
| Constructor for QgsOptionsPageWidget.
 | |
| %End
 | |
| 
 | |
|     virtual QString helpKey() const;
 | |
| %Docstring
 | |
| Returns the optional help key for the options page. The default implementation
 | |
| returns an empty string.
 | |
| 
 | |
| If a non-empty string is returned by this method, it will be used as the help key
 | |
| retrieved when the "help" button is clicked while this options page is active.
 | |
| 
 | |
| If an empty string is returned by this method the default QGIS options
 | |
| help will be retrieved.
 | |
| %End
 | |
| 
 | |
| 
 | |
|     virtual bool isValid();
 | |
| %Docstring
 | |
| Validates the current state of the widget.
 | |
| 
 | |
| Subclasses should return ``True`` if the widget state is currently valid and acceptable to :py:func:`~QgsOptionsPageWidget.apply`.
 | |
| 
 | |
| The default implementation returns ``True``.
 | |
| 
 | |
| .. versionadded:: 3.24
 | |
| %End
 | |
| 
 | |
|   public slots:
 | |
| 
 | |
|     virtual void apply() = 0;
 | |
| %Docstring
 | |
| Called to permanently apply the settings shown in the options page (e.g. save them to
 | |
| :py:class:`QgsSettings` objects). This is usually called when the options dialog is accepted.
 | |
| %End
 | |
| 
 | |
|     virtual void cancel();
 | |
| %Docstring
 | |
| Called to cancel settings changed in the options page (e.g. save them to
 | |
| :py:class:`QgsSettings` objects). This is usually called when the options dialog is canceled.
 | |
| %End
 | |
| 
 | |
|   protected:
 | |
| 
 | |
|     void registerHighlightWidget( QgsOptionsDialogHighlightWidget *highlightWidget );
 | |
| %Docstring
 | |
| Register a highlight widget to be used to search and highlight text in
 | |
| options dialogs. This can be used to provide a custom implementation of
 | |
| :py:class:`QgsOptionsDialogHighlightWidget`.
 | |
| %End
 | |
| 
 | |
| };
 | |
| 
 | |
| class QgsOptionsWidgetFactory : QObject
 | |
| {
 | |
| 
 | |
| %TypeHeaderCode
 | |
| #include "qgsoptionswidgetfactory.h"
 | |
| %End
 | |
|   public:
 | |
| 
 | |
|     QgsOptionsWidgetFactory();
 | |
| 
 | |
|     QgsOptionsWidgetFactory( const QString &title, const QIcon &icon, const QString &key = QString() );
 | |
| %Docstring
 | |
| Constructor
 | |
| %End
 | |
| 
 | |
|     virtual QIcon icon() const;
 | |
| %Docstring
 | |
| The icon that will be shown in the UI for the panel.
 | |
| 
 | |
| :return: A QIcon for the panel icon.
 | |
| 
 | |
| .. seealso:: :py:func:`setIcon`
 | |
| %End
 | |
| 
 | |
|     void setIcon( const QIcon &icon );
 | |
| %Docstring
 | |
| Set the ``icon`` to show in the interface for the factory object.
 | |
| 
 | |
| .. seealso:: :py:func:`icon`
 | |
| %End
 | |
| 
 | |
|     virtual QString title() const;
 | |
| %Docstring
 | |
| The title of the panel.
 | |
| 
 | |
| .. seealso:: :py:func:`setTitle`
 | |
| %End
 | |
| 
 | |
|     void setTitle( const QString &title );
 | |
| %Docstring
 | |
| Set the ``title`` for the interface.
 | |
| 
 | |
| .. seealso:: :py:func:`title`
 | |
| %End
 | |
| 
 | |
|     virtual QString key() const;
 | |
| %Docstring
 | |
| The key of the panel (untranslated title).
 | |
| 
 | |
| .. seealso:: :py:func:`setKey`
 | |
| 
 | |
| .. versionadded:: 3.32
 | |
| %End
 | |
| 
 | |
|     void setKey( const QString &key );
 | |
| %Docstring
 | |
| Set the ``key`` for the interface.
 | |
| 
 | |
| .. seealso:: :py:func:`key`
 | |
| %End
 | |
| 
 | |
|     virtual QString pagePositionHint() const;
 | |
| %Docstring
 | |
| Returns a tab name hinting at where this page should be inserted into the
 | |
| options properties tab list.
 | |
| 
 | |
| If the returned string is non-empty, the options widget page will be inserted
 | |
| before the existing page with matching object name.
 | |
| 
 | |
| The default implementation returns an empty string, which causes the widget
 | |
| to be placed at the end of the dialog page list.
 | |
| 
 | |
| .. versionadded:: 3.18
 | |
| %End
 | |
| 
 | |
|     virtual QStringList path() const;
 | |
| %Docstring
 | |
| Returns the path to place the widget page at, for options dialogs
 | |
| which are structured using a tree view.
 | |
| 
 | |
| A factory which returns "Code", "Javascript" would have its widget placed
 | |
| in a group named "Javascript", contained in a parent group named "Code".
 | |
| 
 | |
| .. versionadded:: 3.22
 | |
| %End
 | |
| 
 | |
|     virtual QgsOptionsPageWidget *createWidget( QWidget *parent = 0 ) const = 0 /Factory/;
 | |
| %Docstring
 | |
| Factory function to create the widget on demand as needed by the options dialog.
 | |
| 
 | |
| :param parent: The parent of the widget.
 | |
| 
 | |
| :return: A new widget to show as a page in the options dialog.
 | |
| %End
 | |
| 
 | |
| };
 | |
| 
 | |
| /************************************************************************
 | |
|  * This file has been generated automatically from                      *
 | |
|  *                                                                      *
 | |
|  * src/gui/qgsoptionswidgetfactory.h                                    *
 | |
|  *                                                                      *
 | |
|  * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 | |
|  ************************************************************************/
 |