summaryrefslogtreecommitdiff
path: root/src/searchbar.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/searchbar.h')
-rw-r--r--src/searchbar.h79
1 files changed, 18 insertions, 61 deletions
diff --git a/src/searchbar.h b/src/searchbar.h
index e574508b..287363c3 100644
--- a/src/searchbar.h
+++ b/src/searchbar.h
@@ -2,6 +2,7 @@
 *
 * 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>
 *
*
@@ -20,82 +21,38 @@
#ifndef SEARCHBAR_H
#define SEARCHBAR_H
-#include <KHistoryComboBox>
-#include <KProcess>
-#include <KAction>
-#include <KDialog>
+#include <KLineEdit>
-#include <QPixmap>
-#include <QString>
-#include <QMenu>
+#include <QWidget>
-class SearchBarCombo : public KHistoryComboBox
+class SearchBar : public QWidget
{
Q_OBJECT
public:
- SearchBarCombo(QWidget *parent);
- ~SearchBarCombo();
- const QPixmap &icon() const;
- void setIcon(const QPixmap &icon);
- int findHistoryItem(const QString &text);
+ SearchBar(QWidget *parent = 0);
+ ~SearchBar();
+ void setSearchBar(QObject *);
+ QObject *getSearchBar() const;
public slots:
- virtual void show();
-
-signals:
- void iconClicked();
+ void clear();
+ void showFind();
+ void slotFindNext();
+ void slotFindPrevious();
protected:
- virtual void mousePressEvent(QMouseEvent *e);
-
-private slots:
- void historyCleared();
-
-private:
- QPixmap m_icon;
-};
-
-
-class SearchBar : public KDialog
-{
- Q_OBJECT
-
-public:
- enum SearchModes { FindInThisPage = 0, UseSearchProvider };
-
- SearchBar();
- virtual ~SearchBar();
+ void resizeEvent(QResizeEvent *event);
private slots:
- void startSearch(const QString &search);
- void setIcon();
- void showSelectionMenu();
-
- void useFindInThisPage();
- void useSearchProvider(QAction *);
- void selectSearchEngines();
- void searchEnginesSelected(int, QProcess::ExitStatus);
- void configurationChanged();
+ void frameChanged(int frame);
- void updateComboVisibility();
-
- void focusSearchbar();
private:
- void nextSearchEntry();
- void previousSearchEntry();
-
+ void initializeSearchWidget();
+ QObject *m_object;
+ QWidget *m_widget;
- SearchBarCombo *m_searchCombo;
- KAction *m_searchComboAction;
- QMenu *m_popupMenu;
- QPixmap m_searchIcon;
- SearchModes m_searchMode;
- QString m_providerName;
- bool m_urlEnterLock;
- QString m_currentEngine;
- QStringList m_searchEngines;
- KProcess *m_process;
+ KLineEdit *m_lineEdit;
};
#endif