QgsSvgSourceLineEdit class

A line edit widget with toolbutton for setting an SVG image path.

Designed for use with QgsSvgCache.

Base classes

class QgsAbstractFileContentSourceLineEdit
Abstract base class for a widgets which allows users to select content from a file, embedding a file, etc.

Constructors, destructors, conversion operators

QgsSvgSourceLineEdit(QWidget* parent = nullptr)
Constructor for QgsSvgSourceLineEdit, with the specified parent widget.
QgsSvgSourceLineEdit(QWidget* parent = nullptr)
Constructor for QgsSvgSourceLineEdit, with the specified parent widget.

Public functions

void setLastPathSettingsKey(const QString& key)
Sets a specific settings key to use when storing the last used path for the SVG source.
auto source() const -> QString
Returns the current SVG source.

Signals

void sourceChanged(const QString& source)
Emitted whenever the SVG source is changed in the widget.

Public slots

void setSource(const QString& source)
Sets a new source to show in the widget.

Function documentation

QgsSvgSourceLineEdit::QgsSvgSourceLineEdit(QWidget* parent = nullptr)

Constructor for QgsSvgSourceLineEdit, with the specified parent widget.

void QgsSvgSourceLineEdit::setLastPathSettingsKey(const QString& key)

Sets a specific settings key to use when storing the last used path for the SVG source.

QString QgsSvgSourceLineEdit::source() const

Returns the current SVG source.

void QgsSvgSourceLineEdit::sourceChanged(const QString& source) signal

Emitted whenever the SVG source is changed in the widget.

void QgsSvgSourceLineEdit::setSource(const QString& source) public slot

Sets a new source to show in the widget.