Skip to content
Permalink
Browse files

add sip bindings

  • Loading branch information
3nids committed Jan 13, 2016
1 parent 488b41f commit 492f1ad18bcc0436250a299284cce4f218582c07
@@ -42,8 +42,8 @@
%Include qgscodeeditorhtml.sip
%Include qgscodeeditorcss.sip
%End
%Include qgscolorbutton.sip
%Include qgscharacterselectdialog.sip
%Include qgscolorbutton.sip
%Include qgscolorbuttonv2.sip
%Include qgscolordialog.sip
%Include qgscolorschemelist.sip
@@ -65,14 +65,16 @@
%Include qgsexpressionhighlighter.sip
%Include qgsexpressionselectiondialog.sip
%Include qgsextentgroupbox.sip
%Include qgsexternalresourcewidget.sip
%Include qgsfeatureselectiondlg.sip
%Include qgsfieldcombobox.sip
%Include qgsfieldexpressionwidget.sip
%Include qgsfieldmodel.sip
%Include qgsfieldproxymodel.sip
%Include qgsfieldvalidator.sip
%Include qgsfiledropedit.sip
%Include qgsfilepickerwidget.sip
%Include qgsfilterlineedit.sip
%Include qgsfeatureselectiondlg.sip
%Include qgsformannotationitem.sip
%Include qgsgenericprojectionselector.sip
%Include qgsgeometryrubberband.sip
@@ -81,8 +83,8 @@
%Include qgshistogramwidget.sip
%Include qgshtmlannotationitem.sip
%Include qgsidentifymenu.sip
%Include qgslegendinterface.sip
%Include qgslegendfilterbutton.sip
%Include qgslegendinterface.sip
%Include qgslonglongvalidator.sip
%Include qgsludialog.sip
%Include qgsmanageconnectionsdialog.sip
@@ -130,8 +132,8 @@
%Include qgsrasterformatsaveoptionswidget.sip
%Include qgsrasterlayersaveasdialog.sip
%Include qgsrasterpyramidsoptionswidget.sip
%Include qgsrubberband.sip
%Include qgsrelationeditorwidget.sip
%Include qgsrubberband.sip
%Include qgsscalecombobox.sip
%Include qgsscalerangewidget.sip
%Include qgsscalevisibilitydialog.sip
@@ -149,8 +151,8 @@

%Include attributetable/qgsattributetabledelegate.sip
%Include attributetable/qgsattributetablefiltermodel.sip
%Include attributetable/qgsattributetableview.sip
%Include attributetable/qgsattributetablemodel.sip
%Include attributetable/qgsattributetableview.sip
%Include attributetable/qgsdualview.sip
%Include attributetable/qgsfeaturelistmodel.sip
%Include attributetable/qgsfeaturelistview.sip
@@ -190,23 +192,31 @@
%Include raster/qgssinglebandgrayrendererwidget.sip
%Include raster/qgssinglebandpseudocolorrendererwidget.sip

%Include symbology-ng/qgsrendererv2widget.sip
%Include symbology-ng/characterwidget.sip
%Include symbology-ng/qgsbrushstylecombobox.sip
%Include symbology-ng/qgscategorizedsymbolrendererv2widget.sip
%Include symbology-ng/qgscolorrampcombobox.sip
%Include symbology-ng/qgscptcitycolorrampv2dialog.sip
%Include symbology-ng/qgsdashspacedialog.sip
%Include symbology-ng/qgsdatadefinedsymboldialog.sip
%Include symbology-ng/qgsellipsesymbollayerv2widget.sip
%Include symbology-ng/qgsgraduatedhistogramwidget.sip
%Include symbology-ng/qgsgraduatedsymbolrendererv2widget.sip
%Include symbology-ng/qgsinvertedpolygonrendererwidget.sip
%Include symbology-ng/qgsheatmaprendererwidget.sip
%Include symbology-ng/qgsinvertedpolygonrendererwidget.sip
%Include symbology-ng/qgslayerpropertieswidget.sip
%Include symbology-ng/qgspenstylecombobox.sip
%Include symbology-ng/qgspointdisplacementrendererwidget.sip
%Include symbology-ng/qgsrendererv2propertiesdialog.sip
%Include symbology-ng/qgsrendererv2widget.sip
%Include symbology-ng/qgsrulebasedrendererv2widget.sip
%Include symbology-ng/qgssinglesymbolrendererv2widget.sip
%Include symbology-ng/qgssizescalewidget.sip
%Include symbology-ng/qgssmartgroupeditordialog.sip
%Include symbology-ng/qgsstylev2managerdialog.sip
%Include symbology-ng/qgsstylev2exportimportdialog.sip
%Include symbology-ng/qgsstylev2groupselectiondialog.sip
%Include symbology-ng/qgsstylev2managerdialog.sip
%Include symbology-ng/qgssvgselectorwidget.sip
%Include symbology-ng/qgssymbollayerv2widget.sip
%Include symbology-ng/qgssymbollevelsv2dialog.sip
%Include symbology-ng/qgssymbolslistwidget.sip
@@ -215,31 +225,23 @@
%Include symbology-ng/qgsvectorfieldsymbollayerwidget.sip
%Include symbology-ng/qgsvectorgradientcolorrampv2dialog.sip
%Include symbology-ng/qgsvectorrandomcolorrampv2dialog.sip
%Include symbology-ng/qgscolorrampcombobox.sip
%Include symbology-ng/characterwidget.sip
%Include symbology-ng/qgsdashspacedialog.sip
%Include symbology-ng/qgsdatadefinedsymboldialog.sip
%Include symbology-ng/qgssizescalewidget.sip
%Include symbology-ng/qgsstylev2exportimportdialog.sip
%Include symbology-ng/qgssvgselectorwidget.sip
%Include symbology-ng/qgsgraduatedhistogramwidget.sip

