Skip to content
Permalink
Browse files
sipify
  • Loading branch information
alexbruy committed Apr 8, 2017
1 parent 1e3baca commit 8b7a6b80a774062e935e485695055803e20e4063
Showing with 107 additions and 66 deletions.
  1. +105 −65 python/gui/qgscheckablecombobox.sip
  2. +2 −1 src/gui/qgscheckablecombobox.h
@@ -1,111 +1,151 @@
/** \class QgsCheckBoxDelegate
* \ingroup gui
* QComboBox subclass which allows selecting multiple items.
* @note added in QGIS 3.0
**/
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgscheckablecombobox.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/








class QgsCheckableComboBox : QComboBox
{

%TypeHeaderCode
#include <qgscheckablecombobox.h>
#include "qgscheckablecombobox.h"
%End


public:

/** Constructor for QgsCheckableComboBox.
* @param parent parent object
*/
QgsCheckableComboBox( QWidget *parent = nullptr );
QgsCheckableComboBox( QWidget *parent = 0 );
%Docstring
Constructor for QgsCheckableComboBox.
@param parent parent object
%End

/** Returns separator used to separate items in the display text.
* @see setSeparator()
*/
QString separator() const;
%Docstring
Returns separator used to separate items in the display text.
@see setSeparator()
%End

/** Set separator used to separate items in the display text.
* @param separator separator to use
* @see separator()
*/
void setSeparator( const QString &separator );
%Docstring
Set separator used to separate items in the display text.
@param separator separator to use
@see separator()
%End

/** Returns default text which will be displayed in the widget
* when no items selected.
* @see setDefaultText()
*/
QString defaultText() const;
%Docstring
Returns default text which will be displayed in the widget
when no items selected.
@see setDefaultText()
%End

/** Set default text which will be displayed in the widget when
* no items selected.
* @param text default text
* @see defaultText()
*/
void setDefaultText( const QString &text );
%Docstring
Set default text which will be displayed in the widget when
no items selected.
@param text default text
@see defaultText()
%End

/** Returns currently checked items.
* @see setCheckedItems()
*/
QStringList checkedItems() const;
%Docstring
Returns currently checked items.
@see setCheckedItems()
%End

/** Returns the checked state of the item identified by index
* @param index item index
* @see setItemCheckState()
* @see toggleItemCheckState()
*/
Qt::CheckState itemCheckState( int index ) const;
%Docstring
Returns the checked state of the item identified by index
@param index item index
@see setItemCheckState()
@see toggleItemCheckState()
%End

/** Sets the item check state to state
* @param index item index
* @param state check state
* @see itemCheckState()
* @see toggleItemCheckState()
*/
void setItemCheckState( int index, Qt::CheckState state );
%Docstring
Sets the item check state to state
@param index item index
@param state check state
@see itemCheckState()
@see toggleItemCheckState()
%End

/** Toggles the item check state
* @param index item index
* @see itemCheckState()
* @see setItemCheckState()
*/
void toggleItemCheckState( int index );
%Docstring
Toggles the item check state
@param index item index
@see itemCheckState()
@see setItemCheckState()
%End

/** Hides the list of items in the combobox if it is currently
* visible and resets the internal state.
*/
virtual void hidePopup();
%Docstring
Hides the list of items in the combobox if it is currently
visible and resets the internal state.
%End

/** Filters events to enable context menu
*/
virtual bool eventFilter( QObject *object, QEvent *event );
%Docstring
Filters events to enable context menu
%End

signals:

/** This signal is emitted whenever the checked items list changed.
*/
void checkedItemsChanged( const QStringList &items );
%Docstring
This signal is emitted whenever the checked items list changed.
%End

public slots:

/** Set items which should be checked/selected.
* @param items items to select
* @see checkedItems()
*/
void setCheckedItems( const QStringList &items );
%Docstring
Set items which should be checked/selected.
@param items items to select
@see checkedItems()
%End

protected:
/** Handler for widget resizing
*/

virtual void resizeEvent( QResizeEvent *event );
%Docstring
Handler for widget resizing
%End

protected slots:
/** Display context menu which allows to select/deselect
* all items at once.
*/

void showContextMenu( const QPoint &pos );
%Docstring
Display context menu which allows to select/deselect
all items at once.
%End

/** Selects all items.
*/
void selectAllOptions();
%Docstring
Selects all items.
%End

/** Removes selection from all items.
*/
void deselectAllOptions();
%Docstring
Removes selection from all items.
%End

};

/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgscheckablecombobox.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
@@ -34,6 +34,7 @@ class QEvent;
* @note added in QGIS 3.0
* @note not available in Python bindings
**/
#ifndef SIP_RUN
class QgsCheckableItemModel : public QStandardItemModel
{
Q_OBJECT
@@ -102,7 +103,7 @@ class QgsCheckBoxDelegate : public QStyledItemDelegate
*/
virtual void paint( QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index ) const;
};

#endif

/** \class QgsCheckableComboBox
* \ingroup gui

0 comments on commit 8b7a6b8

Please sign in to comment.