diff options
Diffstat (limited to 'src/urlbar.h')
-rw-r--r-- | src/urlbar.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/urlbar.h b/src/urlbar.h index 13c4c320..db6304da 100644 --- a/src/urlbar.h +++ b/src/urlbar.h @@ -20,9 +20,45 @@ #ifndef URLBAR_H #define URLBAR_H +// Local Includes +#include "webview.h" +// KDE Includes +#include <KLineEdit> +// Qt Includes +#include <QWidget> +#include <QLabel> +class UrlBar : public QWidget +{ +Q_OBJECT + +public: + UrlBar(QWidget *parent = 0); + ~UrlBar(); + + KLineEdit *lineEdit(); + + void setWebView(WebView *webView); + +protected: + void paintEvent(QPaintEvent *event); + void focusOutEvent(QFocusEvent *event); + +private slots: + void webViewUrlChanged(const QUrl &url); + void webViewIconChanged(); + +private: + QLinearGradient generateGradient(const QColor &color) const; + + WebView *m_webView; + + QLabel *m_iconLabel; + KLineEdit *m_lineEdit; + QColor m_defaultBaseColor; +}; #endif |