summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2008-12-10 00:48:03 +0100
committerAndrea Diamantini <adjam7@gmail.com>2008-12-10 00:48:03 +0100
commitd1edeb480f8539d2a132c5ab9f4e4b2a99d8d2a0 (patch)
tree1ae524849518d7d5a987d77d5556848ececdc592 /src
parentmade the urlbar a KHistoryComboBox. Really beautiful widget!! (diff)
downloadrekonq-d1edeb480f8539d2a132c5ab9f4e4b2a99d8d2a0.tar.xz
Added Completion to new urlbar. ready for merge..
Diffstat (limited to 'src')
-rw-r--r--src/searchbar.cpp1
-rw-r--r--src/urlbar.cpp15
-rw-r--r--src/urlbar.h2
3 files changed, 15 insertions, 3 deletions
diff --git a/src/searchbar.cpp b/src/searchbar.cpp
index a2f1217f..134b5f33 100644
--- a/src/searchbar.cpp
+++ b/src/searchbar.cpp
@@ -52,7 +52,6 @@ void SearchBar::searchNow()
url.addQueryItem(QLatin1String("oe"), QLatin1String("UTF-8"));
url.addQueryItem(QLatin1String("client"), QLatin1String("reKonq"));
emit search(url);
-
}
KLineEdit *SearchBar::lineEdit()
diff --git a/src/urlbar.cpp b/src/urlbar.cpp
index e45c0bb0..9be6bca0 100644
--- a/src/urlbar.cpp
+++ b/src/urlbar.cpp
@@ -25,13 +25,17 @@
UrlBar::UrlBar(KHistoryComboBox *parent)
- : KHistoryComboBox(parent)
+ : KHistoryComboBox(true, parent)
, m_webView(0)
, m_lineEdit(0)
{
m_lineEdit = new QLineEdit;
setLineEdit( m_lineEdit );
-
+
+ // add every item to history
+ connect( this, SIGNAL( activated( const QString& )), this, SLOT( addToHistory( const QString& )));
+
+ connect( this, SIGNAL( activated(int) ), this, SLOT( prova() ) );
webViewIconChanged();
}
@@ -88,3 +92,10 @@ QLinearGradient UrlBar::generateGradient(const QColor &color) const
gradient.setColorAt(1, m_defaultBaseColor);
return gradient;
}
+
+
+void UrlBar::prova()
+{
+ m_lineEdit->selectAll();
+}
+
diff --git a/src/urlbar.h b/src/urlbar.h
index fcebc6f9..d0f80f17 100644
--- a/src/urlbar.h
+++ b/src/urlbar.h
@@ -45,6 +45,8 @@ private slots:
void webViewUrlChanged(const QUrl &url);
void webViewIconChanged();
+ void prova();
+
private:
QLinearGradient generateGradient(const QColor &color) const;