]>
cloud.milkyroute.net Git - dolphin.git/blob - src/dolphinurlnavigator.h
2 This file is part of the KDE project
3 SPDX-FileCopyrightText: 2020 Felix Ernst <fe.a.ernst@gmail.com>
5 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
8 #ifndef DOLPHINURLNAVIGATOR_H
9 #define DOLPHINURLNAVIGATOR_H
11 #include <KUrlNavigator>
14 * @brief Extends KUrlNavigator in a Dolphin-specific way.
16 * Makes sure that Dolphin preferences and settings are
17 * applied to all constructed DolphinUrlNavigators.
21 class DolphinUrlNavigator
: public KUrlNavigator
27 * Applies all Dolphin-specific settings to a KUrlNavigator
28 * @see KUrlNavigator::KurlNavigator()
30 DolphinUrlNavigator(QWidget
*parent
= nullptr);
33 * Applies all Dolphin-specific settings to a KUrlNavigator
34 * @see KUrlNavigator::KurlNavigator()
36 DolphinUrlNavigator(const QUrl
&url
, QWidget
*parent
= nullptr);
38 virtual ~DolphinUrlNavigator();
40 // TODO: Fix KUrlNavigator::sizeHint() instead.
41 QSize
sizeHint() const override
;
44 * Wraps the visual state of a DolphinUrlNavigator so it can be passed around.
45 * This notably doesn't involve the locationUrl or history.
56 * Retrieve the visual state of this DolphinUrlNavigator.
57 * If two DolphinUrlNavigators have the same visual state they should look identical.
59 std::unique_ptr
<VisualState
> visualState() const;
61 * @param visualState A struct describing the new visual state of this object.
63 void setVisualState(const VisualState
&visualState
);
67 * Switches to "breadcrumb" mode if the editable mode is not set to be
68 * preferred in the Dolphin settings.
70 void slotReturnPressed();
73 #endif // DOLPHINURLNAVIGATOR_H