~ubuntu-branches/ubuntu/maverick/kdebase/maverick-updates

« back to all changes in this revision

Viewing changes to apps/konqueror/sidebar/sidebar_part.h

  • Committer: Bazaar Package Importer
  • Author(s): Debian Qt/KDE Maintainers, Martin Alfke, Modestas Vainius
  • Date: 2010-05-01 23:37:50 UTC
  • mfrom: (0.7.4 upstream) (0.4.4 experimental)
  • mto: This revision was merged to the branch mainline in revision 285.
  • Revision ID: james.westby@ubuntu.com-20100501233750-maq4i4sh8ymjbneb
Tags: 4:4.4.3-1
* New upstream release:
  - Konsole does not crash when closing a broken restored session.
    (Closes: #555831)
  - Konqueror does not crash when closing fast a tab. (Closes: #441298)

[Martin Alfke]
* Update of debian/copyright for kde 4.4

[ Modestas Vainius ]
* Bump kde-sc-dev-latest build dependency to 4.4.3.
* Confirm symbol files for 4.4.2 on hurd-i386 i386 ia64 kfreebsd-amd64
  kfreebsd-i386 mips powerpc s390 sparc.
* Release KDE SC 4.4.3 to unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/***************************************************************************
 
2
                               sidebar_part.h
 
3
                             -------------------
 
4
    begin                : Sat June 2 16:25:27 CEST 2001
 
5
    copyright            : (C) 2001 Joseph Wenninger
 
6
    email                : jowenn@kde.org
 
7
 ***************************************************************************/
 
8
 
 
9
/***************************************************************************
 
10
 *                                                                         *
 
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.                                   *
 
15
 *                                                                         *
 
16
 ***************************************************************************/
 
17
#ifndef KONQSIDEBARPART_H
 
18
#define KONQSIDEBARPART_H
 
19
 
 
20
#include <kparts/part.h>
 
21
#include <kparts/browserextension.h>
 
22
#include <QtCore/QPointer>
 
23
#include "sidebar_widget.h"
 
24
 
 
25
class KonqSidebarPart;
 
26
 
 
27
class KonqSidebarBrowserExtension : public KParts::BrowserExtension
 
28
{
 
29
    Q_OBJECT
 
30
public:
 
31
    KonqSidebarBrowserExtension(KonqSidebarPart *part, Sidebar_Widget *widget);
 
32
    ~KonqSidebarBrowserExtension(){}
 
33
 
 
34
protected:
 
35
    QPointer<Sidebar_Widget> widget;
 
36
 
 
37
    // The following slots are needed for konqueror's standard actions
 
38
    // They are called from the RMB popup menu
 
39
protected Q_SLOTS:
 
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"); }
 
44
};
 
45
 
 
46
/**
 
47
 * This is a "Part".  It that does all the real work in a KPart
 
48
 * application.
 
49
 *
 
50
 * @short Main Part
 
51
 * @author Joseph WENNINGER <jowenn@bigfoot.com>
 
52
 * @version 0.1
 
53
 */
 
54
class KonqSidebarPart : public KParts::ReadOnlyPart
 
55
{
 
56
    Q_OBJECT
 
57
public:
 
58
    /**
 
59
     * Default constructor
 
60
     */
 
61
    KonqSidebarPart(QWidget *parentWidget, QObject *parent, const QVariantList&);
 
62
 
 
63
    /**
 
64
     * Destructor
 
65
     */
 
66
    virtual ~KonqSidebarPart();
 
67
 
 
68
    virtual bool openUrl(const KUrl &url);
 
69
 
 
70
protected:
 
71
    /**
 
72
     * This must be implemented by each part
 
73
     */
 
74
    KonqSidebarBrowserExtension * m_extension;
 
75
    virtual bool openFile();
 
76
 
 
77
    virtual void customEvent(QEvent* ev);
 
78
 
 
79
private:
 
80
    Sidebar_Widget *m_widget;
 
81
};
 
82
 
 
83
#endif // KONQSIDEBARPART_H