src/eric7/EricWidgets/EricPathPickerDialog.py

branch
server
changeset 10630
552a790fd9bc
parent 10439
21c28b0f9e41
child 11035
e1e1d6e317c7
equal deleted inserted replaced
10629:b0d14cba79b1 10630:552a790fd9bc
75 75
76 @param mode picker mode 76 @param mode picker mode
77 @type EricPathPickerModes 77 @type EricPathPickerModes
78 """ 78 """
79 self.__pathPicker.setMode(mode) 79 self.__pathPicker.setMode(mode)
80
81 def setPickerRemote(self, remote):
82 """
83 Public method to set the remote mode of the path picker.
84
85 @param remote flag indicating the remote mode
86 @type bool
87 """
88 self.__pathPicker.setRemote(remote)
80 89
81 def setPickerFilters(self, filters): 90 def setPickerFilters(self, filters):
82 """ 91 """
83 Public method to set the filters of the path picker. 92 Public method to set the filters of the path picker.
84 93
132 label, 141 label,
133 mode=EricPathPickerModes.OPEN_FILE_MODE, 142 mode=EricPathPickerModes.OPEN_FILE_MODE,
134 strPath=None, 143 strPath=None,
135 defaultDirectory=None, 144 defaultDirectory=None,
136 filters=None, 145 filters=None,
146 remote=False,
137 ): 147 ):
138 """ 148 """
139 Function to get a file or directory path from the user. 149 Function to get a file or directory path from the user.
140 150
141 @param parent reference to the parent widget 151 @param parent reference to the parent widget
151 @param defaultDirectory default directory of the path picker selection 161 @param defaultDirectory default directory of the path picker selection
152 dialog (defaults to None) 162 dialog (defaults to None)
153 @type str (optional) 163 @type str (optional)
154 @param filters list of file filters (defaults to None) 164 @param filters list of file filters (defaults to None)
155 @type list of str (optional) 165 @type list of str (optional)
166 @param remote flag indicating the remote mode (defaults to False)
167 @type bool (optional)
156 @return tuple containing the entered path and a flag indicating that the 168 @return tuple containing the entered path and a flag indicating that the
157 user pressed the OK button 169 user pressed the OK button
158 @rtype tuple of (str, bool) 170 @rtype tuple of (str, bool)
159 """ 171 """
160 # step 1: setup of the dialog 172 # step 1: setup of the dialog
162 if title: 174 if title:
163 dlg.setTitle(title) 175 dlg.setTitle(title)
164 if label: 176 if label:
165 dlg.setLabelText(label) 177 dlg.setLabelText(label)
166 dlg.setPickerMode(mode) 178 dlg.setPickerMode(mode)
179 dlg.setPickerRemote(remote)
167 if strPath: 180 if strPath:
168 dlg.setPickerPath(strPath) 181 dlg.setPickerPath(strPath)
169 if defaultDirectory: 182 if defaultDirectory:
170 dlg.setDefaultDirectory(defaultDirectory) 183 dlg.setDefaultDirectory(defaultDirectory)
171 if filters is not None and len(filters) > 0: 184 if filters is not None and len(filters) > 0:

eric ide

mercurial