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

Konsole

BookmarkHandler.h

Go to the documentation of this file.
00001 /* This file was part of the KDE libraries
00002     
00003     Copyright 2002 Carsten Pfeiffer <pfeiffer@kde.org>
00004     Copyright 2007-2008 Robert Knight <robertknight@gmail.com>
00005 
00006     library is free software; you can redistribute it and/or
00007     modify it under the terms of the GNU Library General Public
00008     License as published by the Free Software Foundation, version 2 
00009     or (at your option) any later version.
00010 
00011     This library is distributed in the hope that it will be useful,
00012     but WITHOUT ANY WARRANTY; without even the implied warranty of
00013     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014     Library General Public License for more details.
00015 
00016     You should have received a copy of the GNU Library General Public License
00017     along with this library; see the file COPYING.LIB.  If not, write to
00018     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00019     Boston, MA 02110-1301, USA.
00020 */
00021 
00022 // Born as kdelibs/kio/kfile/kfilebookmarkhandler.h
00023 
00024 #ifndef KONSOLEBOOKMARKHANDLER_H
00025 #define KONSOLEBOOKMARKHANDLER_H
00026 
00027 // Qt
00028 #include <QtGui/QMenu>
00029 
00030 // KDE
00031 #include <KBookmarkManager>
00032 
00033 class KMenu;
00034 class KBookmarkMenu;
00035 class KBookmarkManager;
00036 class KActionCollection;
00037 
00038 namespace Konsole
00039 {
00040 
00041 class ViewProperties;
00042 
00054 class BookmarkHandler : public QObject, public KBookmarkOwner
00055 {
00056     Q_OBJECT
00057 
00058 public:
00059 
00067     BookmarkHandler( KActionCollection* collection , KMenu* menu, bool toplevel , QObject* parent );
00068     ~BookmarkHandler();
00069 
00070     QMenu * popupMenu();
00071 
00072     virtual QString currentUrl() const;
00073     virtual QString currentTitle() const;
00074     virtual bool enableOption(BookmarkOption option) const;
00075     virtual bool supportsTabs() const;
00076     virtual QList<QPair<QString,QString> > currentBookmarkList() const;
00077     virtual void openFolderinTabs(const KBookmarkGroup& group);
00078 
00082     KMenu *menu() const { return m_menu; }
00083 
00084     QList<ViewProperties*> views() const;
00085     ViewProperties* activeView() const;
00086 
00087 public slots:
00091     void setViews( const QList<ViewProperties*>& views );
00092 
00093     void setActiveView( ViewProperties* view );
00094 
00095 signals:
00102     void openUrl( const KUrl& url ); 
00103 
00111     void openUrls( const QList<KUrl>& urls );
00112 
00113 private Q_SLOTS:
00114     void openBookmark( const KBookmark & bm, Qt::MouseButtons, Qt::KeyboardModifiers );
00115 
00116 private:
00117     QString titleForView( ViewProperties* view ) const;
00118     QString urlForView( ViewProperties* view ) const;
00119 
00120     KMenu* m_menu;
00121     KBookmarkMenu* m_bookmarkMenu;
00122     QString m_file;
00123     bool m_toplevel;
00124     ViewProperties* m_activeView;
00125     QList<ViewProperties*> m_views;
00126 };
00127 
00128 }
00129 
00130 #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