• Skip to content
  • Skip to link menu
KDE 4.0 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

Konsole

BookmarkHandler.h

Go to the documentation of this file.
00001 /* This file wass 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     or (at your option) any later version.
00008 
00009     This library is distributed in the hope that it will be useful,
00010     but WITHOUT ANY WARRANTY; without even the implied warranty of
00011     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012     Library General Public License for more details.
00013 
00014     You should have received a copy of the GNU Library General Public License
00015     along with this library; see the file COPYING.LIB.  If not, write to
00016     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00017     Boston, MA 02110-1301, USA.
00018 */
00019 
00020 // Born as kdelibs/kio/kfile/kfilebookmarkhandler.h
00021 
00022 #ifndef KONSOLEBOOKMARKHANDLER_H
00023 #define KONSOLEBOOKMARKHANDLER_H
00024 
00025 // Qt
00026 #include <QtGui/QMenu>
00027 
00028 // KDE
00029 #include <KBookmarkManager>
00030 
00031 class KMenu;
00032 class KBookmarkMenu;
00033 class KBookmarkManager;
00034 class KActionCollection;
00035 
00036 namespace Konsole
00037 {
00038 
00039 class ViewProperties;
00040 
00052 class BookmarkHandler : public QObject, public KBookmarkOwner
00053 {
00054     Q_OBJECT
00055 
00056 public:
00057 
00065     BookmarkHandler( KActionCollection* collection , KMenu* menu, bool toplevel , QObject* parent );
00066     ~BookmarkHandler();
00067 
00068     QMenu * popupMenu();
00069 
00070     virtual QString currentUrl() const;
00071     virtual QString currentTitle() const;
00072     virtual bool enableOption(BookmarkOption option) const;
00073     virtual bool supportsTabs() const;
00074     virtual QList<QPair<QString,QString> > currentBookmarkList() const;
00075     virtual void openFolderinTabs(const KBookmarkGroup& group);
00076 
00080     KMenu *menu() const { return m_menu; }
00081 
00082     QList<ViewProperties*> views() const;
00083     ViewProperties* activeView() const;
00084 
00085 public slots:
00089     void setViews( const QList<ViewProperties*>& views );
00090 
00091     void setActiveView( ViewProperties* view );
00092 
00093 signals:
00100     void openUrl( const KUrl& url ); 
00101 
00109     void openUrls( const QList<KUrl>& urls );
00110 
00111 private Q_SLOTS:
00112     void openBookmark( const KBookmark & bm, Qt::MouseButtons, Qt::KeyboardModifiers );
00113 
00114 private:
00115     QString titleForView( ViewProperties* view ) const;
00116     QString urlForView( ViewProperties* view ) const;
00117 
00118     KMenu* m_menu;
00119     KBookmarkMenu* m_bookmarkMenu;
00120     QString m_file;
00121     bool m_toplevel;
00122     ViewProperties* m_activeView;
00123     QList<ViewProperties*> m_views;
00124 };
00125 
00126 }
00127 
00128 #endif // KONSOLEBOOKMARKHANDLER_H

Konsole

Skip menu "Konsole"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • Konsole
  • Libraries
  •   libkonq
Generated for API Reference by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal