1/*
2 SPDX-FileCopyrightText: 2006 Peter Penz <peter.penz@gmx.at>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#ifndef KURLNAVIGATORTOGGLEBUTTON_P_H
8#define KURLNAVIGATORTOGGLEBUTTON_P_H
9
10#include "kurlnavigatorbuttonbase_p.h"
11#include <QPixmap>
12
13namespace KDEPrivate
14{
15/**
16 * @brief Represents the button of the URL navigator to switch to
17 * the editable mode.
18 *
19 * A cursor is shown when hovering the button.
20 */
21class KUrlNavigatorToggleButton : public KUrlNavigatorButtonBase
22{
23 Q_OBJECT
24
25public:
26 explicit KUrlNavigatorToggleButton(KUrlNavigator *parent);
27 ~KUrlNavigatorToggleButton() override;
28
29 /** @see QWidget::sizeHint() */
30 QSize sizeHint() const override;
31
32protected:
33 void enterEvent(QEnterEvent *event) override;
34 void leaveEvent(QEvent *event) override;
35 void paintEvent(QPaintEvent *event) override;
36
37private Q_SLOTS:
38 void updateToolTip();
39 void updateCursor();
40
41private:
42 QPixmap m_pixmap;
43};
44
45} // namespace KDEPrivate
46
47#endif
48

source code of kio/src/filewidgets/kurlnavigatortogglebutton_p.h