QGIS/python/gui/qgspanelwidget.sip

208 lines
6.1 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
\param parent Parent widget.
%End
2016-06-13 18:51:57 +10:00
void setPanelTitle( const QString &panelTitle );
2017-06-07 16:16:21 +02:00
%Docstring
Set the title of the panel when shown in the interface.
\param panelTitle The panel title.
%End
2016-06-13 18:51:57 +10:00
QString panelTitle();
2017-06-07 16:16:21 +02:00
%Docstring
The title of the panel.
:return: The title pf the panel.
:rtype: str
%End
void connectChildPanels( const QList<QgsPanelWidget *> &panels );
%Docstring
Connect the given sub panel widgets showPanel signals to this current panels
main showPanel event to bubble up to the user.
Use this method if you have children widgets that need to show a panel to the user.
\param panels A list of panel widgets to connect.
%End
2016-06-13 18:51:57 +10:00
void connectChildPanel( QgsPanelWidget *panel );
2017-06-07 16:16:21 +02:00
%Docstring
Connect the given sub panel widgets showPanel signals to this current panels
main showPanel event to bubble up to the user.
Use this method if you have children widgets that need to show a panel to the user.
\param panel The panel to connect.
%End
2016-06-13 18:51:57 +10:00
virtual void setDockMode( bool dockMode );
2017-06-07 16:16:21 +02:00
%Docstring
Set the widget in dock mode which tells the widget to emit panel
widgets and not open dialogs
\param dockMode True to enable dock mode.
%End
bool dockMode();
2017-06-07 16:16:21 +02:00
%Docstring
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.
:rtype: bool
%End
void setAutoDelete( bool autoDelete );
2017-06-07 16:16:21 +02:00
%Docstring
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.
\param autoDelete Enable or disable auto delete on the panel.
%End
bool autoDelete();
2017-06-07 16:16:21 +02:00
%Docstring
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.
:rtype: bool
%End
static QgsPanelWidget *findParentPanel( QWidget *widget );
2017-06-07 16:16:21 +02:00
%Docstring
Traces through the parents of a widget to find if it is contained within a QgsPanelWidget
widget.
\param widget widget which may be contained within a panel widget
:return: parent panel widget if found, otherwise None
.. versionadded:: 3.0
:rtype: QgsPanelWidget
%End
2016-06-13 18:51:57 +10:00
signals:
void panelAccepted( QgsPanelWidget *panel );
2017-06-07 16:16:21 +02:00
%Docstring
Emitted when the panel is accepted by the user.
\param panel The panel widget that was accepted.
.. note::
This argument is normally raised with emit panelAccepted(this)
so that callers can retrieve the widget easier in calling code.
.. note::
this is emitted only when this panel is accepted, and is not emitted for
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.
%End
2016-06-13 18:51:57 +10:00
void showPanel( QgsPanelWidget *panel );
2017-06-07 16:16:21 +02:00
%Docstring
Emit when you require a panel to be show in the interface.
\param panel The panel widget to show.
.. note::
If you are connected to this signal you should also connect
given panels showPanel signal as they can be nested.
%End
2016-06-13 18:51:57 +10:00
void widgetChanged();
2017-06-07 16:16:21 +02:00
%Docstring
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.
%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
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.
If dock mode is false this method will open a dialog
and block the user.
\param panel The panel widget to open.
%End
2016-06-13 18:51:57 +10:00
void acceptPanel();
2017-06-07 16:16:21 +02:00
%Docstring
Accept the panel. Causes panelAccepted to be emitted.
Widgets are normally removed form the interface using the panel manager or the caller.
%End
2016-06-13 18:51:57 +10:00
protected:
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.
\param event The key event
%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
the inheritance tree changed, e.g dialogs.
.. note::
Generally you should use the QgsPanelWidget class if you can
and only use this wrapper if you can't update your code.
%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
the inheritance tree changed, e.g dialogs.
\param widget The widget to wrap.
\param parent The parent widget.
%End
2016-06-13 18:51:57 +10:00
QWidget *widget();
2017-06-07 16:16:21 +02:00
%Docstring
Returns the internal widget that is wrapped in this panel.
:return: The internal widget. Can be None.
:rtype: QWidget
%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 *
************************************************************************/