1
/****************************************************************************************
2
* Copyright (c) 2006 Peter Penz <peter.penz@gmx.at> *
3
* Copyright (c) 2006 Aaron Seigo <aseigo@kde.org> *
4
* Copyright (c) 2009 Seb Ruiz <ruiz@kde.org> *
6
* This program is free software; you can redistribute it and/or modify it under *
7
* the terms of the GNU General Public License as published by the Free Software *
8
* Foundation; either version 2 of the License, or (at your option) any later *
11
* This program is distributed in the hope that it will be useful, but WITHOUT ANY *
12
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A *
13
* PARTICULAR PURPOSE. See the GNU General Public License for more details. *
15
* You should have received a copy of the GNU General Public License along with *
16
* this program. If not, see <http://www.gnu.org/licenses/>. *
17
****************************************************************************************/
19
#ifndef BREADCRUMBITEMBUTTON_P_H
20
#define BREADCRUMBITEMBUTTON_P_H
23
#include <QtWidgets/QPushButton>
28
* @brief Base class for buttons of the URL navigator.
30
* Each button of the URL navigator contains an URL, which
31
* is set as soon as the button has been clicked.
33
class BreadcrumbItemButton : public QPushButton
38
BreadcrumbItemButton( QWidget* parent );
39
BreadcrumbItemButton( const QIcon &icon, const QString &text, QWidget *parent );
40
virtual ~BreadcrumbItemButton();
42
void setActive( const bool active );
44
virtual QSize sizeHint() const;
53
void setDisplayHintEnabled(DisplayHint hint, bool enable);
54
bool isDisplayHintEnabled(DisplayHint hint) const;
56
virtual void enterEvent(QEvent* event);
57
virtual void leaveEvent(QEvent* event);
59
virtual void paintEvent(QPaintEvent* event);
60
virtual void drawHoverBackground(QPainter* painter);
62
/** Returns the foreground color by respecting the current display hint. */
63
QColor foregroundColor() const;