diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2009-05-25 12:27:17 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2009-05-25 12:27:17 +0200 |
commit | 7aad2cdabf718b113284d5835a821c059dff5f72 (patch) | |
tree | 2c1b5f1d5ff6c668d463022d3e1d0077a83645bb /src | |
parent | Refactored page/setNewPage KWebPage methods (diff) | |
download | rekonq-7aad2cdabf718b113284d5835a821c059dff5f72.tar.xz |
Fixing CMakelists.txt's
Diffstat (limited to 'src')
-rw-r--r-- | src/CMakeLists.txt | 5 | ||||
-rw-r--r-- | src/mainwindow.cpp | 92 | ||||
-rw-r--r-- | src/mainwindow.h | 2 |
3 files changed, 55 insertions, 44 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index cbb1421d..064fc0e6 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -42,11 +42,6 @@ KDE4_ADD_KCFG_FILES( rekonq_SRCS rekonq.kcfgc ) ### ------------------------------------------ -include_directories( - ${CMAKE_CURRENT_SOURCE_DIR}/.. - ${KDEWEBKIT_INCLUDE_DIR} - ) - ADD_DEFINITIONS( ${KDE4_DEFINITIONS} ${KDEWEBKIT_DEFINITIONS} ) KDE4_ADD_EXECUTABLE( rekonq ${rekonq_SRCS} ) 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.")); +// } } diff --git a/src/mainwindow.h b/src/mainwindow.h index a4574612..93c8ca84 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -129,9 +129,9 @@ private slots: private: MainView *m_view; - FindBar *m_findBar; SearchBar *m_searchBar; SidePanel *m_sidePanel; + QWidget *m_prova; KMenu *m_historyBackMenu; KMenu *m_windowMenu; |