QGIS/python/gui/qgspanelwidget.sip.in

224 lines
6.0 KiB
Plaintext
Raw Normal View History

2017-06-07 16:16:21 +02:00
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgspanelwidget.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsPanelWidget : QWidget
2016-06-13 18:51:57 +10:00
{
2017-06-07 16:16:21 +02:00
%Docstring
Base class for any widget that can be shown as a inline panel
%End
2016-06-13 18:51:57 +10:00
%TypeHeaderCode
#include "qgspanelwidget.h"
%End
public:
2017-06-07 16:16:21 +02:00
2016-06-13 18:51:57 +10:00
QgsPanelWidget( QWidget *parent = 0 );
2017-06-07 16:16:21 +02:00
%Docstring
Base class for any widget that can be shown as a inline panel
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param parent: Parent widget.
2017-06-07 16:16:21 +02:00
%End
2016-06-13 18:51:57 +10:00
void setPanelTitle( const QString &panelTitle );
2017-06-07 16:16:21 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Set the title of the panel when shown in the interface.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param panelTitle: The panel title.
2017-06-07 16:16:21 +02:00
%End
2016-06-13 18:51:57 +10:00
QString panelTitle();
2017-06-07 16:16:21 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
The title of the panel.
:return: The title pf the panel.
2017-06-07 16:16:21 +02:00
%End
void connectChildPanels( const QList<QgsPanelWidget *> &panels );
%Docstring
2017-12-15 10:36:55 -04:00
Connect the given sub panel widgets showPanel signals to this current panels
main showPanel event to bubble up to the user.
2017-06-07 16:16:21 +02:00
2017-12-15 10:36:55 -04:00
Use this method if you have children widgets that need to show a panel to the user.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param panels: A list of panel widgets to connect.
2017-06-07 16:16:21 +02:00
%End
2016-06-13 18:51:57 +10:00
void connectChildPanel( QgsPanelWidget *panel );
2017-06-07 16:16:21 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Connect the given sub panel widgets showPanel signals to this current panels
main showPanel event to bubble up to the user.
2017-06-07 16:16:21 +02:00
2017-12-15 10:36:55 -04:00
Use this method if you have children widgets that need to show a panel to the user.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param panel: The panel to connect.
2017-06-07 16:16:21 +02:00
%End
2016-06-13 18:51:57 +10:00
virtual void setDockMode( bool dockMode );
2017-06-07 16:16:21 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Set the widget in dock mode which tells the widget to emit panel
widgets and not open dialogs
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param dockMode: True to enable dock mode.
2017-06-07 16:16:21 +02:00
%End
bool dockMode();
2017-06-07 16:16:21 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Return the dock mode state.
:return: True if in dock mode. If in dock mode the widget
will emit the showPanel signal to handle panel opening
If false it will open dialogs when openPanel is called.
2017-06-07 16:16:21 +02:00
%End
void setAutoDelete( bool autoDelete );
2017-06-07 16:16:21 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
The the auto delete property on the widget. True by default.
When auto delete is enabled when a panel is removed from the stack
it will be deleted.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param autoDelete: Enable or disable auto delete on the panel.
2017-06-07 16:16:21 +02:00
%End
bool autoDelete();
2017-06-07 16:16:21 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
The the auto delete property on the widget. True by default.
When auto delete is enabled when a panel is removed from the stack
it will be deleted.
:return: The auto delete value for the widget.
2017-06-07 16:16:21 +02:00
%End
static QgsPanelWidget *findParentPanel( QWidget *widget );
2017-06-07 16:16:21 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Traces through the parents of a widget to find if it is contained within a QgsPanelWidget
widget.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param widget: widget which may be contained within a panel widget
:return: parent panel widget if found, otherwise None
2017-06-07 16:16:21 +02:00
.. versionadded:: 3.0
%End
2016-06-13 18:51:57 +10:00
signals:
void panelAccepted( QgsPanelWidget *panel );
2017-06-07 16:16:21 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Emitted when the panel is accepted by the user.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param panel: The panel widget that was accepted.
2017-06-07 16:16:21 +02:00
.. note::
This argument is normally raised with emit panelAccepted(this)
2018-01-12 20:51:17 -04:00
so that callers can retrieve the widget easier in calling code.
2017-12-15 10:36:55 -04:00
2017-06-07 16:16:21 +02:00
.. note::
this is emitted only when this panel is accepted, and is not emitted for
2018-01-12 20:51:17 -04:00
child panels. For example, if this panel opens a second stacked panel, then this panel
will not emit panelAccepted when the second panel is accepted.
2017-06-07 16:16:21 +02:00
%End
2016-06-13 18:51:57 +10:00
void showPanel( QgsPanelWidget *panel );
2017-06-07 16:16:21 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Emit when you require a panel to be show in the interface.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param panel: The panel widget to show.
2017-06-07 16:16:21 +02:00
.. note::
If you are connected to this signal you should also connect
2018-01-12 20:51:17 -04:00
given panels showPanel signal as they can be nested.
2017-06-07 16:16:21 +02:00
%End
2016-06-13 18:51:57 +10:00
void widgetChanged();
2017-06-07 16:16:21 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Emitted when the widget state changes.
Connect to this to pull any changes off the widget when needed.
As panels are non blocking "dialogs" you should listen to this signal
to give the user feedback when something changes.
2017-06-07 16:16:21 +02:00
%End
2016-06-13 18:51:57 +10:00
public slots:
2017-06-07 16:16:21 +02:00
void openPanel( QgsPanelWidget *panel );
2017-06-07 16:16:21 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Open a panel or dialog depending on dock mode setting
If dock mode is true this method will emit the showPanel signal
for connected slots to handle the open event.
2017-06-07 16:16:21 +02:00
2017-12-15 10:36:55 -04:00
If dock mode is false this method will open a dialog
and block the user.
2017-06-07 16:16:21 +02:00
2017-12-15 10:36:55 -04:00
:param panel: The panel widget to open.
2017-06-07 16:16:21 +02:00
%End
2016-06-13 18:51:57 +10:00
void acceptPanel();
2017-06-07 16:16:21 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Accept the panel. Causes panelAccepted to be emitted.
Widgets are normally removed form the interface using the panel manager or the caller.
2017-06-07 16:16:21 +02:00
%End
2016-06-13 18:51:57 +10:00
protected:
virtual void keyPressEvent( QKeyEvent *event );
2017-06-07 16:16:21 +02:00
%Docstring
Overridden key press event to handle the esc event on the widget.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param event: The key event
2017-06-07 16:16:21 +02:00
%End
2016-06-13 18:51:57 +10:00
};
2017-06-07 16:16:21 +02:00
class QgsPanelWidgetWrapper: QgsPanelWidget
2016-06-13 18:51:57 +10:00
{
2017-06-07 16:16:21 +02:00
%Docstring
Wrapper widget for existing widgets which can't have
2017-12-15 10:36:55 -04:00
the inheritance tree changed, e.g dialogs.
2017-06-07 16:16:21 +02:00
.. note::
Generally you should use the QgsPanelWidget class if you can
2018-01-12 20:51:17 -04:00
and only use this wrapper if you can't update your code.
2017-06-07 16:16:21 +02:00
%End
2016-06-13 18:51:57 +10:00
%TypeHeaderCode
#include "qgspanelwidget.h"
%End
public:
2017-06-07 16:16:21 +02:00
QgsPanelWidgetWrapper( QWidget *widget, QWidget *parent = 0 );
2017-06-07 16:16:21 +02:00
%Docstring
Wrapper widget for existing widgets which can't have
2017-12-15 10:36:55 -04:00
the inheritance tree changed, e.g dialogs.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param widget: The widget to wrap.
:param parent: The parent widget.
2017-06-07 16:16:21 +02:00
%End
2016-06-13 18:51:57 +10:00
QWidget *widget();
2017-06-07 16:16:21 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the internal widget that is wrapped in this panel.
:return: The internal widget. Can be None.
2017-06-07 16:16:21 +02:00
%End
2016-06-13 18:51:57 +10:00
};
2017-06-07 16:16:21 +02:00
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgspanelwidget.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/