Skip to content

Commit

Permalink
sipify gui attribute table
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids committed Jun 9, 2017
1 parent f5c3b8a commit 2454e56
Show file tree
Hide file tree
Showing 19 changed files with 1,294 additions and 866 deletions.
13 changes: 0 additions & 13 deletions python/auto_sip.blacklist
Original file line number Diff line number Diff line change
Expand Up @@ -41,19 +41,6 @@ core/composer/qgspaperitem.sip
core/composer/qgsscalebarstyle.sip
core/composer/qgssingleboxscalebarstyle.sip
core/composer/qgsticksscalebarstyle.sip
gui/attributetable/qgsattributetabledelegate.sip
gui/attributetable/qgsattributetablefiltermodel.sip
gui/attributetable/qgsattributetablemodel.sip
gui/attributetable/qgsattributetableview.sip
gui/attributetable/qgsdualview.sip
gui/attributetable/qgsfeaturelistmodel.sip
gui/attributetable/qgsfeaturelistview.sip
gui/attributetable/qgsfeaturelistviewdelegate.sip
gui/attributetable/qgsfeaturemodel.sip
gui/attributetable/qgsfeatureselectionmodel.sip
gui/attributetable/qgsfieldconditionalformatwidget.sip
gui/attributetable/qgsifeatureselectionmanager.sip
gui/attributetable/qgsorganizetablecolumnsdialog.sip
gui/symbology-ng/qgs25drendererwidget.sip
gui/symbology-ng/qgsarrowsymbollayerwidget.sip
gui/symbology-ng/qgsbrushstylecombobox.sip
Expand Down
115 changes: 74 additions & 41 deletions python/gui/attributetable/qgsattributetabledelegate.sip
Original file line number Diff line number Diff line change
@@ -1,53 +1,86 @@
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/attributetable/qgsattributetabledelegate.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/





class QgsAttributeTableDelegate : QItemDelegate
{
%TypeHeaderCode
#include <qgsattributetabledelegate.h>
%Docstring
A delegate item class for QgsAttributeTable (see Qt documentation for
QItemDelegate).
%End
QgsVectorLayer *layer( const QAbstractItemModel *model ) const;

%TypeHeaderCode
#include "qgsattributetabledelegate.h"
%End
public:
/** Constructor
* @param parent parent object
*/

QgsAttributeTableDelegate( QObject *parent /TransferThis/ = 0 );
/** Used to create an editor for when the user tries to
* change the contents of a cell */
QWidget * createEditor(
QWidget *parent,
const QStyleOptionViewItem &option,
const QModelIndex &index ) const;

/** Overloads the paint method form the QItemDelegate bas class */
void paint(
QPainter * painter,
const QStyleOptionViewItem & option,
const QModelIndex &index ) const;

/**
* Sets data from editor back to model. Overloads default method
* @param editor editor which was created by create editor function in this class
* @param model model where data should be updated
* @param index index of field which is to be modified
*/
void setModelData( QWidget *editor, QAbstractItemModel *model, const QModelIndex &index ) const;

/**
* Sets data from model into the editor. Overloads default method
* @param editor editor which was created by create editor function in this class
* @param index index of field which is to be retrieved
*/
void setEditorData( QWidget *editor, const QModelIndex &index ) const;
%Docstring
Constructor
\param parent parent object
%End

virtual QWidget *createEditor( QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index ) const;

%Docstring
Used to create an editor for when the user tries to
change the contents of a cell
:rtype: QWidget
%End

virtual void paint( QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index ) const;

%Docstring
Overloads the paint method form the QItemDelegate base class
%End

virtual void setModelData( QWidget *editor, QAbstractItemModel *model, const QModelIndex &index ) const;

%Docstring
Sets data from editor back to model. Overloads default method
\param editor editor which was created by create editor function in this class
\param model model where data should be updated
\param index index of field which is to be modified
%End

virtual void setEditorData( QWidget *editor, const QModelIndex &index ) const;

%Docstring
Sets data from model into the editor. Overloads default method
\param editor editor which was created by create editor function in this class
\param index index of field which is to be retrieved
%End

void setFeatureSelectionModel( QgsFeatureSelectionModel *featureSelectionModel );

signals:
/**
* Is emitted when an action column item is painted.
* The consumer of this signal can initialize the index widget.
*
* @note This signal is emitted repeatedly whenever the item is being painted.
* It is the consumers responsibility to check if initialization has already
* happened before.
*/

void actionColumnItemPainted( const QModelIndex &index ) const;
%Docstring
Is emitted when an action column item is painted.
The consumer of this signal can initialize the index widget.

.. note::

This signal is emitted repeatedly whenever the item is being painted.
It is the consumers responsibility to check if initialization has already
happened before.
%End

};

/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/attributetable/qgsattributetabledelegate.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
Loading

0 comments on commit 2454e56

Please sign in to comment.