summaryrefslogtreecommitdiff
path: root/src/mainwindow.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2009-05-25 12:27:17 +0200
committerAndrea Diamantini <adjam7@gmail.com>2009-05-25 12:27:17 +0200
commit7aad2cdabf718b113284d5835a821c059dff5f72 (patch)
tree2c1b5f1d5ff6c668d463022d3e1d0077a83645bb /src/mainwindow.cpp
parentRefactored page/setNewPage KWebPage methods (diff)
downloadrekonq-7aad2cdabf718b113284d5835a821c059dff5f72.tar.xz
Fixing CMakelists.txt's
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r--src/mainwindow.cpp92
1 files changed, 54 insertions, 38 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 39455d92..71415b08 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -89,9 +89,9 @@
MainWindow::MainWindow()
: KXmlGuiWindow()
, m_view(new MainView(this))
- , m_findBar(new FindBar(this))
, m_searchBar(new SearchBar(this))
, m_sidePanel(0)
+ , m_prova(0)
{
// updating rekonq configuration
slotUpdateConfiguration();
@@ -104,7 +104,6 @@ MainWindow::MainWindow()
QVBoxLayout *layout = new QVBoxLayout;
layout->setContentsMargins(0, 0, 0, 0);
layout->addWidget(m_view);
- layout->addWidget(m_findBar);
centralWidget->setLayout(layout);
// central widget
@@ -173,7 +172,7 @@ void MainWindow::postLaunch()
connect(m_view, SIGNAL(currentChanged(int)), this, SLOT(slotUpdateActions()));
// Find Bar signal
- connect(m_findBar, SIGNAL(searchString(const QString &)), this, SLOT(slotFind(const QString &)));
+// connect(m_findBar, SIGNAL(searchString(const QString &)), this, SLOT(slotFind(const QString &)));
// bookmarks loading
connect(Application::bookmarkProvider(), SIGNAL(openUrl(const KUrl&)), this, SLOT(loadUrl(const KUrl&)));
@@ -631,51 +630,68 @@ void MainWindow::slotFind(const QString & search)
void MainWindow::slotViewFindBar()
{
- m_findBar->showFindBar();
+// // creating a centralWidget containing panel, m_view and the hidden findbar
+// QWidget *centralWidget = new QWidget;
+// centralWidget->setContentsMargins(0, 0, 0, 0);
+//
+// // setting layout
+// QVBoxLayout *layout = new QVBoxLayout;
+// layout->setContentsMargins(0, 0, 0, 0);
+// layout->addWidget(m_view);
+// centralWidget->setLayout(layout);
+//
+// // m_findBar->showFindBar();
+// // m_findBar->show();
+ QWidget *w = centralWidget();
+ QLayout *l = w->layout();
+ QWidget *searchBarWidget = currentTab()->searchBar();
+ searchBarWidget->show();
+ l->addWidget(searchBarWidget);
+ w->setLayout(l);
}
void MainWindow::slotFindNext()
{
- if (!currentTab() && m_lastSearch.isEmpty())
- return;
-
- QWebPage::FindFlags options;
- if (m_findBar->matchCase())
- {
- options = QWebPage::FindCaseSensitively | QWebPage::FindWrapsAroundDocument;
- }
- else
- {
- options = QWebPage::FindWrapsAroundDocument;
- }
-
- if (!currentTab()->findText(m_lastSearch, options))
- {
- slotUpdateStatusbar(QString(m_lastSearch) + i18n(" not found."));
- }
+// if (!currentTab() && m_lastSearch.isEmpty())
+// return;
+//
+// QWebPage::FindFlags options;
+// if (m_findBar->matchCase())
+// {
+// options = QWebPage::FindCaseSensitively | QWebPage::FindWrapsAroundDocument;
+// }
+// else
+// {
+// options = QWebPage::FindWrapsAroundDocument;
+// }
+//
+// if (!currentTab()->findText(m_lastSearch, options))
+// {
+// slotUpdateStatusbar(QString(m_lastSearch) + i18n(" not found."));
+// }
}
void MainWindow::slotFindPrevious()
{
- if (!currentTab() && m_lastSearch.isEmpty())
- return;
-
- QWebPage::FindFlags options;
- if (m_findBar->matchCase())
- {
- options = QWebPage::FindCaseSensitively | QWebPage::FindBackward | QWebPage::FindWrapsAroundDocument;
- }
- else
- {
- options = QWebPage::FindBackward | QWebPage::FindWrapsAroundDocument;
- }
-
- if (!currentTab()->findText(m_lastSearch, options))
- {
- slotUpdateStatusbar(QString(m_lastSearch) + i18n(" not found."));
- }
+// if (!currentTab() && m_lastSearch.isEmpty())
+// return;
+//
+// QWebPage::FindFlags options;
+// if (m_findBar->matchCase())
+// {
+// options = QWebPage::FindCaseSensitively | QWebPage::FindBackward | QWebPage::FindWrapsAroundDocument;
+// }
+// else
+// {
+// options = QWebPage::FindBackward | QWebPage::FindWrapsAroundDocument;
+// }
+//
+// if (!currentTab()->findText(m_lastSearch, options))
+// {
+// slotUpdateStatusbar(QString(m_lastSearch) + i18n(" not found."));
+// }
}