42 #ifndef QFILEDIALOG_P_H 43 #define QFILEDIALOG_P_H 56 #ifndef QT_NO_FILEDIALOG 59 #include "private/qdialog_p.h" 60 #include "qplatformdefs.h" 79 #include "private/qguiplatformplugin_p.h" 82 #if defined (Q_OS_UNIX) 110 #define UrlRole (Qt::UserRole + 1) 119 void createToolButtons();
120 void createMenuActions();
121 void createWidgets();
131 bool removeDirectory(
const QString &path);
136 inline void setRootIndex(
const QModelIndex &index)
const;
138 inline QString rootPath()
const;
143 #if defined(Q_OS_UNIX) 145 #elif defined(Q_OS_WIN) 149 if (::GetVolumeInformation(reinterpret_cast<const wchar_t *>(drive.
utf16()), NULL, 0, NULL, &maxLength, NULL, NULL, 0) ==
FALSE)
166 return path.
mid(separator + 1);
174 filters &= ~
QDir::Files;
185 #if defined(Q_FS_FAT) || defined(Q_OS_OS2EMX) || defined(Q_OS_SYMBIAN) 187 for (
int i = 0; i < (int)n.
length(); ++i)
189 #if defined(Q_OS_WINCE) 194 #else // the compile should optimize away this 199 void setLastVisitedDirectory(
const QString &dir);
200 void retranslateWindowTitle();
201 void retranslateStrings();
205 void _q_pathChanged(
const QString &);
206 void _q_navigateBackward();
207 void _q_navigateForward();
208 void _q_navigateToParent();
209 void _q_createDirectory();
210 void _q_showListView();
211 void _q_showDetailsView();
213 void _q_renameCurrent();
214 void _q_deleteCurrent();
215 void _q_showHidden();
217 void _q_updateOkButton();
220 void _q_goToDirectory(
const QString &);
221 void _q_useNameFilter(
int index);
222 void _q_selectionChanged();
223 void _q_goToUrl(
const QUrl &url);
224 void _q_autoCompleteFileName(
const QString &);
229 #ifndef QT_NO_PROXYMODEL 237 #ifndef QT_NO_FSCOMPLETER 239 #endif //QT_NO_FSCOMPLETER 265 bool canBeNativeDialog();
266 bool setVisible_sys(
bool visible);
267 void deleteNativeDialog_sys();
272 void selectFile_sys(
const QString &filename);
274 void setFilter_sys();
277 QString selectedNameFilter_sys()
const;
280 #if defined(Q_WS_MAC) 282 #ifndef QT_MAC_USE_COCOA 301 static void qt_mac_filedialog_event_proc(
const NavEventCallbackMessage msg, NavCBRecPtr p,
302 NavCallBackUserData
data);
303 static Boolean qt_mac_filedialog_filter_proc(AEDesc *theItem,
void *
info,
void *
data,
305 bool showCarbonNavServicesDialog();
306 bool hideCarbonNavServicesDialog();
307 void createNavServicesDialog();
309 bool showCocoaFilePanel();
310 bool hideCocoaFilePanel();
312 void createNSOpenSavePanelDelegate();
313 void QNSOpenSavePanelDelegate_selectionChanged(
const QString &newPath);
314 void QNSOpenSavePanelDelegate_panelClosed(
bool accepted);
315 void QNSOpenSavePanelDelegate_directoryEntered(
const QString &newDir);
316 void QNSOpenSavePanelDelegate_filterSelected(
int menuIndex);
317 void _q_macRunNativeAppModalPanel();
318 void mac_nativeDialogModalHelp();
369 QSize sizeHint()
const;
381 QSize sizeHint()
const;
390 #ifdef QT_NO_PROXYMODEL 393 return proxyModel ? proxyModel->mapToSource(index) :
index;
397 #ifdef QT_NO_PROXYMODEL 400 return proxyModel ? proxyModel->mapFromSource(index) :
index;
405 return model->rootPath();
425 #endif // QT_NO_FILEDIALOG 427 #endif // QFILEDIALOG_P_H The QDir class provides access to directory structures and their contents.
QModelIndex mapFromSource(const QModelIndex &index) const
The QKeyEvent class describes a key event.
The QFileSystemModel class provides a data model for the local filesystem.
static mach_timebase_info_data_t info
#define QT_END_NAMESPACE
This macro expands to.
QFileDialogPrivate * d_ptr
QFileDialog::Options opts
QDialog::DialogCode dialogResultCode_sys()
void init(QFileDialogPrivate *d_pointer)
QAbstractProxyModel * proxyModel
QString mCurrentSelection
QByteArray memberToDisconnectOnClose
QFileDialog::FileMode mode
QFileDialog::AcceptMode acceptMode
void selectFile_sys(const QString &filename)
The QByteArray class provides an array of bytes.
int length() const
Returns the number of characters in this string.
static qreal position(QGraphicsObject *item, QDeclarativeAnchorLine::AnchorLine anchorLine)
int select(int, fd_set *, fd_set *, fd_set *, struct timeval *)
QDir::Filters filterForMode(QDir::Filters filters) const
bool startsWith(const QString &s, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Returns true if the string starts with s; otherwise returns false.
The QCompleter class provides completions based on an item model.
#define Q_DISABLE_COPY(Class)
Disables the use of copy constructors and assignment operators for the given Class.
The QUrl class provides a convenient interface for working with URLs.
The QString class provides a Unicode character string.
static QChar separator()
Returns the native directory separator: "/" under Unix (including Mac OS X) and "\\" under Windows...
QFileDialogPrivate * d_ptr
The QFileDialog class provides a dialog that allow users to select files or directories.
QStringList mCurrentSelectionList
QFileDialogComboBox(QWidget *parent=0)
#define QT_BEGIN_NAMESPACE
This macro expands to.
QString left(int n) const Q_REQUIRED_RESULT
Returns a substring that contains the n leftmost characters of the string.
int size() const
Returns the number of characters in this string.
The QTreeView class provides a default model/view implementation of a tree view.
QList< QtMacFilterName > filters
The QStringList class provides a list of strings.
The QComboBox widget is a combined button and popup list.
QAction * newFolderAction
static const char * data(const QByteArray &arr)
The QLatin1String class provides a thin wrapper around an US-ASCII/Latin-1 encoded string literal...
#define FALSE
Synonym for false.
QString directory_sys() const
QFileDialog::FileMode fileMode
void selectNameFilter_sys(const QString &filter)
QAction * showHiddenAction
QString selectedNameFilter_sys() const
QStringList selectedFiles_sys() const
QModelIndex mapToSource(const QModelIndex &index) const
The QAbstractProxyModel class provides a base class for proxy item models that can do sorting...
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...
The QAbstractItemView class provides the basic functionality for item view classes.
static const char *const filters[3]
FileMode
This enum is used to indicate what the user may select in the file dialog; i.
QFileDialog::Options options
#define Q_DECLARE_PUBLIC(Class)
The QListView class provides a list or icon view onto a model.
QCompleter that can deal with QFileSystemModel.
QByteArray signalToDisconnectOnClose
int lastIndexOf(QChar c, int from=-1, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
QString basename(const QString &path) const
QStringList history() const
The QPoint class defines a point in the plane using integer precision.
The QGridLayout class lays out widgets in a grid.
The QModelIndex class is used to locate data in a data model.
QStringList currentHistory
#define Q_AUTOTEST_EXPORT
void deleteNativeDialog_sys()
The QHBoxLayout class lines up widgets horizontally.
The QLineEdit widget is a one-line text editor.
static QByteArray encodeName(const QString &fileName)
By default, this function converts fileName to the local 8-bit encoding determined by the user's loca...
DialogCode
The value returned by a modal dialog.
The QSize class defines the size of a two-dimensional object using integer point precision.
static QString toInternal(const QString &path)
int maxNameLength(const QString &path)
int currentHistoryLocation
void setNameFilters_sys(const QStringList &filters)
The QPaintEvent class contains event parameters for paint events.
QFileDialogPrivate * d_ptr
static QString toNativeSeparators(const QString &pathName)
Returns pathName with the '/' separators converted to separators that are appropriate for the underly...
QFileDialogPrivate * d_ptr
void setDirectory_sys(const QString &directory)
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
bool fileNameLabelExplicitlySat
The QLatin1Char class provides an 8-bit ASCII/Latin-1 character.
QFileDialogLineEdit(QWidget *parent=0)
The QAction class provides an abstract user interface action that can be inserted into widgets...
QScopedPointer< Ui_QFileDialog > qFileDialogUi
The QList class is a template class that provides lists.
bool setVisible_sys(bool visible)
const ushort * utf16() const
Returns the QString as a '\0\'-terminated array of unsigned shorts.
QPointer< QObject > receiverToDisconnectOnClose