• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • applications API Reference
  • KDE Home
  • Contact Us
 

Konsole

  • kde-4.14
  • applications
  • konsole
  • src
BookmarkHandler.h
Go to the documentation of this file.
1 /* This file was part of the KDE libraries
2 
3  Copyright 2002 Carsten Pfeiffer <pfeiffer@kde.org>
4  Copyright 2007-2008 Robert Knight <robertknight@gmail.com>
5 
6  library is free software; you can redistribute it and/or
7  modify it under the terms of the GNU Library General Public
8  License as published by the Free Software Foundation, version 2
9  or (at your option) any later version.
10 
11  This library is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  Library General Public License for more details.
15 
16  You should have received a copy of the GNU Library General Public License
17  along with this library; see the file COPYING.LIB. If not, write to
18  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19  Boston, MA 02110-1301, USA.
20 */
21 
22 // Born as kdelibs/kio/kfile/kfilebookmarkhandler.h
23 
24 #ifndef BOOKMARKHANDLER_H
25 #define BOOKMARKHANDLER_H
26 
27 // KDE
28 #include <KBookmarkManager>
29 
30 // Konsole
31 #include "konsole_export.h"
32 
33 class KMenu;
34 class KBookmarkMenu;
35 class KActionCollection;
36 
37 namespace Konsole
38 {
39 class ViewProperties;
40 
52 class KONSOLEPRIVATE_EXPORT BookmarkHandler : public QObject, public KBookmarkOwner
53 {
54  Q_OBJECT
55 
56 public:
65  BookmarkHandler(KActionCollection* collection , KMenu* menu, bool toplevel , QObject* parent);
66  ~BookmarkHandler();
67 
68  virtual QString currentUrl() const;
69  virtual QString currentTitle() const;
70  virtual bool enableOption(BookmarkOption option) const;
71  virtual bool supportsTabs() const;
72  virtual QList<QPair<QString, QString> > currentBookmarkList() const;
73  virtual void openFolderinTabs(const KBookmarkGroup& group);
74 
78  KMenu* menu() const {
79  return _menu;
80  }
81 
82  QList<ViewProperties*> views() const;
83  ViewProperties* activeView() const;
84 
85 public slots:
89  void setViews(const QList<ViewProperties*>& views);
90 
91  void setActiveView(ViewProperties* view);
92 
93 signals:
99  void openUrl(const KUrl& url);
100 
108  void openUrls(const QList<KUrl>& urls);
109 
110 private slots:
111  void openBookmark(const KBookmark& bm, Qt::MouseButtons, Qt::KeyboardModifiers);
112 
113 private:
114  QString titleForView(ViewProperties* view) const;
115  QString urlForView(ViewProperties* view) const;
116 
117  KMenu* _menu;
118  KBookmarkMenu* _bookmarkMenu;
119  QString _file;
120  bool _toplevel;
121  ViewProperties* _activeView;
122  QList<ViewProperties*> _views;
123 };
124 }
125 
126 #endif // BOOKMARKHANDLER_H
Konsole::BookmarkHandler::menu
KMenu * menu() const
Returns the menu which this bookmark handler inserts its actions into.
Definition: BookmarkHandler.h:78
konsole_export.h
Konsole::BookmarkHandler
This class handles the communication between the bookmark menu and the active session, providing a suggested title and URL when the user clicks the "Add Bookmark" item in the bookmarks menu.
Definition: BookmarkHandler.h:52
QObject
QString
QList
KBookmarkOwner
Konsole::ViewProperties
Encapsulates user-visible information about the terminal session currently being displayed in a view...
Definition: ViewProperties.h:44
Qt::MouseButtons
typedef MouseButtons
KONSOLEPRIVATE_EXPORT
#define KONSOLEPRIVATE_EXPORT
Definition: konsole_export.h:33
Qt::KeyboardModifiers
typedef KeyboardModifiers
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sat May 9 2020 03:56:27 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

Konsole

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

applications API Reference

Skip menu "applications API Reference"
  •   kate
  •       kate
  •   KTextEditor
  •   Kate
  • Konsole

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal