QGIS/python/gui/qgscheckablecombobox.sip

176 lines
3.9 KiB
Plaintext
Raw Normal View History

2017-04-07 11:01:38 +03:00
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgscheckablecombobox.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
2017-03-22 09:43:52 +02:00
class QgsCheckableComboBox : QComboBox
{
%Docstring
2017-12-15 10:36:55 -04:00
QComboBox subclass which allows selecting multiple items.
.. versionadded:: 3.0
*
%End
2017-04-07 11:01:38 +03:00
2017-03-22 09:43:52 +02:00
%TypeHeaderCode
2017-04-07 11:01:38 +03:00
#include "qgscheckablecombobox.h"
2017-03-22 09:43:52 +02:00
%End
public:
QgsCheckableComboBox( QWidget *parent /TransferThis/ = 0 );
2017-04-07 11:01:38 +03:00
%Docstring
2017-12-15 10:36:55 -04:00
Constructor for QgsCheckableComboBox.
2017-04-07 11:01:38 +03:00
%End
2017-03-22 09:43:52 +02:00
QString separator() const;
2017-04-07 11:01:38 +03:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns separator used to separate items in the display text.
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setSeparator()`
2017-04-07 11:01:38 +03:00
%End
2017-03-22 09:43:52 +02:00
void setSeparator( const QString &separator );
2017-04-07 11:01:38 +03:00
%Docstring
2017-12-15 10:36:55 -04:00
Set separator used to separate items in the display text.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param separator: separator to use
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`separator()`
2017-04-07 11:01:38 +03:00
%End
2017-03-22 09:43:52 +02:00
QString defaultText() const;
2017-04-07 11:01:38 +03:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns default text which will be displayed in the widget
when no items selected.
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setDefaultText()`
2017-04-07 11:01:38 +03:00
%End
2017-03-22 09:43:52 +02:00
void setDefaultText( const QString &text );
2017-04-07 11:01:38 +03:00
%Docstring
2017-12-15 10:36:55 -04:00
Set default text which will be displayed in the widget when
no items selected.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param text: default text
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`defaultText()`
2017-04-07 11:01:38 +03:00
%End
2017-03-22 09:43:52 +02:00
QStringList checkedItems() const;
2017-04-07 11:01:38 +03:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns currently checked items.
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setCheckedItems()`
2017-04-07 11:01:38 +03:00
%End
2017-03-22 09:43:52 +02:00
Qt::CheckState itemCheckState( int index ) const;
2017-04-07 11:01:38 +03:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the checked state of the item identified by index
2017-12-15 21:36:08 -04:00
:param index: item index
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setItemCheckState()`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`toggleItemCheckState()`
2017-04-07 11:01:38 +03:00
%End
2017-03-22 09:43:52 +02:00
void setItemCheckState( int index, Qt::CheckState state );
2017-04-07 11:01:38 +03:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets the item check state to state
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param index: item index
:param state: check state
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`itemCheckState()`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`toggleItemCheckState()`
2017-04-07 11:01:38 +03:00
%End
2017-03-22 09:43:52 +02:00
void toggleItemCheckState( int index );
2017-04-07 11:01:38 +03:00
%Docstring
2017-12-15 10:36:55 -04:00
Toggles the item check state
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param index: item index
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`itemCheckState()`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setItemCheckState()`
2017-04-07 11:01:38 +03:00
%End
2017-03-22 09:43:52 +02:00
virtual void hidePopup();
2017-04-07 11:01:38 +03:00
%Docstring
2017-12-15 10:36:55 -04:00
Hides the list of items in the combobox if it is currently
visible and resets the internal state.
2017-04-07 11:01:38 +03:00
%End
2017-03-22 09:43:52 +02:00
virtual bool eventFilter( QObject *object, QEvent *event );
2017-04-07 11:01:38 +03:00
%Docstring
2017-12-15 10:36:55 -04:00
Filters events to enable context menu
2017-04-07 11:01:38 +03:00
%End
2017-03-22 09:43:52 +02:00
signals:
void checkedItemsChanged( const QStringList &items );
2017-04-07 11:01:38 +03:00
%Docstring
2017-12-15 10:36:55 -04:00
This signal is emitted whenever the checked items list changed.
2017-04-07 11:01:38 +03:00
%End
2017-03-22 09:43:52 +02:00
public slots:
void setCheckedItems( const QStringList &items );
2017-04-07 11:01:38 +03:00
%Docstring
2017-12-15 10:36:55 -04:00
Set items which should be checked/selected.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param items: items to select
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`checkedItems()`
2017-04-07 11:01:38 +03:00
%End
2017-03-22 09:43:52 +02:00
protected:
2017-04-07 11:01:38 +03:00
2017-03-22 09:43:52 +02:00
virtual void resizeEvent( QResizeEvent *event );
2017-04-07 11:01:38 +03:00
%Docstring
2017-12-15 10:36:55 -04:00
Handler for widget resizing
2017-04-07 11:01:38 +03:00
%End
protected slots:
2017-04-07 11:01:38 +03:00
void showContextMenu( const QPoint &pos );
2017-04-07 11:01:38 +03:00
%Docstring
2017-12-15 10:36:55 -04:00
Display context menu which allows selecting/deselecting
all items at once.
2017-04-07 11:01:38 +03:00
%End
void selectAllOptions();
2017-04-07 11:01:38 +03:00
%Docstring
2017-12-15 10:36:55 -04:00
Selects all items.
2017-04-07 11:01:38 +03:00
%End
void deselectAllOptions();
2017-04-07 11:01:38 +03:00
%Docstring
2017-12-15 10:36:55 -04:00
Removes selection from all items.
2017-04-07 11:01:38 +03:00
%End
2017-03-22 09:43:52 +02:00
};
2017-04-07 11:01:38 +03:00
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgscheckablecombobox.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/