diff options
author | Olivier Goffart <ogoffart@trolltech.com> | 2009-08-19 13:50:45 (GMT) |
---|---|---|
committer | Olivier Goffart <ogoffart@trolltech.com> | 2009-10-07 08:58:49 (GMT) |
commit | ee383b89f16a9a75a934076255bddbef5a075fa3 (patch) | |
tree | 22118d8368e89aae2ebf09e41b79f3d69d811cae /src/gui/dialogs/qfiledialog_p.h | |
parent | c14455b78904f25e724cd928652c49f9583c6aa0 (diff) | |
download | Qt-ee383b89f16a9a75a934076255bddbef5a075fa3.zip Qt-ee383b89f16a9a75a934076255bddbef5a075fa3.tar.gz Qt-ee383b89f16a9a75a934076255bddbef5a075fa3.tar.bz2 |
Integrate the GuiPlatformPlugin interface
This is an internal interface for plugins that can be provided by
the platform to give platform-specific features by platforms built on
top of Qt.
We can easlily integrate Qt on Windows, Mac, Gnome, ... without any
plugin because we can link to their respective library (dynamically
if we don't want to depend on it). On Gnome, we can dynamically
resolve Gtk+ symbols.
This is however not possible for KDE or other platform built on top
of Qt: we can't link against their library because they depend on us
and we can't dynamically resolve the symbols because they are
mangled (C++)
So this plugin provides hooks inside Qt to be able to do things
like native File or Color dialog, native icons, accurate reading of
the config file, and so on.
This is currently private API.
Task-number: QT-406
Reviewed-by: Jens Bache-Wiig
Reviewed-by: Oswald Buddenhagen
Diffstat (limited to 'src/gui/dialogs/qfiledialog_p.h')
-rw-r--r-- | src/gui/dialogs/qfiledialog_p.h | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/src/gui/dialogs/qfiledialog_p.h b/src/gui/dialogs/qfiledialog_p.h index 54fc0e0..44289d9 100644 --- a/src/gui/dialogs/qfiledialog_p.h +++ b/src/gui/dialogs/qfiledialog_p.h @@ -76,6 +76,8 @@ #include <qdebug.h> #include "qsidebar_p.h" #include "qfscompleter_p.h" +#include "../kernel/qguiplatformplugin_p.h" + #if defined (Q_OS_UNIX) #include <unistd.h> @@ -405,17 +407,17 @@ inline QString QFileDialogPrivate::rootPath() const { #ifndef Q_WS_MAC // Dummies for platforms that don't use native dialogs: - inline void QFileDialogPrivate::deleteNativeDialog_sys() {} - inline bool QFileDialogPrivate::setVisible_sys(bool) { return false; } - inline QDialog::DialogCode QFileDialogPrivate::dialogResultCode_sys(){ return QDialog::Rejected; } - inline void QFileDialogPrivate::setDirectory_sys(const QString &) {} - inline QString QFileDialogPrivate::directory_sys() const { return QString(); } - inline void QFileDialogPrivate::selectFile_sys(const QString &) {} - inline QStringList QFileDialogPrivate::selectedFiles_sys() const { return QStringList(); } - inline void QFileDialogPrivate::setFilter_sys() {} - inline void QFileDialogPrivate::setNameFilters_sys(const QStringList &) {} - inline void QFileDialogPrivate::selectNameFilter_sys(const QString &) {} - inline QString QFileDialogPrivate::selectedNameFilter_sys() const { return QString(); } + inline void QFileDialogPrivate::deleteNativeDialog_sys() { qt_guiPlatformPlugin()->fileDialogDelete(q_func()); } + inline bool QFileDialogPrivate::setVisible_sys(bool visible) { return qt_guiPlatformPlugin()->fileDialogSetVisible(q_func(), visible); } + inline QDialog::DialogCode QFileDialogPrivate::dialogResultCode_sys(){ return qt_guiPlatformPlugin()->fileDialogResultCode(q_func()); } + inline void QFileDialogPrivate::setDirectory_sys(const QString &directory) { qt_guiPlatformPlugin()->fileDialogSetDirectory(q_func(), directory); } + inline QString QFileDialogPrivate::directory_sys() const { return qt_guiPlatformPlugin()->fileDialogDirectory(q_func()); } + inline void QFileDialogPrivate::selectFile_sys(const QString &filename) { qt_guiPlatformPlugin()->fileDialogSelectFile(q_func(), filename); } + inline QStringList QFileDialogPrivate::selectedFiles_sys() const { return qt_guiPlatformPlugin()->fileDialogSelectedFiles(q_func()); } + inline void QFileDialogPrivate::setFilter_sys() { qt_guiPlatformPlugin()->fileDialogSetFilter(q_func()); } + inline void QFileDialogPrivate::setNameFilters_sys(const QStringList &filters) { qt_guiPlatformPlugin()->fileDialogSetNameFilters(q_func(), filters); } + inline void QFileDialogPrivate::selectNameFilter_sys(const QString &filter) { qt_guiPlatformPlugin()->fileDialogSelectNameFilter(q_func(), filter); } + inline QString QFileDialogPrivate::selectedNameFilter_sys() const { return qt_guiPlatformPlugin()->fileDialogSelectedNameFilter(q_func()); } #endif QT_END_NAMESPACE |