1
/***************************************************************************
4
begin : Sat June 2 16:25:27 CEST 2001
5
copyright : (C) 2001 Joseph Wenninger
7
***************************************************************************/
9
/***************************************************************************
11
* This program is free software; you can redistribute it and/or modify *
12
* it under the terms of the GNU General Public License as published by *
13
* the Free Software Foundation; either version 2 of the License, or *
14
* (at your option) any later version. *
16
***************************************************************************/
17
#ifndef KONQSIDEBARPART_H
18
#define KONQSIDEBARPART_H
20
#include <kparts/part.h>
21
#include <kparts/browserextension.h>
22
#include <QtCore/QPointer>
23
#include "sidebar_widget.h"
25
class KonqSidebarPart;
27
class KonqSidebarBrowserExtension : public KParts::BrowserExtension
31
KonqSidebarBrowserExtension(KonqSidebarPart *part, Sidebar_Widget *widget);
32
~KonqSidebarBrowserExtension(){}
35
QPointer<Sidebar_Widget> widget;
37
// The following slots are needed for konqueror's standard actions
38
// They are called from the RMB popup menu
40
void copy() { if (widget) widget->stdAction("copy"); }
41
void cut() { if (widget) widget->stdAction("cut"); }
42
void paste() { if (widget) widget->stdAction("paste"); }
43
void pasteTo(const KUrl&) { if (widget) widget->stdAction("pasteToSelection"); }
47
* This is a "Part". It that does all the real work in a KPart
51
* @author Joseph WENNINGER <jowenn@bigfoot.com>
54
class KonqSidebarPart : public KParts::ReadOnlyPart
61
KonqSidebarPart(QWidget *parentWidget, QObject *parent, const QVariantList&);
66
virtual ~KonqSidebarPart();
68
virtual bool openUrl(const KUrl &url);
72
* This must be implemented by each part
74
KonqSidebarBrowserExtension * m_extension;
75
virtual bool openFile();
77
virtual void customEvent(QEvent* ev);
80
Sidebar_Widget *m_widget;
83
#endif // KONQSIDEBARPART_H