• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.14.38 API Reference
  • KDE Home
  • Contact Us
 

KDE3Support

  • kde3support
  • kio
  • kfile
kfiletreebranch.cpp
Go to the documentation of this file.
1/* This file is part of the KDEproject
2 Copyright (C) 2000 David Faure <faure@kde.org>
3 2000 Carsten Pfeiffer <pfeiffer@kde.org>
4 2002 Klaas Freitag <freitag@suse.de>
5
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Library General Public
8 License version 2 as published by the Free Software Foundation.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
14
15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
19*/
20
21#include "kfiletreebranch.h"
22
23#include <QtCore/QFile>
24
25#include <kfileitem.h>
26#include <kdebug.h>
27#include <kde_file.h>
28
29#include <sys/types.h>
30#include <sys/stat.h>
31#include <unistd.h>
32
33/* --- K3FileTreeViewToplevelItem --- */
34KFileTreeBranch::KFileTreeBranch( K3FileTreeView *parent, const KUrl& url,
35 const QString& name,
36 const QPixmap& pix, bool showHidden,
37 K3FileTreeViewItem *branchRoot )
38
39 : KDirLister(),
40 m_root( branchRoot ),
41 m_startURL( url ),
42 m_name ( name ),
43 m_rootIcon( pix ),
44 m_openRootIcon( pix ),
45 m_recurseChildren(true),
46 m_showExtensions(true)
47{
48 kDebug( 250) << "Creating branch for url " << url.prettyUrl();
49
50 /* if non exists, create one */
51 if( ! branchRoot )
52 {
53 m_root = new K3FileTreeViewItem( parent,
54 KFileItem( url, "inode/directory",
55 S_IFDIR ),
56 this );
57 }
58
59 m_root->setExpandable( true );
60 m_root->setPixmap( 0, pix );
61 m_root->setText( 0, name );
62
63 setShowingDotFiles( showHidden );
64
65 connect( this, SIGNAL(refreshItems(QList<QPair<KFileItem,KFileItem> >)),
66 this, SLOT (slotRefreshItems(QList<QPair<KFileItem,KFileItem> >)));
67
68 connect( this, SIGNAL(newItems(KFileItemList)),
69 this, SLOT (addItems(KFileItemList)));
70
71 connect( this, SIGNAL(completed(KUrl)),
72 this, SLOT(slCompleted(KUrl)));
73
74 connect( this, SIGNAL(started(KUrl)),
75 this, SLOT(slotListerStarted(KUrl)));
76
77 connect( this, SIGNAL(deleteItem(KFileItem)),
78 this, SLOT(slotDeleteItem(KFileItem)));
79
80 connect( this, SIGNAL(canceled(KUrl)),
81 this, SLOT(slotCanceled(KUrl)));
82
83 connect( this, SIGNAL(clear()),
84 this, SLOT(slotDirlisterClear()));
85
86 connect( this, SIGNAL(clear(KUrl)),
87 this, SLOT(slotDirlisterClearUrl(KUrl)));
88
89 connect( this, SIGNAL(redirection(KUrl,KUrl)),
90 this, SLOT(slotRedirect(KUrl,KUrl)));
91
92 m_openChildrenURLs.append( url );
93}
94
95KUrl KFileTreeBranch::rootUrl() const
96{
97 return( m_startURL );
98}
99
100void KFileTreeBranch::setRoot( K3FileTreeViewItem *r )
101{
102 m_root = r;
103}
104
105K3FileTreeViewItem *KFileTreeBranch::root( )
106{
107 return( m_root );
108}
109
110QString KFileTreeBranch::name() const
111{
112 return( m_name );
113}
114
115void KFileTreeBranch::setName( const QString n )
116{
117 m_name = n;
118}
119
120QPixmap KFileTreeBranch::pixmap() const
121{
122 return m_rootIcon;
123}
124
125QPixmap KFileTreeBranch::openPixmap() const
126{
127 return m_openRootIcon;
128}
129
130void KFileTreeBranch::setOpen( bool setopen )
131{
132 if ( root() ) {
133 root()->setOpen( setopen );
134 }
135}
136
137void KFileTreeBranch::setOpenPixmap( const QPixmap& pix )
138{
139 m_openRootIcon = pix;
140
141 if( root()->isOpen())
142 {
143 root()->setPixmap( 0, pix );
144 }
145}
146
147void KFileTreeBranch::slotListerStarted( const KUrl &url )
148{
149 /* set the parent correct if it is zero. */
150 kDebug( 250) << "Starting to list " << url.prettyUrl();
151}
152
153
154K3FileTreeViewItem* KFileTreeBranch::treeItemForFileItem(const KFileItem &it)
155{
156 return
157 const_cast<K3FileTreeViewItem *>(
158 static_cast<const K3FileTreeViewItem*>(it.extraData(this)));
159}
160
161K3FileTreeViewItem *KFileTreeBranch::parentKFTVItem( const KFileItem &item )
162{
163 K3FileTreeViewItem *parent = 0;
164
165 if( item.isNull() ) return 0;
166
167 /* If it is a directory, check, if it exists in the dict. If not, go one up
168 * and check again.
169 */
170 KUrl url = item.url();
171 // kDebug(250) << "Item's url is " << url.prettyUrl();
172 KUrl dirUrl( url );
173 dirUrl.setFileName( QString() );
174 // kDebug(250) << "Directory url is " << dirUrl.prettyUrl();
175
176 parent = findTVIByUrl( dirUrl );
177 // kDebug(250) << "Returning as parent item <" << parent << ">";
178 return( parent );
179}
180
181
182void KFileTreeBranch::slotRefreshItems( const QList<QPair<KFileItem, KFileItem> > &list )
183{
184 kDebug(250) << "Refreshing " << list.count() << " items !";
185
186 for ( int i = 0; i < list.count(); ++i )
187 {
188 const KFileItem fileItem = list[ i ].second;
189
190 K3FileTreeViewItem *item = findTVIByUrl(fileItem.url());
191 if (item) {
192 item->setPixmap(0, item->fileItem().pixmap( KIconLoader::SizeSmall ));
193 item->setText( 0, item->fileItem().text());
194 }
195 }
196}
197
198void KFileTreeBranch::addItems( const KFileItemList& list )
199{
200 kDebug(250) << "Adding " << list.count() << " items !";
201 K3FileTreeViewItemList treeViewItList;
202 K3FileTreeViewItem *parentItem = 0;
203
204 KFileItemList::const_iterator kit = list.begin();
205 const KFileItemList::const_iterator kend = list.end();
206 for ( ; kit != kend; ++kit )
207 {
208 KFileItem currItem = *kit;
209 parentItem = parentKFTVItem( currItem );
210
211 /* Only create a new K3FileTreeViewItem if it does not yet exist */
212 K3FileTreeViewItem *newKFTVI = treeItemForFileItem(currItem);
213
214 if( ! newKFTVI )
215 {
216 newKFTVI = createTreeViewItem( parentItem, currItem );
217 if (!newKFTVI)
218 {
219 // TODO: Don't fail if parentItem == 0
220 continue;
221 }
222 currItem.setExtraData( this, newKFTVI );
223
224 /* Cut off the file extension in case it is not a directory */
225 if( !m_showExtensions && !currItem.isDir() ) /* Need to cut the extension */
226 {
227 QString name = currItem.text();
228 int mPoint = name.lastIndexOf( '.' );
229 if( mPoint > 0 )
230 name = name.left( mPoint );
231 newKFTVI->setText( 0, name );
232 }
233 }
234
235 /* Now try to find out if there are children for dirs in the treeview */
236 /* This stats a directory on the local file system and checks the */
237 /* hardlink entry in the stat-buf. This works only for local directories. */
238 if( dirOnlyMode() && !m_recurseChildren && currItem.isLocalFile( ) && currItem.isDir() )
239 {
240 KUrl url = currItem.url();
241 QString filename = url.directory( KUrl::ObeyTrailingSlash ) + url.fileName();
242 /* do the stat trick of Carsten. The problem is, that the hardlink
243 * count only contains directory links. Thus, this method only seem
244 * to work in dir-only mode */
245 kDebug(250) << "Doing stat on " << filename;
246 KDE_struct_stat statBuf;
247 if( KDE::stat( filename , &statBuf ) == 0 )
248 {
249 int hardLinks = statBuf.st_nlink; /* Count of dirs */
250 kDebug(250) << "stat succeeded, hardlinks: " << hardLinks;
251 // If the link count is > 2, the directory likely has subdirs. If it's < 2
252 // it's something weird like a mounted SMB share. In that case we don't know
253 // if there are subdirs, thus show it as expandable.
254
255 if( hardLinks != 2 )
256 {
257 newKFTVI->setExpandable(true);
258 }
259 else
260 {
261 newKFTVI->setExpandable(false);
262 }
263 if( hardLinks >= 2 ) // "Normal" directory with subdirs
264 {
265 kDebug(250) << "Emitting for " << url.prettyUrl();
266 emit( directoryChildCount( newKFTVI, hardLinks-2)); // parentItem, hardLinks-1 ));
267 }
268 }
269 else
270 {
271 kDebug(250) << "stat of " << filename << " failed !";
272 }
273 }
274 treeViewItList.append( newKFTVI );
275 }
276
277 emit newTreeViewItems( this, treeViewItList );
278}
279
280K3FileTreeViewItem* KFileTreeBranch::createTreeViewItem( K3FileTreeViewItem *parent,
281 const KFileItem &fileItem )
282{
283 K3FileTreeViewItem *tvi = 0;
284 if( parent && !fileItem.isNull() )
285 {
286 tvi = new K3FileTreeViewItem( parent,
287 fileItem,
288 this );
289 }
290 else
291 {
292 kDebug(250) << "createTreeViewItem: Have no parent";
293 }
294 return( tvi );
295}
296
297void KFileTreeBranch::setChildRecurse( bool t )
298{
299 m_recurseChildren = t;
300 if( t == false )
301 m_openChildrenURLs.clear();
302}
303
304bool KFileTreeBranch::childRecurse()
305{
306 return m_recurseChildren;
307}
308
309
310void KFileTreeBranch::setShowExtensions( bool visible )
311{
312 m_showExtensions = visible;
313}
314
315bool KFileTreeBranch::showExtensions( ) const
316{
317 return( m_showExtensions );
318}
319
320/*
321 * The signal that tells that a directory was deleted may arrive before the signal
322 * for its children arrive. Thus, we must walk through the children of a dir and
323 * remove them before removing the dir itself.
324 */
325void KFileTreeBranch::slotDeleteItem( const KFileItem &it )
326{
327 if( it.isNull() ) return;
328 kDebug(250) << "Slot Delete Item hitted for " << it.url().prettyUrl();
329
330 K3FileTreeViewItem *kfti = treeItemForFileItem(it);
331
332 if( kfti )
333 {
334 kDebug( 250 ) << "Child count: " << kfti->childCount();
335 if( kfti->childCount() > 0 )
336 {
337 K3FileTreeViewItem *child = static_cast<K3FileTreeViewItem*>(kfti->firstChild());
338
339 while( child )
340 {
341 kDebug(250) << "Calling child to be deleted !";
342 K3FileTreeViewItem *nextChild = static_cast<K3FileTreeViewItem*>(child->nextSibling());
343 slotDeleteItem( child->fileItem());
344 child = nextChild;
345 }
346 }
347
348 kDebug(250) << "Found corresponding K3FileTreeViewItem";
349 if( m_lastFoundURL.equals(it.url(), KUrl::CompareWithoutTrailingSlash ))
350 {
351 m_lastFoundURL = KUrl();
352 m_lastFoundItem = 0L;
353 }
354 delete( kfti );
355 }
356 else
357 {
358 kDebug(250) << "Error: kfiletreeviewitem: "<< kfti;
359 }
360}
361
362
363void KFileTreeBranch::slotCanceled( const KUrl& url )
364{
365 // ### anything else to do?
366 // remove the url from the childrento-recurse-list
367 m_openChildrenURLs.removeAll( url);
368
369 // stop animations etc.
370 K3FileTreeViewItem *item = findTVIByUrl(url);
371 if (!item) return; // Uh oh...
372 emit populateFinished(item);
373}
374
375void KFileTreeBranch::slotDirlisterClear()
376{
377 kDebug(250)<< "*** Clear all !";
378 /* this slots needs to clear all listed items, but NOT the root item */
379 if( m_root )
380 deleteChildrenOf( m_root );
381}
382
383void KFileTreeBranch::slotDirlisterClearUrl( const KUrl& url )
384{
385 kDebug(250)<< "*** Clear for URL !" << url.prettyUrl();
386 const KFileItem item = findByUrl( url );
387 if( !item.isNull() )
388 {
389 K3FileTreeViewItem *ftvi = treeItemForFileItem(item);
390 deleteChildrenOf( ftvi );
391 }
392}
393
394void KFileTreeBranch::deleteChildrenOf( Q3ListViewItem *parent )
395{
396 // for some strange reason, slotDirlisterClearURL() sometimes calls us
397 // with a 0L parent.
398 if ( !parent )
399 return;
400
401 while ( parent->firstChild() )
402 delete parent->firstChild();
403}
404
405void KFileTreeBranch::slotRedirect( const KUrl& oldUrl, const KUrl&newUrl )
406{
407 if( oldUrl.equals( m_startURL, KUrl::CompareWithoutTrailingSlash ))
408 {
409 m_startURL = newUrl;
410 }
411}
412
413K3FileTreeViewItem* KFileTreeBranch::findTVIByUrl( const KUrl& url )
414{
415 K3FileTreeViewItem *resultItem = 0;
416
417 if( m_startURL.equals(url, KUrl::CompareWithoutTrailingSlash) )
418 {
419 kDebug(250) << "findByURL: Returning root as a parent !";
420 resultItem = m_root;
421 }
422 else if( m_lastFoundURL.equals( url, KUrl::CompareWithoutTrailingSlash ))
423 {
424 kDebug(250) << "findByURL: Returning from lastFoundURL!";
425 resultItem = m_lastFoundItem;
426 }
427 else
428 {
429 kDebug(250) << "findByURL: searching by dirlister: " << url.url();
430
431 const KFileItem it = findByUrl( url );
432
433 if( !it.isNull() )
434 {
435 resultItem = treeItemForFileItem(it);
436 m_lastFoundItem = resultItem;
437 m_lastFoundURL = url;
438 }
439 }
440
441 return( resultItem );
442}
443
444
445void KFileTreeBranch::slCompleted( const KUrl& url )
446{
447 kDebug(250) << "SlotCompleted hit for " << url.prettyUrl();
448 K3FileTreeViewItem *currParent = findTVIByUrl( url );
449 if( ! currParent ) return;
450
451 kDebug(250) << "current parent " << currParent << " is already listed: "
452 << currParent->alreadyListed() << endl;
453
454 emit( populateFinished(currParent));
455 emit( directoryChildCount(currParent, currParent->childCount()));
456
457 /* This is a walk through the children of the last populated directory.
458 * Here we start the dirlister on every child of the dir and wait for its
459 * finish. When it has finished, we go to the next child.
460 * This must be done for non local file systems in dirOnly- and Full-Mode
461 * and for local file systems only in full mode, because the stat trick
462 * (see addItem-Method) does only work for dirs, not for files in the directory.
463 */
464 /* Set bit that the parent dir was listed completely */
465 currParent->setListed(true);
466
467 kDebug(250) << "recurseChildren: " << m_recurseChildren;
468 kDebug(250) << "isLocalFile: " << m_startURL.isLocalFile();
469 kDebug(250) << "dirOnlyMode: " << dirOnlyMode();
470
471
472 if( m_recurseChildren && (!m_startURL.isLocalFile() || ! dirOnlyMode()) )
473 {
474 bool wantRecurseUrl = false;
475 /* look if the url is in the list for url to recurse */
476 for ( KUrl::List::Iterator it = m_openChildrenURLs.begin();
477 it != m_openChildrenURLs.end(); ++it )
478 {
479 /* it is only interesting that the url _is_in_ the list. */
480 if( (*it).equals( url, KUrl::CompareWithoutTrailingSlash ) )
481 wantRecurseUrl = true;
482 }
483
484 K3FileTreeViewItem *nextChild = 0;
485 kDebug(250) << "Recursing " << url.prettyUrl() << "? " << wantRecurseUrl;
486
487 if( wantRecurseUrl && currParent )
488 {
489
490 /* now walk again through the tree and populate the children to get +-signs */
491 /* This is the starting point. The visible folder has finished,
492 processing the children has not yet started */
493 nextChild = static_cast<K3FileTreeViewItem*>
494 (static_cast<Q3ListViewItem*>(currParent)->firstChild());
495
496 if( ! nextChild )
497 {
498 /* This happens if there is no child at all */
499 kDebug( 250 ) << "No children to recuse";
500 }
501
502 /* Since we have listed the children to recurse, we can remove the entry
503 * in the list of the URLs to see the children.
504 */
505 m_openChildrenURLs.removeAll(url);
506 }
507
508 if( nextChild ) /* This implies that idx > -1 */
509 {
510 /* Next child is defined. We start a dirlister job on every child item
511 * which is a directory to find out how much children are in the child
512 * of the last opened dir
513 */
514
515 /* Skip non directory entries */
516 while( nextChild )
517 {
518 if( nextChild->isDir() && ! nextChild->alreadyListed())
519 {
520 const KFileItem kfi = nextChild->fileItem();
521 if( !kfi.isNull() && kfi.isReadable())
522 {
523 KUrl recurseUrl = kfi.url();
524 kDebug(250) << "Starting to recurse NOW " << recurseUrl.prettyUrl();
525 openUrl( recurseUrl, KDirLister::Keep );
526 }
527 }
528 nextChild = static_cast<K3FileTreeViewItem*>(nextChild->nextSibling());
529 // kDebug(250) << "Next child " << m_nextChild;
530 }
531 }
532 }
533 else
534 {
535 kDebug(250) << "skipping to recurse in complete-slot";
536 }
537}
538
539/* This slot is called when a treeviewitem is expanded in the gui */
540bool KFileTreeBranch::populate( const KUrl& url, K3FileTreeViewItem *currItem )
541{
542 bool ret = false;
543 if( ! currItem )
544 return ret;
545
546 kDebug(250) << "Populating <" << url.prettyUrl() << ">";
547
548 /* Add this url to the list of urls to recurse for children */
549 if( m_recurseChildren )
550 {
551 m_openChildrenURLs.append( url );
552 kDebug(250) << "Appending to list " << url.prettyUrl();
553 }
554
555 if( ! currItem->alreadyListed() )
556 {
557 /* start the lister */
558 ret = openUrl( url, KDirLister::Keep );
559 }
560 else
561 {
562 kDebug(250) << "Children already existing in treeview!";
563 slCompleted( url );
564 ret = true;
565 }
566 return ret;
567}
568
569#include "kfiletreebranch.moc"
570
K3FileTreeViewItem
An item for a K3FileTreeView that knows about its own KFileItem.
Definition: k3filetreeviewitem.h:42
K3FileTreeViewItem::fileItem
KFileItem fileItem() const
Definition: k3filetreeviewitem.h:56
K3FileTreeViewItem::setListed
void setListed(bool wasListed)
set the flag if the directory was already listed.
Definition: k3filetreeviewitem.cpp:68
K3FileTreeViewItem::isDir
bool isDir() const
Definition: k3filetreeviewitem.cpp:83
K3FileTreeViewItem::alreadyListed
bool alreadyListed() const
Definition: k3filetreeviewitem.cpp:63
K3FileTreeView
The filetreeview offers a treeview on the file system which behaves like a QTreeView showing files an...
Definition: k3filetreeview.h:54
KDirLister
KDirLister::newItems
void newItems(const KFileItemList &items)
KDirLister::redirection
void redirection(const KUrl &_url)
KDirLister::refreshItems
void refreshItems(const QList< QPair< KFileItem, KFileItem > > &items)
KDirLister::canceled
void canceled()
KDirLister::deleteItem
QT_MOC_COMPAT void deleteItem(const KFileItem &_fileItem)
KDirLister::Keep
Keep
KDirLister::completed
void completed()
KDirLister::dirOnlyMode
bool dirOnlyMode
KDirLister::clear
void clear()
KDirLister::openUrl
virtual bool openUrl(const KUrl &_url, OpenUrlFlags _flags=NoFlags)
KDirLister::setShowingDotFiles
virtual void setShowingDotFiles(bool _showDotFiles)
KDirLister::started
void started(const KUrl &_url)
KDirLister::findByUrl
virtual KFileItem findByUrl(const KUrl &_url) const
KFileItemList
KFileItem
KFileItem::extraData
const void * extraData(const void *key) const
KFileItem::setExtraData
void setExtraData(const void *key, void *value)
KFileItem::isLocalFile
bool isLocalFile() const
KFileItem::isReadable
bool isReadable() const
KFileItem::isDir
bool isDir() const
KFileItem::isNull
bool isNull() const
KFileItem::url
KUrl url() const
KFileItem::text
QString text() const
KFileItem::pixmap
QPixmap pixmap(int _size, int _state=0) const
KFileTreeBranch::setShowExtensions
virtual void setShowExtensions(bool visible=true)
sets printing of the file extensions on or off.
Definition: kfiletreebranch.cpp:310
KFileTreeBranch::openPixmap
QPixmap openPixmap() const
Definition: kfiletreebranch.cpp:125
KFileTreeBranch::populateFinished
void populateFinished(K3FileTreeViewItem *)
emitted with the item of a directory which was finished to populate
KFileTreeBranch::setOpenPixmap
void setOpenPixmap(const QPixmap &pix)
Definition: kfiletreebranch.cpp:137
KFileTreeBranch::findTVIByUrl
virtual K3FileTreeViewItem * findTVIByUrl(const KUrl &)
find the according K3FileTreeViewItem by an url
Definition: kfiletreebranch.cpp:413
KFileTreeBranch::newTreeViewItems
void newTreeViewItems(KFileTreeBranch *, const K3FileTreeViewItemList &)
emitted with a list of new or updated K3FileTreeViewItem which were found in a branch.
KFileTreeBranch::setName
virtual void setName(const QString n)
sets the name of the branch.
Definition: kfiletreebranch.cpp:115
KFileTreeBranch::populate
virtual bool populate(const KUrl &url, K3FileTreeViewItem *currItem)
populates a branch.
Definition: kfiletreebranch.cpp:540
KFileTreeBranch::setOpen
void setOpen(bool setopen=true)
sets the root of the branch open or closed.
Definition: kfiletreebranch.cpp:130
KFileTreeBranch::showExtensions
bool showExtensions() const
Definition: kfiletreebranch.cpp:315
KFileTreeBranch::setRoot
virtual void setRoot(K3FileTreeViewItem *r)
sets a K3FileTreeViewItem as root widget for the branch.
Definition: kfiletreebranch.cpp:100
KFileTreeBranch::rootUrl
KUrl rootUrl() const
Definition: kfiletreebranch.cpp:95
KFileTreeBranch::childRecurse
bool childRecurse()
Definition: kfiletreebranch.cpp:304
KFileTreeBranch::name
QString name() const
Definition: kfiletreebranch.cpp:110
KFileTreeBranch::createTreeViewItem
virtual K3FileTreeViewItem * createTreeViewItem(K3FileTreeViewItem *parent, const KFileItem &fileItem)
allocates a K3FileTreeViewItem for the branch for new items.
Definition: kfiletreebranch.cpp:280
KFileTreeBranch::pixmap
QPixmap pixmap() const
Definition: kfiletreebranch.cpp:120
KFileTreeBranch::root
K3FileTreeViewItem * root()
Definition: kfiletreebranch.cpp:105
KFileTreeBranch::setChildRecurse
void setChildRecurse(bool t=true)
sets if children recursion is wanted or not.
Definition: kfiletreebranch.cpp:297
KFileTreeBranch::directoryChildCount
void directoryChildCount(K3FileTreeViewItem *item, int count)
emitted with the exact count of children for a directory.
KFileTreeBranch::KFileTreeBranch
KFileTreeBranch(K3FileTreeView *, const KUrl &url, const QString &name, const QPixmap &pix, bool showHidden=false, K3FileTreeViewItem *branchRoot=0)
constructs a branch for K3FileTreeView.
Definition: kfiletreebranch.cpp:34
KIconLoader::SizeSmall
SizeSmall
KUrl
KUrl::prettyUrl
QString prettyUrl(AdjustPathOption trailing=LeaveTrailingSlash) const
KUrl::ObeyTrailingSlash
ObeyTrailingSlash
KUrl::url
QString url(AdjustPathOption trailing=LeaveTrailingSlash) const
KUrl::equals
bool equals(const KUrl &u, const EqualsOptions &options=0) const
KUrl::directory
QString directory(const DirectoryOptions &options=IgnoreTrailingSlash) const
KUrl::isLocalFile
bool isLocalFile() const
KUrl::CompareWithoutTrailingSlash
CompareWithoutTrailingSlash
KUrl::fileName
QString fileName(const DirectoryOptions &options=IgnoreTrailingSlash) const
Q3ListViewItem
Q3PtrList
QList
QPair
kDebug
#define kDebug
kdebug.h
kfileitem.h
kfiletreebranch.h
KDE::stat
int stat(const QString &path, KDE_struct_stat *buf)
list
QStringList list(const QString &fileClass)
name
const char * name(StandardAction id)
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDE3Support

Skip menu "KDE3Support"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal