/
qgsfilewidget.sip
186 lines (155 loc) · 5.04 KB
/
qgsfilewidget.sip
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
/************************************************************************
* 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
{
%Docstring
The QgsFileWidget class creates a widget for selecting a file or a folder.
%End
%TypeHeaderCode
#include "qgsfilewidget.h"
%End
%ConvertToSubClassCode
if ( qobject_cast<QgsFileWidget *>( sipCpp ) )
sipType = sipType_QgsFileWidget;
else
sipType = NULL;
%End
public:
enum StorageMode
{
GetFile,
GetDirectory,
GetMultipleFiles,
};
enum RelativeStorage
{
Absolute,
RelativeProject,
RelativeDefaultPath
};
explicit QgsFileWidget( QWidget *parent /TransferThis/ = 0 );
%Docstring
QgsFileWidget creates a widget for selecting a file or a folder.
%End
QString filePath();
%Docstring
Returns the current file path(s)
when multiple files are selected, they are quoted and separated
by a single space (for example: '"/path/foo" "path/bar"')
.. seealso:: :py:func:`filePaths`
:rtype: str
%End
static QStringList splitFilePaths( const QString &path );
%Docstring
Split the the quoted and space separated ``path`` and returns a QString list
.. seealso:: :py:func:`filePath`
:rtype: list of str
%End
void setFilePath( QString path );
%Docstring
Sets the file path
%End
void setReadOnly( bool readOnly );
%Docstring
defines if the widget is readonly
%End
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" or "Select one or more files" depending on the configuration.
%End
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
bool useLink() const;
%Docstring
determines if the file path will be shown as a link
:rtype: bool
%End
void setUseLink( bool useLink );
%Docstring
determines if the file path will be shown as a link
%End
bool fullUrl() const;
%Docstring
returns if the links shows the full path or not
:rtype: bool
%End
void setFullUrl( bool fullUrl );
%Docstring
determines if the links shows the full path or not
%End
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
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
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
QgsFilterLineEdit *lineEdit();
%Docstring
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
:rtype: QgsFilterLineEdit
%End
signals:
void fileChanged( const QString & );
%Docstring
emitted as soon as the current file or directory is changed
%End
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgsfilewidget.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/