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();
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 _q_pathChanged(
const QString &);
168 void navigate(HistoryItem &);
169 void _q_navigateBackward();
170 void _q_navigateForward();
171 void _q_navigateToParent();
172 void _q_createDirectory();
173 void _q_showListView();
174 void _q_showDetailsView();
176 void _q_renameCurrent();
177 void _q_deleteCurrent();
178 void _q_showHidden();
180 void _q_updateOkButton();
183 void _q_emitUrlSelected(
const QUrl &
file);
185 void _q_nativeCurrentChanged(
const QUrl &
file);
187 void _q_goToDirectory(
const QString &);
188 void _q_useNameFilter(
int index);
189 void _q_selectionChanged();
190 void _q_goToUrl(
const QUrl &
url);
191 void _q_autoCompleteFileName(
const QString &);
196#if QT_CONFIG(proxymodel)
204#if QT_CONFIG(fscompleter)
224 inline bool usingWidgets()
const;
227 inline QUrl directory_sys()
const;
228 inline void selectFile_sys(
const QUrl &filename);
230 inline void setFilter_sys();
232 inline QString selectedMimeTypeFilter_sys()
const;
234 inline QString selectedNameFilter_sys()
const;
319#if QT_CONFIG(proxymodel)
320 return proxyModel ? proxyModel->mapToSource(
index) :
index;
326#if QT_CONFIG(proxymodel)
327 return proxyModel ? proxyModel->mapFromSource(
index) :
index;
352 return helper->directory();
370 return helper->selectedFiles();
383 helper->selectMimeTypeFilter(
filter);
389 return helper->selectedMimeTypeFilter();
397 helper->selectNameFilter(
filter);
403 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 is a combined button and popup list.
The QCompleter class provides completions based on an item model.
virtual void initHelper(QPlatformDialogHelper *)
virtual void helperDone(QDialog::DialogCode, QPlatformDialogHelper *)
QPlatformDialogHelper * platformHelper() const
virtual bool canBeNativeDialog() const
virtual void helperPrepareShow(QPlatformDialogHelper *)
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 allow users to select files or directories.
FileMode
This enum is used to indicate what the user may select in the file dialog; i.e.
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
qsizetype lastIndexOf(QChar c, Qt::CaseSensitivity cs=Qt::CaseSensitive) const noexcept
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)
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
PersistentModelIndexList selection
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent