KDevelop API Documentation

BookmarksPart Class Reference

This plugin provides a navigation view for bookmarks and persistance to editor bookmarks so that it is possible to have bookmarks in files that are not open and that these bookmarks are saved with the project. More...

#include <bookmarks_part.h>

Inheritance diagram for BookmarksPart:

Inheritance graph
[legend]
Collaboration diagram for BookmarksPart:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 BookmarksPart (QObject *parent, const char *name, const QStringList &)
 ~BookmarksPart ()
void restorePartialProjectSession (const QDomElement *el)
 To restore any settings which differs from project to project, you can override this base class method to read in from a certain subtree of the project session file.
void savePartialProjectSession (QDomElement *el)
BookmarksConfigconfig ()
QStringList getContext (KURL const &url, unsigned int line, unsigned int context)

Private Slots

void partAdded (KParts::Part *part)
void marksEvent ()
void marksChanged ()
void reload ()
void removeAllBookmarksForURL (const KURL &)
void removeBookmarkForURL (const KURL &, int)
void insertConfigWidget (const KDialogBase *dlg, QWidget *page, unsigned int)

Private Member Functions

bool setBookmarksForURL (KParts::ReadOnlyPart *)
bool clearBookmarksForURL (KParts::ReadOnlyPart *)
void setBookmarksForAllURLs ()
EditorDatastoreBookmarksForURL (KParts::ReadOnlyPart *)
void storeBookmarksForAllURLs ()
void updateContextStringForURL (KParts::ReadOnlyPart *)
void updateContextStringForURL (KURL const &url)
void updateContextStringForAll ()
QStringList getContextFromStream (QTextStream &istream, unsigned int line, unsigned int context)
KParts::ReadOnlyPartpartForURL (KURL const &url)
bool partIsSane (KParts::ReadOnlyPart *)

Private Attributes

QGuardedPtr< BookmarksWidget_widget
QDict< EditorData_editorMap
bool _settingMarks
BookmarksConfig_config
ConfigWidgetProxy_configProxy
QTimer_marksChangeTimer
QValueList< KParts::ReadOnlyPart * > _dirtyParts

Detailed Description

This plugin provides a navigation view for bookmarks and persistance to editor bookmarks so that it is possible to have bookmarks in files that are not open and that these bookmarks are saved with the project.

Feature(s):
Provides a navigation view for bookmarks

Persists bookmarks between sessions

Author(s):
Jens Dagerbo aka teatime

Maintainer(s):
Jens Dagerbo aka teatime

Bug:
Pre KDE-3.2 / KDE-3.1.3, using source reformatting, or the ReplacePart will result in katepart messing up bookmarks (and breakpoints). There is no current workaround.

Requirement(s):
KDE >= 3.1.3

Definition at line 41 of file bookmarks_part.h.


Constructor & Destructor Documentation

BookmarksPart::BookmarksPart QObject parent,
const char *  name,
const QStringList
 

BookmarksPart::~BookmarksPart  ) 
 

Definition at line 88 of file bookmarks_part.cpp.

References _widget, KDevPlugin::mainWindow(), and KDevMainWindow::removeView().


Member Function Documentation

bool BookmarksPart::clearBookmarksForURL KParts::ReadOnlyPart  )  [private]
 

Definition at line 367 of file bookmarks_part.cpp.

References _settingMarks, KTextEditor::MarkInterface::marks(), and KTextEditor::MarkInterface::removeMark().

Referenced by setBookmarksForURL().

BookmarksConfig * BookmarksPart::config  ) 
 

Definition at line 560 of file bookmarks_part.cpp.

Referenced by BookmarkSettings::BookmarkSettings(), BookmarksWidget::config(), BookmarksWidget::maybeTip(), and BookmarkSettings::slotAccept().

QStringList BookmarksPart::getContext KURL const &  url,
unsigned int  line,
unsigned int  context
 

Definition at line 533 of file bookmarks_part.cpp.

References file, getContextFromStream(), KURL::isLocalFile(), kdDebug(), partForURL(), KURL::path(), and KTextEditor::EditInterface::text().

Referenced by BookmarksWidget::getContext().

QStringList BookmarksPart::getContextFromStream QTextStream istream,
unsigned int  line,
unsigned int  context
[private]
 

Definition at line 498 of file bookmarks_part.cpp.

References k_funcinfo, and kdDebug().

Referenced by getContext().

void BookmarksPart::insertConfigWidget const KDialogBase dlg,
QWidget page,
unsigned  int
[private, slot]
 

Definition at line 485 of file bookmarks_part.cpp.

References k_funcinfo, and kdDebug().

void BookmarksPart::marksChanged  )  [private, slot]
 

Definition at line 153 of file bookmarks_part.cpp.

References _dirtyParts, _widget, data, partIsSane(), storeBookmarksForURL(), updateContextStringForURL(), and KParts::ReadOnlyPart::url().

Referenced by partAdded().

void BookmarksPart::marksEvent  )  [private, slot]
 

Definition at line 136 of file bookmarks_part.cpp.

References _dirtyParts, _marksChangeTimer, and partIsSane().

Referenced by partAdded().

void BookmarksPart::partAdded KParts::Part part  )  [private, slot]
 

Definition at line 98 of file bookmarks_part.cpp.

References _editorMap, _widget, data, marksChanged(), marksEvent(), KURL::path(), reload(), setBookmarksForURL(), updateContextStringForURL(), and KParts::ReadOnlyPart::url().

KParts::ReadOnlyPart * BookmarksPart::partForURL KURL const &  url  )  [private]
 

Definition at line 463 of file bookmarks_part.cpp.

References KDevPlugin::partController(), and KParts::ReadOnlyPart::url().

Referenced by getContext(), removeAllBookmarksForURL(), removeBookmarkForURL(), and updateContextStringForURL().

bool BookmarksPart::partIsSane KParts::ReadOnlyPart  )  [private]
 

Definition at line 478 of file bookmarks_part.cpp.

References KDevPlugin::partController(), KParts::PartManager::parts(), KURL::path(), and KParts::ReadOnlyPart::url().

Referenced by marksChanged(), marksEvent(), and reload().

void BookmarksPart::reload  )  [private, slot]
 

Definition at line 122 of file bookmarks_part.cpp.

References partIsSane(), and setBookmarksForURL().

Referenced by partAdded().

void BookmarksPart::removeAllBookmarksForURL const KURL  )  [private, slot]
 

Definition at line 261 of file bookmarks_part.cpp.

References _editorMap, _widget, partForURL(), KURL::path(), and setBookmarksForURL().

Referenced by removeBookmarkForURL().

void BookmarksPart::removeBookmarkForURL const KURL ,
int 
[private, slot]
 

Definition at line 271 of file bookmarks_part.cpp.

References _editorMap, _widget, data, partForURL(), KURL::path(), removeAllBookmarksForURL(), and setBookmarksForURL().

void BookmarksPart::restorePartialProjectSession const QDomElement el  )  [virtual]
 

To restore any settings which differs from project to project, you can override this base class method to read in from a certain subtree of the project session file.

During project loading, respectively project session (.kdevses) loading, this method will be called to give a chance to adapt the part to the newly loaded project. For instance, the debugger part might restore the set breakpoints from the previous debug session for the certain project.

Note:
Take attention to the difference to common not-project-related session stuff. They belong to the application rc file (kdeveloprc)

Reimplemented from KDevPlugin.

Definition at line 181 of file bookmarks_part.cpp.

References _editorMap, _widget, data, setBookmarksForAllURLs(), and updateContextStringForAll().

void BookmarksPart::savePartialProjectSession QDomElement el  )  [virtual]
 

See also:
restorePartialProjectSession - This is the other way round, the same just for saving.

