KIO
kfiledialog.cpp
Go to the documentation of this file.
123 // KDE format: "*.first *.second|Description" or "*|Description", separated by \n (Description is optional)
152 QString moduleName = KConfig("kdeglobals").group(ConfigGroup).readEntry("file module", s_defaultFileModuleName);
435 // This slot still exists mostly for compat purposes; for subclasses which reimplement slotCancel
648 if (KFileDialogPrivate::isNative() && (!startDir.isValid() || startDir.isLocalFile())) { // everything we can do...
705 //TODO KDE5: replace this method by the method below (with default parameter values in declaration)
735 QFileDialog::Options opts = (options & KFileDialog::ConfirmOverwrite) ? QFileDialog::Options(0) : QFileDialog::DontConfirmOverwrite;
772 //TODO KDE5: replace this method by the method below (with default parameter values in declaration)
782 return KFileDialog::getSaveFileName(dir, filter, 0, caption, options); // everything we can do...
808 //TODO KDE5: replace this method by the method below (with default parameter values in declaration)
980 d->native->startDir(), d->native->filter, parentWidget(), windowTitle(), &d->native->selectedFilter ) );
992 d->native->startDir(), d->native->filter, parentWidget(), windowTitle(), &d->native->selectedFilter ) );
1017 d->native->startDir(), d->native->filter, parentWidget(), windowTitle(), Options(0), &d->native->selectedFilter ) );
1062 typedef QString (*_qt_filedialog_existing_directory_hook)(QWidget *parent, const QString &caption,
1073 typedef QStringList (*_qt_filedialog_open_filenames_hook)(QWidget * parent, const QString &caption,
1170 static QString getExistingDirectory(QWidget *parent, const QString &caption, const QString &dir,
1214 static QStringList getOpenFileNames(QWidget *parent, const QString &caption, const QString &dir,
QString i18n(const char *text)
virtual QWidget * createFileWidget(const KUrl &startDir, QWidget *parent)=0
the returned widget implements the KAbstractFileWidget interface
KF_EXTERN _qt_filedialog_open_filename_hook qt_filedialog_open_filename_hook
Definition: kfiledialog.cpp:1071
void setFilter(const QString &filter)
Sets the filter to be used to filter.
Definition: kfiledialog.cpp:332
static Ptr serviceByDesktopName(const QString &_name)
Definition: kfile.h:46
MimetypeJob * mimetype(const KUrl &url, JobFlags flags=DefaultFlags)
Find mimetype for one file or directory.
Definition: job.cpp:1872
static QStringList getOpenFileNames(const KUrl &startDir=KUrl(), const QString &filter=QString(), QWidget *parent=0, const QString &caption=QString())
Creates a modal file dialog and returns the selected filenames or an empty list if none was chosen...
Definition: kfiledialog.cpp:518
KFile is a class which provides a namespace for some enumerated values associated with the kfile libr...
Definition: kfile.h:31
const char * name(StandardAction id)
void add(const QString &fileClass, const QString &directory)
Associates directory with fileClass.
Definition: krecentdirs.cpp:74
Definition: kfile.h:47
static KUrl fromPath(const QString &text)
KConfigGroup group(const QByteArray &group)
static KUrl getExistingDirectoryUrl(const KUrl &startDir=KUrl(), QWidget *parent=0, const QString &caption=QString())
Creates a modal directory-selection dialog and returns the selected directory or an empty string if n...
Definition: kfiledialog.cpp:617
QString selectedFile() const
Returns the full path of the selected file in the local filesystem.
Definition: kfiledialog.cpp:680
QString toLocalFile(AdjustPathOption trailing=LeaveTrailingSlash) const
static void setStartDir(const KUrl &directory)
Definition: kfiledialog.cpp:947
static void add(const KUrl &url)
Add a new item to the Recent Document menu.
Definition: krecentdocument.cpp:88
Definition: kfile.h:45
static QDebug kDebug(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
QString currentFilter() const
Returns the current filter as entered by the user or one of the predefined set via setFilter()...
Definition: kfiledialog.cpp:341
This combobox shows a number of recent URLs/directories, as well as some default directories.
Definition: kurlcombobox.h:47
KSharedConfigPtr config()
Provides a user (and developer) friendly way to select files and directories.
Definition: kfiledialog.h:68
QString(* _qt_filedialog_open_filename_hook)(QWidget *parent, const QString &caption, const QString &dir, const QString &filter, QString *selectedFilter, QFileDialog::Options options)
Definition: kfiledialog.cpp:1067
virtual KUrl selectDirectory(const KUrl &startDir, bool localOnly, QWidget *parent, const QString &caption)=0
Creates a modal file dialog and returns the selected directory or an empty string if none was chosen...
KF_EXTERN _qt_filedialog_save_filename_hook qt_filedialog_save_filename_hook
Definition: kfiledialog.cpp:1083
KActionCollection * actionCollection() const
Definition: kfiledialog.cpp:882
const bool NATIVE_FILEDIALOGS_BY_DEFAULT
File dialogs are native by default on Windows.
Definition: kfiledialog.cpp:49
void setLocationLabel(const QString &text)
Sets the text to be displayed in front of the selection.
Definition: kfiledialog.cpp:325
virtual void setStartDir(const KUrl &directory)=0
void setKeepLocation(bool keep)
Sets whether the filename/url should be kept when changing directories.
Definition: kfiledialog.cpp:887
QString protocol() const
void setUrl(const KUrl &url, bool clearforward=true)
Sets the directory to view.
Definition: kfiledialog.cpp:444
static QString getOpenFileName(const KUrl &startDir=KUrl(), const QString &filter=QString(), QWidget *parent=0, const QString &caption=QString())
Creates a modal file dialog and return the selected filename or an empty string if none was chosen...
Definition: kfiledialog.cpp:464
QString pathOrUrl() const
QString(* _qt_filedialog_existing_directory_hook)(QWidget *parent, const QString &caption, const QString &dir, QFileDialog::Options options)
Definition: kfiledialog.cpp:1062
QStringList(* _qt_filedialog_open_filenames_hook)(QWidget *parent, const QString &caption, const QString &dir, const QString &filter, QString *selectedFilter, QFileDialog::Options options)
Definition: kfiledialog.cpp:1073
void setOperationMode(KFileDialog::OperationMode)
Sets the operational mode of the filedialog to Saving, Opening or Other.
Definition: kfiledialog.cpp:901
QString(* _qt_filedialog_save_filename_hook)(QWidget *parent, const QString &caption, const QString &dir, const QString &filter, QString *selectedFilter, QFileDialog::Options options)
Definition: kfiledialog.cpp:1079
QStringList mimeTypes(Mode mode=Writing)
Returns a list of MIME types for all KImageIO supported formats.
Definition: kimageio.cpp:64
Definition: kimageio.h:53
QString currentMimeFilter() const
The mimetype for the desired output format.
Definition: kfiledialog.cpp:372
void setInlinePreviewShown(bool show)
Forces the inline previews to be shown or hidden, depending on show.
Definition: kfiledialog.cpp:396
Definition: kfiledialog.h:85
static QString getOpenFileNameWId(const KUrl &startDir, const QString &filter, WId parent_id, const QString &caption)
Use this version only if you have no QWidget available as parent widget.
Definition: kfiledialog.cpp:497
static int find(const QByteArray &buf, int begin, const char c1)
returns the position of the first occurrence of any of the given characters c1 or comma ('...
Definition: dataprotocol.cpp:85
static QString getSaveFileName(const KUrl &startDir=KUrl(), const QString &filter=QString(), QWidget *parent=0, const QString &caption=QString())
Creates a modal file dialog and returns the selected filename or an empty string if none was chosen...
Definition: kfiledialog.cpp:701
Confirm whether to overwrite file to save.
Definition: kfiledialog.h:92
static KUrl::List getOpenUrls(const KUrl &startDir=KUrl(), const QString &filter=QString(), QWidget *parent=0, const QString &caption=QString())
Creates a modal file dialog and returns the selected URLs or an empty list if none was chosen...
Definition: kfiledialog.cpp:578
static void setMainWindow(QWidget *subwindow, WId mainwindow)
KMimeType::Ptr currentFilterMimeType()
Returns the mimetype for the desired output format.
Definition: kfiledialog.cpp:384
static KUrl getSaveUrl(const KUrl &startDir=KUrl(), const QString &filter=QString(), QWidget *parent=0, const QString &caption=QString())
Creates a modal file dialog and returns the selected filename or an empty string if none was chosen...
Definition: kfiledialog.cpp:805
Interface to the module that contains the file widget.
Definition: kabstractfilemodule.h:35
Definition: kfile.h:49
static KUrl getStartUrl(const KUrl &startDir, QString &recentDirClass)
This method implements the logic to determine the user's default directory to be listed.
Definition: kfiledialog.cpp:941
static QString getExistingDirectory(const KUrl &startDir=KUrl(), QWidget *parent=0, const QString &caption=QString())
Creates a modal directory-selection dialog and returns the selected directory (local only) or an empt...
Definition: kfiledialog.cpp:630
Definition: kfiledialog.h:85
static KUrl getOpenUrl(const KUrl &startDir=KUrl(), const QString &filter=QString(), QWidget *parent=0, const QString &caption=QString())
Creates a modal file dialog and returns the selected URL or an empty string if none was chosen...
Definition: kfiledialog.cpp:552
static KAbstractFileModule * loadFileModule(const QString &moduleName)
Definition: kfiledialog.cpp:139
QString dir(const QString &fileClass)
Returns the most recently used directory accociated with this file-class.
Definition: krecentdirs.cpp:68
void setPreviewWidget(KPreviewWidgetBase *w)
Adds a preview widget and enters the preview mode.
Definition: kfiledialog.cpp:389
virtual KUrl getStartUrl(const KUrl &startDir, QString &recentDirClass)=0
Abstract baseclass for all preview widgets which shall be used via KFileDialog::setPreviewWidget(cons...
Definition: kpreviewwidgetbase.h:43
QStringList toStringList() const
KAbstractFileWidget * fileWidget()
Returns the KFileWidget that implements most of this file dialog.
Definition: kfiledialog.cpp:959
void setConfirmOverwrite(bool enable)
Sets whether the dialog should ask before accepting the selected file when KFileDialog::OperationMode...
Definition: kfiledialog.cpp:610
static QDebug kWarning(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
static QStringList mime2KdeFilter(const QStringList &mimeTypes, QString *allExtensions=0)
Definition: kfiledialog.cpp:54
static KUrl getImageOpenUrl(const KUrl &startDir=KUrl(), QWidget *parent=0, const QString &caption=QString())
Creates a modal file dialog with an image previewer and returns the selected url or an empty string i...
Definition: kfiledialog.cpp:645
QString url(AdjustPathOption trailing=LeaveTrailingSlash) const
bool isLocalFile() const
KF_EXTERN _qt_filedialog_open_filenames_hook qt_filedialog_open_filenames_hook
Definition: kfiledialog.cpp:1077
Definition: kfile.h:48
virtual void keyPressEvent(QKeyEvent *e)
Reimplemented to animate the cancel button.
Definition: kfiledialog.cpp:916
KFileDialog(const KUrl &startDir, const QString &filter, QWidget *parent, QWidget *widget=0)
Constructs a file dialog.
Definition: kfiledialog.cpp:253
const KShortcut & end()
T * createInstance(QObject *parent=0, const QVariantList &args=QVariantList(), QString *error=0) const
T readEntry(const QString &key, const T &aDefault) const
void setMimeFilter(const QStringList &types, const QString &defaultType=QString())
Sets the filter up to specify the output type.
Definition: kfiledialog.cpp:348
static QString getSaveFileNameWId(const KUrl &startDir, const QString &filter, WId parent_id, const QString &caption)
This function accepts the window id of the parent window, instead of QWidget*.
Definition: kfiledialog.cpp:768
virtual void hideEvent(QHideEvent *event)
Reimplemented for saving the dialog geometry.
Definition: kfiledialog.cpp:930
QStringList selectedFiles() const
Returns a list of all selected local files.
Definition: kfiledialog.cpp:687
KF_EXTERN _qt_filedialog_existing_directory_hook qt_filedialog_existing_directory_hook
Definition: kfiledialog.cpp:1065
QStringList list(const QString &fileClass)
Returns a list of directories associated with this file-class.
Definition: krecentdirs.cpp:60
void setSelection(const QString &name)
Sets the file name to preselect to name.
Definition: kfiledialog.cpp:454
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:50:02 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:50:02 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.