From 2399843ceb70b45b2c1a47b680e11ba1e623ef45 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Sat, 25 Apr 2009 23:55:14 +0200 Subject: Another importing step. Need to fix cookies' classes and then (I think) we are near the goal.. --- src/urlbar.h | 61 ++++++++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 43 insertions(+), 18 deletions(-) (limited to 'src/urlbar.h') 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 -* Copyright (C) 2009 rekonq team. Please, see AUTHORS file for details +* Copyright (C) 2009 by Domrachev Alexandr +* Copyright (C) 2009 by Paweł Prażak * * * This program is free software; you can redistribute it @@ -22,18 +23,22 @@ #ifndef URLBAR_H #define URLBAR_H +// Qt Includes +#include +#include +#include // KDE Includes +#include #include -// 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 -- cgit v1.2.1