summaryrefslogtreecommitdiff
path: root/src/urlbar.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2009-04-29 11:24:11 +0200
committerAndrea Diamantini <adjam7@gmail.com>2009-04-29 11:24:11 +0200
commit82862fbd150afae0101757d1d6081e0e6ddf7baa (patch)
treec864003f3580d4eae365e3757c7a826ae3f6bfe7 /src/urlbar.cpp
parentForgot to add it... ;) (diff)
downloadrekonq-82862fbd150afae0101757d1d6081e0e6ddf7baa.tar.xz
astyle
Diffstat (limited to 'src/urlbar.cpp')
-rw-r--r--src/urlbar.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/urlbar.cpp b/src/urlbar.cpp
index 6b77e5d3..29eaed70 100644
--- a/src/urlbar.cpp
+++ b/src/urlbar.cpp
@@ -51,20 +51,20 @@ UrlBar::UrlBar(QWidget *parent)
setUrlDropsEnabled(true);
setAutoDeleteCompletionObject(true);
setMinimumWidth(180);
-
+
setTrapReturnKey(true);
-
+
setupLineEdit();
-
+
// add every item to history
connect(this, SIGNAL(returnPressed(const QString&)), SLOT(slotActivated(const QString&)));
connect(completionBox(), SIGNAL(activated(const QString&)), SLOT(slotActivated(const QString&)));
-
+
connect(this, SIGNAL(cleared()), SLOT(slotCleared()));
// setup completion box
completionBox()->setTabHandling(true); // Konqueror bug #167135
-
+
// set dropdown list background
QPalette p = view()->palette();
p.setColor(QPalette::Base, palette().color(QPalette::Base));
@@ -86,19 +86,19 @@ void UrlBar::setupLineEdit()
QPalette p = m_lineEdit->palette();
p.setColor(QPalette::Base, Qt::transparent);
m_lineEdit->setPalette(p);
-
+
if (!s_defaultBaseColor.isValid())
{
s_defaultBaseColor = palette().color(QPalette::Base);
}
-
+
setLineEdit(m_lineEdit);
-
+
// Make the lineedit consume the Qt::Key_Enter event...
lineEdit()->setTrapReturnKey(true);
-
+
lineEdit()->setHandleSignals(true);
-
+
// clear the URL bar
lineEdit()->clear();
}
@@ -108,7 +108,7 @@ void UrlBar::setUrl(const QUrl& url)
{
if (url.isEmpty())
return;
-
+
m_currentUrl = url;
slotUpdateUrl();
}
@@ -141,7 +141,7 @@ inline void UrlBar::slotActivated(const QString& url)
{
if (url.isEmpty())
return;
-
+
setUrl(url);
Application::historyManager()->addHistoryEntry(url);
@@ -179,7 +179,7 @@ void UrlBar::paintEvent(QPaintEvent *event)
QPalette p = palette();
p.setColor(QPalette::Base, s_defaultBaseColor);
setPalette(p);
-
+
KHistoryComboBox::paintEvent(event);
if (!hasFocus())
@@ -197,7 +197,7 @@ void UrlBar::paintEvent(QPaintEvent *event)
}
painter.setBrush(generateGradient(loadingColor, height()));
painter.setPen(Qt::transparent);
-
+
QRect backgroundRect = lineEdit()->frameGeometry();
int mid = backgroundRect.width() / 100 * m_progress;
QRect progressRect(backgroundRect.x(), backgroundRect.y(), mid, backgroundRect.height());
@@ -211,7 +211,7 @@ void UrlBar::focusOutEvent(QFocusEvent *event)
{
// set back last loaded url in case user cleared it
setUrl(m_currentUrl);
-
+
KHistoryComboBox::focusOutEvent(event);
}