Skip to content
Permalink
Browse files

Add a new widget QgsImageSourceLineEdit, based on QgsSvgSourceLineEdit

Allows images to be set to base64 embedded images, remote urls, etc
when used alongside QgsImageCache
  • Loading branch information
nyalldawson committed Dec 5, 2018
1 parent cce5c4e commit 9d28a9699c0a8936c7d409f2339eda7a16fa849c
@@ -1,35 +1,39 @@
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgssvgsourcelineedit.h *
* src/gui/qgsfilecontentsourcelineedit.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/




class QgsSvgSourceLineEdit : QWidget
class QgsAbstractFileContentSourceLineEdit : QWidget /Abstract/
{
%Docstring
A line edit widget with toolbutton for setting an SVG image path.
Abstract base class for a widgets which allows users to select content from a file, embedding a file, etc.

.. versionadded:: 3.4
This class is designed to be used by content which is managed by a QgsAbstractContentCache,
i.e. it can handle either direct file paths, base64 encoded contents, or remote HTTP
urls.

.. versionadded:: 3.6
%End

%TypeHeaderCode
#include "qgssvgsourcelineedit.h"
#include "qgsfilecontentsourcelineedit.h"
%End
public:

QgsSvgSourceLineEdit( QWidget *parent /TransferThis/ = 0 );
QgsAbstractFileContentSourceLineEdit( QWidget *parent /TransferThis/ = 0 );
%Docstring
Constructor for QgsSvgSourceLineEdit, with the specified ``parent`` widget.
Constructor for QgsAbstractFileContentSourceLineEdit, with the specified ``parent`` widget.
%End

QString source() const;
%Docstring
Returns the current SVG source.
Returns the current file source.

.. seealso:: :py:func:`setSource`

@@ -39,7 +43,7 @@ Returns the current SVG source.
void setLastPathSettingsKey( const QString &key );
%Docstring
Sets a specific settings ``key`` to use when storing the last
used path for the SVG source.
used path for the file source.
%End

public slots:
@@ -57,15 +61,64 @@ Sets a new ``source`` to show in the widget.

void sourceChanged( const QString &source );
%Docstring
Emitted whenever the SVG source is changed in the widget.
Emitted whenever the file source is changed in the widget.
%End

};

class QgsSvgSourceLineEdit : QgsAbstractFileContentSourceLineEdit
{
%Docstring
A line edit widget with toolbutton for setting an SVG image path.

Designed for use with :py:class:`QgsSvgCache`.

.. seealso:: :py:class:`QgsImageSourceLineEdit`

.. versionadded:: 3.4
%End

%TypeHeaderCode
#include "qgsfilecontentsourcelineedit.h"
%End
public:

QgsSvgSourceLineEdit( QWidget *parent /TransferThis/ = 0 );
%Docstring
Constructor for QgsSvgSourceLineEdit, with the specified ``parent`` widget.
%End

};


class QgsImageSourceLineEdit : QgsAbstractFileContentSourceLineEdit
{
%Docstring
A line edit widget with toolbutton for setting a raster image path.

Designed for use with :py:class:`QgsImageCache`.

.. seealso:: :py:class:`QgsSvgSourceLineEdit`

.. versionadded:: 3.6
%End

%TypeHeaderCode
#include "qgsfilecontentsourcelineedit.h"
%End
public:

QgsImageSourceLineEdit( QWidget *parent /TransferThis/ = 0 );
%Docstring
Constructor for QgsImageSourceLineEdit, with the specified ``parent`` widget.
%End

};

/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgssvgsourcelineedit.h *
* src/gui/qgsfilecontentsourcelineedit.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
@@ -116,6 +116,7 @@
%Include auto_generated/qgsfeaturelistcombobox.sip
%Include auto_generated/qgsfieldvalidator.sip
%Include auto_generated/qgsfieldvalueslineedit.sip
%Include auto_generated/qgsfilecontentsourcelineedit.sip
%Include auto_generated/qgsfilewidget.sip
%Include auto_generated/qgsfilterlineedit.sip
%Include auto_generated/qgsfloatingwidget.sip
@@ -203,7 +204,6 @@
%Include auto_generated/qgsstatusbar.sip
%Include auto_generated/qgssublayersdialog.sip
%Include auto_generated/qgssubstitutionlistwidget.sip
%Include auto_generated/qgssvgsourcelineedit.sip
%Include auto_generated/qgssymbolbutton.sip
%Include auto_generated/qgstablewidgetbase.sip
%Include auto_generated/qgstabwidget.sip
@@ -270,6 +270,7 @@ SET(QGIS_GUI_SRCS
qgsfeaturelistcombobox.cpp
qgsfieldvalidator.cpp
qgsfieldvalueslineedit.cpp
qgsfilecontentsourcelineedit.cpp
qgsfilewidget.cpp
qgsfilterlineedit.cpp
qgsfloatingwidget.cpp
@@ -369,7 +370,6 @@ SET(QGIS_GUI_SRCS
qgssubstitutionlistwidget.cpp
qgssqlcomposerdialog.cpp
qgsstatusbar.cpp
qgssvgsourcelineedit.cpp
qgssymbolbutton.cpp
qgstablewidgetbase.cpp
qgstabwidget.cpp
@@ -450,6 +450,7 @@ SET(QGIS_GUI_MOC_HDRS
qgsfeaturelistcombobox.h
qgsfieldvalidator.h
qgsfieldvalueslineedit.h
qgsfilecontentsourcelineedit.h
qgsfilewidget.h
qgsfilterlineedit.h
qgsfloatingwidget.h
@@ -542,7 +543,6 @@ SET(QGIS_GUI_MOC_HDRS
qgsstatusbar.h
qgssublayersdialog.h
qgssubstitutionlistwidget.h
qgssvgsourcelineedit.h
qgssymbolbutton.h
qgstablewidgetbase.h
qgstabwidget.h

0 comments on commit 9d28a96

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