Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
|
#include <qfiledialog_p.h>
Classes | |
struct | HistoryItem |
Public Types | |
using | PersistentModelIndexList = QList<QPersistentModelIndex> |
Public Types inherited from QWidgetPrivate | |
enum | DrawWidgetFlag { DrawAsRoot = 0x01 , DrawPaintOnScreen = 0x02 , DrawRecursive = 0x04 , DrawInvisible = 0x08 , DontSubtractOpaqueChildren = 0x10 , DontDrawOpaqueChildren = 0x20 , DontDrawNativeChildren = 0x40 , DontSetCompositionMode = 0x80 , UseEffectRegionBounds = 0x100 } |
enum | Direction { DirectionNorth = 0x01 , DirectionEast = 0x10 , DirectionSouth = 0x02 , DirectionWest = 0x20 } |
enum class | WindowHandleMode { Direct , Closest , TopLevel } |
enum | CloseMode { CloseNoEvent , CloseWithEvent , CloseWithSpontaneousEvent } |
enum class | FocusDirection { Previous , Next } |
enum class | FocusChainRemovalRule { EnsureFocusOut = 0x01 , AssertConsistency = 0x02 } |
Public Types inherited from QObjectPrivate | |
typedef void(* | StaticMetaCallFunction) (QObject *, QMetaObject::Call, int, void **) |
using | ConnectionDataPointer = QExplicitlySharedDataPointer<ConnectionData> |
Static Public Member Functions | |
static long | maxNameLength (const QString &path) |
static QString | toInternal (const QString &path) |
static void | setLastVisitedDirectory (const QUrl &dir) |
Static Public Member Functions inherited from QWidgetPrivate | |
static QWidgetPrivate * | get (QWidget *w) |
static const QWidgetPrivate * | get (const QWidget *w) |
static void | checkRestoredGeometry (const QRect &availableGeometry, QRect *restoredGeometry, int frameHeight) |
static void | adjustFlags (Qt::WindowFlags &flags, QWidget *w=nullptr) |
static QWidget * | parentGraphicsView (const QWidget *widget) |
static QRect | screenGeometry (const QWidget *widget) |
static QRect | availableScreenGeometry (const QWidget *widget) |
static QScreen * | screen (const QWidget *widget, const QPoint &globalPosition, bool hasPosition=true) |
static QRect | screenGeometry (const QWidget *widget, const QPoint &globalPosition, bool hasPosition=true) |
static QRect | availableScreenGeometry (const QWidget *widget, const QPoint &globalPosition, bool hasPosition=true) |
static void | sendComposeStatus (QWidget *w, bool end) |
static void | setWidgetParentHelper (QObject *widgetAsObject, QObject *newParent) |
static bool | insertIntoFocusChain (const QWidgetList &toBeInserted, FocusDirection direction, QWidget *position) |
static QWidgetList | takeFromFocusChain (QWidget *from, QWidget *to, FocusDirection direction=FocusDirection::Next) |
Static Public Member Functions inherited from QObjectPrivate | |
static bool | removeConnection (Connection *c) |
static QObjectPrivate * | get (QObject *o) |
static const QObjectPrivate * | get (const QObject *o) |
template<typename Func1 , typename Func2 > | |
static QMetaObject::Connection | connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiverPrivate, Func2 slot, Qt::ConnectionType type=Qt::AutoConnection) |
template<typename Func1 , typename Func2 > | |
static bool | disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiverPrivate, Func2 slot) |
static QMetaObject::Connection | connectImpl (const QObject *sender, int signal_index, const QObject *receiver, void **slot, QtPrivate::QSlotObjectBase *slotObj, int type, const int *types, const QMetaObject *senderMetaObject) |
static QMetaObject::Connection | connect (const QObject *sender, int signal_index, QtPrivate::QSlotObjectBase *slotObj, Qt::ConnectionType type) |
static QMetaObject::Connection | connect (const QObject *sender, int signal_index, const QObject *receiver, QtPrivate::QSlotObjectBase *slotObj, Qt::ConnectionType type) |
static bool | disconnect (const QObject *sender, int signal_index, void **slot) |
static bool | disconnect (const QObject *sender, int signal_index, const QObject *receiver, void **slot) |
Private Member Functions | |
virtual void | initHelper (QPlatformDialogHelper *) override |
virtual void | helperPrepareShow (QPlatformDialogHelper *) override |
virtual void | helperDone (QDialog::DialogCode, QPlatformDialogHelper *) override |
Additional Inherited Members | |
Static Public Attributes inherited from QWidgetPrivate | |
static QWidgetMapper * | mapper = nullptr |
static QWidgetSet * | allWidgets = nullptr |
static int | instanceCounter = 0 |
static int | maxInstances = 0 |
Protected Member Functions inherited from QDialogPrivate | |
virtual int | dialogCode () const |
Definition at line 77 of file qfiledialog_p.h.
Definition at line 82 of file qfiledialog_p.h.
QFileDialogPrivate::QFileDialogPrivate | ( | ) |
Definition at line 514 of file qfiledialog.cpp.
QFileDialogPrivate::~QFileDialogPrivate | ( | ) |
Definition at line 530 of file qfiledialog.cpp.
QStringList QFileDialogPrivate::addDefaultSuffixToFiles | ( | const QStringList & | filesToFix | ) | const |
Definition at line 1250 of file qfiledialog.cpp.
References QFileDialogOptions::defaultSuffix(), files, i, info, QString::isEmpty(), options, rootPath(), and toInternal().
Referenced by typedFiles().
Definition at line 1277 of file qfiledialog.cpp.
References QFileDialogOptions::defaultSuffix(), QString::isEmpty(), QString::lastIndexOf(), QStringView::mid(), options, QUrl::path(), QUrl::setPath(), and url.
Referenced by userSelectedFiles().
Definition at line 3643 of file qfiledialog.cpp.
References file, QWidget::hasFocus(), QFileSystemModel::index(), lineEdit(), model, qFileDialogUi, QItemSelectionModel::Rows, select(), QString::startsWith(), text, QItemSelectionModel::Toggle, and typedFiles().
Referenced by createWidgets().
Definition at line 125 of file qfiledialog_p.h.
References QDir::separator(), and QDir::toNativeSeparators().
|
overridevirtual |
Reimplemented from QDialogPrivate.
Definition at line 694 of file qfiledialog.cpp.
References Qt::AA_DontUseNativeDialogs, className, QFileDialog::DontUseNativeDialog, QDialogPrivate::nativeDialogInUse, QFileDialogOptions::options(), options, QObjectData::q_ptr, QCoreApplication::testAttribute(), and Qt::WA_DontShowOnScreen.
Referenced by setVisible().
void QFileDialogPrivate::createDirectory | ( | ) |
Creates a new directory, first asking the user for a suitable name.
Definition at line 3475 of file qfiledialog.cpp.
References currentView(), QAbstractItemView::edit(), QFile::exists(), QFileSystemModel::mkdir(), model, QString::number(), QObjectData::parent, qFileDialogUi, rootIndex(), select(), and QDir::separator().
Referenced by createMenuActions(), and createToolButtons().
void QFileDialogPrivate::createMenuActions | ( | ) |
Create actions which will be used in the right click.
Definition at line 3301 of file qfiledialog.cpp.
References QObjectPrivate::connect(), createDirectory(), Qt::CTRL, deleteAction, deleteCurrent(), goHome(), Qt::Key_H, Qt::Key_Up, navigateToParent(), newFolderAction, renameAction, renameCurrent(), QAction::setCheckable(), QAction::setEnabled(), QObject::setObjectName(), Qt::SHIFT, showHidden(), showHiddenAction, and QAction::triggered().
Referenced by createWidgets().
void QFileDialogPrivate::createToolButtons | ( | ) |
Create tool buttons, set properties and connections
Definition at line 3249 of file qfiledialog.cpp.
References QAbstractButton::clicked(), QObjectPrivate::connect(), createDirectory(), navigateBackward(), navigateForward(), navigateToParent(), qFileDialogUi, showDetailsView(), showListView(), QStyle::SP_ArrowBack, QStyle::SP_ArrowForward, QStyle::SP_FileDialogDetailedView, QStyle::SP_FileDialogListView, QStyle::SP_FileDialogNewFolder, and QStyle::SP_FileDialogToParent.
Referenced by createWidgets().
void QFileDialogPrivate::createWidgets | ( | ) |
Create the widgets, set properties and connections
Definition at line 2976 of file qfiledialog.cpp.
References QFileDialog::accept(), QDialogButtonBox::accepted(), QFileDialogOptions::acceptMode(), Qt::ActionsContextMenu, QShortcut::activated(), QAbstractItemView::activated(), QComboBox::activated(), QComboBox::AdjustToContentsOnFirstShow, autoCompleteFileName(), completer, QObject::connect(), QObjectPrivate::connect(), createMenuActions(), createToolButtons(), QItemSelectionModel::currentChanged(), currentChanged(), defaultIconProvider, QFileDialogOptions::defaultSuffix(), QKeySequence::Delete, deleteCurrent(), enterDirectory(), QSizePolicy::Expanding, QFileDialogOptions::fileMode(), QFileSystemModel::fileRenamed(), fileRenamed(), QFileDialogOptions::filter(), QFileDialog::filterSelected(), QSizePolicy::Fixed, QUrl::fromLocalFile(), goToDirectory(), goToUrl(), QSidebar::goToUrl(), QFileDialogOptions::history(), QDir::homePath(), i, Qt::ImhNoPredictiveText, QFileDialogOptions::initialDirectory(), QFileDialogOptions::initiallySelectedFiles(), QFileDialogOptions::initiallySelectedNameFilter(), QList< T >::isEmpty(), lineEdit(), QFileDialogOptions::mimeTypeFilters(), model, QFileDialogOptions::nameFilters(), QComboBox::NoInsert, QFileDialogOptions::options(), options, pathChanged(), platformFileDialogHelper(), qFileDialogUi, QDialog::reject(), QDialogButtonBox::rejected(), QScopedPointer< T, Cleanup >::reset(), retranslateStrings(), QLineEdit::returnPressed(), QFileSystemModel::rootPathChanged(), rowsInserted(), QAbstractItemModel::rowsInserted(), QLineEdit::selectAll(), selectionChanged(), QItemSelectionModel::selectionChanged(), QFileSystemModel::setFilter(), QFileSystemModel::setIconProvider(), QFileSystemModel::setNameFilterDisables(), QObject::setObjectName(), QFileSystemModel::setReadOnly(), settings, shortcut, showContextMenu(), showHeader(), QFileDialogOptions::sidebarUrls(), QComboBox::textActivated(), QLineEdit::textChanged(), QVariant::toByteArray(), QActionGroup::triggered(), updateOkButton(), url, useNameFilter(), QSettings::UserScope, QSettings::value(), QFileDialogOptions::viewMode(), and Qt::WA_Resized.
Referenced by init(), and setVisible().
void QFileDialogPrivate::currentChanged | ( | const QModelIndex & | index | ) |
Definition at line 3768 of file qfiledialog.cpp.
References emit, QFileSystemModel::FilePathRole, and updateOkButton().
Referenced by createWidgets().
QAbstractItemView * QFileDialogPrivate::currentView | ( | ) | const |
Definition at line 1798 of file qfiledialog.cpp.
References qFileDialogUi.
Referenced by createDirectory().
void QFileDialogPrivate::deleteCurrent | ( | ) |
Deletes the currently selected item in the dialog.
Definition at line 3589 of file qfiledialog.cpp.
References arg, QList< T >::crbegin(), QList< T >::crend(), QString::data(), QFileSystemModel::fileInfo(), fileName, QFileSystemModel::FileNameRole, QFileSystemModel::FilePathRole, QFileSystemModel::FilePermissions, QFileSystemModel::isDir(), QFileSystemModel::isReadOnly(), QFileInfo::isSymLink(), it, list, mapToSource(), model, QMessageBox::No, qFileDialogUi, QFileSystemModel::remove(), removeDirectory(), QMessageBox::warning(), QFileDevice::WriteUser, and QMessageBox::Yes.
Referenced by createMenuActions(), and createWidgets().
|
inline |
Definition at line 350 of file qfiledialog_p.h.
References platformFileDialogHelper().
void QFileDialogPrivate::emitFilesSelected | ( | const QStringList & | files | ) |
Definition at line 686 of file qfiledialog.cpp.
Definition at line 3947 of file qfiledialog.cpp.
Referenced by initHelper().
Definition at line 3955 of file qfiledialog.cpp.
References emit, file, and files.
Referenced by initHelper().
void QFileDialogPrivate::enterDirectory | ( | const QModelIndex & | index | ) |
This is called when the user double clicks on a file with the corresponding model item index.
Definition at line 3780 of file qfiledialog.cpp.
References QLineEdit::clear(), Qt::CTRL, QString::data(), QFileDialog::Directory, emit, QFileDialog::ExistingFiles, QFileSystemModel::FilePathRole, QFileSystemModel::isDir(), Qt::ItemIsEnabled, QGuiApplication::keyboardModifiers(), lineEdit(), mapToSource(), QModelIndex::model(), model, qFileDialogUi, QLineEdit::setText(), and QStyle::SH_ItemView_ActivateItemOnSingleClick.
Referenced by createWidgets(), goToDirectory(), and goToUrl().
void QFileDialogPrivate::fileRenamed | ( | const QString & | path, |
const QString & | oldName, | ||
const QString & | newName ) |
Definition at line 3938 of file qfiledialog.cpp.
References QFileDialog::Directory, lineEdit(), rootPath(), QLineEdit::setText(), and text.
Referenced by createWidgets().
|
inline |
Definition at line 133 of file qfiledialog_p.h.
References QDir::AllDirs, QDir::Dirs, QDir::Drives, QDir::Files, filters, and QFileDialog::ShowDirsOnly.
Definition at line 4023 of file qfiledialog.cpp.
References QString::fromLocal8Bit(), QStringView::mid(), qgetenv(), and QDialogPrivate::size.
Referenced by goToDirectory(), and updateOkButton().
void QFileDialogPrivate::goHome | ( | ) |
Definition at line 3348 of file qfiledialog.cpp.
References QDir::homePath().
Referenced by createMenuActions().
Changes the file dialog's current directory to the one specified by path.
Definition at line 3811 of file qfiledialog.cpp.
References dir, enterDirectory(), getEnvironmentVariable(), QFileSystemModel::index(), QString::isEmpty(), mapFromSource(), model, QFileSystemModel::myComputer(), qFileDialogUi, QVariant::toString(), Qt::UserRole, and QMessageBox::warning().
Referenced by createWidgets().
set the directory to url
Definition at line 902 of file qfiledialog.cpp.
References enterDirectory(), QFileSystemModel::index(), model, QUrl::toLocalFile(), and url.
Referenced by createWidgets().
|
overrideprivatevirtual |
Reimplemented from QDialogPrivate.
Definition at line 564 of file qfiledialog.cpp.
References QDialog::Accepted, QFileDialogOptions::history(), options, QFileDialogOptions::sidebarUrls(), and QFileDialogOptions::viewMode().
|
overrideprivatevirtual |
Reimplemented from QDialogPrivate.
Definition at line 551 of file qfiledialog.cpp.
References QFileDialogOptions::initiallySelectedFiles(), QFileDialogOptions::initiallySelectedNameFilter(), QString::isEmpty(), QList< T >::isEmpty(), options, qFileDialogUi, QFileDialogOptions::setHistory(), QFileDialogOptions::setInitiallySelectedFiles(), QFileDialogOptions::setInitiallySelectedNameFilter(), QFileDialogOptions::setSidebarUrls(), QFileDialogOptions::setWindowTitle(), userSelectedFiles(), and usingWidgets().
void QFileDialogPrivate::init | ( | const QFileDialogArgs & | args | ) |
Create widgets, layout and set default values
Definition at line 2924 of file qfiledialog.cpp.
References QFileDialog::AcceptOpen, QFileDialog::AnyFile, args, QList< T >::clear(), createWidgets(), QList< T >::isEmpty(), QSize::isValid(), QDialogPrivate::nativeDialogInUse, platformFileDialogHelper(), qFileDialogUi, settings, setWindowTitle, QVariant::toByteArray(), useDefaultCaption, QSettings::UserScope, and QSettings::value().
|
overrideprivatevirtual |
Reimplemented from QDialogPrivate.
Definition at line 534 of file qfiledialog.cpp.
References QObject::connect(), QObjectPrivate::connect(), QPlatformFileDialogHelper::currentChanged(), QPlatformFileDialogHelper::directoryEntered(), emitUrlSelected(), emitUrlsSelected(), QPlatformFileDialogHelper::fileSelected(), QPlatformFileDialogHelper::filesSelected(), QPlatformFileDialogHelper::filterSelected(), QFileDialog::filterSelected(), nativeCurrentChanged(), nativeEnterDirectory(), and options.
bool QFileDialogPrivate::itemViewKeyboardEvent | ( | QKeyEvent * | event | ) |
For the list and tree view watch keys to goto parent and back in the history
returns true
if handled
Definition at line 3993 of file qfiledialog.cpp.
References Qt::AltModifier, QKeySequence::Cancel, Qt::Key_Back, Qt::Key_Backspace, Qt::Key_Left, navigateBackward(), and navigateToParent().
Referenced by QFileDialogListView::keyPressEvent(), and QFileDialogTreeView::keyPressEvent().
QLineEdit * QFileDialogPrivate::lineEdit | ( | ) | const |
Definition at line 1806 of file qfiledialog.cpp.
References qFileDialogUi.
Referenced by autoCompleteFileName(), createWidgets(), enterDirectory(), fileRenamed(), selectionChanged(), typedFiles(), updateOkButton(), useNameFilter(), and userSelectedFiles().
|
inline |
Definition at line 326 of file qfiledialog_p.h.
Referenced by goToDirectory(), select(), and setRootIndex().
|
inline |
Definition at line 319 of file qfiledialog_p.h.
Referenced by deleteCurrent(), enterDirectory(), rootIndex(), selectionChanged(), and showContextMenu().
|
static |
Definition at line 1810 of file qfiledialog.cpp.
References QWidgetPrivate::data, QFile::encodeName(), QString::left(), Q_UNUSED, and QString::utf16().
Referenced by updateOkButton().
Definition at line 3967 of file qfiledialog.cpp.
Referenced by initHelper().
Definition at line 3975 of file qfiledialog.cpp.
References directory, emit, and QString::isEmpty().
Referenced by initHelper().
void QFileDialogPrivate::navigate | ( | HistoryItem & | historyItem | ) |
Definition at line 3394 of file qfiledialog.cpp.
References QSet< T >::cbegin(), QItemSelectionModel::Clear, QItemSelectionModel::Current, i, QScopedPointer< T, Cleanup >::isNull(), it, QFileDialog::List, qFileDialogUi, QItemSelectionModel::Rows, QItemSelectionModel::Select, and view.
Referenced by navigateBackward(), and navigateForward().
void QFileDialogPrivate::navigateBackward | ( | ) |
Navigates to the last directory viewed in the dialog.
Definition at line 3428 of file qfiledialog.cpp.
References currentHistory, currentHistoryLocation, navigate(), and saveHistorySelection().
Referenced by createToolButtons(), and itemViewKeyboardEvent().
void QFileDialogPrivate::navigateForward | ( | ) |
Navigates to the last directory viewed in the dialog.
Definition at line 3441 of file qfiledialog.cpp.
References currentHistory, currentHistoryLocation, navigate(), and saveHistorySelection().
Referenced by createToolButtons().
void QFileDialogPrivate::navigateToParent | ( | ) |
Navigates to the parent directory of the currently displayed directory in the dialog.
Definition at line 3455 of file qfiledialog.cpp.
References dir, emit, model, QFileSystemModel::myComputer(), QFileSystemModel::rootDirectory(), and QVariant::toString().
Referenced by createMenuActions(), createToolButtons(), and itemViewKeyboardEvent().
Update history with new path, buttons, and combo
Definition at line 3371 of file qfiledialog.cpp.
References currentHistory, currentHistoryLocation, QFileInfo::exists(), QUrl::fromLocalFile(), model, qFileDialogUi, QFileSystemModel::rootPath(), saveHistorySelection(), and QDir::toNativeSeparators().
Referenced by createWidgets().
|
inline |
Definition at line 92 of file qfiledialog_p.h.
Referenced by createWidgets(), directory_sys(), init(), selectedFiles_sys(), selectedMimeTypeFilter_sys(), selectedNameFilter_sys(), selectFile_sys(), selectMimeTypeFilter_sys(), selectNameFilter_sys(), setDirectory_sys(), and setFilter_sys().
bool QFileDialogPrivate::removeDirectory | ( | const QString & | path | ) |
Definition at line 3578 of file qfiledialog.cpp.
References QFileSystemModel::index(), model, and QFileSystemModel::remove().
Referenced by deleteCurrent().
void QFileDialogPrivate::renameCurrent | ( | ) |
Definition at line 3567 of file qfiledialog.cpp.
References QFileDialog::List, and qFileDialogUi.
Referenced by createMenuActions().
bool QFileDialogPrivate::restoreWidgetState | ( | QStringList & | history, |
int | splitterPosition ) |
Definition at line 2876 of file qfiledialog.cpp.
References QWidgetPrivate::actions, QList< T >::at(), headerData, i, list, model, qFileDialogUi, qMin(), QAction::setChecked(), sidebarUrls, QList< T >::size(), and splitterState.
void QFileDialogPrivate::retranslateStrings | ( | ) |
Definition at line 654 of file qfiledialog.cpp.
References QWidgetPrivate::actions, QList< T >::at(), QFileDialogOptions::defaultNameFilterString(), deleteAction, Qt::DisplayRole, Qt::Horizontal, i, model, newFolderAction, options, qFileDialogUi, qMin(), renameAction, QAction::setText(), showHiddenAction, QList< T >::size(), updateCancelButtonText(), updateFileNameLabel(), updateFileTypeLabel(), updateLookInLabel(), QFileDialogOptions::useDefaultNameFilters(), and usingWidgets().
Referenced by createWidgets().
void QFileDialogPrivate::retranslateWindowTitle | ( | ) |
Definition at line 574 of file qfiledialog.cpp.
References QFileDialog::AcceptOpen, QFileDialog::Directory, setWindowTitle, and useDefaultCaption.
|
inline |
Definition at line 1794 of file qfiledialog.cpp.
References mapToSource(), and qFileDialogUi.
Referenced by createDirectory().
|
inline |
Definition at line 334 of file qfiledialog_p.h.
References model, QStringLiteral, and QFileSystemModel::rootPath().
Referenced by addDefaultSuffixToFiles(), fileRenamed(), QFileDialogComboBox::setHistory(), and QFileDialogComboBox::showPopup().
void QFileDialogPrivate::rowsInserted | ( | const QModelIndex & | parent | ) |
When parent is root and rows have been inserted when none was there before then select the first one.
Definition at line 3928 of file qfiledialog.cpp.
References QObjectData::parent, and qFileDialogUi.
Referenced by createWidgets().
void QFileDialogPrivate::saveHistorySelection | ( | ) |
Definition at line 3355 of file qfiledialog.cpp.
References currentHistory, currentHistoryLocation, QScopedPointer< T, Cleanup >::isNull(), item, and qFileDialogUi.
Referenced by navigateBackward(), navigateForward(), and pathChanged().
|
inline |
Definition at line 1839 of file qfiledialog.cpp.
References mapFromSource(), model, Q_ASSERT, qFileDialogUi, QItemSelectionModel::Rows, and QItemSelectionModel::Select.
Referenced by autoCompleteFileName(), and createDirectory().
Definition at line 368 of file qfiledialog_p.h.
References platformFileDialogHelper().
Referenced by userSelectedFiles().
|
inline |
Definition at line 387 of file qfiledialog_p.h.
References platformFileDialogHelper().
|
inline |
Definition at line 401 of file qfiledialog_p.h.
References platformFileDialogHelper().
Definition at line 357 of file qfiledialog_p.h.
References QPlatformFileDialogHelper::isSupportedUrl(), platformFileDialogHelper(), and QPlatformFileDialogHelper::selectFile().
void QFileDialogPrivate::selectionChanged | ( | ) |
This is called when the model index corresponding to the current file is changed from index to current.
Definition at line 3885 of file qfiledialog.cpp.
References QFileDialog::Directory, QWidget::hasFocus(), i, QFileSystemModel::isDir(), QWidget::isVisible(), lineEdit(), mapToSource(), model, qFileDialogUi, QLineEdit::setText(), and updateOkButton().
Referenced by createWidgets().
Definition at line 381 of file qfiledialog_p.h.
References platformFileDialogHelper().
Definition at line 395 of file qfiledialog_p.h.
References platformFileDialogHelper().
Definition at line 339 of file qfiledialog_p.h.
References directory, QPlatformFileDialogHelper::isSupportedUrl(), platformFileDialogHelper(), and QPlatformFileDialogHelper::setDirectory().
|
inline |
Definition at line 375 of file qfiledialog_p.h.
References platformFileDialogHelper().
void QFileDialogPrivate::setLabelTextControl | ( | QFileDialog::DialogLabel | label, |
const QString & | text ) |
Definition at line 1982 of file qfiledialog.cpp.
References QFileDialog::Accept, QFileDialog::AcceptOpen, button, QDialogButtonBox::Cancel, QFileDialog::FileName, QFileDialog::FileType, QFileDialog::LookIn, QDialogButtonBox::Open, qFileDialogUi, QFileDialog::Reject, QDialogButtonBox::Save, QAbstractButton::setText(), and text.
Referenced by updateCancelButtonText(), updateFileNameLabel(), updateFileTypeLabel(), updateLookInLabel(), and updateOkButtonText().
Definition at line 591 of file qfiledialog.cpp.
References dir.
Referenced by QFileDialog::setDirectory(), and QFileDialog::setDirectoryUrl().
|
inline |
Definition at line 1829 of file qfiledialog.cpp.
References mapFromSource(), model, Q_ASSERT, and qFileDialogUi.
|
overridevirtual |
The logic has to live here so that the call to hide() in ~QDialog calls this function; it wouldn't call an override of QDialog::setVisible().
Reimplemented from QDialogPrivate.
Definition at line 864 of file qfiledialog.cpp.
References canBeNativeDialog(), completer, createWidgets(), model, QDialogPrivate::nativeDialogInUse, qFileDialogUi, QCompleter::setModel(), QDialogPrivate::setNativeDialogVisible(), QDialogPrivate::setVisible(), usingWidgets(), and Qt::WA_DontShowOnScreen.
Show the context menu for the file/dir under position
Definition at line 3527 of file qfiledialog.cpp.
References QMenu::addAction(), QMenu::addSeparator(), deleteAction, QFileDialog::Detail, QFileSystemModel::FilePermissions, QFileSystemModel::isReadOnly(), mapToSource(), menu, model, newFolderAction, QMenu::popup(), position(), Q_UNUSED, qFileDialogUi, renameAction, QWidget::setAttribute(), QAction::setEnabled(), showHiddenAction, view, Qt::WA_DeleteOnClose, and QFileDevice::WriteUser.
Referenced by createWidgets().
void QFileDialogPrivate::showDetailsView | ( | ) |
Definition at line 3512 of file qfiledialog.cpp.
References qFileDialogUi.
Referenced by createToolButtons().
Definition at line 3157 of file qfiledialog.cpp.
References QActionGroup::actions(), QListSpecialMethodsBase< T >::indexOf(), QAction::isChecked(), and qFileDialogUi.
Referenced by createWidgets().
void QFileDialogPrivate::showHidden | ( | ) |
Includes hidden files and directories in the items displayed in the dialog.
Definition at line 3914 of file qfiledialog.cpp.
References QDir::Hidden, QAction::isChecked(), and showHiddenAction.
Referenced by createMenuActions().
void QFileDialogPrivate::showListView | ( | ) |
Definition at line 3502 of file qfiledialog.cpp.
References qFileDialogUi.
Referenced by createToolButtons().
Definition at line 143 of file qfiledialog_p.h.
Referenced by addDefaultSuffixToFiles(), and typedFiles().
QStringList QFileDialogPrivate::typedFiles | ( | ) | const |
Returns the text in the line edit which can be one or more file names
Definition at line 1187 of file qfiledialog.cpp.
References addDefaultSuffixToFiles(), QString::contains(), QFile::exists(), files, i, lineEdit(), Q_UNUSED, QDir::separator(), QString::split(), QLineEdit::text, toInternal(), and token.
Referenced by autoCompleteFileName(), and userSelectedFiles().
void QFileDialogPrivate::updateCancelButtonText | ( | ) |
Definition at line 648 of file qfiledialog.cpp.
References QFileDialogOptions::isLabelExplicitlySet(), QFileDialogOptions::labelText(), options, QFileDialogOptions::Reject, QFileDialog::Reject, and setLabelTextControl().
Referenced by retranslateStrings().
|
inline |
Definition at line 602 of file qfiledialog.cpp.
References QFileDialog::Directory, QFileDialogOptions::FileName, QFileDialog::FileName, QFileDialogOptions::isLabelExplicitlySet(), QFileDialogOptions::labelText(), options, and setLabelTextControl().
Referenced by retranslateStrings().
|
inline |
Definition at line 618 of file qfiledialog.cpp.
References QFileDialogOptions::FileType, QFileDialog::FileType, QFileDialogOptions::isLabelExplicitlySet(), QFileDialogOptions::labelText(), options, and setLabelTextControl().
Referenced by retranslateStrings().
|
inline |
Definition at line 596 of file qfiledialog.cpp.
References QFileDialogOptions::isLabelExplicitlySet(), QFileDialogOptions::labelText(), QFileDialogOptions::LookIn, QFileDialog::LookIn, options, and setLabelTextControl().
Referenced by retranslateStrings().
void QFileDialogPrivate::updateOkButton | ( | ) |
Definition at line 3672 of file qfiledialog.cpp.
References QFileDialog::AcceptOpen, QFileDialog::AnyFile, button, QFileDialog::Directory, QFileDialog::ExistingFile, QFileDialog::ExistingFiles, file, fileName, files, getEnvironmentVariable(), QFileSystemModel::index(), info, QFileSystemModel::isDir(), QModelIndex::isValid(), QString::lastIndexOf(), lineEdit(), maxNameLength(), QString::mid(), model, QDialogButtonBox::Open, qFileDialogUi, QDialogButtonBox::Save, QWidget::setEnabled(), QLineEdit::text, and updateOkButtonText().
Referenced by createWidgets(), currentChanged(), and selectionChanged().
Definition at line 624 of file qfiledialog.cpp.
References QFileDialogOptions::Accept, QFileDialog::Accept, QFileDialog::AcceptOpen, QFileDialog::Directory, QFileDialogOptions::isLabelExplicitlySet(), QFileDialogOptions::labelText(), options, and setLabelTextControl().
Referenced by updateOkButton().
void QFileDialogPrivate::useNameFilter | ( | int | index | ) |
Sets the current name filter to be nameFilter and update the qFileDialogUi->fileNameEdit when in AcceptSave mode with the new extension.
Definition at line 3849 of file qfiledialog.cpp.
References QFileDialog::AcceptSave, QPlatformFileDialogHelper::cleanFilterList(), fileName, lineEdit(), model, QFileDialogOptions::nameFilters(), options, qFileDialogUi, QFileSystemModel::setNameFilters(), QFileDialogOptions::setNameFilters(), QLineEdit::setText(), QString::size(), QFileInfo::suffix(), and QLineEdit::text.
Referenced by createWidgets().
Definition at line 1228 of file qfiledialog.cpp.
References addDefaultSuffixToUrls(), QFileSystemModel::FilePathRole, files, QUrl::fromLocalFile(), QString::isEmpty(), lineEdit(), qFileDialogUi, selectedFiles_sys(), QList< T >::size(), QLineEdit::text, typedFiles(), and usingWidgets().
Referenced by helperPrepareShow().
|
inline |
Definition at line 710 of file qfiledialog.cpp.
References QDialogPrivate::nativeDialogInUse, and qFileDialogUi.
Referenced by helperPrepareShow(), retranslateStrings(), setVisible(), and userSelectedFiles().
QString QFileDialogPrivate::acceptLabel |
Definition at line 240 of file qfiledialog_p.h.
QList<HistoryItem> QFileDialogPrivate::currentHistory |
Definition at line 210 of file qfiledialog_p.h.
Referenced by navigateBackward(), navigateForward(), pathChanged(), and saveHistorySelection().
int QFileDialogPrivate::currentHistoryLocation |
Definition at line 211 of file qfiledialog_p.h.
Referenced by navigateBackward(), navigateForward(), pathChanged(), and saveHistorySelection().
QFileIconProvider QFileDialogPrivate::defaultIconProvider |
Definition at line 252 of file qfiledialog_p.h.
Referenced by createWidgets().
QAction* QFileDialogPrivate::deleteAction |
Definition at line 214 of file qfiledialog_p.h.
Referenced by createMenuActions(), retranslateStrings(), and showContextMenu().
QByteArray QFileDialogPrivate::headerData |
Definition at line 250 of file qfiledialog_p.h.
Referenced by restoreWidgetState().
QByteArray QFileDialogPrivate::memberToDisconnectOnClose |
Definition at line 243 of file qfiledialog_p.h.
QFileSystemModel* QFileDialogPrivate::model |
Definition at line 202 of file qfiledialog_p.h.
Referenced by autoCompleteFileName(), createDirectory(), createWidgets(), deleteCurrent(), enterDirectory(), goToDirectory(), goToUrl(), navigateToParent(), pathChanged(), removeDirectory(), restoreWidgetState(), retranslateStrings(), rootPath(), select(), selectionChanged(), QFileDialogComboBox::setFileDialogPrivate(), QFileDialogComboBox::setHistory(), setRootIndex(), setVisible(), showContextMenu(), QFileDialogComboBox::showPopup(), updateOkButton(), and useNameFilter().
QAction* QFileDialogPrivate::newFolderAction |
Definition at line 216 of file qfiledialog_p.h.
Referenced by createMenuActions(), retranslateStrings(), and showContextMenu().
QSharedPointer<QFileDialogOptions> QFileDialogPrivate::options |
Definition at line 246 of file qfiledialog_p.h.
Referenced by addDefaultSuffixToFiles(), addDefaultSuffixToUrls(), canBeNativeDialog(), createWidgets(), helperDone(), helperPrepareShow(), initHelper(), retranslateStrings(), updateCancelButtonText(), updateFileNameLabel(), updateFileTypeLabel(), updateLookInLabel(), updateOkButtonText(), and useNameFilter().
QScopedPointer<Ui_QFileDialog> QFileDialogPrivate::qFileDialogUi |
Definition at line 238 of file qfiledialog_p.h.
Referenced by autoCompleteFileName(), createDirectory(), createToolButtons(), createWidgets(), currentView(), deleteCurrent(), enterDirectory(), goToDirectory(), helperPrepareShow(), init(), lineEdit(), navigate(), pathChanged(), renameCurrent(), restoreWidgetState(), retranslateStrings(), rootIndex(), rowsInserted(), saveHistorySelection(), select(), selectionChanged(), setLabelTextControl(), setRootIndex(), setVisible(), showContextMenu(), showDetailsView(), showHeader(), showListView(), updateOkButton(), useNameFilter(), userSelectedFiles(), and usingWidgets().
Definition at line 242 of file qfiledialog_p.h.
QAction* QFileDialogPrivate::renameAction |
Definition at line 213 of file qfiledialog_p.h.
Referenced by createMenuActions(), retranslateStrings(), and showContextMenu().
QString QFileDialogPrivate::setWindowTitle |
Definition at line 208 of file qfiledialog_p.h.
Referenced by init(), and retranslateWindowTitle().
QAction* QFileDialogPrivate::showHiddenAction |
Definition at line 215 of file qfiledialog_p.h.
Referenced by createMenuActions(), retranslateStrings(), showContextMenu(), and showHidden().
Definition at line 251 of file qfiledialog_p.h.
Referenced by restoreWidgetState().
QByteArray QFileDialogPrivate::signalToDisconnectOnClose |
Definition at line 244 of file qfiledialog_p.h.
QByteArray QFileDialogPrivate::splitterState |
Definition at line 249 of file qfiledialog_p.h.
Referenced by restoreWidgetState().
bool QFileDialogPrivate::useDefaultCaption |
Definition at line 218 of file qfiledialog_p.h.
Referenced by init(), and retranslateWindowTitle().
QStringList QFileDialogPrivate::watching |
Definition at line 201 of file qfiledialog_p.h.