15 #include <QStringList> 64 typedef QDialog Superclass;
92 ExistingFilesAndDirectories
111 const QString& directory = QString(),
const QString& filter = QString(),
112 bool supportGroupFiles =
true,
bool onlyBrowseRemotely =
true);
119 void setFileMode(
FileMode, vtkTypeUInt32);
127 void setRecentlyUsedExtension(
const QString& fileExtension, vtkTypeUInt32 location);
128 void setRecentlyUsedExtension(
const QString& fileExtension);
134 QStringList getSelectedFiles(
int index = 0);
139 QList<QStringList> getAllSelectedFiles();
144 int getSelectedFilterIndex();
149 void accept()
override;
154 bool selectFile(
const QString&);
159 void setShowHidden(
const bool& hidden);
164 bool getShowHidden();
178 const QString& title = QString(),
const QString& directory = QString(),
179 const QString& filter = QString())
181 const QPair<QString, vtkTypeUInt32> result =
185 static QPair<QString, vtkTypeUInt32> getSaveFileNameAndLocation(
pqServer* server,
186 QWidget* parentWdg,
const QString&
title = QString(),
const QString& directory = QString(),
187 const QString& filter = QString(),
bool supportGroupFiles =
false,
188 bool onlyBrowseRemotely =
true);
194 void filesSelected(
const QList<QStringList>&);
203 void filesSelected(
const QStringList&);
210 void fileAccepted(
const QString&);
213 bool acceptExistingFiles();
214 bool acceptDefault(
const bool& checkForGrouping);
216 QStringList buildFileGroup(
const QString& filename);
218 void showEvent(QShowEvent* showEvent)
override;
221 void onLocationChanged(
int fs);
223 void onNavigate(
const QString& = QString());
225 void onNavigateBack();
226 void onNavigateForward();
227 void onNavigateDown(
const QModelIndex&);
228 void onFilterChange(
const QString&);
230 void onClickedRecent(
const QModelIndex&);
231 void onClickedFavorite(
const QModelIndex&);
232 void onClickedFile(
const QModelIndex&);
234 void onActivateFavorite(
const QModelIndex&);
235 void onActivateLocation(
const QModelIndex&);
236 void onActivateRecent(
const QModelIndex&);
237 void onDoubleClickFile(
const QModelIndex&);
239 void onTextEdited(
const QString&);
241 void onShowHiddenFiles(
const bool& hide);
243 void onShowDetailToggled(
bool show);
245 void onGroupFilesToggled(
bool group);
248 void fileSelectionChanged();
251 void onContextMenuRequested(
const QPoint& pos);
254 void onFavoritesContextMenuRequested(
const QPoint& pos);
256 void AddDirectoryToFavorites(QString
const&);
257 void RemoveDirectoryFromFavorites(QString
const&);
258 void FilterDirectoryFromFavorites(
const QString& filter);
260 void onAddCurrentDirectoryToFavorites();
261 void onRemoveSelectedDirectoriesFromFavorites();
262 void onResetFavoritesToSystemDefault();
265 void onCreateNewFolder();
270 void addToFilesSelected(
const QStringList&);
275 void emitFilesSelectionDone();
282 void updateButtonStates(vtkTypeUInt32 fileSystem);
288 class pqImplementation;
289 QMap<vtkTypeUInt32, QPointer<pqImplementation>> Implementations;
290 vtkTypeUInt32 SelectedLocation;
292 QPointer<pqServer> Server;
293 const QString StartDirectory;
294 const QString NameFilter;
295 bool SupportsGroupFiles;
296 vtkTypeUInt32 DefaultLocation;
297 QString RecentlyUsedExtension;
299 void addImplementation(vtkTypeUInt32
location);
302 bool acceptInternal(
const QStringList& selected_files);
303 QString fixFileExtension(
const QString& filename,
const QString& filter);
309 void saveState(vtkTypeUInt32 fileSystem);
317 void restoreState(vtkTypeUInt32 fileSystem);
322 #endif // pqFileDialog_h
vtkTypeUInt32 getSelectedLocation() const
Get the location that the selected files/directories belong to.
static QString getSaveFileName(pqServer *server, QWidget *parentWdg, const QString &title=QString(), const QString &directory=QString(), const QString &filter=QString())
static method similar to QFileDialog::getSaveFileName(...) to make it easier to get a file name to sa...
FileMode
choose mode for selecting file/folder.
Provides a standard file dialog "front-end" for the pqFileDialogModel "back-end", i...
static QPair< QString, vtkTypeUInt32 > getSaveFileNameAndLocation(pqServer *server, QWidget *parentWdg, const QString &title=QString(), const QString &directory=QString(), const QString &filter=QString(), bool supportGroupFiles=false, bool onlyBrowseRemotely=true)
static method similar to QFileDialog::getSaveFileName(...) to make it easier to get a file name to sa...
pqServer (should be renamed to pqSession) is a pqServerManagerModelItem subclass that represents a vt...