KFile
kfilebookmarkhandler_p.h
Go to the documentation of this file.
00001 /* This file is part of the KDE libraries 00002 Copyright (C) 2002 Carsten Pfeiffer <pfeiffer@kde.org> 00003 00004 library is free software; you can redistribute it and/or 00005 modify it under the terms of the GNU Library General Public 00006 License as published by the Free Software Foundation, version 2. 00007 00008 This library is distributed in the hope that it will be useful, 00009 but WITHOUT ANY WARRANTY; without even the implied warranty of 00010 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00011 Library General Public License for more details. 00012 00013 You should have received a copy of the GNU Library General Public License 00014 along with this library; see the file COPYING.LIB. If not, write to 00015 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00016 Boston, MA 02110-1301, USA. 00017 */ 00018 00019 #ifndef KFILEBOOKMARKHANDLER_H 00020 #define KFILEBOOKMARKHANDLER_H 00021 00022 #include <kbookmarkmanager.h> 00023 #include <kbookmarkmenu.h> 00024 00025 class KMenu; 00026 class KFileWidget; 00027 00031 class KFileBookmarkHandler : public QObject, public KBookmarkOwner 00032 { 00033 Q_OBJECT 00034 00035 public: 00036 KFileBookmarkHandler( KFileWidget *widget ); 00037 ~KFileBookmarkHandler(); 00038 00039 QMenu * popupMenu(); 00040 00041 // KBookmarkOwner interface: 00042 virtual QString currentUrl() const; 00043 virtual QString currentTitle() const; 00044 00045 KMenu *menu() const { return m_menu; } 00046 00047 public Q_SLOTS: 00048 void openBookmark(const KBookmark & bm, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers ); 00049 00050 Q_SIGNALS: 00051 void openUrl( const QString& url ); 00052 00053 private: 00054 void importOldBookmarks( const QString& path, KBookmarkManager *manager ); 00055 00056 KFileWidget *m_widget; 00057 KMenu *m_menu; 00058 KBookmarkMenu *m_bookmarkMenu; 00059 00060 private: 00061 class KFileBookmarkHandlerPrivate; 00062 KFileBookmarkHandlerPrivate *d; 00063 }; 00064 00065 00066 #endif // KFILEBOOKMARKHANDLER_H
KDE 4.6 API Reference