Changeset View
Changeset View
Standalone View
Standalone View
util/path.h
Show First 20 Lines • Show All 312 Lines • ▼ Show 20 Line(s) | 75 | public: | |||
---|---|---|---|---|---|
313 | * I.e. you cannot set the path this way. @sa QUrl::addPath | 313 | * I.e. you cannot set the path this way. @sa QUrl::addPath | ||
314 | */ | 314 | */ | ||
315 | void addPath(const QString& path); | 315 | void addPath(const QString& path); | ||
316 | 316 | | |||
317 | /** | 317 | /** | ||
318 | * @return the path pointing to the parent folder of this path. | 318 | * @return the path pointing to the parent folder of this path. | ||
319 | * | 319 | * | ||
320 | * @sa KIO::upUrl() | 320 | * @sa KIO::upUrl() | ||
321 | * @sa ancestor(unsigned) | ||||
321 | */ | 322 | */ | ||
322 | Path parent() const; | 323 | Path parent() const; | ||
323 | 324 | | |||
324 | /** | 325 | /** | ||
326 | * @return the ancestor path obtained by going up @p steps steps. | ||||
327 | * | ||||
328 | * If @p steps is larger than the number of segments, a path to root is | ||||
329 | * returned. The returned path is always remote if this path is remote. | ||||
330 | * | ||||
331 | * @sa KIO::upUrl() | ||||
332 | * @sa parent() | ||||
333 | */ | ||||
334 | Path ancestor(unsigned steps) const; | ||||
mwolff: Qt style: use uint | |||||
335 | | ||||
336 | /** | ||||
325 | * @return true when this path has a parent and false if this is a root or invalid path. | 337 | * @return true when this path has a parent and false if this is a root or invalid path. | ||
326 | */ | 338 | */ | ||
327 | bool hasParent() const; | 339 | bool hasParent() const; | ||
328 | 340 | | |||
329 | /** | 341 | /** | ||
330 | * Clear the path, i.e. make it invalid and empty. | 342 | * Clear the path, i.e. make it invalid and empty. | ||
331 | */ | 343 | */ | ||
332 | void clear(); | 344 | void clear(); | ||
▲ Show 20 Lines • Show All 50 Lines • Show Last 20 Lines |
Qt style: use uint