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

kiten/lib

Public Types | Public Member Functions | List of all members
EntryList Class Reference

#include <entrylist.h>

Inheritance diagram for EntryList:
Inheritance graph
[legend]

Public Types

typedef QListIterator< Entry * > EntryIterator
 

Public Member Functions

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

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 38 of file entrylist.h.

Member Typedef Documentation

typedef QListIterator<Entry*> EntryList::EntryIterator

A simple overridden iterator for working with the Entries.

Definition at line 44 of file entrylist.h.

Constructor & Destructor Documentation

EntryList::EntryList ( )

Basic constructor, create an empty EntryList.

Definition at line 71 of file entrylist.cpp.

EntryList::EntryList ( const EntryList &  old)

Copy constructor.

Definition at line 77 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 83 of file entrylist.cpp.

Member Function Documentation

void EntryList::appendList ( const EntryList *  other)

Append another EntryList onto this one.

Definition at line 306 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 99 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 323 of file entrylist.cpp.

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

Append another EntryList onto this one.

Definition at line 284 of file entrylist.cpp.

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

Copy an entry list.

Definition at line 298 of file entrylist.cpp.

int EntryList::scrollValue ( ) const

Definition at line 89 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 331 of file entrylist.cpp.

void EntryList::setScrollValue ( int  val)

Definition at line 94 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
sortOrderthe 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.
dictionaryOrderthe 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 271 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 230 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
startthe location in the list where we should start
lengththe length of the list we should generate

Definition at line 111 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
startthe location in the list where we should start
lengththe length of the list we should generate

Definition at line 200 of file entrylist.cpp.

QString EntryList::toString ( ) const

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

Definition at line 266 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
startthe location in the list where we should start
lengththe length of the list we should generate

Definition at line 238 of file entrylist.cpp.


The documentation for this class was generated from the following files:
  • entrylist.h
  • entrylist.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:42:54 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kiten/lib

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

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

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