diff options
Diffstat (limited to 'src/history')
-rw-r--r-- | src/history/historymanager.cpp (renamed from src/history/history.cpp) | 4 | ||||
-rw-r--r-- | src/history/historymanager.h (renamed from src/history/history.h) | 0 | ||||
-rw-r--r-- | src/history/historymodels.h | 2 | ||||
-rw-r--r-- | src/history/sidepanel.cpp | 60 | ||||
-rw-r--r-- | src/history/sidepanel.h | 58 |
5 files changed, 121 insertions, 3 deletions
diff --git a/src/history/history.cpp b/src/history/historymanager.cpp index 07580433..29bdb45b 100644 --- a/src/history/history.cpp +++ b/src/history/historymanager.cpp @@ -27,8 +27,8 @@ // Self Includes -#include "history.h" -#include "history.moc" +#include "historymanager.h" +#include "historymanager.moc" // Auto Includes #include "rekonq.h" diff --git a/src/history/history.h b/src/history/historymanager.h index ff3b4381..ff3b4381 100644 --- a/src/history/history.h +++ b/src/history/historymanager.h diff --git a/src/history/historymodels.h b/src/history/historymodels.h index cb8bea41..08f3f63e 100644 --- a/src/history/historymodels.h +++ b/src/history/historymodels.h @@ -31,7 +31,7 @@ // Local Includes -#include "history.h" +#include "historymanager.h" // KDE Includes #include <KUrl> diff --git a/src/history/sidepanel.cpp b/src/history/sidepanel.cpp new file mode 100644 index 00000000..7c42301c --- /dev/null +++ b/src/history/sidepanel.cpp @@ -0,0 +1,60 @@ +/* ============================================================ +* +* This file is a part of the rekonq project +* +* Copyright (C) 2009 by Andrea Diamantini <adjam7 at gmail dot com> +* Copyright (C) 2009 by Paweł Prażak <pawelprazak 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 of +* the License or (at your option) version 3 or any later version +* accepted by the membership of KDE e.V. (or its successor approved +* by the membership of KDE e.V.), which shall act as a proxy +* defined in Section 14 of version 3 of the license. +* +* 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. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see <http://www.gnu.org/licenses/>. +* +* ============================================================ */ + + +// Self Includes +#include "sidepanel.h" +#include "sidepanel.moc" + +// Auto Includes +#include "rekonq.h" + +// Local Includes +#include "historypanel.h" + + +SidePanel::SidePanel(const QString &title, QWidget *parent, Qt::WindowFlags flags) + : QDockWidget(title, parent, flags) + , m_historyPanel(new HistoryPanel(this)) +{ + setObjectName("sidePanel"); + setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea); + + setShown(ReKonfig::showSideBar()); + + connect(m_historyPanel, SIGNAL(openUrl(const KUrl&)), this, SIGNAL(openUrl(const KUrl&))); + + setWidget(m_historyPanel); +} + + +SidePanel::~SidePanel() +{ + // Save side panel's state + ReKonfig::setShowSideBar(!isHidden()); + + delete m_historyPanel; +} diff --git a/src/history/sidepanel.h b/src/history/sidepanel.h new file mode 100644 index 00000000..6aca3587 --- /dev/null +++ b/src/history/sidepanel.h @@ -0,0 +1,58 @@ +/* ============================================================ +* +* This file is a part of the rekonq project +* +* Copyright (C) 2009 by Andrea Diamantini <adjam7 at gmail dot com> +* Copyright (C) 2009 by Paweł Prażak <pawelprazak 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 of +* the License or (at your option) version 3 or any later version +* accepted by the membership of KDE e.V. (or its successor approved +* by the membership of KDE e.V.), which shall act as a proxy +* defined in Section 14 of version 3 of the license. +* +* 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. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see <http://www.gnu.org/licenses/>. +* +* ============================================================ */ + + +#ifndef SIDEPANEL_H +#define SIDEPANEL_H + +// Local Includes +#include "application.h" + +// Qt Includes +#include <QDockWidget> + +// Forward Declarations +class KUrl; +class HistoryPanel; + + +class SidePanel : public QDockWidget +{ + Q_OBJECT + +public: + explicit SidePanel(const QString &title, QWidget *parent = 0, Qt::WindowFlags flags = 0); + ~SidePanel(); + +signals: + void openUrl(const KUrl &); + +private: + HistoryPanel *m_historyPanel; + +}; + +#endif // SIDEPANEL_H |