/***************************************************************************
- * Copyright (C) 2006 by Peter Penz *
- * peter.penz@gmx.at *
+ * 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 *
#ifndef SIDEBARTREEVIEW_H
#define SIDEBARTREEVIEW_H
-#include <QTreeView>
-
-class DolphinMainWindow;
+#include <kurl.h>
+#include <QtGui/QTreeView>
/**
- * @brief
+ * @brief Tree view widget which is used for the sidebar panel.
+ *
+ * @see TreeViewSidebarPage
*/
class SidebarTreeView : public QTreeView
{
Q_OBJECT
public:
- explicit SidebarTreeView(DolphinMainWindow* mainWindow, QWidget* parent = 0);
+ explicit SidebarTreeView(QWidget* parent = 0);
virtual ~SidebarTreeView();
+signals:
+ /**
+ * Is emitted if the URLs \a urls have been dropped to
+ * the index \a index.
+ */
+ void urlsDropped(const KUrl::List& urls,
+ const QModelIndex& index);
+
protected:
virtual bool event(QEvent* event);
virtual void dragEnterEvent(QDragEnterEvent* event);
+ virtual void dragLeaveEvent(QDragLeaveEvent* event);
+ virtual void dragMoveEvent(QDragMoveEvent* event);
virtual void dropEvent(QDropEvent* event);
+ virtual void paintEvent(QPaintEvent* event);
private:
- DolphinMainWindow* m_mainWindow;
+ bool m_dragging; // TODO: remove this property when the issue #160611 is solved in Qt 4.4
+ QRect m_dropRect; // TODO: remove this property when the issue #160611 is solved in Qt 4.4
};
#endif