diff options
Diffstat (limited to 'src/urlbar.h')
-rw-r--r-- | src/urlbar.h | 61 |
1 files changed, 43 insertions, 18 deletions
diff --git a/src/urlbar.h b/src/urlbar.h index 2b8f89a5..4cef5157 100644 --- a/src/urlbar.h +++ b/src/urlbar.h @@ -3,7 +3,8 @@ * This file is a part of the rekonq project * * Copyright (C) 2008-2009 by Andrea Diamantini <adjam7 at gmail dot com> -* Copyright (C) 2009 rekonq team. Please, see AUTHORS file for details +* Copyright (C) 2009 by Domrachev Alexandr <alexandr.domrachev@gmail.com> +* Copyright (C) 2009 by Paweł Prażak <pawelprazak at gmail dot com> * * * This program is free software; you can redistribute it @@ -22,18 +23,22 @@ #ifndef URLBAR_H #define URLBAR_H +// Qt Includes +#include <QIcon> +#include <QPointer> +#include <QUrl> // KDE Includes +#include <KUrl> #include <KHistoryComboBox> -// Forward Declarations -class WebView; +// Local Includes +#include "lineedit.h" -class QWidget; -class QLineEdit; -class QUrl; + +// Forward Declarations class QLinearGradient; -class QColor; +class QWidget; class UrlBar : public KHistoryComboBox @@ -41,25 +46,45 @@ class UrlBar : public KHistoryComboBox Q_OBJECT public: - UrlBar(QWidget *parent = 0); + UrlBar(QWidget *parent=0); ~UrlBar(); - QLineEdit *lineEdit(); - void setWebView(WebView *webView); + void selectAll() const { lineEdit()->selectAll(); } + KUrl url() const { return m_currentUrl; } -private slots: - void webViewUrlChanged(const QUrl &url); - void webViewIconChanged(); + QSize sizeHint() const; + +signals: + void activated(const KUrl&); +public slots: + void setUrl(const QUrl &url); + void slotUpdateProgress(int progress); + +private slots: + void slotActivated(const QString&); + void slotLoadFinished(bool); + void slotCleared(); + void slotUpdateUrl(); + protected: -// void paintEvent( QPaintEvent * ); + virtual void paintEvent(QPaintEvent *event); + virtual void focusOutEvent(QFocusEvent *event); private: - QLinearGradient generateGradient(const QColor &color) const; + void setupLineEdit(); + + KLineEdit *lineEdit() const { return m_lineEdit; } + + static QLinearGradient generateGradient(const QColor &color, int height); + + static QColor s_defaultBaseColor; - WebView* m_webView; - QLineEdit* m_lineEdit; - QColor m_defaultBaseColor; + LineEdit *m_lineEdit; + + QIcon m_currentIcon; + KUrl m_currentUrl; + int m_progress; }; #endif |