Changeset View
Changeset View
Standalone View
Standalone View
src/filewidgets/kurlnavigator.h
Show First 20 Lines • Show All 283 Lines • ▼ Show 20 Line(s) | 81 | public: | |||
---|---|---|---|---|---|
284 | * if you need to show a drop menu with KIO::drop(). | 284 | * if you need to show a drop menu with KIO::drop(). | ||
285 | * @return Child widget that has received the last drop event, or nullptr if | 285 | * @return Child widget that has received the last drop event, or nullptr if | ||
286 | * nothing has been dropped yet on the URL navigator. | 286 | * nothing has been dropped yet on the URL navigator. | ||
287 | * @since 5.37 | 287 | * @since 5.37 | ||
288 | * @see KIO::drop() | 288 | * @see KIO::drop() | ||
289 | */ | 289 | */ | ||
290 | QWidget *dropWidget() const; | 290 | QWidget *dropWidget() const; | ||
291 | 291 | | |||
292 | #if !defined(KIOFILEWIDGETS_NO_DEPRECATED) && !defined(DOXYGEN_SHOULD_SKIP_THIS) | 292 | #if KIOFILEWIDGETS_ENABLE_DEPRECATED_SINCE(4, 5) | ||
293 | /** | 293 | /** | ||
294 | * @return The current URL of the location. | 294 | * @return The current URL of the location. | ||
295 | * @deprecated Use KUrlNavigator::locationUrl() instead. | 295 | * @deprecated Since 4.5, use KUrlNavigator::locationUrl() instead. | ||
296 | */ | 296 | */ | ||
297 | KIOFILEWIDGETS_DEPRECATED const QUrl &url() const; | 297 | KIOFILEWIDGETS_DEPRECATED_VERSION(4, 5, "Use KUrlNavigator::locationUrl(int)") | ||
298 | const QUrl &url() const; | ||||
299 | #endif | ||||
298 | 300 | | |||
301 | #if KIOFILEWIDGETS_ENABLE_DEPRECATED_SINCE(4, 5) | ||||
299 | /** | 302 | /** | ||
300 | * @return The portion of the current URL up to the path part given | 303 | * @return The portion of the current URL up to the path part given | ||
301 | * by \a index. Assuming that the current URL is /home/peter/Documents/Music, | 304 | * by \a index. Assuming that the current URL is /home/peter/Documents/Music, | ||
302 | * then the following URLs are returned for an index: | 305 | * then the following URLs are returned for an index: | ||
303 | * - index <= 0: /home | 306 | * - index <= 0: /home | ||
304 | * - index is 1: /home/peter | 307 | * - index is 1: /home/peter | ||
305 | * - index is 2: /home/peter/Documents | 308 | * - index is 2: /home/peter/Documents | ||
306 | * - index >= 3: /home/peter/Documents/Music | 309 | * - index >= 3: /home/peter/Documents/Music | ||
307 | * @deprecated It should not be necessary for a client of KUrlNavigator to query this information. | 310 | * @deprecated Since 4.5. It should not be necessary for a client of KUrlNavigator to query this information. | ||
308 | */ | 311 | */ | ||
309 | KIOFILEWIDGETS_DEPRECATED QUrl url(int index) const; | 312 | KIOFILEWIDGETS_DEPRECATED_VERSION(4, 5, "Do not use") | ||
313 | QUrl url(int index) const; | ||||
314 | #endif | ||||
310 | 315 | | |||
316 | #if KIOFILEWIDGETS_ENABLE_DEPRECATED_SINCE(4, 5) | ||||
311 | /** | 317 | /** | ||
312 | * @return URL for the history element with the index \a historyIndex. | 318 | * @return URL for the history element with the index \a historyIndex. | ||
313 | * The history index 0 represents the most recent URL. | 319 | * The history index 0 represents the most recent URL. | ||
314 | * @since 4.3 | 320 | * @since 4.3 | ||
315 | * @deprecated Use KUrlNavigator::locationUrl(historyIndex) instead. | 321 | * @deprecated Since 4.5, use KUrlNavigator::locationUrl(historyIndex) instead. | ||
316 | */ | 322 | */ | ||
317 | KIOFILEWIDGETS_DEPRECATED QUrl historyUrl(int historyIndex) const; | 323 | KIOFILEWIDGETS_DEPRECATED_VERSION(4, 5, "Use KUrlNavigator::locationUrl(int)") | ||
324 | QUrl historyUrl(int historyIndex) const; | ||||
325 | #endif | ||||
318 | 326 | | |||
327 | #if KIOFILEWIDGETS_ENABLE_DEPRECATED_SINCE(4, 5) | ||||
319 | /** | 328 | /** | ||
320 | * @return The saved root URL for the current URL (see KUrlNavigator::saveRootUrl()). | 329 | * @return The saved root URL for the current URL (see KUrlNavigator::saveRootUrl()). | ||
321 | * @deprecated Use KUrlNavigator::locationState() instead. | 330 | * @deprecated Since 4.5, use KUrlNavigator::locationState() instead. | ||
322 | */ | 331 | */ | ||
323 | KIOFILEWIDGETS_DEPRECATED const QUrl &savedRootUrl() const; | 332 | KIOFILEWIDGETS_DEPRECATED_VERSION(4, 5, "Use KUrlNavigator::locationState(int)") | ||
333 | const QUrl &savedRootUrl() const; | ||||
334 | #endif | ||||
324 | 335 | | |||
336 | #if KIOFILEWIDGETS_ENABLE_DEPRECATED_SINCE(4, 5) | ||||
325 | /** | 337 | /** | ||
326 | * @return The saved contents position of the upper left corner | 338 | * @return The saved contents position of the upper left corner | ||
327 | * for the current URL. | 339 | * for the current URL. | ||
328 | * @deprecated Use KUrlNavigator::locationState() instead. | 340 | * @deprecated Since 4.5, use KUrlNavigator::locationState() instead. | ||
329 | */ | 341 | */ | ||
330 | KIOFILEWIDGETS_DEPRECATED QPoint savedPosition() const; | 342 | KIOFILEWIDGETS_DEPRECATED_VERSION(4, 5, "Use KUrlNavigator::locationState(int)") | ||
343 | QPoint savedPosition() const; | ||||
344 | #endif | ||||
331 | 345 | | |||
332 | /** @deprecated Use setHomeUrl(const QUrl& url) instead. */ | 346 | #if KIOFILEWIDGETS_ENABLE_DEPRECATED_SINCE(4, 5) | ||
333 | KIOFILEWIDGETS_DEPRECATED void setHomeUrl(const QString &homeUrl); | 347 | /** @deprecated Since 4.5, use setHomeUrl(const QUrl& url) instead. */ | ||
348 | KIOFILEWIDGETS_DEPRECATED_VERSION(4, 5, "Use KUrlNavigator::setHomeUrl(const QUrl&)") | ||||
349 | void setHomeUrl(const QString &homeUrl); | ||||
334 | #endif | 350 | #endif | ||
335 | 351 | | |||
336 | public Q_SLOTS: | 352 | public Q_SLOTS: | ||
337 | /** | 353 | /** | ||
338 | * Sets the location to \a url. The old URL is added to the history. | 354 | * Sets the location to \a url. The old URL is added to the history. | ||
339 | * The signals KUrlNavigator::urlAboutToBeChanged(), KUrlNavigator::urlChanged() | 355 | * The signals KUrlNavigator::urlAboutToBeChanged(), KUrlNavigator::urlChanged() | ||
340 | * and KUrlNavigator::historyChanged() are emitted. Use | 356 | * and KUrlNavigator::historyChanged() are emitted. Use | ||
341 | * KUrlNavigator::locationUrl() to read the location. | 357 | * KUrlNavigator::locationUrl() to read the location. | ||
342 | * @since 4.5 | 358 | * @since 4.5 | ||
343 | */ | 359 | */ | ||
344 | void setLocationUrl(const QUrl &url); | 360 | void setLocationUrl(const QUrl &url); | ||
345 | 361 | | |||
346 | /** | 362 | /** | ||
347 | * Activates the URL navigator (KUrlNavigator::isActive() will return true) | 363 | * Activates the URL navigator (KUrlNavigator::isActive() will return true) | ||
348 | * and emits the signal KUrlNavigator::activated(). | 364 | * and emits the signal KUrlNavigator::activated(). | ||
349 | * @see KUrlNavigator::setActive() | 365 | * @see KUrlNavigator::setActive() | ||
350 | */ | 366 | */ | ||
351 | void requestActivation(); | 367 | void requestActivation(); | ||
352 | 368 | | |||
353 | #if !defined(DOXYGEN_SHOULD_SKIP_THIS) | 369 | #if !defined(DOXYGEN_SHOULD_SKIP_THIS) | ||
354 | // KDE5: Remove and listen for focus-signal instead | 370 | // KDE5: Remove and listen for focus-signal instead | ||
355 | void setFocus(); | 371 | void setFocus(); | ||
356 | #endif | 372 | #endif | ||
357 | 373 | | |||
358 | #if !defined(KIOFILEWIDGETS_NO_DEPRECATED) && !defined(DOXYGEN_SHOULD_SKIP_THIS) | 374 | #if KIOFILEWIDGETS_ENABLE_DEPRECATED_SINCE(4, 5) | ||
359 | /** | 375 | /** | ||
360 | * Sets the location to \a url. | 376 | * Sets the location to \a url. | ||
361 | * @deprecated Use KUrlNavigator::setLocationUrl(url). | 377 | * @deprecated Since 4.5, use KUrlNavigator::setLocationUrl(url). | ||
362 | */ | 378 | */ | ||
363 | KIOFILEWIDGETS_DEPRECATED void setUrl(const QUrl &url); | 379 | KIOFILEWIDGETS_DEPRECATED_VERSION(4, 5, "Use KUrlNavigator::setLocationUrl(const QUrl&))") | ||
380 | void setUrl(const QUrl &url); | ||||
381 | #endif | ||||
364 | 382 | | |||
383 | #if KIOFILEWIDGETS_ENABLE_DEPRECATED_SINCE(4, 5) | ||||
365 | /** | 384 | /** | ||
366 | * Saves the used root URL of the content for the current history element. | 385 | * Saves the used root URL of the content for the current history element. | ||
367 | * @deprecated Use KUrlNavigator::saveLocationState() instead. | 386 | * @deprecated Since 4.5, use KUrlNavigator::saveLocationState() instead. | ||
368 | */ | 387 | */ | ||
369 | KIOFILEWIDGETS_DEPRECATED void saveRootUrl(const QUrl &url); | 388 | KIOFILEWIDGETS_DEPRECATED_VERSION(4, 5, "Use KUrlNavigator::saveLocationState(const QByteArray &)") | ||
389 | void saveRootUrl(const QUrl &url); | ||||
390 | #endif | ||||
370 | 391 | | |||
392 | #if KIOFILEWIDGETS_ENABLE_DEPRECATED_SINCE(4, 5) | ||||
371 | /** | 393 | /** | ||
372 | * Saves the coordinates of the contents for the current history element. | 394 | * Saves the coordinates of the contents for the current history element. | ||
373 | * @deprecated Use KUrlNavigator::saveLocationState() instead. | 395 | * @deprecated Since 4.5, use KUrlNavigator::saveLocationState() instead. | ||
374 | */ | 396 | */ | ||
375 | KIOFILEWIDGETS_DEPRECATED void savePosition(int x, int y); | 397 | KIOFILEWIDGETS_DEPRECATED_VERSION(4, 5, "Use KUrlNavigator::saveLocationState(const QByteArray &)") | ||
398 | void savePosition(int x, int y); | ||||
376 | #endif | 399 | #endif | ||
377 | 400 | | |||
378 | Q_SIGNALS: | 401 | Q_SIGNALS: | ||
379 | /** | 402 | /** | ||
380 | * Is emitted, if the URL navigator has been activated by | 403 | * Is emitted, if the URL navigator has been activated by | ||
381 | * an user interaction | 404 | * an user interaction | ||
382 | * @see KUrlNavigator::setActive() | 405 | * @see KUrlNavigator::setActive() | ||
383 | */ | 406 | */ | ||
▲ Show 20 Lines • Show All 116 Lines • Show Last 20 Lines |