43 #include <private/qwidgetitemdata_p.h> 46 #ifndef QT_NO_FILEDIALOG 62 #if !defined(Q_WS_WINCE) && !defined(Q_OS_SYMBIAN) 63 #include "ui_qfiledialog.h" 65 #define Q_EMBEDDED_SMALLSCREEN 66 #include "ui_qfiledialog_embedded.h" 67 #if defined(Q_OS_WINCE) 70 #if defined(Q_OS_UNIX) 330 #if defined(Q_WS_WIN) || defined(Q_WS_MAC) 354 d->lineEdit()->selectAll();
371 d->init(directory, filter, caption);
372 d->lineEdit()->selectAll();
386 d->lineEdit()->selectAll();
395 #ifndef QT_NO_SETTINGS 400 d->deleteNativeDialog_sys();
423 d->qFileDialogUi->sidebar->setUrls(urls);
433 return d->qFileDialogUi->sidebar->urls();
439 "^(.*)\\(([a-zA-Z0-9_.*? +;#\\-\\[\\]@\\{\\}/!<>\\$%&=^~:\\|]*)\\)$";
458 stream <<
qint32(QFileDialogMagic);
459 stream <<
qint32(version);
460 stream <<
d->qFileDialogUi->splitter->saveState();
461 stream <<
d->qFileDialogUi->sidebar->urls();
463 stream << *lastVisitedDir();
464 stream <<
d->qFileDialogUi->treeView->header()->saveState();
499 if (marker != QFileDialogMagic || v != version)
502 stream >> splitterState
509 if (!
d->qFileDialogUi->splitter->restoreState(splitterState))
511 QList<int> list =
d->qFileDialogUi->splitter->sizes();
512 if (list.
count() >= 2 && list.
at(0) == 0 && list.
at(1) == 0) {
513 for (
int i = 0; i < list.
count(); ++i)
514 list[i] =
d->qFileDialogUi->splitter->widget(i)->sizeHint().width();
515 d->qFileDialogUi->splitter->setSizes(list);
518 d->qFileDialogUi->sidebar->setUrls(bookmarks);
519 while (history.
count() > 5)
523 QHeaderView *headerView =
d->qFileDialogUi->treeView->header();
529 #ifndef QT_NO_PROXYMODEL 531 abstractModel =
d->proxyModel;
534 for (
int i = 1; i < total; ++i)
548 d->retranslateWindowTitle();
549 d->retranslateStrings();
562 currentHistoryLocation(-1),
566 useDefaultCaption(true),
567 defaultFileTypes(true),
568 fileNameLabelExplicitlySat(false),
569 nativeDialogInUse(false),
572 #ifndef QT_MAC_USE_COCOA
574 mDialogStarted(false),
604 *lastVisitedDir() = dir;
616 #ifndef QT_NO_PROXYMODEL 621 for (
int i = 1; i < total; ++i) {
645 emit q->filesSelected(files);
646 if (files.
count() == 1)
662 return (staticName == dynamicName);
678 if (!(
d->opts & option) != !on)
679 setOptions(
d->opts ^ option);
696 return (
d->opts & option) != 0;
719 Options changed = (options ^
d->opts);
724 if (changed & DontResolveSymlinks)
725 d->model->setResolveSymlinks(!(options & DontResolveSymlinks));
726 if (changed & ReadOnly) {
727 bool ro = (options & ReadOnly);
728 d->model->setReadOnly(ro);
729 d->qFileDialogUi->newFolderButton->setEnabled(!ro);
730 d->renameAction->setEnabled(!ro);
731 d->deleteAction->setEnabled(!ro);
733 if (changed & HideNameFilterDetails)
734 setNameFilters(
d->nameFilters);
736 if (changed & ShowDirsOnly)
739 if (changed & DontUseCustomDirectoryIcons)
740 iconProvider()->d_ptr->setUseCustomDirectoryIcons(!(options & DontUseCustomDirectoryIcons));
768 connect(
this, signal, receiver, member);
769 d->signalToDisconnectOnClose = signal;
770 d->receiverToDisconnectOnClose = receiver;
771 d->memberToDisconnectOnClose = member;
789 if (
d->canBeNativeDialog()){
790 if (
d->setVisible_sys(visible)){
791 d->nativeDialogInUse =
true;
795 #ifndef QT_NO_FSCOMPLETER 797 d->completer->setModel(0);
800 d->nativeDialogInUse =
false;
802 #ifndef QT_NO_FSCOMPLETER 803 if (
d->proxyModel != 0)
804 d->completer->setModel(
d->proxyModel);
806 d->completer->setModel(
d->model);
811 if (!
d->nativeDialogInUse)
812 d->qFileDialogUi->fileNameEdit->setFocus();
842 QString newDirectory = directory;
851 d->setLastVisitedDirectory(newDirectory);
853 if (
d->nativeDialogInUse){
854 d->setDirectory_sys(newDirectory);
857 if (
d->rootPath() == newDirectory)
861 if (root !=
d->rootIndex()) {
862 #ifndef QT_NO_FSCOMPLETER 864 d->completer->setCompletionPrefix(newDirectory);
866 d->completer->setCompletionPrefix(newDirectory +
QLatin1Char(
'/'));
868 d->setRootIndex(root);
870 d->qFileDialogUi->listView->selectionModel()->clear();
879 return QDir(
d->nativeDialogInUse ?
d->directory_sys() :
d->rootPath());
893 if (
d->nativeDialogInUse){
894 d->selectFile_sys(filename);
902 if (
d->model->rootPath() != filenamePath)
903 setDirectory(filenamePath);
926 d->qFileDialogUi->listView->selectionModel()->clear();
927 if (!isVisible() || !
d->lineEdit()->hasFocus())
928 d->lineEdit()->setText(file);
939 #if !defined(Q_OS_INTEGRITY) 946 #if defined(Q_OS_VXWORKS) 948 #elif defined(_POSIX_THREAD_SAFE_FUNCTIONS) && !defined(Q_OS_OPENBSD) 952 const int bufSize =
sizeof(buf);
954 #if defined(Q_OS_SOLARIS) && defined(_POSIX_C_SOURCE) && (_POSIX_C_SOURCE - 0 < 199506L) 1001 for (
int i=0; i<tokens.
size(); ++i) {
1022 for (
int i=0; i<filesToFix.
size(); ++i) {
1028 if (info.isAbsolute()) {
1055 if (
d->nativeDialogInUse)
1056 return d->addDefaultSuffixToFiles(
d->selectedFiles_sys());
1058 QModelIndexList indexes =
d->qFileDialogUi->listView->selectionModel()->selectedRows();
1060 for (
int i = 0; i < indexes.
count(); ++i)
1063 if (files.
isEmpty() && !
d->lineEdit()->text().isEmpty())
1064 files =
d->typedFiles();
1066 if (files.
isEmpty() && !(
d->fileMode == ExistingFile ||
d->fileMode == ExistingFiles))
1091 return f.
split(sep);
1123 setNameFilter(filter);
1143 setOption(HideNameFilterDetails, !enabled);
1148 return !testOption(HideNameFilterDetails);
1159 for (
int i = 0; i < filters.
count(); ++i) {
1163 filterName = r.
cap(1);
1166 return strippedFilters;
1185 for (
int i = 0; i < filters.
count(); ++i) {
1186 cleanedFilters << filters[i].simplified();
1188 d->nameFilters = cleanedFilters;
1190 if (
d->nativeDialogInUse){
1191 d->setNameFilters_sys(cleanedFilters);
1195 d->qFileDialogUi->fileTypeCombo->clear();
1199 if (testOption(HideNameFilterDetails))
1202 d->qFileDialogUi->fileTypeCombo->addItems(cleanedFilters);
1204 d->_q_useNameFilter(0);
1217 setNameFilters(filters);
1231 return d_func()->nameFilters;
1262 if (
d->nativeDialogInUse) {
1263 d->selectNameFilter_sys(filter);
1267 if (testOption(HideNameFilterDetails)) {
1270 i =
d->qFileDialogUi->fileTypeCombo->findText(filters.
first());
1272 i =
d->qFileDialogUi->fileTypeCombo->findText(filter);
1275 d->qFileDialogUi->fileTypeCombo->setCurrentIndex(i);
1276 d->_q_useNameFilter(
d->qFileDialogUi->fileTypeCombo->currentIndex());
1291 selectNameFilter(filter);
1307 if (
d->nativeDialogInUse)
1308 return d->selectedNameFilter_sys();
1310 return d->qFileDialogUi->fileTypeCombo->currentText();
1323 return selectedNameFilter();
1339 return d->model->filter();
1357 d->model->setFilter(filters);
1358 if (
d->nativeDialogInUse){
1382 d->_q_showDetailsView();
1384 d->_q_showListView();
1415 d->retranslateWindowTitle();
1418 setOption(ShowDirsOnly, mode == DirectoryOnly);
1426 d->qFileDialogUi->listView->setSelectionMode(selectionMode);
1427 d->qFileDialogUi->treeView->setSelectionMode(selectionMode);
1429 d->model->setFilter(
d->filterForMode(filter()));
1431 QString buttonText = (
d->acceptMode == AcceptOpen ? tr(
"&Open") : tr(
"&Save"));
1432 if (mode == DirectoryOnly || mode == Directory) {
1433 d->qFileDialogUi->fileTypeCombo->clear();
1434 d->qFileDialogUi->fileTypeCombo->addItem(tr(
"Directories"));
1435 d->qFileDialogUi->fileTypeCombo->setEnabled(
false);
1437 if (!
d->fileNameLabelExplicitlySat){
1438 setLabelText(FileName, tr(
"Directory:"));
1439 d->fileNameLabelExplicitlySat =
false;
1441 buttonText = tr(
"&Choose");
1443 if (!
d->fileNameLabelExplicitlySat){
1444 setLabelText(FileName, tr(
"File &name:"));
1445 d->fileNameLabelExplicitlySat =
false;
1448 setLabelText(Accept, buttonText);
1449 if (
d->nativeDialogInUse){
1454 d->qFileDialogUi->fileTypeCombo->setEnabled(!testOption(ShowDirsOnly));
1455 d->_q_updateOkButton();
1480 d->acceptMode = mode;
1481 bool directoryMode = (
d->fileMode == Directory ||
d->fileMode == DirectoryOnly);
1484 d->qFileDialogUi->buttonBox->button(button)->setEnabled(
false);
1485 d->_q_updateOkButton();
1486 if (mode == AcceptOpen && directoryMode)
1487 setLabelText(Accept, tr(
"&Choose"));
1489 setLabelText(Accept, (mode == AcceptOpen ? tr(
"&Open") : tr(
"&Save")));
1490 if (mode == AcceptSave) {
1491 d->qFileDialogUi->lookInCombo->setEditable(
false);
1493 d->retranslateWindowTitle();
1494 #if defined(Q_WS_MAC) 1495 d->deleteNativeDialog_sys();
1537 if (idx.isValid() && !
qFileDialogUi->listView->selectionModel()->isSelected(idx))
1546 return d->acceptMode;
1564 setOption(ReadOnly, enabled);
1569 return testOption(ReadOnly);
1588 setOption(DontResolveSymlinks, !enabled);
1593 return !testOption(DontResolveSymlinks);
1610 setOption(DontConfirmOverwrite, !enabled);
1615 return !testOption(DontConfirmOverwrite);
1639 return d->defaultSuffix;
1649 d->qFileDialogUi->lookInCombo->setHistory(paths);
1662 urlModel->setUrls(list);
1674 if (!currentHistory.
contains(newHistory))
1675 currentHistory << newHistory;
1697 d->qFileDialogUi->listView->setItemDelegate(delegate);
1698 d->qFileDialogUi->treeView->setItemDelegate(delegate);
1707 return d->qFileDialogUi->listView->itemDelegate();
1716 d->model->setIconProvider(provider);
1718 d->qFileDialogUi->sidebar->setUrls(
d->qFileDialogUi->sidebar->urls());
1727 return d->model->iconProvider();
1739 d->qFileDialogUi->lookInLabel->setText(text);
1742 d->qFileDialogUi->fileNameLabel->setText(text);
1743 d->fileNameLabelExplicitlySat =
true;
1746 d->qFileDialogUi->fileTypeLabel->setText(text);
1749 d->acceptLabel =
text;
1774 return d->qFileDialogUi->lookInLabel->text();
1776 return d->qFileDialogUi->fileNameLabel->text();
1778 return d->qFileDialogUi->fileTypeLabel->text();
1785 return button->
text();
1789 return button->
text();
1798 #if defined(Q_WS_WIN) 1817 #if defined(Q_WS_S60) 1829 extern QString qtSymbianGetExistingDirectory(
const QString &caption,
1891 if (qt_filedialog_open_filename_hook && !(options & DontUseNativeDialog))
1893 #if defined(Q_WS_S60) 1894 if (QSysInfo::s60Version() > QSysInfo::SV_S60_5_0 && !(options & DontUseNativeDialog))
1895 return qtSymbianGetOpenFileName(caption, dir, filter);
1903 args.
mode = ExistingFile;
1905 #if defined(Q_WS_WIN) 1906 if (qt_use_native_dialogs && !(args.
options & DontUseNativeDialog)) {
1913 if (selectedFilter && !selectedFilter->
isEmpty())
1983 if (qt_filedialog_open_filenames_hook && !(options & DontUseNativeDialog))
1985 #if defined(Q_WS_S60) 1986 if (QSysInfo::s60Version() > QSysInfo::SV_S60_5_0 && !(options & DontUseNativeDialog))
1987 return qtSymbianGetOpenFileNames(caption, dir, filter);
1995 args.
mode = ExistingFiles;
1998 #if defined(Q_WS_WIN) 1999 if (qt_use_native_dialogs && !(args.
options & DontUseNativeDialog)) {
2006 if (selectedFilter && !selectedFilter->
isEmpty())
2077 if (qt_filedialog_save_filename_hook && !(options & DontUseNativeDialog))
2079 #if defined(Q_WS_S60) 2080 if (QSysInfo::s60Version() > QSysInfo::SV_S60_5_0 && !(options & DontUseNativeDialog))
2081 return qtSymbianGetSaveFileName(caption, dir);
2089 args.
mode = AnyFile;
2092 #if defined(Q_WS_WIN) 2093 if (qt_use_native_dialogs && !(args.
options & DontUseNativeDialog)) {
2101 if (selectedFilter && !selectedFilter->
isEmpty())
2159 if (qt_filedialog_existing_directory_hook && !(options & DontUseNativeDialog))
2161 #if defined(Q_WS_S60) 2162 if (QSysInfo::s60Version() > QSysInfo::SV_S60_5_0 && !(options & DontUseNativeDialog))
2163 return qtSymbianGetExistingDirectory(caption, dir);
2169 args.
mode = (options & ShowDirsOnly ? DirectoryOnly : Directory);
2172 #if defined(Q_WS_WIN) 2173 if (qt_use_native_dialogs && !(args.
options & DontUseNativeDialog) && (options & ShowDirsOnly)
2244 if (
d->receiverToDisconnectOnClose) {
2245 disconnect(
this,
d->signalToDisconnectOnClose,
2246 d->receiverToDisconnectOnClose,
d->memberToDisconnectOnClose);
2247 d->receiverToDisconnectOnClose = 0;
2249 d->memberToDisconnectOnClose.clear();
2250 d->signalToDisconnectOnClose.clear();
2262 if (
d->nativeDialogInUse){
2263 d->emitFilesSelected(files);
2268 QString lineEditText =
d->lineEdit()->text();
2272 d->_q_navigateToParent();
2273 bool block =
d->qFileDialogUi->fileNameEdit->blockSignals(
true);
2274 d->lineEdit()->selectAll();
2275 d->qFileDialogUi->fileNameEdit->blockSignals(block);
2279 switch (
d->fileMode) {
2285 info =
QFileInfo(
d->getEnvironmentVariable(fn));
2287 #ifndef QT_NO_MESSAGEBOX 2288 QString message = tr(
"%1\nDirectory not found.\nPlease verify the " 2289 "correct directory name was given.");
2291 #endif // QT_NO_MESSAGEBOX 2295 d->emitFilesSelected(files);
2319 #ifndef QT_NO_MESSAGEBOX 2322 tr(
"%1 already exists.\nDo you want to replace it?")
2336 for (
int i = 0; i < files.
count(); ++i) {
2340 if (!
info.exists()) {
2341 #ifndef QT_NO_MESSAGEBOX 2342 QString message = tr(
"%1\nFile not found.\nPlease verify the " 2343 "correct file name was given.");
2345 #endif // QT_NO_MESSAGEBOX 2349 setDirectory(
info.absoluteFilePath());
2350 d->lineEdit()->clear();
2354 d->emitFilesSelected(files);
2372 q->setWindowTitle(caption);
2380 #ifndef QT_NO_SETTINGS 2388 #if defined(Q_EMBEDDED_SMALLSCREEN) 2396 q->setNameFilter(nameFilter);
2402 q->resize(q->sizeHint());
2420 model->d_func()->disableRecursiveSort =
true;
2450 #ifndef QT_NO_SHORTCUT 2453 #ifndef QT_NO_FSCOMPLETER 2456 #endif // QT_NO_FSCOMPLETER 2479 #ifndef QT_NO_SHORTCUT 2501 #ifndef QT_NO_PROXYMODEL 2519 #ifndef QT_NO_SHORTCUT 2543 #ifndef QT_NO_PROXYMODEL 2562 if ((!proxyModel && !
d->proxyModel)
2563 || (proxyModel ==
d->proxyModel))
2567 if (
d->proxyModel) {
2575 if (proxyModel != 0) {
2579 d->qFileDialogUi->listView->setModel(
d->proxyModel);
2580 d->qFileDialogUi->treeView->setModel(
d->proxyModel);
2581 #ifndef QT_NO_FSCOMPLETER 2582 d->completer->setModel(
d->proxyModel);
2583 d->completer->proxyModel =
d->proxyModel;
2589 d->qFileDialogUi->listView->setModel(
d->model);
2590 d->qFileDialogUi->treeView->setModel(
d->model);
2591 #ifndef QT_NO_FSCOMPLETER 2592 d->completer->setModel(
d->model);
2593 d->completer->sourceModel =
d->model;
2594 d->completer->proxyModel = 0;
2600 d->qFileDialogUi->treeView->setSelectionModel(
d->qFileDialogUi->listView->selectionModel());
2602 d->setRootIndex(idx);
2620 return d->proxyModel;
2622 #endif // QT_NO_PROXYMODEL 2683 #ifndef QT_NO_SHORTCUT 2687 q->addAction(goHomeAction);
2693 #ifndef QT_NO_SHORTCUT 2697 q->addAction(goToParent);
2763 q->setDirectory(previousHistory);
2781 q->setDirectory(nextHistory);
2803 newDirectory = dir.absolutePath();
2805 q->setDirectory(newDirectory);
2806 emit q->directoryEntered(newDirectory);
2823 QString folderName = newFolderString;
2884 if (
index.isValid()) {
2899 #endif // QT_NO_MENU 2936 for (
int i = list.
count() - 1; i >= 0; --i) {
2950 #ifndef QT_NO_MESSAGEBOX 2953 QFileDialog::tr(
"'%1' is write protected.\nDo you want to delete it anyway?")
2964 if (!(p & QFile::WriteUser))
2966 #endif // QT_NO_MESSAGEBOX 2971 #ifndef QT_NO_MESSAGEBOX 2985 qFileDialogUi->listView->selectionModel()->clearSelection();
2990 if (multipleFiles.
count() > 0) {
2993 for (
int i = 0; i < multipleFiles.
count(); ++i) {
3000 for (
int i = 0; i < newFiles.
count(); ++i)
3003 for (
int i = 0; i < oldFiles.
count(); ++i)
3020 bool enableButton =
true;
3021 bool isOpenDirectory =
false;
3034 enableButton =
false;
3036 isOpenDirectory =
true;
3046 enableButton =
false;
3059 fileName = fn.
mid(fileDir.
length() + 1);
3066 if (fileDir == q->directory().canonicalPath() && fileName.
isEmpty()) {
3067 enableButton =
false;
3071 isOpenDirectory =
true;
3072 enableButton =
true;
3077 enableButton = maxLength < 0 || fileName.
length() <= maxLength;
3083 for (
int i = 0; i < files.
count(); ++i) {
3088 enableButton =
false;
3092 isOpenDirectory =
true;
3132 q->setDirectory(path);
3133 emit q->directoryEntered(path);
3160 #ifndef QT_NO_MESSAGEBOX 3179 #ifndef QT_NO_MESSAGEBOX 3182 "correct directory name was given.");
3184 #endif // QT_NO_MESSAGEBOX 3218 QString newNameFilterExtension;
3219 if (newNameFilters.
count() > 0)
3224 if (!fileNameExtension.
isEmpty() && !newNameFilterExtension.
isEmpty()) {
3225 const int fileNameExtensionLength = fileNameExtension.
count();
3226 fileName.
replace(fileName.
count() - fileNameExtensionLength,
3227 fileNameExtensionLength, newNameFilterExtension);
3251 for (
int i = 0; i < indexes.
count(); ++i) {
3256 if (allFiles.
count() > 1)
3257 for (
int i = 0; i < allFiles.
count(); ++i) {
3279 QDir::Filters dirFilters = q->filter();
3283 dirFilters &= ~
QDir::Hidden;
3301 ||
qFileDialogUi->treeView->selectionModel()->hasSelection()
3324 switch (event->
key()) {
3329 #ifdef QT_KEYPAD_NAVIGATION 3330 if (QApplication::keypadNavigationEnabled())
3365 urlModel->showFullPath =
true;
3366 urlModel->setFileSystemModel(d_ptr->model);
3372 if (
model()->rowCount() > 1)
3386 urlModel->addUrls(list, 0);
3391 for (
int i = 0; i < m_history.count(); ++i) {
3396 if (urls.
count() > 0) {
3403 Qt::ItemFlags flags = m->
flags(idx);
3407 urlModel->addUrls(urls, -1,
false);
3422 initStyleOption(&opt);
3446 #ifndef QT_NO_DRAGANDDROP 3459 #ifdef QT_KEYPAD_NAVIGATION 3464 #endif // QT_KEYPAD_NAVIGATION 3487 #ifndef QT_NO_DRAGANDDROP 3494 #ifdef QT_KEYPAD_NAVIGATION 3499 #endif // QT_KEYPAD_NAVIGATION 3510 return QSize(sizeHint.
width() * 4, height * 30);
3519 #ifdef QT_KEYPAD_NAVIGATION 3524 #endif // QT_KEYPAD_NAVIGATION 3537 #ifndef QT_NO_FSCOMPLETER 3545 dirModel = sourceModel;
3546 QString currentLocation = dirModel->rootPath();
3549 #if defined(Q_OS_UNIX) || defined(Q_OS_WINCE) 3551 return path.
mid(currentLocation.
length());
3554 return path.
mid(currentLocation.
length());
3556 return path.
mid(currentLocation.
length()+1);
3568 #if defined(Q_OS_SYMBIAN) 3571 #elif defined(Q_OS_WIN) 3576 pathCopy = pathCopy.
mid(2);
3578 doubleSlash.
clear();
3579 #elif defined(Q_OS_UNIX) 3587 dirModel = sourceModel;
3588 dirModel->
fetchMore(dirModel->index(pathCopy));
3594 #if defined(Q_OS_SYMBIAN) 3598 #elif defined(Q_OS_WIN) 3601 parts[0].prepend(doubleSlash);
3606 if (pathCopy[0] == sep[0])
3610 #if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN) 3613 bool startsFromRoot = pathCopy[0] == sep[0];
3615 if (parts.
count() == 1 || (parts.
count() > 1 && !startsFromRoot)) {
3620 dirModel = sourceModel;
3622 #if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN) 3624 currentLocation.
append(sep);
3626 if (currentLocation.
contains(sep) && path != currentLocation) {
3627 QStringList currentLocationList = splitPath(currentLocation);
3628 while (!currentLocationList.
isEmpty()
3629 && parts.
count() > 0
3636 return currentLocationList + parts;
3642 #endif // QT_NO_COMPLETER 3657 QString QFileDialog::selectedFile()
const 3744 #endif // QT3_SUPPORT 3748 #include "moc_qfiledialog.cpp" 3750 #endif // QT_NO_FILEDIALOG void _q_navigateForward()
Navigates to the last directory viewed in the dialog.
static QString number(int, int base=10)
This is an overloaded member function, provided for convenience. It differs from the above function o...
SelectionMode
This enum indicates how the view responds to user selections:
The QDir class provides access to directory structures and their contents.
void init(QFileDialogPrivate *d_pointer)
T qobject_cast(QObject *object)
QBool contains(QChar c, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
QModelIndex mapFromSource(const QModelIndex &index) const
virtual int columnCount(const QModelIndex &parent=QModelIndex()) const =0
Returns the number of columns for the children of the given parent.
static const qint32 QFileDialogMagic
QString qt_win_get_existing_directory(const QFileDialogArgs &args)
The QAbstractItemDelegate class is used to display and edit data items from a model.
void setValue(const QString &key, const QVariant &value)
Sets the value of setting key to value.
void keyPressEvent(QKeyEvent *)
Converts the given key press event into a line edit action.
void setSidebarUrls(const QList< QUrl > &urls)
Sets the urls that are located in the sidebar.
void _q_navigateBackward()
Navigates to the last directory viewed in the dialog.
Q_CORE_EXPORT QByteArray qgetenv(const char *varName)
The QKeyEvent class describes a key event.
The QItemSelectionModel class keeps track of a view's selected items.
QAbstractItemDelegate * itemDelegate() const
Returns the item delegate used to render the items in the views in the filedialog.
The QFileSystemModel class provides a data model for the local filesystem.
void setShortcut(const QKeySequence &shortcut)
void setDirectory(const QString &directory)
Sets the file dialog's current directory.
static QString fromLocal8Bit(const char *, int size=-1)
Returns a QString initialized with the first size characters of the 8-bit string str.
void _q_showContextMenu(const QPoint &position)
QVariant value(const QString &key, const QVariant &defaultValue=QVariant()) const
Returns the value for setting key.
bool isValid() const
Returns true if the URL is valid; otherwise returns false.
static mach_timebase_info_data_t info
void _q_enterDirectory(const QModelIndex &index)
This is called when the user double clicks on a file with the corresponding model item index...
Q_DECL_CONSTEXPR const T & qMin(const T &a, const T &b)
The QFontMetrics class provides font metrics information.
QString cap(int nth=0) const
Returns the text captured by the nth subexpression.
#define QT_END_NAMESPACE
This macro expands to.
Q_GUI_EXPORT _qt_filedialog_existing_directory_hook qt_filedialog_existing_directory_hook
QString defaultSuffix() const
QT_DEPRECATED void setFilter(const QString &filter)
Use setNameFilter() instead.
static QString getSaveFileName(QWidget *parent=0, const QString &caption=QString(), const QString &dir=QString(), const QString &filter=QString(), QString *selectedFilter=0, Options options=0)
This is a convenience static function that will return a file name selected by the user...
QSize iconSize
the icon size for the current item of the combo box
QFileDialog::Options opts
Q_AUTOTEST_EXPORT QString qt_tildeExpansion(const QString &path, bool *expanded=0)
void setConfirmOverwrite(bool enabled)
void drawControl(QStyle::ControlElement ce, const QStyleOption &opt)
Use the widget's style to draw a control element ce specified by QStyleOption option.
const QChar at(int i) const
Returns the character at the given index position in the string.
void setHistory(const QStringList &paths)
QAbstractProxyModel * proxyModel
The QRegExp class provides pattern matching using regular expressions.
QVariant data(int role=Qt::DisplayRole) const
Returns the data for the given role for the item referred to by the index.
void retranslateWindowTitle()
bool setData(const QModelIndex &index, const QVariant &value, int role=Qt::EditRole)
Reimplemented Function
QFileDialog::FileMode mode
QModelIndex sibling(int row, int column) const
Returns the sibling at row and column.
bool isAbsolute() const
Returns true if the file path name is absolute, otherwise returns false if the path is relative...
The QDialog class is the base class of dialog windows.
void setViewMode(ViewMode mode)
void setNameFilterDetailsVisible(bool enabled)
QStringList addDefaultSuffixToFiles(const QStringList filesToFix) const
int exec()
Shows the dialog as a modal dialog, blocking until the user closes it.
The QSettings class provides persistent platform-independent application settings.
QDir directory() const
Returns the directory currently being displayed in the dialog.
void setNameFilterDisables(bool enable)
QFileDialog::AcceptMode acceptMode
void keyPressEvent(QKeyEvent *e)
This event handler, for event event, can be reimplemented in a subclass to receive key press events f...
virtual int rowCount(const QModelIndex &parent=QModelIndex()) const =0
Returns the number of rows under the given parent.
QString & replace(int i, int len, QChar after)
bool atEnd() const
Returns true if the I/O device has reached the end position (end of the stream or file) or if there i...
QString currentText
the text for the current item of the combo box
bool itemViewKeyboardEvent(QKeyEvent *event)
The QByteArray class provides an array of bytes.
void setVisible(bool visible)
Reimplemented Function
QDir absoluteDir() const
Returns the file's absolute path as a QDir object.
QT_DEPRECATED QStringList filters() const
Use nameFilters() instead.
Q_GUI_EXPORT _qt_filedialog_open_filename_hook qt_filedialog_open_filename_hook
QStandardItem * item(int row, int column=0) const
Returns the item for the given row and column if one has been set; otherwise returns 0...
int length() const
Returns the number of characters in this string.
virtual void setSourceModel(QAbstractItemModel *sourceModel)
Sets the given sourceModel to be processed by the proxy model.
void keyPressEvent(QKeyEvent *e)
FIXME: this is a hack to avoid propagating key press events to the dialog and from there to the "Ok" ...
void selectNameFilter(const QString &filter)
Sets the current file type filter.
bool Q_GUI_EXPORT qt_use_native_dialogs
static qreal position(QGraphicsObject *item, QDeclarativeAnchorLine::AnchorLine anchorLine)
bool confirmOverwrite() const
QString fileName() const
Returns the name of the file, excluding the path.
virtual void accept()
Hides the modal dialog and sets the result code to Accepted.
void setEditTriggers(EditTriggers triggers)
void beginGroup(const QString &prefix)
Appends prefix to the current group.
QT_DEPRECATED QString selectedFilter() const
Use selectedNameFilter() instead.
void setResizeMode(ResizeMode mode)
QString toString() const
Returns the variant as a QString if the variant has type() String , Bool , ByteArray ...
QStringList history() const
Returns the browsing history of the filedialog as a list of paths.
void _q_autoCompleteFileName(const QString &)
void setDefaultSuffix(const QString &suffix)
static const QMetaObject staticMetaObject
This variable stores the meta-object for the class.
int width() const
Returns the width of the rectangle.
bool isNameFilterDetailsVisible() const
bool startsWith(const QString &s, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Returns true if the string starts with s; otherwise returns false.
void removeLast()
Removes the last item in the list.
QString absoluteFilePath() const
Returns an absolute path including the file name.
#define QT_END_INCLUDE_NAMESPACE
This macro is equivalent to QT_BEGIN_NAMESPACE.
static QString tr(const char *sourceText, const char *comment=0, int n=-1)
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
bool exists() const
Returns true if the file exists; otherwise returns false.
void setRootIndex(const QModelIndex &index) const
QString pathFromIndex(const QModelIndex &index) const
Returns the path for the given index.
void pop_front()
This function is provided for STL compatibility.
void init(QFileDialogPrivate *d_pointer)
int count(const T &t) const
Returns the number of occurrences of value in the list.
bool resolveSymlinks() const
The QStandardItemModel class provides a generic model for storing custom data.
void setOption(Option option, bool on=true)
Sets the given option to be enabled if on is true; otherwise, clears the given option.
bool restoreState(const QByteArray &state)
Restores the dialogs's layout, history and current directory to the state specified.
QString(* _qt_filedialog_existing_directory_hook)(QWidget *parent, const QString &caption, const QString &dir, QFileDialog::Options options)
void fetchMore(const QModelIndex &parent)
Reimplemented Function
static QString _qt_get_directory(const QString &path)
void _q_deleteCurrent()
Deletes the currently selected item in the dialog.
static bool isRelativePath(const QString &path)
Returns true if path is relative; returns false if it is absolute.
void _q_pathChanged(const QString &)
The QUrl class provides a convenient interface for working with URLs.
FileMode fileMode() const
The QString class provides a Unicode character string.
QFontMetrics fontMetrics
the font metrics that should be used when drawing text in the control
T * qobject_cast(QObject *object)
static QString currentPath()
Returns the absolute path of the application's current directory.
void keyPressEvent(QKeyEvent *e)
This event handler, for event event, can be reimplemented in a subclass to receive key press events f...
bool testOption(Option option) const
Returns true if the given option is enabled; otherwise, returns false.
QStringList qt_strip_filters(const QStringList &filters)
The QObject class is the base class of all Qt objects.
const char * qt_file_dialog_filter_reg_exp
static QString workingDirectory(const QString &path)
static QChar separator()
Returns the native directory separator: "/" under Unix (including Mac OS X) and "\\" under Windows...
QString(* _qt_filedialog_open_filename_hook)(QWidget *parent, const QString &caption, const QString &dir, const QString &filter, QString *selectedFilter, QFileDialog::Options options)
QStringList splitPath(const QString &path) const
Splits the given path into strings that are used to match at each level in the model().
QStringList(* _qt_filedialog_open_filenames_hook)(QWidget *parent, const QString &caption, const QString &dir, const QString &filter, QString *selectedFilter, QFileDialog::Options options)
QFileDialogPrivate * d_ptr
static StandardButton warning(QWidget *parent, const QString &title, const QString &text, StandardButtons buttons=Ok, StandardButton defaultButton=NoButton)
Opens a warning message box with the given title and text in front of the specified parent widget...
void keyPressEvent(QKeyEvent *event)
Reimplemented Function
QModelIndex parent() const
Returns the parent of the model index, or QModelIndex() if it has no parent.
The QActionGroup class groups actions together.
QByteArray toByteArray() const
Returns the variant as a QByteArray if the variant has type() ByteArray or String (converted using QS...
The QFileDialog class provides a dialog that allow users to select files or directories.
virtual QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
Returns the data for the given role and section in the header with the specified orientation.
Q_DECL_CONSTEXPR const T & qMax(const T &a, const T &b)
QString elidedText(const QString &text, Qt::TextElideMode mode, int width, int flags=0) const
If the string text is wider than width, returns an elided version of the string (i.
QStringList qt_clean_filter_list(const QString &filter)
void setHistory(const QStringList &paths)
Sets the browsing history of the filedialog to contain the given paths.
QAbstractItemView * currentView() const
bool isEmpty() const
Returns true if the list contains no items; otherwise returns false.
The QScopedPointer class stores a pointer to a dynamically allocated object, and deletes it upon dest...
The QShortcut class is used to create keyboard shortcuts.
void setParent(QObject *)
Makes the object a child of parent.
void setObjectName(const QString &name)
int toInt(bool *ok=0) const
Returns the variant as an int if the variant has type() Int , Bool , ByteArray , Char ...
bool exists() const
Returns true if the file specified by fileName() exists; otherwise returns false. ...
~QFileDialog()
Destroys the file dialog.
void _q_fileRenamed(const QString &path, const QString oldName, const QString newName)
ViewMode viewMode() const
void done(int result)
Reimplemented Function
QStringList typedFiles() const
void setFileMode(FileMode mode)
QString qt_win_get_save_file_name(const QFileDialogArgs &args, QString *initialDirectory, QString *selectedFilter)
virtual QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const =0
Returns the index of the item in the model specified by the given row, column and parent index...
void _q_selectionChanged()
This is called when the model index corresponding to the current file is changed from index to curren...
void expanded(const QModelIndex &index)
This signal is emitted when the item specified by index is expanded.
int key() const
Returns the code of the key that was pressed or released.
QModelIndex mkdir(const QModelIndex &parent, const QString &name)
Create a directory with the name in the parent model index.
int width() const
Returns the width.
ViewMode
This enum describes the view mode of the file dialog; i.
void changeEvent(QEvent *e)
Reimplemented Function
void setNameFilters(const QStringList &filters)
Sets the filters used in the file dialog.
void append(const T &t)
Inserts value at the end of the list.
QString selectedNameFilter() const
Returns the filter that the user selected in the file dialog.
#define QT_BEGIN_NAMESPACE
This macro expands to.
void selectFile(const QString &filename)
Selects the given filename in the file dialog.
void setNameFilter(const QString &filter)
QBool contains(const T &t) const
Returns true if the list contains an occurrence of value; otherwise returns false.
static bool isEmpty(const char *str)
int indexIn(const QString &str, int offset=0, CaretMode caretMode=CaretAtZero) const
Attempts to find a match in str from position offset (0 by default).
bool isDir() const
Returns true if this object points to a directory or to a symbolic link to a directory; otherwise ret...
QString qt_win_get_open_file_name(const QFileDialogArgs &args, QString *initialDirectory, QString *selectedFilter)
static bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
Creates a connection of the given type from the signal in the sender object to the method in the rece...
bool insertRow(int row, const QModelIndex &parent=QModelIndex())
Inserts a single row before the given row in the child items of the parent specified.
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
void setNameFilters(const QStringList &filters)
Sets the name filters to apply against the existing files.
The QTreeView class provides a default model/view implementation of a tree view.
QString text
the line edit's text
void setItemDelegate(QAbstractItemDelegate *delegate)
Sets the item delegate used to render items in the views in the file dialog to the given delegate...
Qt::ItemFlags flags(const QModelIndex &index) const
Reimplemented Function
int row() const
Returns the row this model index refers to.
void emitFilesSelected(const QStringList &files)
void setResolveSymlinks(bool enabled)
#define Q_GLOBAL_STATIC(TYPE, NAME)
Declares a global static variable with the given type and name.
void prepend(const T &t)
Inserts value at the beginning of the list.
void showPopup()
Displays the list of items in the combobox.
static QDir current()
Returns the application's current directory.
const T & at(int i) const
Returns the item at index position i in the list.
const QAbstractItemModel * model() const
Returns a pointer to the model containing the item that this index refers to.
bool isDir(const QModelIndex &index) const
Returns true if the model item index represents a directory; otherwise returns false.
The QStringList class provides a list of strings.
void setFile(const QString &file)
Sets the file that the QFileInfo provides information about to file.
QString canonicalFilePath() const
Returns the canonical path including the file name, i.e.
bool endsWith(const T &t) const
Returns true if this list is not empty and its last item is equal to value; otherwise returns false...
The QFileIconProvider class provides file icons for the QDirModel and the QFileSystemModel classes...
void setIconProvider(QFileIconProvider *provider)
Sets the icon provider used by the filedialog to the specified provider.
QAction * newFolderAction
void setText(const QString &text)
QLineEdit * lineEdit() const
void setTextElideMode(Qt::TextElideMode mode)
int indexOf(QChar c, int from=0, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
The QLatin1String class provides a thin wrapper around an US-ASCII/Latin-1 encoded string literal...
void removeFirst()
Removes the first item in the list.
void setDragDropMode(DragDropMode behavior)
QModelIndex select(const QModelIndex &index) const
QVariant myComputer(int role=Qt::DisplayRole) const
Returns the data stored under the given role for the item "My Computer".
void setKey(const QKeySequence &key)
QStringList qt_make_filter_list(const QString &filter)
void setSortingEnabled(bool enable)
QFileDialog::FileMode fileMode
QBool contains(const QString &str, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Returns true if the list contains the string str; otherwise returns false.
void setRootIsDecorated(bool show)
void keyPressEvent(QKeyEvent *event)
This function is called with the given event when a key event is sent to the widget.
T value(int i) const
Returns the value at index position i in the list.
static QString cleanPath(const QString &path)
Removes all multiple directory separators "/" and resolves any "."s or ".."s found in the path...
QAction * showHiddenAction
void replace(int i, const T &t)
Replaces the item at index position i with value.
QString toLocalFile() const
Returns the path of this URL formatted as a local file path.
QUrl toUrl() const
Returns the variant as a QUrl if the variant has type() Url ; otherwise returns an invalid QUrl...
QByteArray toLocal8Bit() const Q_REQUIRED_RESULT
Returns the local 8-bit representation of the string as a QByteArray.
bool isValid() const
Returns true if this model index is valid; otherwise returns false.
QFileIconProvider * iconProvider() const
Returns the icon provider used by the filedialog.
void reset(T *other=0)
Deletes the existing object it is pointing to if any, and sets its pointer to other.
QModelIndex mapToSource(const QModelIndex &index) const
The QAbstractItemModel class provides the abstract interface for item model classes.
The QAbstractProxyModel class provides a base class for proxy item models that can do sorting...
void setProxyModel(QAbstractProxyModel *model)
Sets the model for the views to the given proxyModel.
void setWrapping(bool enable)
void setAcceptMode(AcceptMode mode)
virtual void done(int)
Closes the dialog and sets its result code to r.
void paintEvent(QPaintEvent *)
This event handler can be reimplemented in a subclass to receive paint events passed in event...
T & first()
Returns a reference to the first item in the list.
void setText(const QString &)
const char * constData() const
Returns a pointer to the data stored in the byte array.
static QStringList getOpenFileNames(QWidget *parent=0, const QString &caption=QString(), const QString &dir=QString(), const QString &filter=QString(), QString *selectedFilter=0, Options options=0)
This is a convenience static function that will return one or more existing files selected by the use...
QString join(const QString &sep) const
Joins all the string list's strings into a single string with each element separated by the given sep...
QString mid(int position, int n=-1) const Q_REQUIRED_RESULT
Returns a string that contains n characters of this string, starting at the specified position index...
Q_GUI_EXPORT _qt_filedialog_save_filename_hook qt_filedialog_save_filename_hook
The QAbstractItemView class provides the basic functionality for item view classes.
static QString getExistingDirectory(QWidget *parent=0, const QString &caption=QString(), const QString &dir=QString(), Options options=ShowDirsOnly)
This is a convenience static function that will return an existing directory selected by the user...
static const char *const filters[3]
FileMode
This enum is used to indicate what the user may select in the file dialog; i.
QT_DEPRECATED void selectFilter(const QString &filter)
Use selectNameFilter() instead.
QFileDialog::Options options
void setOptions(Options options)
QString arg(qlonglong a, int fieldwidth=0, int base=10, const QChar &fillChar=QLatin1Char(' ')) const Q_REQUIRED_RESULT
QStringList selectedFiles() const
Returns a list of strings containing the absolute paths of the selected files in the dialog...
The QItemSelection class manages information about selected items in a model.
QAbstractProxyModel * proxyModel() const
Returns the proxy model used by the file dialog.
static Qt::KeyboardModifiers keyboardModifiers()
Returns the current state of the modifier keys on the keyboard.
The QListView class provides a list or icon view onto a model.
QString & append(QChar c)
The QKeySequence class encapsulates a key sequence as used by shortcuts.
int indexOf(const T &t, int from=0) const
Returns the index position of the first occurrence of value in the list, searching forward from index...
QCompleter that can deal with QFileSystemModel.
void accept()
Reimplemented Function
void clear()
Clears the contents of the line edit.
QStringList qt_win_get_open_file_names(const QFileDialogArgs &args, QString *initialDirectory, QString *selectedFilter)
QFileDialogTreeView(QWidget *parent)
void _q_createDirectory()
Creates a new directory, first asking the user for a suitable name.
QString simplified() const Q_REQUIRED_RESULT
Returns a string that has whitespace removed from the start and the end, and that has each sequence o...
void clear()
Clears the contents of the string and makes it empty.
int lastIndexOf(QChar c, int from=-1, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
static QString fromLatin1(const char *, int size=-1)
Returns a QString initialized with the first size characters of the Latin-1 string str...
QFileDialog(QWidget *parent, Qt::WindowFlags f)
Constructs a file dialog with the given parent and widget flags.
virtual void showPopup()
Displays the list of items in the combobox.
QString suffix() const
Returns the suffix of the file.
The QPoint class defines a point in the plane using integer precision.
void _q_navigateToParent()
Navigates to the parent directory of the currently displayed directory in the dialog.
T & last()
Returns a reference to the last item in the list.
QHeaderView * header() const
Returns the header for the tree view.
The QModelIndex class is used to locate data in a data model.
QStringList nameFilters() const
Returns the file type filters that are in operation on this file dialog.
QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const
Reimplemented Function
int size() const
Returns the number of items in the list.
QT_DEPRECATED void setFilters(const QStringList &filters)
Use setNameFilters() instead.
void setItemsExpandable(bool enable)
QModelIndex rootIndex() const
The QStyleOptionComboBox class is used to describe the parameter for drawing a combobox.
void setPen(const QColor &color)
Sets the painter's pen to have style Qt::SolidLine, width 0 and the specified color.
void setSelectionBehavior(QAbstractItemView::SelectionBehavior behavior)
void setLabelText(DialogLabel label, const QString &text)
Sets the text shown in the filedialog in the specified label.
QDir rootDirectory() const
The currently set directory.
static QString getOpenFileName(QWidget *parent=0, const QString &caption=QString(), const QString &dir=QString(), const QString &filter=QString(), QString *selectedFilter=0, Options options=0)
This is a convenience static function that returns an existing file selected by the user...
QFileDialogListView(QWidget *parent=0)
The QRect class defines a rectangle in the plane using integer precision.
QStringList currentHistory
void _q_useNameFilter(int index)
Sets the current name filter to be nameFilter and update the qFileDialogUi->fileNameEdit when in Acce...
#define Q_AUTOTEST_EXPORT
void edit(const QModelIndex &index)
Starts editing the item corresponding to the given index if it is editable.
QFuture< void > filter(Sequence &sequence, FilterFunction filterFunction)
void _q_goToDirectory(const QString &)
Changes the file dialog's current directory to the one specified by path.
void _q_rowsInserted(const QModelIndex &parent)
When parent is root and rows have been inserted when none was there before then select the first one...
The QLineEdit widget is a one-line text editor.
QByteArray saveState() const
Saves the state of the dialog's layout, history and current directory.
AcceptMode acceptMode() const
#define QT_BEGIN_INCLUDE_NAMESPACE
This macro is equivalent to QT_END_NAMESPACE.
static QUrl fromLocalFile(const QString &localfile)
Returns a QUrl representation of localFile, interpreted as a local file.
The QStylePainter class is a convenience class for drawing QStyle elements inside a widget...
void accept()
Sets the accept flag of the event object, the equivalent of calling setAccepted(true).
void setReadOnly(bool enable)
void open()
Shows the dialog as a window modal dialog, returning immediately.
The QSize class defines the size of a two-dimensional object using integer point precision.
void _q_goToUrl(const QUrl &url)
static QString toInternal(const QString &path)
void setLastVisitedDirectory(const QString &dir)
QStringList split(const QString &sep, SplitBehavior behavior=KeepEmptyParts, Qt::CaseSensitivity cs=Qt::CaseSensitive) const Q_REQUIRED_RESULT
Splits the string into substrings wherever sep occurs, and returns the list of those strings...
The QDataStream class provides serialization of binary data to a QIODevice.
void _q_currentChanged(const QModelIndex &index)
void init(const QString &directory=QString(), const QString &nameFilter=QString(), const QString &caption=QString())
QString labelText(DialogLabel label) const
Returns the text shown in the filedialog in the specified label.
bool removeDirectory(const QString &path)
QList< QAction * > actions() const
Returns the list of this groups's actions.
int maxNameLength(const QString &path)
QString path() const
Returns the path.
bool remove(const QModelIndex &index) const
Removes the model item index from the file system model and deletes the corresponding file from the f...
int currentHistoryLocation
static QString initialSelection(const QString &path)
void drawComplexControl(QStyle::ComplexControl cc, const QStyleOptionComplex &opt)
Use the widget's style to draw a complex control cc specified by the QStyleOptionComplex option...
QDir::Filters filter() const
Returns the filter that is used when displaying files.
QString path() const
Returns the file's path.
QString & remove(int i, int len)
Removes n characters from the string, starting at the given position index, and returns a reference t...
bool endsWith(const QString &s, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Returns true if the string ends with s; otherwise returns false.
QList< QUrl > sidebarUrls() const
The QFileInfo class provides system-independent file information.
The QPaintEvent class contains event parameters for paint events.
QFileDialogPrivate * d_ptr
Q_GUI_EXPORT _qt_filedialog_open_filenames_hook qt_filedialog_open_filenames_hook
static QString toNativeSeparators(const QString &pathName)
Returns pathName with the '/' separators converted to separators that are appropriate for the underly...
The QEvent class is the base class of all event classes.
void _q_showHeader(QAction *)
Type type() const
Returns the event type.
void _q_showDetailsView()
void setVisible(bool visible)
Reimplemented Function
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
static QString fileName(const QString &fileUrl)
QString absolutePath() const
Returns a file's path absolute path.
void retranslateStrings()
QString(* _qt_filedialog_save_filename_hook)(QWidget *parent, const QString &caption, const QString &dir, const QString &filter, QString *selectedFilter, QFileDialog::Options options)
void setReadOnly(bool enabled)
bool fileNameLabelExplicitlySat
The QLatin1Char class provides an 8-bit ASCII/Latin-1 character.
void createMenuActions()
Create actions which will be used in the right click.
virtual int sizeHintForRow(int row) const
Returns the height size hint for the specified row or -1 if there is no model.
void init(QFileDialogPrivate *d_pointer)
QString getEnvironmentVariable(const QString &string)
void _q_showHidden()
Includes hidden files and directories in the items displayed in the dialog.
The QAction class provides an abstract user interface action that can be inserted into widgets...
void setFilter(Filters filter)
Sets the filter used by entryList() and entryInfoList() to filters.
QScopedPointer< Ui_QFileDialog > qFileDialogUi
int column() const
Returns the column this model index refers to.
Option
Some platforms allow the user to set a different icon.
static QString escape(const QString &str)
Returns the string str with every regexp special character escaped with a backslash.
virtual QModelIndex indexAt(const QPoint &point) const =0
Returns the model index of the item at the viewport coordinates point.
int removeAll(const T &t)
Removes all occurrences of value in the list and returns the number of entries removed.
static QString homePath()
Returns the absolute path of the user's home directory.