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

kjots

Bookshelf Class Reference

#include <bookshelf.h>

Inheritance diagram for Bookshelf:

Inheritance graph
[legend]

List of all members.


Public Slots

void nextBook ()
void nextPage ()
void onHeaderClick (int)
void prevBook ()
void prevPage ()

Public Member Functions

 Bookshelf (QWidget *)
KJotsBook * currentBook (void)
QString currentCaption (const QString &)
KJotsEntry * currentEntry (void)
KJotsPage * currentPage (void)
KJotsBook * currentTopLevelBook (void)
void DelayedInitialization (KActionCollection *)
bool dropMimeData (QTreeWidgetItem *, int, const QMimeData *, Qt::DropAction)
KJotsEntry * entryFromId (quint64)
void jumpToEntry (QTreeWidgetItem *)
void jumpToId (quint64)
QMimeData * mimeData (const QList< QTreeWidgetItem * >) const
QStringList mimeTypes () const
void prepareForExit (void)
void remove (QTreeWidgetItem *)
QList< KJotsEntry * > selected (void)
Qt::DropActions supportedDropActions () const

Protected Slots

void changeColor ()
void copyLinkAddress ()
void entryRenamed (QTreeWidgetItem *, int)
void itemWasCollapsed (QTreeWidgetItem *)
void itemWasExpanded (QTreeWidgetItem *)

Protected Member Functions

virtual void contextMenuEvent (QContextMenuEvent *)
virtual void dragEnterEvent (QDragEnterEvent *)
virtual void dragMoveEvent (QDragMoveEvent *)
void loadBooks (void)
void sortBook (QTreeWidgetItem *)

Protected Attributes

Qt::SortOrder sortOrder

Detailed Description

Definition at line 38 of file bookshelf.h.


Constructor & Destructor Documentation

Bookshelf::Bookshelf ( QWidget *  parent  )  [explicit]

Definition at line 49 of file bookshelf.cpp.


Member Function Documentation

void Bookshelf::changeColor (  )  [protected, slot]

Definition at line 637 of file bookshelf.cpp.

void Bookshelf::contextMenuEvent ( QContextMenuEvent *  event  )  [protected, virtual]

Definition at line 154 of file bookshelf.cpp.

void Bookshelf::copyLinkAddress (  )  [protected, slot]

Called when selected from the context menu.

Definition at line 567 of file bookshelf.cpp.

KJotsBook * Bookshelf::currentBook ( void   ) 

Returns a pointer to the currently selected book, or the book that owns the currently selected page.

Definition at line 508 of file bookshelf.cpp.

QString Bookshelf::currentCaption ( const QString &  sep  ) 

Returns a representation of the current selection.

Definition at line 611 of file bookshelf.cpp.

KJotsEntry * Bookshelf::currentEntry ( void   ) 

Returns a pointer to the currently selected page.

Definition at line 478 of file bookshelf.cpp.

KJotsPage * Bookshelf::currentPage ( void   ) 

Returns a pointer to the currently selected page.

Definition at line 492 of file bookshelf.cpp.

KJotsBook * Bookshelf::currentTopLevelBook ( void   ) 

Returns a pointer to the toplevel book that owns the currently selected book or page.

Definition at line 531 of file bookshelf.cpp.

void Bookshelf::DelayedInitialization ( KActionCollection *  actionCollection  ) 

Definition at line 70 of file bookshelf.cpp.

void Bookshelf::dragEnterEvent ( QDragEnterEvent *  event  )  [protected, virtual]

Definition at line 306 of file bookshelf.cpp.

void Bookshelf::dragMoveEvent ( QDragMoveEvent *  event  )  [protected, virtual]

Definition at line 317 of file bookshelf.cpp.

bool Bookshelf::dropMimeData ( QTreeWidgetItem *  parent,
int  index,
const QMimeData *  data,
Qt::DropAction  action 
)

Imports dropped data.

Reimplemented from QTreeWidget.

Definition at line 367 of file bookshelf.cpp.

KJotsEntry * Bookshelf::entryFromId ( quint64  id  ) 

Returns a pointer to the KJotsEntry with the given ID or 0 if none matches.

Parameters:
id The ID to look for.
Todo:
Should we optimize this by using a container?

