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 * 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 *
21 * \internal
22 */
23class KUrlNavigatorToggleButton : public KUrlNavigatorButtonBase
24{
25 Q_OBJECT
26
27public:
28 explicit KUrlNavigatorToggleButton(KUrlNavigator *parent);
29 ~KUrlNavigatorToggleButton() override;
30
31 /*! \sa QWidget::sizeHint() */
32 QSize sizeHint() const override;
33
34protected:
35 void enterEvent(QEnterEvent *event) override;
36 void leaveEvent(QEvent *event) override;
37 void paintEvent(QPaintEvent *event) override;
38
39private Q_SLOTS:
40 void updateToolTip();
41 void updateCursor();
42
43private:
44 QPixmap m_pixmap;
45};
46
47} // namespace KDEPrivate
48
49#endif
50

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