17 #ifndef QGSSVGSELECTORWIDGET_H 18 #define QGSSVGSELECTORWIDGET_H 20 #include "ui_widget_svgselector.h" 23 #include <QAbstractListModel> 25 #include <QDialogButtonBox> 27 #include <QStandardItemModel> 30 #include <QElapsedTimer> 46 class GUI_EXPORT QgsSvgSelectorLoader :
public QThread 55 QgsSvgSelectorLoader(
QObject* parent =
nullptr );
57 ~QgsSvgSelectorLoader();
63 virtual void run()
override;
73 void setPath(
const QString& path )
96 void loadPath(
const QString& path );
97 void loadImages(
const QString& path );
106 class GUI_EXPORT QgsSvgGroupLoader :
public QThread 115 QgsSvgGroupLoader(
QObject* parent =
nullptr );
117 ~QgsSvgGroupLoader();
122 virtual void run()
override;
132 void setParentPaths(
const QStringList& parentPaths )
134 mParentPaths = parentPaths;
151 void loadGroup(
const QString& parentPath );
190 QgsSvgSelectorLoader* mSvgLoader;
217 QgsSvgGroupLoader* mLoader;
238 QString currentSvgPath()
const;
239 QString currentSvgPathToName()
const;
250 void setSvgPath(
const QString& svgPath );
253 void svgSelected(
const QString& path );
260 void svgSelectionChanged(
const QModelIndex& idx );
261 void updateCurrentSvgPath(
const QString& svgPath );
263 void on_mFilePushButton_clicked();
264 void updateLineEditFeedback(
bool ok,
const QString& tip =
QString() );
265 void on_mFileLineEdit_textChanged(
const QString& text );
281 Qt::Orientation orientation = Qt::Horizontal );
299 #endif // QGSSVGSELECTORWIDGET_H
QgsSvgSelectorWidget * mSvgSelector
static const Qt::WindowFlags ModalDialogFlags
virtual int rowCount(const QModelIndex &parent) const=0
A model for displaying SVG files with a preview icon.
QDialogButtonBox * buttonBox()
Returns the button box.
QVBoxLayout * layout()
Returns the central layout. Widgets added to it must have this dialog as parent.
QDialogButtonBox * mButtonBox
virtual QVariant data(const QModelIndex &index, int role) const=0
A model for displaying SVG search paths.
QgsSvgSelectorWidget * svgSelector()
Returns pointer to the embedded SVG selector widget.