/***************************************************************************
* Copyright (C) 2006 by Cvetoslav Ludmiloff <ludmiloff@gmail.com> *
+ * Copyright (C) 2006 by Peter Penz <peter.penz@gmx.at> *
* *
* 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 *
***************************************************************************/
#include "sidebarpage.h"
-#include "dolphinmainwindow.h"
+#include <QtGui/QWidget>
+#include <kfileitem.h>
+#include <kurl.h>
-SidebarPage::SidebarPage(DolphinMainWindow *mainWindow, QWidget* parent) :
+SidebarPage::SidebarPage(QWidget* parent) :
QWidget(parent),
- m_mainWindow(mainWindow)
+ m_url(KUrl()),
+ m_currentSelection()
{
- connect(mainWindow, SIGNAL(activeViewChanged()),
- this, SLOT(activeViewChanged()));
}
SidebarPage::~SidebarPage()
{
}
-void SidebarPage::activeViewChanged()
+const KUrl& SidebarPage::url() const
{
+ return m_url;
}
-DolphinMainWindow* SidebarPage::mainWindow() const {
- return m_mainWindow;
+const KFileItemList& SidebarPage::selection() const
+{
+ return m_currentSelection;
+}
+
+void SidebarPage::setUrl(const KUrl& url)
+{
+ m_url = url;
+}
+
+void SidebarPage::setSelection(const KFileItemList& selection)
+{
+ m_currentSelection = selection;
}
#include "sidebarpage.moc"