KFile
kdirselectdialog.cpp
Go to the documentation of this file.
104 void KDirSelectDialog::Private::readConfig(const KSharedConfig::Ptr &config, const QString& group)
132 if ( m_parent->url().isLocalFile() && QFileInfo( m_parent->url().path(KUrl::AddTrailingSlash) + name ).exists() )
135 QString directory = KIO::encodeFileName( KInputDialog::getText( i18nc("@title:window", "New Folder" ),
245 if (job.askDeleteConfirmation(KUrl::List() << url, KIO::JobUiDelegate::Trash, KIO::JobUiDelegate::DefaultConfirmation)) {
256 if (job.askDeleteConfirmation(KUrl::List() << url, KIO::JobUiDelegate::Delete, KIO::JobUiDelegate::DefaultConfirmation)) {
347 d->showHiddenFoldersAction = new KToggleAction( i18nc("@option:check", "Show Hidden Folders"), this );
348 d->m_actions->addAction( d->showHiddenFoldersAction->objectName(), d->showHiddenFoldersAction );
350 connect( d->showHiddenFoldersAction, SIGNAL(triggered(bool)), d->m_treeView, SLOT(setShowHiddenFiles(bool)) );
KDirSelectDialog(const KUrl &startDir=KUrl(), bool localOnly=false, QWidget *parent=0L)
Creates a new directory selection dialog.
Definition: kdirselectdialog.cpp:272
QString i18n(const char *text)
void sync()
bool isValid() const
bool isHidden() const
void setCurrentUrl(const KUrl &url)
Sets the current url in the dialog.
Definition: kdirselectdialog.cpp:436
QStringList split(const QString &sep, SplitBehavior behavior, Qt::CaseSensitivity cs) const
void setIcon(const QIcon &icon)
KStandardDirs * dirs()
QAbstractItemView * view() const
Returns a pointer to the view which is used for displaying the directories.
Definition: kdirselectdialog.cpp:421
const char * name(StandardAction id)
bool isDir() const
void add(const QString &fileClass, const QString &directory)
static bool synchronousRun(Job *job, QWidget *window, QByteArray *data=0, KUrl *finalURL=0, QMap< QString, QString > *metaData=0)
StatJob * stat(const KUrl &url, JobFlags flags=DefaultFlags)
bool cd(const QString &_dir)
void setAttribute(Qt::WidgetAttribute attribute, bool on)
int exec()
QString toLocalFile(AdjustPathOption trailing=LeaveTrailingSlash) const
static bool mkdir(const KUrl &url, QWidget *window, int permissions=-1)
static QDebug kDebug(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
bool isEmpty() const
QString homePath()
bool askDeleteConfirmation(const KUrl::List &urls, DeletionType deletionType, ConfirmationType confirmationType)
QString i18nc(const char *ctxt, const char *text)
KSharedConfigPtr config()
bool isNull() const
void addWidget(QWidget *widget, int stretch, QFlags< Qt::AlignmentFlag > alignment)
TsConfig readConfig(const QString &fname)
static bool exists(const KUrl &url, bool source, QWidget *window)
QString encodeFileName(const QString &str)
virtual void hideEvent(QHideEvent *event)
QString protocol() const
KUrl upUrl() const
static void sorry(QWidget *parent, const QString &text, const QString &caption=QString(), Options options=Notify)
objectName
bool isEmpty() const
static KUrl selectDirectory(const KUrl &startDir=KUrl(), bool localOnly=false, QWidget *parent=0L, const QString &caption=QString())
Creates a KDirSelectDialog, and returns the result.
Definition: kdirselectdialog.cpp:487
void setMargin(int margin)
virtual void accept()
virtual void hideEvent(QHideEvent *event)
Reimplemented for saving the dialog geometry.
Definition: kdirselectdialog.cpp:479
QString getText(const QString &caption, const QString &label, const QString &value=QString(), bool *ok=0, QWidget *parent=0, QValidator *validator=0, const QString &mask=QString(), const QString &whatsThis=QString(), const QStringList &completionList=QStringList())
void setShortcut(const KShortcut &shortcut, ShortcutTypes type=ShortcutTypes(ActiveShortcut|DefaultShortcut))
static QString documentPath()
KGuiItem ok()
static KUrl mostLocalUrl(const KUrl &url, QWidget *window)
A pretty dialog for a KDirSelect control for selecting directories.
Definition: kdirselectdialog.h:36
DeleteJob * del(const KUrl &src, JobFlags flags=DefaultFlags)
bool isValid() const
QString fileName(const DirectoryOptions &options=IgnoreTrailingSlash) const
typedef ConstIterator
void setCaption(const QString &c)
static QString suggestName(const KUrl &baseURL, const QString &oldName)
int length() const
QString url(AdjustPathOption trailing=LeaveTrailingSlash) const
bool localOnly() const
Returns whether only local directories can be selected.
Definition: kdirselectdialog.cpp:426
void show()
const UDSEntry & statResult() const
bool isLocalFile() const
KUrl url() const
Returns the currently selected URL, or an empty one if no item is selected.
Definition: kdirselectdialog.cpp:405
QObject * parent() const
QString prettyUrl(AdjustPathOption trailing=LeaveTrailingSlash) const
CopyJob * trash(const KUrl &src, JobFlags flags=DefaultFlags)
void addLayout(QLayout *layout, int stretch)
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:27:26 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:27:26 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.