mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-15 00:04:00 -04:00
sipify
This commit is contained in:
parent
1e3baca361
commit
8b7a6b80a7
@ -1,111 +1,151 @@
|
|||||||
/** \class QgsCheckBoxDelegate
|
/************************************************************************
|
||||||
* \ingroup gui
|
* This file has been generated automatically from *
|
||||||
* QComboBox subclass which allows selecting multiple items.
|
* *
|
||||||
* @note added in QGIS 3.0
|
* src/gui/qgscheckablecombobox.h *
|
||||||
**/
|
* *
|
||||||
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
||||||
|
************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class QgsCheckableComboBox : QComboBox
|
class QgsCheckableComboBox : QComboBox
|
||||||
{
|
{
|
||||||
|
|
||||||
%TypeHeaderCode
|
%TypeHeaderCode
|
||||||
#include <qgscheckablecombobox.h>
|
#include "qgscheckablecombobox.h"
|
||||||
%End
|
%End
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
/** Constructor for QgsCheckableComboBox.
|
QgsCheckableComboBox( QWidget *parent = 0 );
|
||||||
* @param parent parent object
|
%Docstring
|
||||||
*/
|
Constructor for QgsCheckableComboBox.
|
||||||
QgsCheckableComboBox( QWidget *parent = nullptr );
|
@param parent parent object
|
||||||
|
%End
|
||||||
|
|
||||||
/** Returns separator used to separate items in the display text.
|
|
||||||
* @see setSeparator()
|
|
||||||
*/
|
|
||||||
QString separator() const;
|
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 );
|
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;
|
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 );
|
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;
|
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;
|
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 );
|
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 );
|
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();
|
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 );
|
virtual bool eventFilter( QObject *object, QEvent *event );
|
||||||
|
%Docstring
|
||||||
|
Filters events to enable context menu
|
||||||
|
%End
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
|
||||||
/** This signal is emitted whenever the checked items list changed.
|
|
||||||
*/
|
|
||||||
void checkedItemsChanged( const QStringList &items );
|
void checkedItemsChanged( const QStringList &items );
|
||||||
|
%Docstring
|
||||||
|
This signal is emitted whenever the checked items list changed.
|
||||||
|
%End
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
|
|
||||||
/** Set items which should be checked/selected.
|
|
||||||
* @param items items to select
|
|
||||||
* @see checkedItems()
|
|
||||||
*/
|
|
||||||
void setCheckedItems( const QStringList &items );
|
void setCheckedItems( const QStringList &items );
|
||||||
|
%Docstring
|
||||||
|
Set items which should be checked/selected.
|
||||||
|
@param items items to select
|
||||||
|
@see checkedItems()
|
||||||
|
%End
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
/** Handler for widget resizing
|
|
||||||
*/
|
|
||||||
virtual void resizeEvent( QResizeEvent *event );
|
virtual void resizeEvent( QResizeEvent *event );
|
||||||
|
%Docstring
|
||||||
|
Handler for widget resizing
|
||||||
|
%End
|
||||||
|
|
||||||
protected slots:
|
protected slots:
|
||||||
/** Display context menu which allows to select/deselect
|
|
||||||
* all items at once.
|
|
||||||
*/
|
|
||||||
void showContextMenu( const QPoint &pos );
|
void showContextMenu( const QPoint &pos );
|
||||||
|
%Docstring
|
||||||
|
Display context menu which allows to select/deselect
|
||||||
|
all items at once.
|
||||||
|
%End
|
||||||
|
|
||||||
/** Selects all items.
|
|
||||||
*/
|
|
||||||
void selectAllOptions();
|
void selectAllOptions();
|
||||||
|
%Docstring
|
||||||
|
Selects all items.
|
||||||
|
%End
|
||||||
|
|
||||||
/** Removes selection from all items.
|
|
||||||
*/
|
|
||||||
void deselectAllOptions();
|
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 added in QGIS 3.0
|
||||||
* @note not available in Python bindings
|
* @note not available in Python bindings
|
||||||
**/
|
**/
|
||||||
|
#ifndef SIP_RUN
|
||||||
class QgsCheckableItemModel : public QStandardItemModel
|
class QgsCheckableItemModel : public QStandardItemModel
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
@ -102,7 +103,7 @@ class QgsCheckBoxDelegate : public QStyledItemDelegate
|
|||||||
*/
|
*/
|
||||||
virtual void paint( QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index ) const;
|
virtual void paint( QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index ) const;
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
/** \class QgsCheckableComboBox
|
/** \class QgsCheckableComboBox
|
||||||
* \ingroup gui
|
* \ingroup gui
|
||||||
|
Loading…
x
Reference in New Issue
Block a user