Definition at line 218 of file bookshelf.cpp.

void Bookshelf::entryRenamed ( QTreeWidgetItem *  item,
int   
) [protected, slot]

Definition at line 465 of file bookshelf.cpp.

void Bookshelf::itemWasCollapsed ( QTreeWidgetItem *  item  )  [protected, slot]

Called when a book is closed/collapsed/whatever.

Definition at line 556 of file bookshelf.cpp.

void Bookshelf::itemWasExpanded ( QTreeWidgetItem *  item  )  [protected, slot]

Called when a book is opened/expanded/whatever.

Definition at line 545 of file bookshelf.cpp.

void Bookshelf::jumpToEntry ( QTreeWidgetItem *  item  ) 

Makes the given entry the new selection in the bookshelf.

Parameters:
item The entry to select.

Definition at line 249 of file bookshelf.cpp.

void Bookshelf::jumpToId ( quint64  id  ) 

Makes the given ID the new selection in the bookshelf.

Parameters:
id The ID to select.

Definition at line 237 of file bookshelf.cpp.

void Bookshelf::loadBooks ( void   )  [protected]

Loads all the books it can find in the appdata directory.

Warning:
Needless to say: this should only ever be called once. For reasons surpassing understanding, QTreeWidgetItems do not behave well when you construct a tree without first attaching them to a QTreeWidget. Hopefully, this will be fixed in a future version of Qt. Until then, we attach the books and create them first, then remove them, then reattach them in the correct order.

Definition at line 97 of file bookshelf.cpp.

QMimeData * Bookshelf::mimeData ( const QList< QTreeWidgetItem * >  items  )  const

Exports dropped data.

Definition at line 339 of file bookshelf.cpp.

QStringList Bookshelf::mimeTypes (  )  const

Indicate the mime types we handle.

Definition at line 299 of file bookshelf.cpp.

void Bookshelf::nextBook (  )  [slot]

Moves to the next book after the current selection.

Definition at line 658 of file bookshelf.cpp.

void Bookshelf::nextPage (  )  [slot]

Moves to the next page after the current selection.

Definition at line 711 of file bookshelf.cpp.

void Bookshelf::onHeaderClick ( int   )  [slot]

Definition at line 761 of file bookshelf.cpp.

void Bookshelf::prepareForExit ( void   ) 

Runs just before KJots is closed. Save your stuff!

Definition at line 192 of file bookshelf.cpp.

void Bookshelf::prevBook (  )  [slot]

Moves to the previous book before the current selection.

Definition at line 681 of file bookshelf.cpp.

void Bookshelf::prevPage (  )  [slot]

Moves to the previous page before the current selection.

Definition at line 734 of file bookshelf.cpp.

void Bookshelf::remove ( QTreeWidgetItem *  item  ) 

Remove the given entry from the bookshelf and delete it if necessary.

Definition at line 263 of file bookshelf.cpp.

QList< KJotsEntry * > Bookshelf::selected ( void   ) 

Return everything selected, but don't let a page of a book and a book both be in the list because then there would be duplication.

Definition at line 587 of file bookshelf.cpp.

void Bookshelf::sortBook ( QTreeWidgetItem *  book  )  [protected]

Definition at line 776 of file bookshelf.cpp.

Qt::DropActions Bookshelf::supportedDropActions (  )  const

Indicate the drop types we handle.

Definition at line 291 of file bookshelf.cpp.


Member Data Documentation

Qt::SortOrder Bookshelf::sortOrder [protected]

Definition at line 81 of file bookshelf.h.


The documentation for this class was generated from the following files:
  • bookshelf.h
  • bookshelf.cpp

kjots

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

kdepim

Skip menu "kdepim"
  • akonadi
  •   clients
  •   kabc
  •   kcal
  •   kcm
  • akregator
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt
  • kdgantt1
  • kjots
  • kleopatra
  • kmail
  • kmobiletools
  • knode
  • knotes
  • kontact
  • kontactinterfaces
  • korganizer
  •   korgac
  • kpilot
  • ktimetracker
  • libkdepim
  • libkholidays
  • libkleo
  • libkpgp
  • maildir
Generated for kdepim by doxygen 1.5.7
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