2017-06-08 15:30:38 +02:00
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
2017-08-06 13:39:03 +02:00
|
|
|
* src/gui/symbology/qgssvgselectorwidget.h *
|
2017-06-08 15:30:38 +02:00
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-06-22 19:37:41 +02:00
|
|
|
class QgsSvgSelectorListModel : QAbstractListModel
|
|
|
|
{
|
2017-06-08 15:30:38 +02:00
|
|
|
%Docstring
|
|
|
|
A model for displaying SVG files with a preview icon. Population of the model is performed in
|
|
|
|
a background thread to ensure that initial creation of the model is responsive and does
|
|
|
|
not block the GUI.
|
|
|
|
%End
|
|
|
|
|
2013-06-22 19:37:41 +02:00
|
|
|
%TypeHeaderCode
|
2017-06-08 15:30:38 +02:00
|
|
|
#include "qgssvgselectorwidget.h"
|
2013-06-22 19:37:41 +02:00
|
|
|
%End
|
|
|
|
public:
|
2017-06-08 15:30:38 +02:00
|
|
|
|
2017-07-27 09:00:44 +10:00
|
|
|
QgsSvgSelectorListModel( QObject *parent /TransferThis/, int iconSize = 30 );
|
2017-06-08 15:30:38 +02:00
|
|
|
%Docstring
|
|
|
|
Constructor for QgsSvgSelectorListModel. All SVGs in folders from the application SVG
|
|
|
|
search paths will be shown.
|
|
|
|
\param parent parent object
|
2017-07-27 09:00:44 +10:00
|
|
|
\param iconSize desired size of SVG icons to create
|
2017-06-08 15:30:38 +02:00
|
|
|
%End
|
2013-06-22 19:37:41 +02:00
|
|
|
|
2017-07-27 09:00:44 +10:00
|
|
|
QgsSvgSelectorListModel( QObject *parent /TransferThis/, const QString &path, int iconSize = 30 );
|
2017-06-08 15:30:38 +02:00
|
|
|
%Docstring
|
|
|
|
Constructor for creating a model for SVG files in a specific path.
|
|
|
|
\param parent parent object
|
|
|
|
\param path initial path, which is recursively searched
|
2017-07-27 09:00:44 +10:00
|
|
|
\param iconSize desired size of SVG icons to create
|
2017-06-08 15:30:38 +02:00
|
|
|
%End
|
|
|
|
|
|
|
|
virtual int rowCount( const QModelIndex &parent = QModelIndex() ) const;
|
2013-06-22 19:37:41 +02:00
|
|
|
|
2017-06-08 15:30:38 +02:00
|
|
|
virtual QVariant data( const QModelIndex &index, int role = Qt::DisplayRole ) const;
|
|
|
|
|
|
|
|
|
|
|
|
protected:
|
2013-06-22 19:37:41 +02:00
|
|
|
|
|
|
|
};
|
|
|
|
|
2017-06-08 15:30:38 +02:00
|
|
|
|
2013-06-22 19:37:41 +02:00
|
|
|
class QgsSvgSelectorGroupsModel : QStandardItemModel
|
|
|
|
{
|
2017-06-08 15:30:38 +02:00
|
|
|
%Docstring
|
|
|
|
A model for displaying SVG search paths. Population of the model is performed in
|
|
|
|
a background thread to ensure that initial creation of the model is responsive and does
|
|
|
|
not block the GUI.
|
|
|
|
%End
|
|
|
|
|
2013-06-22 19:37:41 +02:00
|
|
|
%TypeHeaderCode
|
2017-06-08 15:30:38 +02:00
|
|
|
#include "qgssvgselectorwidget.h"
|
2013-06-22 19:37:41 +02:00
|
|
|
%End
|
|
|
|
public:
|
2017-05-01 18:13:15 +02:00
|
|
|
QgsSvgSelectorGroupsModel( QObject *parent /TransferThis/ );
|
2017-06-08 15:30:38 +02:00
|
|
|
~QgsSvgSelectorGroupsModel();
|
2013-06-22 19:37:41 +02:00
|
|
|
|
2017-06-08 15:30:38 +02:00
|
|
|
};
|
2013-06-22 19:37:41 +02:00
|
|
|
|
|
|
|
class QgsSvgSelectorWidget : QWidget
|
|
|
|
{
|
2017-06-08 15:30:38 +02:00
|
|
|
|
2013-06-22 19:37:41 +02:00
|
|
|
%TypeHeaderCode
|
2017-06-08 15:30:38 +02:00
|
|
|
#include "qgssvgselectorwidget.h"
|
2013-06-22 19:37:41 +02:00
|
|
|
%End
|
|
|
|
public:
|
2017-05-01 18:13:15 +02:00
|
|
|
QgsSvgSelectorWidget( QWidget *parent /TransferThis/ = 0 );
|
2013-06-22 19:37:41 +02:00
|
|
|
~QgsSvgSelectorWidget();
|
|
|
|
|
|
|
|
QString currentSvgPath() const;
|
2017-06-08 15:30:38 +02:00
|
|
|
%Docstring
|
|
|
|
:rtype: str
|
|
|
|
%End
|
2013-06-22 19:37:41 +02:00
|
|
|
|
|
|
|
public slots:
|
2017-05-01 18:13:15 +02:00
|
|
|
void setSvgPath( const QString &svgPath );
|
2017-06-08 15:30:38 +02:00
|
|
|
%Docstring
|
|
|
|
Accepts absolute paths
|
|
|
|
%End
|
2013-06-22 19:37:41 +02:00
|
|
|
|
|
|
|
signals:
|
2017-05-01 18:13:15 +02:00
|
|
|
void svgSelected( const QString &path );
|
2013-06-22 19:37:41 +02:00
|
|
|
|
|
|
|
protected:
|
|
|
|
void populateList();
|
2017-06-08 15:30:38 +02:00
|
|
|
|
2013-06-22 19:37:41 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
class QgsSvgSelectorDialog : QDialog
|
|
|
|
{
|
2017-06-08 15:30:38 +02:00
|
|
|
|
2013-06-22 19:37:41 +02:00
|
|
|
%TypeHeaderCode
|
2017-06-08 15:30:38 +02:00
|
|
|
#include "qgssvgselectorwidget.h"
|
2013-06-22 19:37:41 +02:00
|
|
|
%End
|
|
|
|
public:
|
2017-06-08 15:30:38 +02:00
|
|
|
|
|
|
|
QgsSvgSelectorDialog( QWidget *parent /TransferThis/ = 0,
|
|
|
|
Qt::WindowFlags fl = QgsGuiUtils::ModalDialogFlags,
|
2016-10-24 09:34:13 +10:00
|
|
|
QDialogButtonBox::StandardButtons buttons = QDialogButtonBox::Close | QDialogButtonBox::Ok,
|
2013-06-22 19:37:41 +02:00
|
|
|
Qt::Orientation orientation = Qt::Horizontal );
|
2017-06-08 15:30:38 +02:00
|
|
|
%Docstring
|
|
|
|
Constructor for QgsSvgSelectorDialog.
|
|
|
|
%End
|
2013-06-22 19:37:41 +02:00
|
|
|
~QgsSvgSelectorDialog();
|
|
|
|
|
2017-05-01 18:13:15 +02:00
|
|
|
QgsSvgSelectorWidget *svgSelector();
|
2017-06-08 15:30:38 +02:00
|
|
|
%Docstring
|
|
|
|
Returns pointer to the embedded SVG selector widget
|
|
|
|
:rtype: QgsSvgSelectorWidget
|
|
|
|
%End
|
2013-06-22 19:37:41 +02:00
|
|
|
|
2017-06-08 15:30:38 +02:00
|
|
|
protected:
|
2013-06-22 19:37:41 +02:00
|
|
|
};
|
2017-06-08 15:30:38 +02:00
|
|
|
|
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
2017-08-06 13:39:03 +02:00
|
|
|
* src/gui/symbology/qgssvgselectorwidget.h *
|
2017-06-08 15:30:38 +02:00
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|