%Include effects/qgseffectdrawmodecombobox.sip
%Include effects/qgseffectstackpropertieswidget.sip
%Include effects/qgspainteffectpropertieswidget.sip
%Include effects/qgspainteffectwidget.sip
%Include effects/qgseffectstackpropertieswidget.sip

%Include editorwidgets/core/qgseditorconfigwidget.sip
%Include editorwidgets/core/qgseditorwidgetfactory.sip
%Include editorwidgets/core/qgseditorwidgetregistry.sip
%Include editorwidgets/core/qgseditorwidgetwrapper.sip
%Include editorwidgets/core/qgssearchwidgetwrapper.sip
%Include editorwidgets/core/qgswidgetwrapper.sip
%Include editorwidgets/qgsdatetimeedit.sip
%Include editorwidgets/qgsdoublespinbox.sip
%Include editorwidgets/qgsrelationreferencewidget.sip
%Include editorwidgets/qgsrelationreferencewidgetwrapper.sip
%Include editorwidgets/qgsrelationwidgetwrapper.sip
%Include editorwidgets/qgsspinbox.sip
%Include editorwidgets/qgsdatetimeedit.sip

%Include layertree/qgslayertreeview.sip
@@ -0,0 +1,54 @@

class QgsExternalResourceWidget : QWidget
{
%TypeHeaderCode
#include <qgsexternalresourcewidget.h>
%End

public:

enum DocumentViewerContent
{
NoContent,
Image,
Web
};

explicit QgsExternalResourceWidget( QWidget* parent /TransferThis/ );

~QgsExternalResourceWidget();

/**
* @brief documentPath returns the path of the current document in the widget
* @param type determines the type of the returned null variant if the document is not defined yet
*/
QVariant documentPath( QVariant::Type type = QVariant::String ) const;
void setDocumentPath( QVariant documentPath );

//! access the file picker widget to allow its configuration
QgsFilePickerWidget* filePickerwidget();

//! returns if the file picker is visible in the widget
bool filePickerVisible() const;
//! set the visiblity of the file picker in the widget
void setFilePickerVisible( bool visible );

//! returns the type of content used in the document viewer
QgsExternalResourceWidget::DocumentViewerContent documentViewerContent() const;
//! setDocumentViewerContent defines the type of content to be shown. Widget will be adapated accordingly
void setDocumentViewerContent( QgsExternalResourceWidget::DocumentViewerContent content );

//! set the configuration of the document viewer
int documentViewerHeight() const;
void setDocumentViewerHeight( int height );
int documentViewerWidth() const ;
void setDocumentViewerWidth( int width );

//! defines if the widget is readonly
void setReadOnly( bool readOnly );

signals:
void valueChanged( QString );


};
@@ -0,0 +1,74 @@

class QgsFilePickerWidget : QWidget
{
%TypeHeaderCode
#include <qgsfilepickerwidget.h>
%End

public:

enum StorageMode
{
File,
Directory
};

enum RelativeStorage
{
Absolute,
RelativeProject,
RelativeDefaultPath
};

explicit QgsFilePickerWidget( QWidget* parent /TransferThis/ );

~QgsFilePickerWidget();

//! Returns the current file path
QString filePath();

//! Sets the file path
void setFilePath( QString path );

//! defines if the widget is readonly
void setReadOnly( bool readOnly );

//! returns the open file dialog title
QString dialogTitle() const;
/**
* @brief setDialogTitle defines the open file dialog title
* @note if not defined, the title is "Select a file" or "Select a directory" depending on the configuration.
*/
void setDialogTitle( QString title );

//! determines if the tool button is shown
bool filePickerButtonVisible() const;
//! determines if the tool button is shown
void setFilePickerButtonVisible( bool visible );

//! determines if the file path will be shown as a link
bool useLink() const;
//! determines if the file path will be shown as a link
void setUseLink( bool useLink );

//! determines if the links shows the full path or not
bool fullUrl() const;
void setFullUrl( bool fullUrl );

//! determinies the default root path
QString defaultRoot() const;
void setDefaultRoot( QString defaultRoot );

//! determines the storage mode (i.e. file or directory)
QgsFilePickerWidget::StorageMode storageMode() const;
void setStorageMode( QgsFilePickerWidget::StorageMode storageMode );

//! determines if the relative path is with respect to the project path or the default path
QgsFilePickerWidget::RelativeStorage relativeStorage() const;
void setRelativeStorage( QgsFilePickerWidget::RelativeStorage relativeStorage );

signals:
void fileChanged( QString );


};
@@ -69,6 +69,10 @@ QgsFilePickerWidget::QgsFilePickerWidget( QWidget *parent )
setLayout( layout );
}

QgsFilePickerWidget::~QgsFilePickerWidget()
{
}

QString QgsFilePickerWidget::filePath()
{
return mFilePath;
@@ -50,9 +50,10 @@ class GUI_EXPORT QgsFilePickerWidget : public QWidget
RelativeDefaultPath
};

public:
explicit QgsFilePickerWidget( QWidget *parent = 0 );

~QgsFilePickerWidget();

//! Returns the current file path
QString filePath();

0 comments on commit 492f1ad

Please sign in to comment.
You can’t perform that action at this time.