Reimplemented from KDevPlugin.

Definition at line 226 of file bookmarks_part.cpp.

References _editorMap.

void BookmarksPart::setBookmarksForAllURLs  )  [private]
 

Definition at line 430 of file bookmarks_part.cpp.

References KDevPlugin::partController(), KParts::PartManager::parts(), and setBookmarksForURL().

Referenced by restorePartialProjectSession().

bool BookmarksPart::setBookmarksForURL KParts::ReadOnlyPart  )  [private]
 

Definition at line 337 of file bookmarks_part.cpp.

References _editorMap, _settingMarks, KTextEditor::MarkInterface::addMark(), clearBookmarksForURL(), data, KURL::path(), and KParts::ReadOnlyPart::url().

Referenced by partAdded(), reload(), removeAllBookmarksForURL(), removeBookmarkForURL(), and setBookmarksForAllURLs().

void BookmarksPart::storeBookmarksForAllURLs  )  [private]
 

Definition at line 446 of file bookmarks_part.cpp.

References KDevPlugin::partController(), KParts::PartManager::parts(), and storeBookmarksForURL().

EditorData * BookmarksPart::storeBookmarksForURL KParts::ReadOnlyPart  )  [private]
 

Definition at line 392 of file bookmarks_part.cpp.

References _editorMap, data, KTextEditor::MarkInterface::marks(), and KParts::ReadOnlyPart::url().

Referenced by marksChanged(), and storeBookmarksForAllURLs().

void BookmarksPart::updateContextStringForAll  )  [private]
 

Definition at line 324 of file bookmarks_part.cpp.

References _editorMap, and updateContextStringForURL().

Referenced by restorePartialProjectSession().

void BookmarksPart::updateContextStringForURL KURL const &  url  )  [private]
 

Definition at line 319 of file bookmarks_part.cpp.

References partForURL(), and updateContextStringForURL().

void BookmarksPart::updateContextStringForURL KParts::ReadOnlyPart  )  [private]
 

Definition at line 300 of file bookmarks_part.cpp.

References _editorMap, data, KURL::path(), KTextEditor::EditInterface::textLine(), and KParts::ReadOnlyPart::url().

Referenced by marksChanged(), partAdded(), updateContextStringForAll(), and updateContextStringForURL().


Member Data Documentation

BookmarksConfig* BookmarksPart::_config [private]
 

Definition at line 98 of file bookmarks_part.h.

ConfigWidgetProxy* BookmarksPart::_configProxy [private]
 

Definition at line 100 of file bookmarks_part.h.

QValueList<KParts::ReadOnlyPart*> BookmarksPart::_dirtyParts [private]
 

Definition at line 103 of file bookmarks_part.h.

Referenced by marksChanged(), and marksEvent().

QDict<EditorData> BookmarksPart::_editorMap [private]
 

Definition at line 95 of file bookmarks_part.h.

Referenced by partAdded(), removeAllBookmarksForURL(), removeBookmarkForURL(), restorePartialProjectSession(), savePartialProjectSession(), setBookmarksForURL(), storeBookmarksForURL(), updateContextStringForAll(), and updateContextStringForURL().

QTimer* BookmarksPart::_marksChangeTimer [private]
 

Definition at line 102 of file bookmarks_part.h.

Referenced by marksEvent().

bool BookmarksPart::_settingMarks [private]
 

Definition at line 96 of file bookmarks_part.h.

Referenced by clearBookmarksForURL(), and setBookmarksForURL().

QGuardedPtr<BookmarksWidget> BookmarksPart::_widget [private]
 

Definition at line 94 of file bookmarks_part.h.

Referenced by marksChanged(), partAdded(), removeAllBookmarksForURL(), removeBookmarkForURL(), restorePartialProjectSession(), and ~BookmarksPart().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for KDevelop Version 3.1.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Mar 23 00:19:33 2005 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003