QGIS/python/gui/auto_generated/qgsfilewidget.sip.in

220 lines
5.8 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 *
************************************************************************/
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,
GetMultipleFiles,
SaveFile,
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(s)
2017-12-15 10:36:55 -04:00
when multiple files are selected, they are quoted and separated
by a single space (for example: '"/path/foo" "path/bar"')
2018-05-25 09:00:58 +10:00
.. seealso:: :py:func:`splitFilePaths`
%End
2016-01-11 16:52:39 +01:00
static QStringList splitFilePaths( const QString &path );
%Docstring
Split the the quoted and space separated ``path`` and returns a QString list
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`filePath`
%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
%End
void setDialogTitle( const QString &title );
%Docstring
setDialogTitle defines the open file dialog title
2017-12-15 10:36:55 -04:00
.. note::
if not defined, the title is "Select a file" or "Select a directory" or "Select one or more files" depending on the configuration.
%End
2016-01-11 16:52:39 +01:00
QString filter() const;
%Docstring
returns the filters used for QDialog.getOpenFileName
%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.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
: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
QFileDialog::Options options() const;
%Docstring
Returns additional options used for QFileDialog
.. versionadded:: 3.14
%End
void setOptions( QFileDialog::Options options );
%Docstring
setOptions sets additional options used for QFileDialog. These options affect the look and feel of the QFileDialog
.. versionadded:: 3.14
%End
void setSelectedFilter( const QString &selectedFilter );
%Docstring
Sets the selected filter when the file dialog opens.
%End
QString selectedFilter() const;
%Docstring
Returns the selected filter from the last opened file dialog.
%End
void setConfirmOverwrite( bool confirmOverwrite );
%Docstring
2017-12-15 10:36:55 -04:00
Sets whether a confirmation to overwrite an existing file will appear.
By default, a confirmation will appear.
2017-12-15 21:36:08 -04:00
2019-02-26 19:54:09 +10:00
:param confirmOverwrite: If set to ``True``, an overwrite confirmation will be shown
%End
bool confirmOverwrite() const;
%Docstring
2017-12-15 10:36:55 -04:00
Returns whether a confirmation will be shown when overwriting an existing file
%End
bool fileWidgetButtonVisible() const;
%Docstring
determines if the tool button is shown
%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
%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
%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
%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)
%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
%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
QgsFilterLineEdit *lineEdit();
%Docstring
2017-12-15 10:36:55 -04:00
Returns a pointer to the widget's line edit, which can be used to customize
the appearance and behavior of the line edit portion of the widget.
.. versionadded:: 3.0
%End
2016-01-11 16:52:39 +01:00
signals:
void fileChanged( const QString &path );
%Docstring
Emitted whenever the current file or directory ``path`` 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 *
************************************************************************/