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

okteta

  • sources
  • kde-4.12
  • kdesdk
  • okteta
  • core
bookmarklist.h
Go to the documentation of this file.
1 /*
2  This file is part of the Okteta Core library, made within the KDE community.
3 
4  Copyright 2007,2009 Friedrich W. H. Kossebau <kossebau@kde.org>
5 
6  This library is free software; you can redistribute it and/or
7  modify it under the terms of the GNU Lesser General Public
8  License as published by the Free Software Foundation; either
9  version 2.1 of the License, or (at your option) version 3, or any
10  later version accepted by the membership of KDE e.V. (or its
11  successor approved by the membership of KDE e.V.), which shall
12  act as a proxy defined in Section 6 of version 3 of the license.
13 
14  This library is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17  Lesser General Public License for more details.
18 
19  You should have received a copy of the GNU Lesser General Public
20  License along with this library. If not, see <http://www.gnu.org/licenses/>.
21 */
22 
23 #ifndef OKTETA_BOOKMARKLIST_H
24 #define OKTETA_BOOKMARKLIST_H
25 
26 // lib
27 #include "bookmark.h"
28 // Qt
29 #include <QtCore/QLinkedList>
30 
31 template <class T> class QList;
32 
33 
34 namespace Okteta
35 {
36 
40 class BookmarkList : public QLinkedList<Bookmark>
41 {
42  public:
43  BookmarkList();
44  ~BookmarkList();
45 
46  public:
47  void addBookmark( const Bookmark &bookmark );
48  void addBookmarks( const QList<Okteta::Bookmark> &bookmarks );
49  void removeBookmark( const Bookmark &bookmark );
50  void removeBookmarks( const QList<Okteta::Bookmark> &bookmarks );
51  void setBookmark( unsigned int index, const Bookmark& bookmark );
52 
53  bool adjustToReplaced( Address offset, Size removedLength, Size insertedLength );
54  bool adjustToSwapped( Address firstPartStart, Address secondPartStart, Size secondPartLength );
55 
56  public:
57  // TODO: this function needs to be called with a valid offset, will return a reference to a zero pointer else
58  // want a reference for speed, perhaps need a global static dummy invalid bookmark
59  const Bookmark& bookmark( Address offset ) const;
60  bool contains( Address offset ) const;
61  using QLinkedList<Bookmark>::contains;
62  const Bookmark& at( unsigned int index ) const;
63  QList<Okteta::Bookmark> list() const;
64 };
65 
66 }
67 
68 #endif
Okteta::Address
qint32 Address
Definition: address.h:34
bookmark.h
Okteta::BookmarkList
Definition: bookmarklist.h:40
Okteta::BookmarkList::bookmark
const Bookmark & bookmark(Address offset) const
Definition: bookmarklist.cpp:177
Okteta::BookmarkList::removeBookmarks
void removeBookmarks(const QList< Okteta::Bookmark > &bookmarks)
Definition: bookmarklist.cpp:86
Okteta::Bookmark
Definition: bookmark.h:38
Okteta::BookmarkList::addBookmark
void addBookmark(const Bookmark &bookmark)
Definition: bookmarklist.cpp:34
Okteta::BookmarkList::removeBookmark
void removeBookmark(const Bookmark &bookmark)
Definition: bookmarklist.cpp:70
Okteta::BookmarkList::adjustToSwapped
bool adjustToSwapped(Address firstPartStart, Address secondPartStart, Size secondPartLength)
Definition: bookmarklist.cpp:131
QLinkedList
Okteta::BookmarkList::adjustToReplaced
bool adjustToReplaced(Address offset, Size removedLength, Size insertedLength)
Definition: bookmarklist.cpp:106
Okteta::BookmarkList::contains
bool contains(Address offset) const
Definition: bookmarklist.cpp:190
Okteta::BookmarkList::addBookmarks
void addBookmarks(const QList< Okteta::Bookmark > &bookmarks)
Definition: bookmarklist.cpp:64
Okteta::BookmarkList::list
QList< Okteta::Bookmark > list() const
Definition: bookmarklist.cpp:167
Okteta::BookmarkList::setBookmark
void setBookmark(unsigned int index, const Bookmark &bookmark)
Definition: bookmarklist.cpp:92
Okteta::Size
qint32 Size
Definition: size.h:33
Okteta::BookmarkList::BookmarkList
BookmarkList()
Definition: bookmarklist.cpp:32
Okteta::BookmarkList::~BookmarkList
~BookmarkList()
Definition: bookmarklist.cpp:222
QList
Definition: bookmarkable.h:29
Okteta::BookmarkList::at
const Bookmark & at(unsigned int index) const
Definition: bookmarklist.cpp:207
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:04:07 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

okteta

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

kdesdk API Reference

Skip menu "kdesdk API Reference"
  • kapptemplate
  • kcachegrind
  • kompare
  • lokalize
  • okteta
  • umbrello
  •   umbrello

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