bookmarks_widget.h
Go to the documentation of this file.00001 /*************************************************************************** 00002 * Copyright (C) 2003 by Jens Dagerbo * 00003 * jens.dagerbo@swipnet.se * 00004 * * 00005 * This program is free software; you can redistribute it and/or modify * 00006 * it under the terms of the GNU General Public License as published by * 00007 * the Free Software Foundation; either version 2 of the License, or * 00008 * (at your option) any later version. * 00009 * * 00010 ***************************************************************************/ 00011 00012 #ifndef __BOOKMARKS_WIDGET_H__ 00013 #define __BOOKMARKS_WIDGET_H__ 00014 00015 00016 #include <qwidget.h> 00017 #include <qstring.h> 00018 //#include <qlistview.h> 00019 #include <qtooltip.h> 00020 00021 #include <klistview.h> 00022 00023 #include "bookmarks_part.h" 00024 00025 class BookmarksPart; 00026 class BookmarkItem; 00027 class BookmarksConfig; 00028 00029 class BookmarksWidget : public KListView, public QToolTip 00030 { 00031 Q_OBJECT 00032 00033 public: 00034 BookmarksWidget( BookmarksPart * ); 00035 ~BookmarksWidget(); 00036 00037 void update( QDict<EditorData> const & ); 00038 void updateURL( EditorData * ); 00039 bool removeURL( KURL const & ); 00040 00041 BookmarksConfig * config(); 00042 QStringList getContext( KURL const &, unsigned int ); 00043 00044 signals: 00045 void removeAllBookmarksForURL( const KURL & ); 00046 void removeBookmarkForURL( const KURL &, int ); 00047 00048 protected: 00049 void maybeTip( QPoint const & ); 00050 00051 private slots: 00052 void itemClicked( QListViewItem * ); 00053 void popupMenu( QListViewItem * , const QPoint & , int ); 00054 void collapseAll(); 00055 void expandAll(); 00056 void doEmitRemoveBookMark(); 00057 00058 private: 00059 void createURL( EditorData * ); 00060 00061 BookmarksPart * _part; 00062 BookmarkItem * _selectedItem; 00063 00064 // static CodeLineType _s_codeline; 00065 00066 friend class BookmarkItem; 00067 }; 00068 00069 00070 #endif 00071 00072 // kate: space-indent off; indent-width 4; tab-width 4; show-tabs off;