summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/CMakeLists.txt2
-rw-r--r--src/browsermainwindow.cpp12
-rw-r--r--src/browsermainwindow.h7
-rw-r--r--src/findbar.cpp (renamed from src/searchbar.cpp)44
-rw-r--r--src/findbar.h (renamed from src/searchbar.h)17
-rw-r--r--src/findwidget.cpp58
-rw-r--r--src/findwidget.h33
7 files changed, 30 insertions, 143 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index a30af320..2f4ebb9b 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -10,7 +10,7 @@ SET( rekonq_SRCS
modelmenu.cpp
networkaccessmanager.cpp
searchlineedit.cpp
- searchbar.cpp
+ findbar.cpp
findwidget.cpp
settings.cpp
squeezelabel.cpp
diff --git a/src/browsermainwindow.cpp b/src/browsermainwindow.cpp
index 717031a5..46510384 100644
--- a/src/browsermainwindow.cpp
+++ b/src/browsermainwindow.cpp
@@ -82,9 +82,9 @@ BrowserMainWindow::BrowserMainWindow(QWidget *parent, Qt::WindowFlags flags)
addToolBarBreak();
layout->addWidget(m_tabWidget);
- // Search Bar
- m_searchBar = new SearchBar(centralWidget);
- layout->addWidget(m_searchBar);
+ // Find Bar
+ m_findBar = new FindBar(centralWidget);
+ layout->addWidget(m_findBar);
centralWidget->setLayout(layout);
setCentralWidget(centralWidget);
@@ -268,7 +268,7 @@ void BrowserMainWindow::setupMenu()
editMenu->addSeparator();
- editMenu->addAction( KStandardAction::find(this, SLOT( slotViewSearchBar() ) , this ) );
+ editMenu->addAction( KStandardAction::find(this, SLOT( slotViewFindBar() ) , this ) );
editMenu->addAction( KStandardAction::findNext(this, SLOT( slotEditFindNext() ) , this ) );
editMenu->addAction( KStandardAction::findPrev(this, SLOT( slotEditFindPrevious() ) , this ) );
@@ -671,9 +671,9 @@ bool ok;
m_lastSearch = findWidg->*/
}
-void BrowserMainWindow::slotViewSearchBar()
+void BrowserMainWindow::slotViewFindBar()
{
- m_searchBar->show();
+ m_findBar->show();
}
void BrowserMainWindow::slotEditFindNext()
diff --git a/src/browsermainwindow.h b/src/browsermainwindow.h
index 64962c58..cc206626 100644
--- a/src/browsermainwindow.h
+++ b/src/browsermainwindow.h
@@ -23,7 +23,7 @@
#define BROWSERMAINWINDOW_H
// Local Includes
-#include "searchbar.h"
+#include "findbar.h"
// KDE Includes
#include <KMainWindow>
@@ -96,7 +96,7 @@ private slots:
void slotViewStatusbar();
void slotViewPageSource();
void slotViewFullScreen(bool enable);
- void slotViewSearchBar();
+ void slotViewFindBar();
void slotWebSearch();
void slotToggleInspector(bool enable);
@@ -133,7 +133,6 @@ private:
QAction *m_historyBack;
KMenu *m_historyBackMenu;
QAction *m_historyForward;
-// KMenu *m_historyForwardMenu;
KMenu *m_windowMenu;
KAction *m_stop;
@@ -147,7 +146,7 @@ private:
KIcon m_reloadIcon;
KIcon m_stopIcon;
- SearchBar *m_searchBar;
+ FindBar *m_findBar;
QString m_lastSearch;
KBookmarkMenu* m_bookmarkMenu;
diff --git a/src/searchbar.cpp b/src/findbar.cpp
index b0e91fa9..ae64b7f6 100644
--- a/src/searchbar.cpp
+++ b/src/findbar.cpp
@@ -2,7 +2,6 @@
 *
 * This file is a part of the reKonq project
 *
- * Copyright 2008 Benjamin C. Meyer <ben@meyerhome.net>
* Copyright (C) 2008 by Andrea Diamantini <adjam7 at gmail dot com>
 *
*
@@ -18,8 +17,8 @@
 *
 * ============================================================ */
-#include "searchbar.h"
-#include "moc_searchbar.cpp"
+#include "findbar.h"
+#include "moc_findbar.cpp"
#include <KLineEdit>
#include <KAction>
@@ -34,13 +33,11 @@
#include <QShortcut>
#include <QResizeEvent>
-SearchBar::SearchBar(QWidget *parent)
+FindBar::FindBar(QWidget *parent)
: QWidget(parent)
- , m_object(0)
- , m_widget(0)
, m_lineEdit(0)
{
- initializeSearchWidget();
+ initializeFindWidget();
// we start off hidden
setMaximumHeight(0);
@@ -50,15 +47,13 @@ SearchBar::SearchBar(QWidget *parent)
new QShortcut(QKeySequence(Qt::Key_Escape), this, SLOT(hide()));
}
-SearchBar::~SearchBar()
+FindBar::~FindBar()
{
- delete m_object;
- delete m_widget;
delete m_lineEdit;
}
-void SearchBar::initializeSearchWidget()
+void FindBar::initializeFindWidget()
{
QHBoxLayout *layout = new QHBoxLayout();
@@ -85,25 +80,14 @@ void SearchBar::initializeSearchWidget()
}
-void SearchBar::setSearchBar(QObject *object)
-{
- m_object = object;
-}
-
-
-QObject *SearchBar::getSearchBar() const
-{
- return m_object;
-}
-
-void SearchBar::clear()
+void FindBar::clear()
{
m_lineEdit->setText(QString());
}
-void SearchBar::showFind()
+void FindBar::showFind()
{
if (!isVisible())
{
@@ -114,7 +98,7 @@ void SearchBar::showFind()
}
-void SearchBar::resizeEvent(QResizeEvent *event)
+void FindBar::resizeEvent(QResizeEvent *event)
{
/* if (event->size().width() != m_widget->width())
m_widget->resize(event->size().width(), m_widget->height());
@@ -122,20 +106,20 @@ void SearchBar::resizeEvent(QResizeEvent *event)
}
-void SearchBar::frameChanged(int frame)
+void FindBar::frameChanged(int frame)
{
- if (!m_widget)
+/* if (!m_widget)
return;
m_widget->move(0, frame);
int height = qMax(0, m_widget->y() + m_widget->height());
setMinimumHeight(height);
- setMaximumHeight(height);
+ setMaximumHeight(height);*/
}
-void SearchBar::slotFindNext()
+void FindBar::slotFindNext()
{}
-void SearchBar::slotFindPrevious()
+void FindBar::slotFindPrevious()
{}
diff --git a/src/searchbar.h b/src/findbar.h
index 287363c3..214a06e2 100644
--- a/src/searchbar.h
+++ b/src/findbar.h
@@ -2,7 +2,6 @@
 *
 * This file is a part of the reKonq project
 *
- * Copyright 2008 Benjamin C. Meyer <ben@meyerhome.net>
* Copyright (C) 2008 by Andrea Diamantini <adjam7 at gmail dot com>
 *
*
@@ -18,22 +17,20 @@
 *
 * ============================================================ */
-#ifndef SEARCHBAR_H
-#define SEARCHBAR_H
+#ifndef FINDBAR_H
+#define FINDBAR_H
#include <KLineEdit>
#include <QWidget>
-class SearchBar : public QWidget
+class FindBar : public QWidget
{
Q_OBJECT
public:
- SearchBar(QWidget *parent = 0);
- ~SearchBar();
- void setSearchBar(QObject *);
- QObject *getSearchBar() const;
+ FindBar(QWidget *parent = 0);
+ ~FindBar();
public slots:
void clear();
@@ -48,9 +45,7 @@ private slots:
void frameChanged(int frame);
private:
- void initializeSearchWidget();
- QObject *m_object;
- QWidget *m_widget;
+ void initializeFindWidget();
KLineEdit *m_lineEdit;
};
diff --git a/src/findwidget.cpp b/src/findwidget.cpp
deleted file mode 100644
index 4eb10e6b..00000000
--- a/src/findwidget.cpp
+++ /dev/null
@@ -1,58 +0,0 @@
-/* ============================================================
- *
- * This file is a part of the reKonq project
- *
- * Copyright (C) 2008 by Andrea Diamantini <adjam7 at gmail dot com>
- *
- *
- * This program is free software; you can redistribute it
- * and/or modify it under the terms of the GNU General
- * Public License as published by the Free Software Foundation;
- * either version 2, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * ============================================================ */
-
-#include "findwidget.h"
-
-#include <QHBoxLayout>
-#include <QLabel>
-
-#include <KLineEdit>
-#include <KToolBar>
-#include <KAction>
-#include <KStandardAction>
-
-FindWidget::FindWidget(QWidget * parent) : QWidget(parent)
-{
- QHBoxLayout *layout = new QHBoxLayout();
-
- KToolBar *bar1 = new KToolBar(this);
- bar1->addAction( KStandardAction::close(this, SLOT( searchNow() ) , this ) );
- layout->addWidget( bar1 );
-
- QLabel *label = new QLabel("Find: ");
- layout->addWidget( label );
-
- KLineEdit *findLineEdit = new KLineEdit();
- layout->addWidget( findLineEdit );
-
- KToolBar *bar2 = new KToolBar(this);
- bar2->addAction( KStandardAction::findNext(this, SLOT( searchNow() ) , this ) );
- bar2->addAction( KStandardAction::findPrev(this, SLOT( searchNow() ) , this ) );
- layout->addWidget( bar2 );
-
- layout->addStretch();
-
- setLayout(layout);
-}
-
-QString FindWidget::searchNow()
-{
- QString prova("adjam");
- return prova;
-}
diff --git a/src/findwidget.h b/src/findwidget.h
deleted file mode 100644
index 5d8b7b28..00000000
--- a/src/findwidget.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/* ============================================================
- *
- * This file is a part of the reKonq project
- *
- * Copyright (C) 2008 by Andrea Diamantini <adjam7 at gmail dot com>
- *
- *
- * This program is free software; you can redistribute it
- * and/or modify it under the terms of the GNU General
- * Public License as published by the Free Software Foundation;
- * either version 2, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * ============================================================ */
-
-#ifndef FINDWIDGET_H
-#define FINDWIDGET_H
-
-#include <QWidget>
-
-class FindWidget : public QWidget
-{
-public:
- FindWidget(QWidget * parent = 0);
-
- QString searchNow();
-};
-
-#endif