~ubuntu-branches/ubuntu/warty/kdebase/warty

« back to all changes in this revision

Viewing changes to kate/app/kbookmarkhandler.h

  • Committer: Bazaar Package Importer
  • Author(s): LaMont Jones
  • Date: 2004-09-16 04:51:45 UTC
  • Revision ID: james.westby@ubuntu.com-20040916045145-9vr63kith3k1cpza
Tags: upstream-3.2.2
ImportĀ upstreamĀ versionĀ 3.2.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* This file is part of the KDE project
 
2
   Copyright (C) xxxx KFile Authors
 
3
   Copyright (C) 2002 Anders Lund <anders.lund@lund.tdcadsl.dk>
 
4
 
 
5
   This library is free software; you can redistribute it and/or
 
6
   modify it under the terms of the GNU Library General Public
 
7
   License version 2 as published by the Free Software Foundation.
 
8
 
 
9
   This library is distributed in the hope that it will be useful,
 
10
   but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
12
   Library General Public License for more details.
 
13
 
 
14
   You should have received a copy of the GNU Library General Public License
 
15
   along with this library; see the file COPYING.LIB.  If not, write to
 
16
   the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 
17
   Boston, MA 02111-1307, USA.
 
18
*/
 
19
 
 
20
#ifndef _KBOOKMARKHANDLER_H_
 
21
#define _KBOOKMARKHANDLER_H_
 
22
 
 
23
#include <kbookmarkmanager.h>
 
24
#include <kbookmarkmenu.h>
 
25
#include "katefileselector.h"
 
26
 
 
27
class QTextStream;
 
28
class KPopupMenu;
 
29
class KActionMenu;
 
30
 
 
31
class KBookmarkHandler : public QObject, public KBookmarkOwner
 
32
{
 
33
    Q_OBJECT
 
34
 
 
35
public:
 
36
    KBookmarkHandler( KateFileSelector *parent, KPopupMenu *kpopupmenu=0 );
 
37
    ~KBookmarkHandler();
 
38
 
 
39
    // KBookmarkOwner interface:
 
40
    virtual void openBookmarkURL( const QString& url ) { emit openURL( url ); }
 
41
    virtual QString currentURL() const;
 
42
 
 
43
    KPopupMenu *menu() const { return m_menu; }
 
44
 
 
45
signals:
 
46
    void openURL( const QString& url );
 
47
 
 
48
private slots:
 
49
    void slotNewBookmark( const QString& text, const QCString& url,
 
50
                          const QString& additionalInfo );
 
51
    void slotNewFolder( const QString& text, bool open,
 
52
                        const QString& additionalInfo );
 
53
    void newSeparator();
 
54
    void endFolder();
 
55
 
 
56
protected:
 
57
    virtual void virtual_hook( int id, void* data );
 
58
 
 
59
private:
 
60
    KateFileSelector *mParent;
 
61
    KPopupMenu *m_menu;
 
62
    KBookmarkMenu *m_bookmarkMenu;
 
63
 
 
64
    QTextStream *m_importStream;
 
65
 
 
66
    //class KBookmarkHandlerPrivate *d;
 
67
};
 
68
 
 
69
 
 
70
#endif // _KBOOKMARKHANDLER_H_