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

kiten/lib

EntryList Class Reference

#include <EntryList.h>

Inheritance diagram for EntryList:

Inheritance graph
[legend]

List of all members.


Detailed Description

EntryList is a simple container for Entry objects, and is-a QList<Entry*> A few simple overrides allow you to deal with sorting and translating.

Definition at line 35 of file EntryList.h.


Public Types

typedef QListIterator< Entry * > EntryIterator

Public Member Functions

void appendList (const EntryList *)
void deleteAll ()
 EntryList (const EntryList &)
 EntryList ()
DictQuery getQuery () const
const EntryList & operator+= (const EntryList &)
const EntryList & operator= (const EntryList &)
int scrollValue () const
void setQuery (const DictQuery &)
void setScrollValue (int val)
void sort (QStringList &sortOrder, QStringList &dictionaryOrder)
QString toHTML (unsigned int start, unsigned int length) const
QString toHTML () const
QString toKVTML (unsigned int start, unsigned int length) const
QString toString (unsigned int start, unsigned int length) const
QString toString () const
virtual ~EntryList ()

Member Typedef Documentation

typedef QListIterator<Entry*> EntryList::EntryIterator

A simple overridden iterator for working with the Entries.

Definition at line 39 of file EntryList.h.


Constructor & Destructor Documentation

EntryList::EntryList (  ) 

Basic constructor, create an empty EntryList.

Definition at line 50 of file EntryList.cpp.

EntryList::EntryList ( const EntryList &  old  ) 

Copy constructor.

Definition at line 53 of file EntryList.cpp.

EntryList::~EntryList (  )  [virtual]

Basic Destructor, does not delete Entry* objects.

Please remember to call deleteAll() before deleting an EntryList

Definition at line 57 of file EntryList.cpp.


Member Function Documentation

void EntryList::appendList ( const EntryList *  other  ) 

Append another EntryList onto this one.

Definition at line 185 of file EntryList.cpp.

void EntryList::deleteAll (  ) 

Delete all Entry objects in our list.

In the future, we'll switch to a reference counting system, and this will be deprecated

Definition at line 65 of file EntryList.cpp.

DictQuery EntryList::getQuery (  )  const

Get the query that generated this list, note that if you have appended EntryLists from two different queries, the resulting DictQuery from this is undefined.

This method retrieves an earlier saved query in the EntryList, this should be the query that generated the list.

Definition at line 194 of file EntryList.cpp.

const EntryList & EntryList::operator+= ( const EntryList &  other  ) 

Append another EntryList onto this one.

Definition at line 171 of file EntryList.cpp.

const EntryList & EntryList::operator= ( const EntryList &  other  ) 

Copy an entry list.

Definition at line 179 of file EntryList.cpp.

int EntryList::scrollValue (  )  const

Definition at line 62 of file EntryList.cpp.

void EntryList::setQuery ( const DictQuery &  newQuery  ) 

Set the query for this list.

This allows us to save a query in the EntryList for later retrieval.

See getQuery() for a potential problem with this

Definition at line 200 of file EntryList.cpp.

void EntryList::setScrollValue ( int  val  ) 

Definition at line 63 of file EntryList.cpp.

void EntryList::sort ( QStringList &  sortOrder,
QStringList &  dictionaryOrder 
)

Sort the list according to the given fields in sortOrder, if dictionaryOrder is blank, don't order the list by dictionary, otherwise items are sorted by dictionary then by sortOrder aspects.

Parameters:
sortOrder the keys to sort by, this should be a list of fields to sort by, this should be the same as the fields that are returned from dictFile::listDictDisplayOptions(). "--NewLine--" entries will be ignored, "Word/Kanji", "Meaning", and "Reading" entries will be accepted. An entry which has an extended attribute is considered higher ranking (sorted to a higher position) than an entry which does not have such an attribute.
dictionaryOrder the order for the Entry objects to be sorted in, dictionary-wise. This should match the names of the dictionary objects, passed to the DictionaryManager

Definition at line 159 of file EntryList.cpp.

QString EntryList::toHTML ( unsigned int  start,
unsigned int  length 
) const

Convert a given range of the EntryList to a QString in HTML form and return it.

Parameters:
start the location in the list where we should start
length the length of the list we should generate

Definition at line 73 of file EntryList.cpp.

QString EntryList::toHTML (  )  const

Convert every element of the EntryList to a QString in HTML form and return it.

Definition at line 123 of file EntryList.cpp.

QString EntryList::toKVTML ( unsigned int  start,
unsigned int  length 
) const

Convert the entire list to KVTML for export to a flashcard app.

Parameters:
start the location in the list where we should start
length the length of the list we should generate

Definition at line 105 of file EntryList.cpp.

QString EntryList::toString ( unsigned int  start,
unsigned int  length 
) const

Convert a given range of the EntryList to a QString and return it.

Parameters:
start the location in the list where we should start
length the length of the list we should generate

Definition at line 130 of file EntryList.cpp.

QString EntryList::toString (  )  const

Convert every element of the EntryList to a QString and return it.

Definition at line 145 of file EntryList.cpp.


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

kiten/lib

Skip menu "kiten/lib"
  • Main Page
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

kdeedu

Skip menu "kdeedu"
  • kalzium
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  •   docs
  •   src
  • parley
  •   stepcore
Generated for kdeedu by doxygen 1.5.4
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