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
|
|
|
|
{
|
2017-04-17 10:49:29 +10:00
|
|
|
%Docstring
|
|
|
|
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:
|
|
|
|
|
2017-04-08 08:29:38 +03:00
|
|
|
QgsCheckableComboBox( QWidget *parent /TransferThis/ = 0 );
|
2017-04-07 11:01:38 +03:00
|
|
|
%Docstring
|
|
|
|
Constructor for QgsCheckableComboBox.
|
|
|
|
%End
|
2017-03-22 09:43:52 +02:00
|
|
|
|
|
|
|
QString separator() const;
|
2017-04-07 11:01:38 +03:00
|
|
|
%Docstring
|
|
|
|
Returns separator used to separate items in the display text.
|
2017-04-30 16:51:18 +02:00
|
|
|
.. seealso:: setSeparator()
|
2017-04-08 10:25:00 +03:00
|
|
|
:rtype: str
|
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
|
|
|
|
Set separator used to separate items in the display text.
|
2017-04-07 11:06:24 +03:00
|
|
|
\param separator separator to use
|
2017-04-30 16:51:18 +02:00
|
|
|
.. seealso:: 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
|
|
|
|
Returns default text which will be displayed in the widget
|
|
|
|
when no items selected.
|
2017-04-30 16:51:18 +02:00
|
|
|
.. seealso:: setDefaultText()
|
2017-04-08 10:25:00 +03:00
|
|
|
:rtype: str
|
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
|
|
|
|
Set default text which will be displayed in the widget when
|
|
|
|
no items selected.
|
2017-04-07 11:06:24 +03:00
|
|
|
\param text default text
|
2017-04-30 16:51:18 +02:00
|
|
|
.. seealso:: 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
|
|
|
|
Returns currently checked items.
|
2017-04-30 16:51:18 +02:00
|
|
|
.. seealso:: setCheckedItems()
|
2017-04-08 10:25:00 +03:00
|
|
|
:rtype: list of str
|
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
|
|
|
|
Returns the checked state of the item identified by index
|
2017-04-07 11:06:24 +03:00
|
|
|
\param index item index
|
2017-04-30 16:51:18 +02:00
|
|
|
.. seealso:: setItemCheckState()
|
|
|
|
.. seealso:: toggleItemCheckState()
|
2017-04-08 10:25:00 +03:00
|
|
|
:rtype: Qt.CheckState
|
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
|
|
|
|
Sets the item check state to state
|
2017-04-07 11:06:24 +03:00
|
|
|
\param index item index
|
|
|
|
\param state check state
|
2017-04-30 16:51:18 +02:00
|
|
|
.. seealso:: itemCheckState()
|
|
|
|
.. seealso:: 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
|
|
|
|
Toggles the item check state
|
2017-04-07 11:06:24 +03:00
|
|
|
\param index item index
|
2017-04-30 16:51:18 +02:00
|
|
|
.. seealso:: itemCheckState()
|
|
|
|
.. seealso:: 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
|
|
|
|
Hides the list of items in the combobox if it is currently
|
|
|
|
visible and resets the internal state.
|
|
|
|
%End
|
2017-03-22 09:43:52 +02:00
|
|
|
|
2017-04-05 19:02:35 +03:00
|
|
|
virtual bool eventFilter( QObject *object, QEvent *event );
|
2017-04-07 11:01:38 +03:00
|
|
|
%Docstring
|
|
|
|
Filters events to enable context menu
|
2017-04-08 10:25:00 +03:00
|
|
|
:rtype: bool
|
2017-04-07 11:01:38 +03:00
|
|
|
%End
|
2017-04-05 19:02:35 +03:00
|
|
|
|
2017-03-22 09:43:52 +02:00
|
|
|
signals:
|
|
|
|
|
|
|
|
void checkedItemsChanged( const QStringList &items );
|
2017-04-07 11:01:38 +03:00
|
|
|
%Docstring
|
|
|
|
This signal is emitted whenever the checked items list changed.
|
|
|
|
%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
|
|
|
|
Set items which should be checked/selected.
|
2017-04-07 11:06:24 +03:00
|
|
|
\param items items to select
|
2017-04-30 16:51:18 +02:00
|
|
|
.. seealso:: 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
|
|
|
|
Handler for widget resizing
|
|
|
|
%End
|
2017-04-05 19:02:35 +03:00
|
|
|
|
|
|
|
protected slots:
|
2017-04-07 11:01:38 +03:00
|
|
|
|
2017-04-05 19:02:35 +03:00
|
|
|
void showContextMenu( const QPoint &pos );
|
2017-04-07 11:01:38 +03:00
|
|
|
%Docstring
|
2017-08-06 17:28:39 +02:00
|
|
|
Display context menu which allows selecting/deselecting
|
2017-04-07 11:01:38 +03:00
|
|
|
all items at once.
|
|
|
|
%End
|
2017-04-05 19:02:35 +03:00
|
|
|
|
|
|
|
void selectAllOptions();
|
2017-04-07 11:01:38 +03:00
|
|
|
%Docstring
|
|
|
|
Selects all items.
|
|
|
|
%End
|
2017-04-05 19:02:35 +03:00
|
|
|
|
|
|
|
void deselectAllOptions();
|
2017-04-07 11:01:38 +03:00
|
|
|
%Docstring
|
|
|
|
Removes selection from all items.
|
|
|
|
%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 *
|
|
|
|
************************************************************************/
|