QGIS/python/gui/qgsfilewidget.sip

167 lines
4.4 KiB
Plaintext
Raw Normal View History

/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgsfilewidget.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
2016-01-11 16:52:39 +01:00
class QgsFileWidget : QWidget
2016-01-11 16:52:39 +01:00
{
%Docstring
The QgsFileWidget class creates a widget for selecting a file or a folder.
2016-01-11 16:52:39 +01:00
%End
%TypeHeaderCode
#include "qgsfilewidget.h"
%End
%ConvertToSubClassCode
if ( qobject_cast<QgsFileWidget *>( sipCpp ) )
sipType = sipType_QgsFileWidget;
else
sipType = NULL;
%End
2016-01-11 16:52:39 +01:00
public:
2016-01-11 16:52:39 +01:00
enum StorageMode
{
GetFile,
GetDirectory
2016-01-11 16:52:39 +01:00
};
enum RelativeStorage
{
Absolute,
RelativeProject,
RelativeDefaultPath
};
explicit QgsFileWidget( QWidget *parent /TransferThis/ = 0 );
%Docstring
QgsFileWidget creates a widget for selecting a file or a folder.
%End
2016-01-11 16:52:39 +01:00
QString filePath();
%Docstring
Returns the current file path
:rtype: str
%End
2016-01-11 16:52:39 +01:00
void setFilePath( QString path );
%Docstring
Sets the file path
%End
2016-01-11 16:52:39 +01:00
void setReadOnly( bool readOnly );
%Docstring
defines if the widget is readonly
%End
2016-01-11 16:52:39 +01:00
QString dialogTitle() const;
%Docstring
returns the open file dialog title
:rtype: str
%End
void setDialogTitle( const QString &title );
%Docstring
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.
%End
2016-01-11 16:52:39 +01:00
QString filter() const;
%Docstring
returns the filters used for QDialog.getOpenFileName
:rtype: str
%End
void setFilter( const QString &filter );
%Docstring
setFilter sets the filter used by the model to filters. The filter is used to specify the kind of files that should be shown.
\param filter Only files that match the given filter are shown, it may be an empty string. If you want multiple filters, separate them with ';;',
%End
bool fileWidgetButtonVisible() const;
%Docstring
determines if the tool button is shown
:rtype: bool
%End
void setFileWidgetButtonVisible( bool visible );
%Docstring
determines if the tool button is shown
%End
2016-01-11 16:52:39 +01:00
bool useLink() const;
%Docstring
determines if the file path will be shown as a link
:rtype: bool
%End
2016-01-11 16:52:39 +01:00
void setUseLink( bool useLink );
%Docstring
determines if the file path will be shown as a link
%End
2016-01-11 16:52:39 +01:00
bool fullUrl() const;
%Docstring
returns if the links shows the full path or not
:rtype: bool
%End
2016-01-11 16:52:39 +01:00
void setFullUrl( bool fullUrl );
%Docstring
determines if the links shows the full path or not
%End
2016-01-11 16:52:39 +01:00
QString defaultRoot() const;
%Docstring
returns the default root path
:rtype: str
%End
void setDefaultRoot( const QString &defaultRoot );
%Docstring
determines the default root path used as the first shown location when picking a file and used if the RelativeStorage is RelativeDefaultPath
%End
2016-01-11 16:52:39 +01:00
QgsFileWidget::StorageMode storageMode() const;
%Docstring
returns the storage mode (i.e. file or directory)
:rtype: QgsFileWidget.StorageMode
%End
void setStorageMode( QgsFileWidget::StorageMode storageMode );
%Docstring
determines the storage mode (i.e. file or directory)
%End
2016-01-11 16:52:39 +01:00
QgsFileWidget::RelativeStorage relativeStorage() const;
%Docstring
returns if the relative path is with respect to the project path or the default path
:rtype: QgsFileWidget.RelativeStorage
%End
void setRelativeStorage( QgsFileWidget::RelativeStorage relativeStorage );
%Docstring
determines if the relative path is with respect to the project path or the default path
%End
2016-01-11 16:52:39 +01:00
signals:
void fileChanged( const QString & );
%Docstring
emitted as soon as the current file or directory is changed
%End
2016-01-11 16:52:39 +01:00
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgsfilewidget.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/