Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

KeyList Class Reference

A represntation of keys used for a table. More...

#include </home/clem/local/src/opie/noncore/apps/tableviewer/db/common.h>

Inheritance diagram for KeyList:

Inheritance graph
[legend]
Collaboration diagram for KeyList:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 KeyList ()
 KeyList (const KeyList &)
 ~KeyList ()
bool operator!= (const KeyList &)
int getNumFields () const
int addKey (QString KeyName, TVVariant example)
int addKey (QString KeyName, TVVariant::KeyType type)
TVVariant getKeyExample (int) const
void setKeyExample (int, TVVariant e)
QString getKeyName (int i) const
void setKeyName (int i, const QString &n)
TVVariant::KeyType getKeyType (int i) const
void setKeyType (int i, TVVariant::KeyType)
int getKeyIndex (QString q) const
int getKeyFlags (int i) const
void setKeyFlags (int i, int flag)
bool checkNewFlag (int i) const
void setNewFlag (int i, bool f)
bool checkDeleteFlag (int i) const
void setDeleteFlag (int i, bool f)
bool validIndex (int) const

Detailed Description

A represntation of keys used for a table.

The KeyList class is used to store the representation of keys used in table headings by DBStore. It stores the names and types of the keys

Definition at line 175 of file common.h.


Constructor & Destructor Documentation

KeyList::KeyList  ) 
 

Constructs a KeyList

Definition at line 780 of file common.cpp.

References QPtrCollection::setAutoDelete(), and TRUE.

KeyList::KeyList const KeyList  ) 
 

Definition at line 786 of file common.cpp.

References QIntDictIterator< type >::current(), QIntDictIterator< type >::currentKey(), QIntDict< Key >::replace(), QPtrCollection::setAutoDelete(), and TRUE.

KeyList::~KeyList  ) 
 

Destroys a KeyList

Definition at line 800 of file common.cpp.


Member Function Documentation

int KeyList::addKey QString  KeyName,
TVVariant::KeyType  type
 

Definition at line 845 of file common.cpp.

References addKey(), QDate::currentDate(), TVVariant::Date, TVVariant::Int, oendl, owarn, TVVariant::String, and TVVariant::Time.

int KeyList::addKey QString  name,
TVVariant  example
 

Adds a new key to the KeyList

Parameters:
name the name of the new key
type the type of the new key

Definition at line 836 of file common.cpp.

References QIntDict< Key >::count(), QIntDict< Key >::find(), i, and QIntDict< Key >::replace().

Referenced by addKey(), DBXmlHandler::characters(), TableViewerWindow::newDocument(), TVKeyEdit::newTerm(), and DBCsv::openSource().

bool KeyList::checkDeleteFlag int  i  )  const
 

Definition at line 896 of file common.cpp.

References QIntDict< Key >::find().

bool KeyList::checkNewFlag int  i  )  const
 

Definition at line 882 of file common.cpp.

References QIntDict< Key >::find().

TVVariant KeyList::getKeyExample int   )  const
 

Definition at line 959 of file common.cpp.

References QIntDict< Key >::find().

int KeyList::getKeyFlags int  i  )  const
 

Definition at line 875 of file common.cpp.

References QIntDict< Key >::find().

int KeyList::getKeyIndex QString  q  )  const
 

Returns the index of the key with name q

Definition at line 975 of file common.cpp.

References QIntDictIterator< type >::current(), and QIntDictIterator< type >::currentKey().

Referenced by DBStore::getKeyIndex().

QString KeyList::getKeyName int  i  )  const
 

Returns the name of the key at index i

Definition at line 913 of file common.cpp.

References QIntDict< Key >::find().

Referenced by DBStore::getKeyName(), operator!=(), and TVBrowseKeyEntry::setTableState().

TVVariant::KeyType KeyList::getKeyType int  i  )  const
 

Returns the type of the key at index i

Definition at line 929 of file common.cpp.

References QIntDict< Key >::find(), and TVVariant::Invalid.

Referenced by TVBrowseKeyEntry::changeKeySlot(), DBStore::getKeyType(), operator!=(), TVBrowseKeyEntry::searchOnText(), and TVFilterKeyEntry::setKey().

int KeyList::getNumFields  )  const
 

Returns the number of keys stored in the KeyList

Definition at line 825 of file common.cpp.

References QIntDict< Key >::count().

Referenced by DBStore::getNumFields(), operator!=(), operator<<(), and TVKeyEdit::TVKeyEdit().

bool KeyList::operator!= const KeyList  ) 
 

Definition at line 804 of file common.cpp.

References QIntDictIterator< type >::current(), QIntDictIterator< type >::currentKey(), FALSE, getKeyName(), getKeyType(), getNumFields(), and TRUE.

void KeyList::setDeleteFlag int  i,
bool  f
 

Definition at line 903 of file common.cpp.

References QIntDict< Key >::find().

Referenced by TVKeyEdit::deleteTerm().

void KeyList::setKeyExample int  ,
TVVariant  e
 

Definition at line 966 of file common.cpp.

References QIntDict< Key >::find().

void KeyList::setKeyFlags int  i,
int  flag
 

Definition at line 869 of file common.cpp.

References QIntDict< Key >::find().

void KeyList::setKeyName int  i,
const QString n
 

Definition at line 920 of file common.cpp.

References QIntDict< Key >::find().

Referenced by TVKeyEdit::updateTerm().

void KeyList::setKeyType int  i,
TVVariant::KeyType 
 

Definition at line 936 of file common.cpp.

References QDate::currentDate(), TVVariant::Date, QIntDict< Key >::find(), TVVariant::Int, TVVariant::String, and TVVariant::Time.

Referenced by TVKeyEdit::updateTerm().

void KeyList::setNewFlag int  i,
bool  f
 

Definition at line 889 of file common.cpp.

References QIntDict< Key >::find().

bool KeyList::validIndex int   )  const
 

Definition at line 987 of file common.cpp.

References FALSE, QIntDict< Key >::find(), and TRUE.

Referenced by TVEditView::setData(), and TVKeyEdit::TVKeyEdit().


The documentation for this class was generated from the following files:
Generated on Sat Nov 5 17:37:39 2005 for OPIE by  doxygen 1.4.2