14 #include <QStringList> 63 typedef QDialog Superclass;
91 ExistingFilesAndDirectories
110 const QString& directory = QString(),
const QString& filter = QString(),
111 bool supportGroupFiles =
true,
bool onlyBrowseRemotely =
true);
118 void setFileMode(
FileMode, vtkTypeUInt32);
126 void setRecentlyUsedExtension(
const QString& fileExtension, vtkTypeUInt32 location);
127 void setRecentlyUsedExtension(
const QString& fileExtension);
133 QStringList getSelectedFiles(
int index = 0);
138 QList<QStringList> getAllSelectedFiles();
143 int getSelectedFilterIndex();
148 void accept()
override;
153 bool selectFile(
const QString&);
158 void setShowHidden(
const bool& hidden);
163 bool getShowHidden();
177 const QString& title = QString(),
const QString& directory = QString(),
178 const QString& filter = QString())
180 const QPair<QString, vtkTypeUInt32> result =
184 static QPair<QString, vtkTypeUInt32> getSaveFileNameAndLocation(
pqServer* server,
185 QWidget* parentWdg,
const QString&
title = QString(),
const QString& directory = QString(),
186 const QString& filter = QString(),
bool supportGroupFiles =
false,
187 bool onlyBrowseRemotely =
true);
193 void filesSelected(
const QList<QStringList>&);
202 void filesSelected(
const QStringList&);
209 void fileAccepted(
const QString&);
212 bool acceptExistingFiles();
213 bool acceptDefault(
const bool& checkForGrouping);
215 QStringList buildFileGroup(
const QString& filename);
217 void showEvent(QShowEvent* showEvent)
override;
220 void onLocationChanged(
int fs);
222 void onNavigate(
const QString& = QString());
224 void onNavigateBack();
225 void onNavigateForward();
226 void onNavigateDown(
const QModelIndex&);
227 void onFilterChange(
const QString&);
229 void onClickedRecent(
const QModelIndex&);
230 void onClickedFavorite(
const QModelIndex&);
231 void onClickedFile(
const QModelIndex&);
233 void onActivateFavorite(
const QModelIndex&);
234 void onActivateLocation(
const QModelIndex&);
235 void onActivateRecent(
const QModelIndex&);
236 void onDoubleClickFile(
const QModelIndex&);
238 void onTextEdited(
const QString&);
240 void onShowHiddenFiles(
const bool& hide);
242 void onShowDetailToggled(
bool show);
244 void onGroupFilesToggled(
bool group);
247 void fileSelectionChanged();
250 void onContextMenuRequested(
const QPoint& pos);
253 void onFavoritesContextMenuRequested(
const QPoint& pos);
255 void AddDirectoryToFavorites(QString
const&);
256 void RemoveDirectoryFromFavorites(QString
const&);
257 void FilterDirectoryFromFavorites(
const QString& filter);
259 void onAddCurrentDirectoryToFavorites();
260 void onRemoveSelectedDirectoriesFromFavorites();
261 void onResetFavoritesToSystemDefault();
264 void onCreateNewFolder();
269 void addToFilesSelected(
const QStringList&);
274 void emitFilesSelectionDone();
281 void updateButtonStates(vtkTypeUInt32 fileSystem);
287 class pqImplementation;
288 QMap<vtkTypeUInt32, pqImplementation*> Implementations;
289 vtkTypeUInt32 SelectedLocation;
292 bool acceptInternal(
const QStringList& selected_files);
293 QString fixFileExtension(
const QString& filename,
const QString& filter);
299 void saveState(vtkTypeUInt32 fileSystem);
307 void restoreState(vtkTypeUInt32 fileSystem);
312 #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...