18#include <QtWidgets/private/qtwidgetsglobal_p.h>
21#include "private/qdialog_p.h"
22#include "qplatformdefs.h"
24#include <QtGui/private/qfilesystemmodel_p.h>
37#if QT_CONFIG(completer)
43#if QT_CONFIG(fscompleter)
47#if defined (Q_OS_UNIX)
95 void createToolButtons();
96 void createMenuActions();
103 QList<QUrl> userSelectedFiles()
const;
105 QList<QUrl> addDefaultSuffixToUrls(
const QList<QUrl> &urlsToFix)
const;
108 inline void updateLookInLabel();
109 inline void updateFileNameLabel();
110 inline void updateFileTypeLabel();
111 void updateOkButtonText(
bool saveAsOnFolder =
false);
112 void updateCancelButtonText();
119 inline QString rootPath()
const;
129 return path.mid(separator + 1);
147 n.replace(u
'\\', u
'/');
154#if QT_CONFIG(settings)
156 bool restoreFromSettings();
159 bool restoreWidgetState(
QStringList &history,
int splitterPosition);
160 static void setLastVisitedDirectory(
const QUrl &
dir);
161 void retranslateWindowTitle();
162 void retranslateStrings();
164 void saveHistorySelection();
167 void pathChanged(
const QString &);
168 void navigate(HistoryItem &);
169 void navigateBackward();
170 void navigateForward();
171 void navigateToParent();
174 void showDetailsView();
176 void renameCurrent();
177 void deleteCurrent();
180 void updateOkButton();
183 void emitUrlSelected(
const QUrl &
file);
184 void emitUrlsSelected(
const QList<QUrl> &
files);
185 void nativeCurrentChanged(
const QUrl &
file);
187 void goToDirectory(
const QString &);
188 void useNameFilter(
int index);
189 void selectionChanged();
191 void autoCompleteFileName(
const QString &);
196#if QT_CONFIG(proxymodel)
204#if QT_CONFIG(fscompleter)
223 bool canBeNativeDialog()
const override;
224 void setVisible(
bool visible)
override;
225 inline bool usingWidgets()
const;
228 inline QUrl directory_sys()
const;
229 inline void selectFile_sys(
const QUrl &filename);
230 inline QList<QUrl> selectedFiles_sys()
const;
231 inline void setFilter_sys();
233 inline QString selectedMimeTypeFilter_sys()
const;
235 inline QString selectedNameFilter_sys()
const;
320#if QT_CONFIG(proxymodel)
321 return proxyModel ? proxyModel->mapToSource(
index) :
index;
327#if QT_CONFIG(proxymodel)
328 return proxyModel ? proxyModel->mapFromSource(
index) :
index;
353 return helper->directory();
371 return helper->selectedFiles();
372 return QList<QUrl>();
384 helper->selectMimeTypeFilter(
filter);
390 return helper->selectedMimeTypeFilter();
398 helper->selectNameFilter(
filter);
404 return helper->selectedNameFilter();
The QAbstractItemView class provides the basic functionality for item view classes.
The QAbstractProxyModel class provides a base class for proxy item models that can do sorting,...
The QAction class provides an abstraction for user commands that can be added to different user inter...
The QComboBox widget combines a button with a dropdown list.
The QCompleter class provides completions based on an item model.
DialogCode
The value returned by a modal dialog.
static QChar separator()
Returns the native directory separator: "/" under Unix and "\\" under Windows.
static QString toNativeSeparators(const QString &pathName)
QCompleter that can deal with QFileSystemModel.
QFileDialogComboBox(QWidget *parent=nullptr)
QStringList history() const
void setHistory(const QStringList &paths)
void setFileDialogPrivate(QFileDialogPrivate *d_pointer)
void showPopup() override
Displays the list of items in the combobox.
void paintEvent(QPaintEvent *) override
\reimp
void keyPressEvent(QKeyEvent *e) override
FIXME: this is a hack to avoid propagating key press events to the dialog and from there to the "Ok" ...
void setFileDialogPrivate(QFileDialogPrivate *d_pointer)
QFileDialogLineEdit(QWidget *parent=nullptr)
void setFileDialogPrivate(QFileDialogPrivate *d_pointer)
QSize sizeHint() const override
QFileDialogListView(QWidget *parent=nullptr)
void keyPressEvent(QKeyEvent *e) override
QModelIndex mapFromSource(const QModelIndex &index) const
QDir::Filters filterForMode(QDir::Filters filters) const
QString selectedMimeTypeFilter_sys() const
QPointer< QObject > receiverToDisconnectOnClose
QByteArray signalToDisconnectOnClose
void selectNameFilter_sys(const QString &filter)
QScopedPointer< Ui_QFileDialog > qFileDialogUi
QAction * showHiddenAction
QList< QUrl > sidebarUrls
static QString toInternal(const QString &path)
QByteArray memberToDisconnectOnClose
QString basename(const QString &path) const
void selectMimeTypeFilter_sys(const QString &filter)
QList< QUrl > selectedFiles_sys() const
QUrl directory_sys() const
QFileIconProvider defaultIconProvider
QAction * newFolderAction
QList< HistoryItem > currentHistory
QModelIndex mapToSource(const QModelIndex &index) const
int currentHistoryLocation
QPlatformFileDialogHelper * platformFileDialogHelper() const
void setDirectory_sys(const QUrl &directory)
void selectFile_sys(const QUrl &filename)
QSharedPointer< QFileDialogOptions > options
QString selectedNameFilter_sys() const
void keyPressEvent(QKeyEvent *e) override
QSize sizeHint() const override
QFileDialogTreeView(QWidget *parent)
void setFileDialogPrivate(QFileDialogPrivate *d_pointer)
The QFileDialog class provides a dialog that allows users to select files or directories.
FileMode
This enum is used to indicate what the user may select in the file dialog; that is,...
DialogLabel
\value LookIn \value FileName \value FileType \value Accept \value Reject
The QFileSystemModel class provides a data model for the local filesystem.
QString rootPath() const
The currently set root path.
The QGridLayout class lays out widgets in a grid.
The QHBoxLayout class lines up widgets horizontally.
The QKeyEvent class describes a key event.
The QLineEdit widget is a one-line text editor.
The QListView class provides a list or icon view onto a model.
QObject * parent() const
Returns a pointer to the parent object.
The QPaintEvent class contains event parameters for paint events.
\inmodule QtCore\reentrant
\macro QT_RESTRICTED_CAST_FROM_ASCII
The QTreeView class provides a default model/view implementation of a tree view.
Combined button and popup list for selecting options.
GLsizei const GLuint * paths
GLuint GLsizei const GLchar * label
[43]
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
GLsizei const GLchar *const * path
static qreal position(const QQuickItem *item, QQuickAnchors::Anchor anchorLine)
#define QStringLiteral(str)
#define QT_REQUIRE_CONFIG(feature)
static QT_BEGIN_NAMESPACE void init(QTextBoundaryFinder::BoundaryType type, QStringView str, QCharAttributes *attributes)
QUrl url("example.com")
[constructor-url-reference]
const QStringList filters({"Image files (*.png *.xpm *.jpg)", "Text files (*.txt)", "Any files (*)" })
[6]
selection select(topLeft, bottomRight)
QCompleter * completer
[0]
QFileDialog::Options options
QFileDialogArgs(const QUrl &url={})
PersistentModelIndexList selection
bool createDirectory(const QString &directory, QString *errorMessage, bool dryRun)